abap

Passing field-symbols into FORM

こ雲淡風輕ζ 提交于 2019-12-25 00:25:57
问题 I need to assign data field (component of another field symbol) to field-symbol in a several places of code. For the sake of reusability I decided to encapsulate this code in procedure, but I cannot understand how to pass field-symbols into this procedure. LOOP bseg ASSIGNING <bseg> ... PERFORM assigning USING <bseg> CHANGING <wrbtr>. ... ENDLOOP. FORM assigning USING <bseg> TYPE bseg CHANGING <wrbtr> TYPE bseg-wrbtr IF ... some logic here ASSIGN <bseg>-wrbtr TO <wrbtr>. ELSE ASSIGN <bseg>

ABAP Type mismatch using cl_salv_bs_runtime_info=>get_data_ref()

社会主义新天地 提交于 2019-12-24 23:50:21
问题 I found a solution here which I try to apply. cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false metadata = abap_false data = abap_true ). SUBMIT ('RM07MLBS') AND RETURN. DATA: lt_outtab TYPE STANDARD TABLE OF alv_t_t2. FIELD-SYMBOLS: <lt_outtab> like lt_outtab. DATA lo_data TYPE REF TO data. TRY. " get data from SALV model"  cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lo_data ). ASSIGN lo_data->* to <lt_outtab>. BREAK-POINT. CATCH cx_salv_bs_sc_runtime_info. ENDTRY.

SAP: Port-Number for msserv (RFC)

假如想象 提交于 2019-12-24 23:13:55
问题 How to determine the correct port for the msserv connection parameter? According to the docs of RfcOpenConnection : msserv is only needed, if the service of the message server is not defined as sapms in /etc/services. In my case I run a standard linux distribution with unmodified /etc/services file. This means I need the matching value for msserv . On one system I was lucky I tried 3600 and it worked. But on a second system this failed. I can connect to the system via SAP-GUI. How to

PM Order change status to TECO

旧时模样 提交于 2019-12-24 22:14:07
问题 Hello I want to change the status of a PM order to TECO. For that I am using the BAPI BAPI_ALM_ORDER_MAINTAIN . This is my code, but it doesn't work. What am I doing wrong? DATA: lt_alm_order_method TYPE TABLE OF bapi_alm_order_method, ls_alm_order_method TYPE bapi_alm_order_method. ls_alm_order_method-refnumber = '00001'. ls_alm_order_method-objecttype = 'HEADER'. ls_alm_order_method-method = 'TECHNICALCOMPLETE'. ls_alm_order_method-objectkey = '000000900085'. APPEND ls_alm_order_method TO

Get profit center/cost center from RBKP invoice receipt number

假如想象 提交于 2019-12-24 19:06:01
问题 how can I get the cost center, profit center? I am from RSEG and RBKP tables is there any other way to get those, i can't use vbseg tables cause the doc no. are stored in rseg and rbkp since i created the document using MIR7. please help. thanks 回答1: Firstly you should find accounting document number from invoice number (RBKP-BELNR). You can do this by two ways: Via reference key (AWKEY). You should concatenate fields BELNR and GJAHR and link this with BKPF-AWKEY. Another way to find this

cl_salv_bs_runtime_info=>get_data_ref() returns no data

核能气质少年 提交于 2019-12-24 14:23:55
问题 I have this code, which works very nice for a lot of reports: if IV_SELECTION_SET_VARIANT is INITIAL. SUBMIT (IV_REPORT_NAME) WITH SELECTION-TABLE selection_table AND RETURN. ELSE. SUBMIT (IV_REPORT_NAME) WITH SELECTION-TABLE selection_table USING SELECTION-SET IV_SELECTION_SET_VARIANT AND RETURN. endif. FIELD-SYMBOLS <lt_data> TYPE ANY TABLE. FIELD-SYMBOLS <lt_data_line> TYPE ANY TABLE. DATA lr_data TYPE REF TO data. DATA lr_data_line TYPE REF TO data. DATA lr_data_descr TYPE REF TO cl_abap

Suppress duplicated entries in a table

不问归期 提交于 2019-12-24 12:15:39
问题 How do i suppress duplicate entries in both classical (write) and ALV report? I was given a task to write a simple report with this criteria. I tried to google but could not succeed with any of their solutions and need help. Below is the expected result. original report: -------------------------------------- |Sales Org | Dist.Channel | Division | -------------------------------------- |1000 |10 |00 | |1000 |10 |00 | |1000 |10 |00 | |1020 |22 |00 | |1020 |22 |00 | ----------------------------

How to skip mandatory fields on ABAP

六眼飞鱼酱① 提交于 2019-12-24 11:54:17
问题 I want it to skip mandatory fields when i clicked on 'İptal' button . But i don't want to control mandatory fields without "obligatory" . I want to see check mark in textboxes like screenshot. Normally 'İptal' button calls a different screen when there is no mandatory fields. Note: Screens are standard selection screens. 回答1: What you need to do is have a function code assigned to the pushbutton on the screen that has the function type "Exit". Then you can use the event AT SELECTION-SCREEN ON

sap abap 流水号设置

☆樱花仙子☆ 提交于 2019-12-24 11:10:00
1.TCODE:SNRO,进入如图所示界面 2.   短文本和长文本用来说明这个编号范围对象,输入任意描述即可。   子对象数据元素我们这里不填。这里需要说明一下,所谓子对象,多数指一个组织结构,比如公司代码、销售组织、工厂等,这样编号就在对应的每个组织下面独立编号,最典型的例子是财务凭证,每个公司代码下的财务凭证都是独立编号的(其对应的数据表 BKPF,也必定把公司代码做为一个键字段)。而我们这个调度单对应于销售订单,销售订单没有按照组织级别分别编号,因此相应的调度单也就不需要了。 到期年标记是指编号按年度归零,每当开始一个新年度时,相应的编号也需要从头开始,比如财务凭证和物料凭证都是这样(比如表BKPF 和MKPF,都把年度做为一个键字段) ,而我们的调度单不需要对应年度,因此这里也不打勾。   编号长度域就填创建的域,但是一定要先激活。指定这个编号范围对象 YLBPP001的长度,我们定义域长度为 10,因此这个编号范围对象生成的编号长度也是 10 位。 无滚动是指如果编号达到最大,是否自动从头开始,勾上就不从头开始,而在获取编号的时候提示出错。我们这里应该打勾。    编号范围处理,属于翻译问题,实际就是编号范围的事务码,如果指定这个事务码,就可以不需要通过 SNUM 或者 SNRO 的主屏幕然后输入编号范围对象的名字来维护这个编号范围

What does the generate authorization process do and what is a Profile?

旧时模样 提交于 2019-12-24 08:13:52
问题 While trying to understand the Authorization concept in SAP, I came across the stage where an Authorization is 'generated' resulting in a profile number. Now I've the following questions: Q1. What is the meaning of 'generating' an authorization. What new does the button actually do because we already have allocated an authorization object to a class. I think this only should serve the purpose of allocating this authorization to a user? Q2. What is a profile? Thanks! 回答1: "Profiles" are the