cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Leave Transcation

former_member212001
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

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.

former_member212001
Participant
0 Kudos

Rossi ,

Its working fine.

Thanks a lot for your reply.

Regards,

Priya.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

Try LEAVE TO SCREEN 0.

or Leave program.

Regards,

Uma Dave

former_member212001
Participant
0 Kudos

Hi All,

Leave Program,

leave to Screen 0 are also not working .

Any other way ??

Regards

Priya .

Former Member
0 Kudos

What it is doing currently ? where is the control getting returned.

Regards,

Uma

SuhaSaha
Advisor
Advisor
0 Kudos

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

birendra_chatterjee
Active Participant
0 Kudos

Hi Priya,

Did You try leave program.

Regards,

Birendra