03-02-2015 9:53 AM
Hi All,
I have a requirement where in from selection screen after uploading a file an intermediate screen is callled in which the redords are displayed with check boxes. Now, If I go back from this screen to selection screen and upload a new file and execute, it still shows the old table values.
On debugging, I could see that the Start-Of-Selection is not triggered the second time and hence, no new data is populated.
I tried Leave screen, Leave to list processing..etc. but does not work.
Can you please let me know how can this be achieved?
Thanks.
03-02-2015 10:04 AM
Hi Dharmin,
use event "At selection-screen output" , and clear all parameters and refresh all select-options in it.
Regards
Shailendra Karada
03-02-2015 10:17 AM
Hi Dharmin,
Write your select query in event 'AT SELECTION-SCREEN OUTPUT'. So that your data in internal table will be refreshed every time the selection changes.
Thanks,
Sneha.
03-02-2015 2:55 PM
Hi Sneha , Shailendra,
But the intermediate screen appears based on the company code and document type entered in the selection screen and after uploading the file.
So, how will it trigger 'At selection screen output' after the inputs are provided on selection screen?
03-03-2015 7:10 AM
Hi Dharmin,
you have to clear all the parameters in at selection-screen output.
03-03-2015 7:12 AM
03-03-2015 1:31 PM
Hi Shailendra,
The parameters will get cleared in AT-selection screen output, but then, it does not trigger the start-of-selection event and hence nothing is performed and no data is pulled the second time.
03-03-2015 1:39 PM
03-03-2015 1:55 PM
Seems you have not correctly re-initialized data when calling again the selection-screen, if you cannot solve, the lazy solution is to execute a LEAVE TO CURRENT TRANSACTION.
Else give more information on how you coded the
If I go back from this screen to selection screen
Regards,
Raymond
03-03-2015 3:17 PM
Hi Shailendra / Raymond
The code is very big. I am adding the parts where i added my logic.
.
.
START-OF-SELECTION.
INCLUDE zsutsosi.
PERFORM table_formatting.
--->> under this form I am passing the data collected from the file uploaded, to the internal table to be displayed in the intermediate screen with check boxes
After this screen 0100 is called to display the alv
CALL SCREEN 0100.
.
.
MODULE USER_COMMAND_0100 INPUT.
gw_code = sy-ucomm.
CASE gw_code.
WHEN gc_canc OR gc_ext.
LEAVE PROGRAM.
WHEN gc_bck.
gcl_grid1->free( ).
gcl_custom_container->free( ).
CLEAR: gcl_grid1, gcl_custom_container.
CALL SELECTION-SCREEN 1000.
-->> When BACK is clicked from screen 0100, it calls the selection screen 1000.
Now, when i change the upload file and execute it again, the AT SELECTION-SCREEN events are triggered but not the START-OF-SELECTION and directly goes to MODULE USER_COMMAND_0100 INPUT and repeats with the old table values since, the processing did not happen for the new file.
This is how it is behaving when checked in debug mode. The entire code is way too large as I am making changes in an existing code and cannot paste it.
Please let me know if its sufficient as the main part is why the START-OF-SELECTION is not triggered the second time.
Thanks.
03-03-2015 3:46 PM
Hi Dharmin,
The functionality what you are expecting with your code will not happen.
When once START-OF-SELECTION triggers it will not trigger in the same session again. So make a change in your program for the OUTPUT FIELD.. like
AT SELECTION-SCREEN ON <FIELD> - here write the code as you needed.
Regards,
Rafi
03-04-2015 6:55 AM
Hi Rafi,
There is a block of code written where in the data from file is moved to an internal table. So this needs to be processed. If I code in the at selection screen on field block, how can the earlier block get processed? Moreover, after the ALV screen is called, it again needs to go back to the code line after the CALL SCREEN 0100 statement to further process the code. So then, will this be possible via At SELECTION SCREEN ON FIELD block?
03-04-2015 7:11 AM
So I suppose your program is a type "1" program. Calling a new screen 1000 will call add the new occurence of screen 1000 to dynpro stack, and not actually go back to selection-screen, you don't actually leave the current processing of START-OF-SELECTION, but you stack more dynpros (until dump cause to limit reached).
Replace the CALL SELECTION-SCREEN 1000. with a LEAVE TO SCREEN 0., or SET SCREEN 0., LEAVE SCREEN.. So you will left the dynpro 0100 processing and will reach next statement in START-OF-SELECTION event/form, which will trigger again the true SELECTION-SCREEN if you don't have WRITE statement or an explicit END-OF-SELECTION event.
Regards,
Raymond
03-04-2015 9:28 AM
Hi Raymond,
Using Leave Screen or Set screen leads to the further processing of the program, which should not happen when BACK button is pressed from the intermediate 0100 screen. It should go back to the selection screen and based on the inputs changed, it should again process the code.
I am not sure whether START-OF-SELECTION gets called more than once or not in a session. But if that's the case, then how can I trigger it again, or proceed in such a scenario?
Thanks.
03-04-2015 9:56 AM
Hi,
Initially first file data is moved to internal table and it is displayed in ALV. Now when you go back for processing a new file, your program has to pick and select a new file and execute the program then new file data has to be shown in the ALV.
Try to do this.
Write your functionality of picking the data from input file and passing the data to the ALV in F8 Functionality. Get Function Code of F8 and implement your code in it. By doing it every time when you F8 is executed then the data from the input file is picked and processed further.
Regards,
Rafi
12-19-2019 8:19 AM
I fixed this via define own transaction code. Then in the intermediate-screen's pai use leave to current transaction.
12-19-2019 8:22 AM
it is a 4 years old thread, I think the problem has been fixed or bypass 😉