‎2012 Apr 25 9:07 AM
Hi All,
I have a requirement I have to display a screen say '1000' screen number of my module pool program and before navigating to the next screen I have to upload an excel sheet and using the data from excel sheet I have to display data on second screen say '2000' screen number.
What I am trying is I have created another report with selection screen asking for the file to be uploaded and from there through SET/GET Parameter ID I am importing Data from Excel Sheet to my module pool. I have used SUBMIT 'ZPROGRAM' in module pool to call that report program.
But how should I come back to the second screen '2000' after getting the data, how should I return to my code in module pool PBO after the statement SUBMIT 'ZPROGRAM'. I tried using CALL SCREEN 2000, but it says DYNPRO 2000 does not exist.
Thanks & Regards,
Chandni Sharma.
‎2012 Apr 25 9:13 AM
Dear Chandini Sharma,
Why are you writing a separate program just to upload data from excel ???
Instead you can design a screen of your own and display it as a popup to the user, which has a text field for the file path to be entered and a button, upon clicking the button, data will be uploaded to your program and from there you may do your processing and then call screen 2000 to display the data.
Anyways, if you still want to continue with your approach then try using submit.. and return statement, here after submiting the report control will comback to the program that has submitted it.
Hope it helps. For further clarifications or suggestions feel free to revert. Thank you.
Regards,
kartik
‎2012 Apr 25 9:13 AM
Dear Chandini Sharma,
Why are you writing a separate program just to upload data from excel ???
Instead you can design a screen of your own and display it as a popup to the user, which has a text field for the file path to be entered and a button, upon clicking the button, data will be uploaded to your program and from there you may do your processing and then call screen 2000 to display the data.
Anyways, if you still want to continue with your approach then try using submit.. and return statement, here after submiting the report control will comback to the program that has submitted it.
Hope it helps. For further clarifications or suggestions feel free to revert. Thank you.
Regards,
kartik
‎2012 Apr 25 9:49 AM
Thank you for your Quick Response Kartik, but I did try using Module Pool but I was not able to find a way for it to ask for the file to be uploaded. I created a field in module pool of type RLGRAP-FILENAME but how to request for the for the filepath since there is no search help attached to it how should I get that request pop up for the file, and we cannot use selection screen that is why I was using this method.
And in report program I tried using Return but still it comes back to the module pool to the submit statement and leaves the program after that it is not moving on to the next statement that is the problem I am facing.
‎2012 Apr 25 9:54 AM
Thanks Kartik, I used the FM 'WS_FILENAME_GET' and filled that field with the value I get from this FM. Thanks a lot.
‎2012 Apr 25 9:59 AM
Dear Chandini,
If you have placed a field for file name on your screen then for F4 help you can do the following -
1. In the PAI section you have to use the following event
PROCESS ON VALUE-REQUEST.
FIELD p_file MODULE p_f4_help.
2. In the module p_f4_help you may use the function module 'F4_FILENAME'.
As of your problem submit and return should work, please check in debugging why it is not working.
Thanks and regards,
kartik
‎2012 Apr 25 10:02 AM
I do not need that field, even without that It just asks for the filename and gets me the data from the excel. That is all I needed. Thank you for your Help.
‎2012 Apr 25 10:06 AM
Hi,
Have you used fm F4_FILENAME? http://scn.sap.com/thread/1841061
Also, I think you should go with the suggestion of .
Instead you can design a screen of your own and display it as a popup to the user, which has a text field for the file path to be entered and a button, upon clicking the button, data will be uploaded to your program and from there you may do your processing and then call screen 2000 to display the data.
For your problem,
but how to request for the for the filepath since there is no search help attached to it how should I get that request pop up for the file, and we cannot use selection screen that is why I was using this method.
you should add a button and for PAI of that button used fm F4_FILENAME , and so upon clicking that button data will be uploaded to your program then do processing then call screen 2000 and display your processed data.
Regards,
Jake.