2013 Sep 11 8:13 PM
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?
2013 Sep 11 10:00 PM
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
2013 Sep 12 4:11 AM
HI Karthi,
See the Below Link , This will solve the problem.
http://scn.sap.com/thread/153081
Hope it helps,
Regards,
Sivaganesh.k
2013 Sep 12 4:20 AM
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
2013 Sep 12 7:27 AM
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.
2013 Sep 12 8:43 AM
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
2013 Sep 13 5:47 AM
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