Skip to Content
avatar image
Former Member

Regarding Leave Transcation

Hi,

I created a Z set and maintaining entries in GS02 and I assigned one transaction to this Z set and by skiping first screen.

So when i execute the Z transaction it should directly go to GS02 ( values entering screen ).

The below is the code i added inmy report.

REPORT zrmm_mdr_ifast

NO STANDARD PAGE HEADING LINE-SIZE 255.

SET PARAMETER ID 'GSE' FIELD 'ZRMM_MDR_IFAST'.

CALL TRANSACTION 'GS02' AND SKIP FIRST SCREEN.

now my requirement is after saving entries i wil be getting " Set ZRMM_MDR_IFAST has been saved" after thsi information it should go to SAP Easy acces screen.

Leave to screen , set screen is not working .

Help me on this.

Regards,

Priya.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 23, 2010 at 09:05 AM

    You can use a workaround:

    data ls_bdcdata type bdcdata.
    data lt_bdcdata type table of bdcdata.
    define d.
      CLEAR ls_bdcdata.
      ls_bdcdata-program = '&1'.
      ls_bdcdata-dynpro  = '&2'.
      ls_bdcdata-dynbegin = '&3'.
      APPEND ls_bdcdata TO lt_bdcdata.
    end-of-definition.
    define f.
      CLEAR ls_bdcdata.
      ls_bdcdata-fnam = '&1'.
      ls_bdcdata-fval = '&2'.
      APPEND ls_bdcdata TO lt_bdcdata.
    end-of-definition.
    
    " fill BDC data
    d SAPMGSBM  0105  X. "initial screen
    f BDC_CURSOR  RGSBM-SHORTNAME.
    f BDC_OKCODE  /00.
    f RGSBM-SHORTNAME ZRMM_MDR_IFAST. "set name
    d SAPMGSBM  0105  X. "initial screen
    f BDC_OKCODE  /EBACK.
    f BDC_CURSOR  RGSBM-SHORTNAME.
    
    DATA ls_option TYPE ctu_params.
    DATA lt_msg TYPE TABLE OF bdcmsgcoll.
    DATA ls_msg TYPE bdcmsgcoll.
    ls_option-dismode = 'E'. "no dialog
    CALL TRANSACTION 'GS02'
          USING lt_bdcdata OPTIONS FROM ls_option 
          MESSAGES INTO lt_msg.
    

    It uses the synchronisation principle of batch input: it stops when the BDC data screen is different from the displayed screen, and batch input restarts when the displayed screen corresponds to the BDC data screen.

    Here above, we restart the batch input when the initial screen is displayed again.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2010 at 08:15 AM

    Hi Priya,

    Did You try leave program.

    Regards,

    Birendra

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2010 at 08:35 AM

    From the code you have posted you are calling GS02 & displaying its screens.

    Now after your operation in complete in GS02 you want to exit back to the initial screen. You cannot achieve this by using SET SCREEN, LEAVE TO TRANSACTION ( and other similar trxns.) in the calling program.

    Hope i am clear.

    BR,

    Suhas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2010 at 08:46 AM

    Hi ,

    Try LEAVE TO SCREEN 0.

    or Leave program.

    Regards,

    Uma Dave

    Add comment
    10|10000 characters needed characters exceeded