Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

selection screen with multiple transactions transactions

k_gjergja
Participant
0 Likes
2,474

Hello ,

I have section screen ( rapport ) with several transaction. Each transaction is linked with deifferen selection screen .The screens are called in Initialisation event depending on choice of transaction. The problem is after one of selection screens is displayed standard tool buttons ( Back Exit and Cancel ) leads to execiton of the program.

I checked sy-ucomm and sscreen-ucomm but ther are not filled in.

After I hit one of those button the flow goes again i initialisation and than straight to start of selection event

Please advice how to get values of the button and get out of transaction instead to execute it

Thanks

1 ACCEPTED SOLUTION
Read only

DoanManhQuynh
Active Contributor
0 Likes
1,833

i dont understand your problem but i did try a simple code and it work as normal, what is your problem?

SELECTION-SCREEN BEGIN OF SCREEN 102.
SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE title1.
PARAMETERS: cityfr TYPE spfli-cityfrom,
            cityto TYPE spfli-cityto.
SELECTION-SCREEN END OF BLOCK sel1.
SELECTION-SCREEN END OF SCREEN 102.

SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECTION-SCREEN BEGIN OF BLOCK sel2
                          WITH FRAME TITLE title2.
PARAMETERS: airpfr TYPE spfli-airpfrom,
            airpto TYPE spfli-airpto.
SELECTION-SCREEN END OF BLOCK sel2.
SELECTION-SCREEN END OF SCREEN 500.

START-OF-SELECTION.
  CASE sy-tcode.
    WHEN 'tcode1'.
      title1 = 'Cities'.
      CALL SELECTION-SCREEN 102." STARTING AT 10 10.
    WHEN 'tcode2'.
      title2 = 'Airports'.
      CALL SELECTION-SCREEN 500.
    WHEN OTHERS.

  ENDCASE.

and for you to consider, you can use modify id to control the visible of parameter in selection screen, or you may create module pool which have 1 big screen with subscreen area and call subscreen based on transaction code.

5 REPLIES 5
Read only

k_gjergja
Participant
0 Likes
1,833

Hello,

sy-ucom and sscreen-ucomm are empty after I hit - back/exit/cance/ button on selection screen of transaction.

Flow just jumps over initialisation (which is normal as the screen is already initialised after transaction executed)

and goes straigh to start of selection

Read only

Former Member
0 Likes
1,833

Are you trying to come out of the second selection screen to the first.

i.e. Transaction ZTXN --> Selection screen A --> Initialization section of A --> Calls Selection Screen B --> Exit from B --> Calls Selection screen A.

Is the above the existing flow? Do you the Selection screen B --> Exit --> come fully out of the transaction?

Read only

k_gjergja
Participant
0 Likes
1,833

it goes like this

Initialisation

when trx A call select screen 001

when trx B call select screen 002

- once on a selection screen 001 before i put anything in selection fields

I want to get out of program or transaction.

Nothing has been selected at that moment just selection screen 001 is displayed

and user has ocasion to enter selction field or get out of transaction.- but exit/back and cancel

jumps start of selection.

Exit/back and cancel were working perfectlu befor I created different selection screens

for different transactions

Read only

DoanManhQuynh
Active Contributor
0 Likes
1,834

i dont understand your problem but i did try a simple code and it work as normal, what is your problem?

SELECTION-SCREEN BEGIN OF SCREEN 102.
SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE title1.
PARAMETERS: cityfr TYPE spfli-cityfrom,
            cityto TYPE spfli-cityto.
SELECTION-SCREEN END OF BLOCK sel1.
SELECTION-SCREEN END OF SCREEN 102.

SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECTION-SCREEN BEGIN OF BLOCK sel2
                          WITH FRAME TITLE title2.
PARAMETERS: airpfr TYPE spfli-airpfrom,
            airpto TYPE spfli-airpto.
SELECTION-SCREEN END OF BLOCK sel2.
SELECTION-SCREEN END OF SCREEN 500.

START-OF-SELECTION.
  CASE sy-tcode.
    WHEN 'tcode1'.
      title1 = 'Cities'.
      CALL SELECTION-SCREEN 102." STARTING AT 10 10.
    WHEN 'tcode2'.
      title2 = 'Airports'.
      CALL SELECTION-SCREEN 500.
    WHEN OTHERS.

  ENDCASE.

and for you to consider, you can use modify id to control the visible of parameter in selection screen, or you may create module pool which have 1 big screen with subscreen area and call subscreen based on transaction code.

Read only

k_gjergja
Participant
0 Likes
1,833

Hello ,

partial solution was this event

AT SELECTION-SCREEN ON EXIT-COMMAND.

leave program

But than, somehow, the "layout" button exit the program which was not acceptable

I did like Quynh Doan Manh ssuggested and deplaced creen cal from Initiation

to start of selection.

Now is workig properly

Thank you