Application Development 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: 

Re:Function

Former Member
0 Kudos

Hi,

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN'FC01'.

CALL SELECTION-SCREEN 123 STARTING AT 20 5.

WHEN 'CRET'.------1)

CALL SELECTION-SCREEN 132 STARTING AT 19 10 ending at 100 10.

WHEN 'CRET'. -


2)

perform get_data.

ENDCASE.

The problem is when i click screen 132 execute it is always going to screen123 ,means only first CRET function is working but it is not going to second CRET, how to do this?

3 REPLIES 3

former_member226234
Contributor
0 Kudos

Hi,

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN'FC01'.

CALL SELECTION-SCREEN 123 STARTING AT 20 5.

WHEN 'CRET'.------1)

CALL SELECTION-SCREEN 132 STARTING AT 19 10 ending at 100 10.

perform get_data.

ENDCASE.

Use appropriate condionalising (using IF statements, flags) to meet your requirement.

Regards,

Sandeep.

0 Kudos

Hi Sandeep,

when i click the second screen execute again it will go to

CASE sscrfields-ucomm.

so the first CRET is only displayed all the time,it is coming recursively , i kept flags n conditions also

0 Kudos

check the value of <b>sy-dynnr</b> to know which selection-screen has triggered the AT SELECTION SCREEN event

AT SELECTION-SCREEN

IF sy-dynnr EQ '0132'.

CASE sy-ucomm.

WHEN 'CRET'.

perform get_data.

ENDCASE.

ELSEIF sy-dynnr EQ '0123'.

CASE sy-ucomm.

WHEN 'CRET'.

CALL SELECTION-SCREEN 123....

ENDCASE.

ENDIF.