01-25-2013 7:06 AM
Hello All,
I have a z program in which I'm using BDC to populate values and call MR22 Transaction 2nd screen. My issue is after clicking on SAVE button on MR22 transaction, its comes back to my zprogram, which is not what i want. I need to show the first screen of MR22 transaction only. Is there a way to achieve this ?
I've already tried using these two solution, which I saw in another forum:
1) Either there is an intermediate COMMIT WORK which stops the CALL TRANSACTION (solution is then to use OPTIONS FROM <structure> and set <structure>-RACOMMIT = 'X' (request to not stop the CALL TRANSACTION if a COMMIT WORK is reached)
2) or the program detects that the transaction is called using CALL TRANSACTION and reacts differently. If the program tests SY-BINPT, then you may run the program use OPTIONS FROM <structure> and set <structure>-NOBINPT = 'X'). If the program tests other things (SY-CPROG, SY-CALLD, etc.), then the only possiblity is probably a modification of the standard!
But, it still doesn't satisfy my scenario.
Regards.
01-25-2013 7:32 AM
Hi,
After your Call Transaction you write
IF SY-SUBRC EQ 0.
CALL TRANSACTION 'TCODE'.
ENDIF.
Thanks,
Mani
01-25-2013 7:15 AM
Hi Roshini,
Why dont you record your BDC accordingly and run the BDC program or call the transaction after the BDC is complete?
With regards,
01-25-2013 7:19 AM
Hello Naveen,
I've done the recording, but the user wants to see screen 2 of MR22 with the values I populated using BDC, and then they want to click the save button on MR22 screen. After that, they want to return to MR22 screen 1 and not come back to my program.
Regards.
01-25-2013 7:17 AM
Hi,
If u r tying with Leave to transaction,then use SET SCREEN 0.
try this & revert back.
Thanks
Gourav.
01-25-2013 7:24 AM
01-25-2013 7:18 AM
Hi Roshni,
Please do the recording for the T_code MR22 (only those screen which u want to display) .
Recording must in the process as u want it to be displayed.
Please follow the pattern of data in the recording when it generates a technical data.
e.g code :-
FORM GET_PROGRAM_STATUS .
Data wa_objects TYPE x_objects.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
DATA it_msg TYPE TABLE OF bdcmsgcoll.
LOOP AT i_objects INTO wa_objects.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSLIN'.
bdcdata_wa-dynpro = '0100'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'RSLIN-X_WOO'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CHEC'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'RSLIN-PROGRAM'.
bdcdata_wa-fval = wa_objects-object_name.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPMSSY0'.
bdcdata_wa-dynpro = '0120'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=BACK'.
APPEND bdcdata_wa TO bdcdata_tab.
ENDLOOP.
CALL TRANSACTION 'SLIN' USING bdcdata_tab
MODE 'A'
UPDATE 'S'
MESSAGES INTO it_msg.
ENDFORM. " GET_PROGRAM_STATUS
Hope it will help u .....
01-25-2013 7:31 AM
Hello Amit,
Using the above code, Its actually asking every time to press enter till i reach MR22 screen
And even after that, on clicking save, its coming back to calling program. I even tried using MODE = E.
Regards.
01-25-2013 7:36 AM
01-25-2013 7:18 AM
Keep RACOMMIT space so the SAVE or EXIT of the called transaction will get back to the caller program, but set NOBIEND to ''X'. (ref OPTIONS FROM opt)
Regards,
Raymond
01-25-2013 7:36 AM
01-25-2013 7:32 AM
Hi,
After your Call Transaction you write
IF SY-SUBRC EQ 0.
CALL TRANSACTION 'TCODE'.
ENDIF.
Thanks,
Mani
01-25-2013 7:47 AM
01-25-2013 7:43 AM
Hi Roshni ,
Please show the code snippets it will be better to understand from that ....