‎2010 Feb 02 4:12 AM
hi all,
i have 5 pushbutton in selection screen and after clicking every pushbutton i am using submit statement to submit another program, after click of 5 pushbuttons i assigned 5 diffrenet flag before submit statement and i want to use that flag value inside the submit statement but problem is that flag value is not transferring inside the submit statement.
can anyone please help me?
code :
SELECTION-SCREEN : begin of BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN : skip 1,
pushbutton 25(30) a2 user-command SKU, "SKU Interface(IDOC)
skip 2,
pushbutton 25(30) a3 user-command VM, "Vendor Master(IDOC)
skip 2,
pushbutton 25(30) a4 user-command CC, "Cost Change(IDOC)
skip 2,
pushbutton 25(30) a5 user-command PO, "PO Interface(IDOC)
skip 2,
pushbutton 25(30) a6 user-command GM, "Goods Movement(IDOC)
skip 1.
SELECTION-SCREEN : end of BLOCK b1.
AT SELECTION-SCREEN.
case sy-ucomm.
when 'SKU'.
GV_FLG = GC_FLG1.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN .
when 'VM'.
GV_FLG = GC_FLG2.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
when 'CC'.
GV_FLG = GC_FLG3.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
when 'PO'.
GV_FLG = GC_FLG4.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
when 'GM'.
GV_FLG = GC_FLG5.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
endcase.
regards.
kindly help.
‎2010 Feb 02 4:41 AM
Hi Saurabh,
You can use ABAP memory inorder to transfer data in such case.
IN the current code that you have provided, make use of EXPORT statement inorder to save it to ABAP memory . And to fetch the value in the program ZMMR0320_03 use IMPORT statement in the program ZMMR0320_03.
current program :
case sy-ucomm.
when 'SKU'.
EXPORT GC_FLG1
TO MEMORY ID 'flag1'.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN .
when 'VM'.
EXPORT GC_FLG1
TO MEMORY ID 'flag2'.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
and so on...
In the program ZMMR0320_03 use IMPORT as follows :
IMPORT lv_flag1 FROM MEMORY ID 'flag1'.
IMPORT lv_flag2 FROM MEMORY ID 'flag2'.
‎2010 Feb 02 4:26 AM
Hi,
Try to use the IMPORT/EXPORT statement to pass the flag into submit program.
‎2010 Feb 02 4:31 AM
hi niraj thanx for reply....
can u please tell me in detail?
regards.
‎2010 Feb 02 4:46 AM
Hi,
Try to use the EXPORT statement i n ur main program.
EXPORT variable TO memory ID 'FLAG_DATA'.
in the submitted program try to use.
IMPORT Variable FROM MEMORY ID 'FLAG_DATA'.
‎2010 Feb 02 4:31 AM
Hi,
You have an option to use the SUBMIT statement this way,
SUBMIT rfitemar AND RETURN WITH dd_kunnr = wa_tab1-kunnr
WITH dd_bukrs = p_bukrs
WITH x_opsel = 'X'
WITH pa_stida = wf_keydt
VIA SELECTION-SCREEN.
hope this helps you,
Let me know if you need further help.
Regards,
Abhijit G. Borkar
‎2010 Feb 02 4:36 AM
hi abhijit...
thanx for reply...... i used this statement but value is not transfered in submitted program.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN with GV_FLG = GC_FLG1 and return.
plz help.
‎2010 Feb 02 4:45 AM
GV_FLG has to be there in the selection-screen, if it is not there then the value will not be passed.
For example look at this program 'rfitemar' open it in SE38,
Press F1 on the radio button'Open items' and note the screen-field name it's 'X_OPSEL' so i have passed in the submit report
X_OPSEL = 'x'.
This is the way we have to do it, please check in your case.
Regards,
Abhijit G. Borkar
‎2010 Feb 02 4:41 AM
Hi Saurabh,
You can use ABAP memory inorder to transfer data in such case.
IN the current code that you have provided, make use of EXPORT statement inorder to save it to ABAP memory . And to fetch the value in the program ZMMR0320_03 use IMPORT statement in the program ZMMR0320_03.
current program :
case sy-ucomm.
when 'SKU'.
EXPORT GC_FLG1
TO MEMORY ID 'flag1'.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN .
when 'VM'.
EXPORT GC_FLG1
TO MEMORY ID 'flag2'.
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
and so on...
In the program ZMMR0320_03 use IMPORT as follows :
IMPORT lv_flag1 FROM MEMORY ID 'flag1'.
IMPORT lv_flag2 FROM MEMORY ID 'flag2'.
‎2010 Feb 02 5:12 AM
hello vasuki & niraj,
thanx for reply...i m using below statement but still not getting data in Export statement.
plz help.
CONSTANTS: gc_flg1(8) type c value 'MTYP_SKU',
gc_flg2(7) type c value 'MTYP_VM'.
data : gv_flg(8) type c.
SELECTION-SCREEN : begin of BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN : skip 1,
pushbutton 25(30) a2 user-command SKU,
skip 2,
pushbutton 25(30) a3 user-command VM,
SELECTION-SCREEN : end of BLOCK b1.
AT SELECTION-SCREEN.
case sy-ucomm.
when 'SKU'.
EXPORT GC_FLG1 TO MEMORY ID 'GV_FLG'. " Not getting data here in GV_FLG
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
when 'VM'.
EXPORT GC_FLG2 TO MEMORY ID 'GV_FLG'. " Not getting data here in GV_FLG
SUBMIT ZMMR0320_03 VIA SELECTION-SCREEN.
ENDCASE.
then i used IMPORT lv_flg FROM MEMORY ID 'GV_FLG' in submitted program.
plz correct me.
regards.
‎2010 Feb 02 5:26 AM
Hi,
I guess you are looking the variable defined as GV_FLG.
but when you are passing the value to the memory ID it will get stored into the ABAP memory not into the variable.
So check into the debugging mode... the sy-subrc after the EXPORT statement and then check the variable LV_FLG into the submitted program.