ABAP 调用标准程序SALV并返回输出结果
程序员文章站
2022-06-23 14:50:37
SAP调用标准程序并返回标准程序的输出结果RFIDCN_BSAIS标准程序正常执行结果用代码调用RFIDCN_BSAIS,并取得输出结果DATA: LR_DATA TYPE REF TO DATA.FIELD-SYMBOLS : TYPE ANY TABLE .CLEAR LR_DATA.UNASSIGN .CL_SALV_BS_RUNTIME_INFO=>SET( EXPORTING DISPLAY...
SAP调用标准程序并返回标准程序的输出结果
RFIDCN_BSAIS标准程序正常执行结果
用代码调用RFIDCN_BSAIS,并取得输出结果存入<LT_RECEIVE>
DATA: LR_DATA TYPE REF TO DATA.
FIELD-SYMBOLS : <LT_RECEIVE> TYPE ANY TABLE .
CLEAR LR_DATA.
UNASSIGN <LT_RECEIVE>.
CL_SALV_BS_RUNTIME_INFO=>SET( EXPORTING DISPLAY = ABAP_FALSE "是否显示选择界面
METADATA = ABAP_FALSE "
DATA = ABAP_TRUE ). "
"调用程序并传值
SUBMIT RFIDCN_BSAIS
WITH SD_BUKRS = 'XXXX' "公司代码
WITH FSCKEY = 'LXCN'
WITH VERSN = 'LXCN'
WITH LANGU = '1'
WITH BILBJAHR = '2020'
WITH R-MONATE = '01'
WITH CILVJAHR = '2020'
WITH C-MONATE = '02'
AND RETURN.
TRY.
"获取返回数据
CL_SALV_BS_RUNTIME_INFO=>GET_DATA_REF( IMPORTING R_DATA = LR_DATA ).
"赋值数据
ASSIGN LR_DATA->* TO <LT_RECEIVE>.
"捕获异常
CATCH CX_SALV_BS_SC_RUNTIME_INFO.
MESSAGE 'Unable to retrieve ALV data! Please try other conditions.' TYPE 'E'.
ENDTRY.
*Receveive Table LT_RECEIVE
BREAK-POINT.
本文地址:https://blog.csdn.net/qq_30797051/article/details/109004211
上一篇: 《MSSQL2008基础教程》之五“企业管理器与日常维护”
下一篇: 7、数据表添加字段(三种方式)