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

go to same selection screen with same values when user clicks on back button of selection screen after selection screen dynamically changes .

Former Member
0 Likes
3,164

Hi   my requirement is i have given some values on selection screen fields. after click on execute button on selection screen. some processing will be happened in side of program, then files will be created in al11. then selection screen dynamically changes with status 'success' and path and file name will be displayed on selection screen.  After that when user clicks on back button then it should come with same fields values on selection screen.  there is no report output and nothing there of grid.   only thing if file is successfully created or not  then selection screen will be dynamically changes with status is 'success' or 'error' and file details displayed. but when user wants when clicks back button on selection screen after selection screen dynamically changes then selection scrren fields should be same values.  How should i solve this pbm?

6 REPLIES 6
Read only

Former Member
0 Likes
2,244

Hi Kartik,

If 'am not wrong, you are changing the Selection screen fields as 'Success' and displaying the paths, after the execution of the report?

If so, Export the selection screen fields values to SAP memory, and when the user presses the 'Back' button, Import it back from the memory and fill he Selection screen fields.

Hope this will help you.

Thanks & Regards

Read only

sivaganesh_krishnan
Contributor
0 Likes
2,244

HI Karthi,

See the Below Link , This will solve the problem.

http://scn.sap.com/thread/153081

Hope it helps,

Regards,

Sivaganesh.k

Read only

Former Member
0 Likes
2,244

Hi Kartik,

the first requirment is simple, as Manu said, set SAP memory or handle ' at selection screen output' event is OK.

but " when user wants when clicks back button on selection screen after selection screen dynamically changes then selection scrren fields should be same values. " , this is difficult to implement, except you create another screen to be called in this program.

Maybe have other solution, hope i can help you.

Regards,

Archer

Read only

Former Member
0 Likes
2,244

Hi karthik,

As of my knowledge,i  tried your requirement through the following sample program.. Check it once it is useful to u.

REPORT  ZCC.

DATA:
       lv_file                  type string.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETERS: p_fpath      TYPE ibipparms-path OBLIGATORY,   "Input file path
             p_logf       TYPE string OBLIGATORY,           "Log file path
             p_trun       AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.

*For getting F4 Help to p_fpath.
*For getting F4 Help to p_fpath.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath.
   CALL FUNCTION 'F4_FILENAME'
     IMPORTING
       file_name = p_fpath.

START-OF-SELECTION.
lv_file = p_fpath.
WRITE:/ lv_file.
MESSAGE 'Success' TYPE 'S'.
set PF-STATUS 'ZSAT'.

at USER-COMMAND.
   CASE  sy-ucomm.
     when 'BACK'.
       submit ZCC VIA SELECTION-SCREEN.
   ENDCASE.


initial selection screen

And then execute the report.It displays the following screen with our custom back button.


And then click on back button it goes to our selection screen. and it contains the given input values.


Read only

0 Likes
2,244

Hi Lakshmi, Thanks for earlist response . selection screen is dynamically changes when user clicks excute buttom on seletion screen. then same selection screen is coming with dynamic changes. up to dynamic changes on same selection screen is working fine.when user clicks on back button  after dynamic chages was happened of same selection screen  then  it should  come to same values of selection screen . Could you please tell me how to solve this one? Regards Karthik

Read only

Former Member
0 Likes
2,244

hi,

the basic is that we write all the validation codes for the selecction screen parameter under the event

at selection screen, u can use at selection screen on block and also for individual fields.

This will be the first event trigerred before going to start of selection where ur actual process will start.

So if any errors are found it wont proceed to start of selection and displays the messge in the selection screen itself.

So if u r using oops concept then u can call the funciton to create the file in  at selection screen and display what ever message u want to. You can make this method static so that you dont have to create any object in the at selection screen