Submit program with memory id
here simple example to submit program with memory id here you can import internal table and fetch the data
REPORT ZSUBMIT2.
DATA: S_VBELN TYPE RANGE OF VBELN WITH HEADER LINE,
gs_name1 type string.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false
metadata = abap_true data = abap_true ).
SUBMIT ZSUBMIT1 with r2 = 'X' AND RETURN.
import gs_name to gs_name1 from MEMORY id 'RKM'.
BREAK-POINT.
MESSAGE gs_name1 type 'I'.
WRITE: 'Hello'.
REPORT ZSUBMIT1.
PARAMETERS: r1 RADIOBUTTON GROUP r1,
r2 RADIOBUTTON GROUP r1,
gs_name type string.
*IF r1 is NOT INITIAL.
* MESSAGE 'You have submit r1 button' TYPE 'I'.
*ENDIF.
*
*IF r2 is NOT INITIAL.
* MESSAGE 'You have submit r1 button' TYPE 'I'.
*ENDIF.
gs_name = 'ROHAN PANDEY'.
export gs_name to MEMORY id 'RKM'.
EXPORT gt_final TO MEMORY ID 'RKM'.
IMPORT gt_final TO gt_final FROM MEMORY ID 'RKM'.
RK_DATE_LO = fkdat_low+6(4) && fkdat_low+0(2) && fkdat_low+3(2).
fkdat_high = fkdat_high+6(4) && fkdat_high+0(2) && fkdat_high+3(2).
IF fkdat_low IS NOT INITIAL.
s_fkdat-sign = 'I'.
s_fkdat-option = 'BT'.
s_fkdat-low = fkdat_low.
s_fkdat-high = fkdat_high.
APPEND s_fkdat.
ENDIF.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false
metadata = abap_true data = abap_true ).
SUBMIT rkprogram WITH s_bukrs = '2100'
WITH s_vkorg = '2100'
WITH s_fkdat IN s_fkdat
WITH r1 = 'X'
WITH c1 = 'X'
AND RETURN .
IMPORT gt_final TO gt_final FROM MEMORY ID 'RKM'.
EXPORT gt_final TO MEMORY ID 'RKM'.
REPORT ZSUBMIT2.
DATA: S_VBELN TYPE RANGE OF VBELN WITH HEADER LINE,
gs_name1 type string.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false
metadata = abap_true data = abap_true ).
SUBMIT ZSUBMIT1 with r2 = 'X' AND RETURN.
import gs_name to gs_name1 from MEMORY id 'RKM'.
BREAK-POINT.
MESSAGE gs_name1 type 'I'.
WRITE: 'Hello'.
REPORT ZSUBMIT1.
PARAMETERS: r1 RADIOBUTTON GROUP r1,
r2 RADIOBUTTON GROUP r1,
gs_name type string.
*IF r1 is NOT INITIAL.
* MESSAGE 'You have submit r1 button' TYPE 'I'.
*ENDIF.
*
*IF r2 is NOT INITIAL.
* MESSAGE 'You have submit r1 button' TYPE 'I'.
*ENDIF.
gs_name = 'ROHAN PANDEY'.
export gs_name to MEMORY id 'RKM'.
EXPORT gt_final TO MEMORY ID 'RKM'.
IMPORT gt_final TO gt_final FROM MEMORY ID 'RKM'.
RK_DATE_LO = fkdat_low+6(4) && fkdat_low+0(2) && fkdat_low+3(2).
fkdat_high = fkdat_high+6(4) && fkdat_high+0(2) && fkdat_high+3(2).
IF fkdat_low IS NOT INITIAL.
s_fkdat-sign = 'I'.
s_fkdat-option = 'BT'.
s_fkdat-low = fkdat_low.
s_fkdat-high = fkdat_high.
APPEND s_fkdat.
ENDIF.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false
metadata = abap_true data = abap_true ).
SUBMIT rkprogram WITH s_bukrs = '2100'
WITH s_vkorg = '2100'
WITH s_fkdat IN s_fkdat
WITH r1 = 'X'
WITH c1 = 'X'
AND RETURN .
IMPORT gt_final TO gt_final FROM MEMORY ID 'RKM'.
EXPORT gt_final TO MEMORY ID 'RKM'.
Comments
Post a Comment