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

Problem in refreshing parameter value

Former Member
0 Likes
643

Hi Friends,

I am executing a report and entering some data like 10 in the parameter field. executing it. output displayed. Now I am pressing back button and it is returning back to selection screen. Here 10 is by default in parameter field. I think some memory involvement is there to store this 10. Requirement is that when i press back button and the control return to the selection screen, parameter value should be blank.

Mukesh Kumar

4 REPLIES 4
Read only

Former Member
0 Likes
600

Hi,

Use Event AT-SELECTION-SCREEN OUTPUT.

In this event initialize your parameter field.

Hope this helps.

reward if helpful.

Regards

Sourabh Verma

Read only

JozsefSzikszai
Active Contributor
0 Likes
600

hi Mukesh,

add the following lines to your program:

INITIALIZATION.

CLEAR : parameter.

hope this helps

ec

Read only

0 Likes
600

Hi Eric,

I checked in the debugging mode when i am pressing the back button, control is going to initialization event here parameter value is 00.After this selection screen is getting displayed and here parameter value is 10.Some memory involvement will be there for storing this parameter value.

I am sending you my code.

REPORT demo_sel_screen_with_subscreen.

SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

SELECTION-SCREEN END OF SCREEN 400.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.

PARAMETERS: p1(10) TYPE c obligatory.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 100.

  • SUBSCREEN 2

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-020.

PARAMETERS:q2(10) TYPE c.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN END OF SCREEN 200.

  • SUBSCREEN 3

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-030.

PARAMETERS:r3(10) TYPE c.

SELECTION-SCREEN END OF BLOCK b3.

SELECTION-SCREEN END OF SCREEN 300.

  • STANDARD SELECTION SCREEN

SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-010.

PARAMETERS: intid like ZZFA_BAT_INTERF-intid OBLIGATORY modif id int.

SELECTION-SCREEN END OF BLOCK a1.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK sub FOR 10 LINES,

END OF BLOCK sub.

INITIALIZATION.

sub-prog = sy-repid.

sub-dynnr = 400.

clear intid.

*

AT SELECTION-SCREEN.

CASE intid.

WHEN 10.

sub-dynnr = 100.

WHEN 20.

sub-dynnr = 200.

WHEN 30.

sub-dynnr = 300.

ENDCASE.

AT SELECTION-SCREEN ON intid.

if intid = '16'.

MESSAGE 'Please enter valid interface key' TYPE 'E'.

endif.

START-OF-SELECTION.

WRITE 'hello'.

Read only

Former Member
0 Likes
600

in code for user command "BACK"

u can write ...

LEAVE TO TRANSACTION sy-tcode.

this will call same transaction refreshing all parameters..

Reward points if useful...

Regards,

Sachin