ABAP-调用MB52取数

 1 FIELD-SYMBOLS: <fs_datas1> TYPE ANY TABLE.
 2 DATA:los_data TYPE REF TO data.
 3 
 4 cl_salv_bs_runtime_info=>set( display = '' metadata = '' data = 'X' ).
 5 
 6 "SUMBIT 程序名 WITH 条件
 7 SUBMIT rm07mlbs WITH matnr IN r_matnr
 8             WITH werks IN s_werks
 9             WITH lgort IN s_lgort
10             WITH charg IN r_charg
11             WITH matart-low = ''
12             WITH matart-high = ''
13             WITH matkla-low = ''
14             WITH matkla-high = ''
15             WITH ekgrup-low = ''
16             WITH ekgrup-high = ''
17             WITH pa_sond = 'X'
18             WITH so_sobkz-low = 'E'
19             WITH so_sobkz-high = ''
20             WITH negativ = ''
21             WITH xmchb = 'X'
22             WITH nozero = 'X'
23             WITH novalues = ''
24             WITH pa_hsq = ''
25             WITH pa_flt = 'X'
26             WITH p_vari = lv_vari
27             AND RETURN.
28 
29 TRY.
30 
31     FREE los_data.
32     cl_salv_bs_runtime_info=>get_data_ref(
33        IMPORTING r_data = los_data ).
34     IF los_data IS BOUND .
35       ASSIGN los_data->* TO <fs_datas1>.
36       "gt_datas为存数据的内表
37       MOVE-CORRESPONDING <fs_datas1> TO gt_datas .
38     ENDIF.
39   CATCH cx_salv_bs_sc_runtime_info.
40 
41 ENDTRY.
42 
43 CALL METHOD cl_salv_bs_runtime_info=>clear_all.
posted @ 2023-08-17 09:32  TigerMan  阅读(159)  评论(0编辑  收藏  举报