2023 Sep 27 8:11 AM
Hi All,
In program_1, I am using the following code for submit program_2:
cl_salv_bs_runtime_info=>set(
exporting display = abap_false
metadata = abap_true
data = abap_true ).
submit (v_program_2)
with free selections texpr
with selection-table i_select
and return.
In program_2, I am using submit to program_3 with similar code.
When running program_1, the program will stop on the alv display of program_2 and can not receive data from memory.
How to solve this problem?
2023 Oct 05 5:31 AM
Thank you all for comment and answer.
Finally, I can solve this problem by myself.
After get data from program_3, cl_salv_bs_runtime_info=>clear_all() for clear alv data of program_3 and before display data to alv for program_2, I set cl_salv_bs_runtime_info again.
cl_salv_bs_runtime_info=>set(
exporting display = abap_false
metadata = abap_true
data = abap_true ).
So, program_1 can get data from submit of program_2 without displayed alv of program_2.
2023 Sep 27 8:37 AM
2023 Sep 30 8:03 PM
It's a good workaround, but I think that it's best to use cl_salv_bs_runtime_info as far as possible. So, understand first why the called program ignores cl_salv_bs_runtime_info, then I guess the best workaround can be found.
2023 Sep 28 3:11 PM
It's something specific to (V_PROGRAM_2) which seems to deactivate the feature.
If you run on a test program, it should work. Try to see by debug of CL_SALV_BS_RUNTIME_INFO why there's a difference between the test program and (V_PROGRAM_2).
2023 Sep 28 4:19 PM
Check if the program_3 use a call of cl_salv_bs_runtime_info=>clear_all() or similar method that would deactivate the handling of ALV events?
NB: The class use memory id cl_salv_bs_runtime_info=>c_memid_info to pass information, so a recursive call may not be allowed/handled.
2023 Oct 02 2:21 AM
Yes, in program_2, I used cl_salv_bs_runtime_info=>clear_all() after submit program_3.
Any solution for solve that problem?
2023 Oct 02 8:47 AM
In fact, by using cl_salv_bs_runtime_info=>clear_all(), you prevent cl_salv_bs_runtime_info from continuing to run.
The called program should check in memory whether it has already been called with cl_salv_bs_runtime_info (check the contents of the memory identifier cl_salv_bs_runtime_info=>c_memid_info with cl_salv_bs_runtime_info=>get) and save the contents before calling the class a second time, and restore it to its previous value after receiving the data).
2023 Sep 30 1:07 PM
SUBMIT zzh99cwtr0 "ZZRPMENUSTART00
WITH pnppernr IN r_pernrfor example above code return data into memory and make sure to memory id must be unique .
2023 Sep 30 8:03 PM
It's a good workaround, but I think that it's best to use cl_salv_bs_runtime_info as far as possible. So, understand first why the called program ignores cl_salv_bs_runtime_info, then I guess the best workaround can be found.
2023 Oct 02 2:25 AM
sandra.rossi,
In program_2. I used cl_salv_bs_runtime_info=>clear_all() after submit program_3.
Any solution for solve that problem?
2023 Oct 02 7:42 AM
I can't reproduce your case, you are not precise enough, so as I said you should make sure that it works well in simple case, then tri to debug CL_SALV_BS_RUNTIME_INFO why it stops working in the special case of program_2 and program_3, I'm pretty sure you don't do it correctly.
2023 Oct 02 7:45 AM
If you say you do "clear_all" right before doing a "get*", I hope you can understand that it's normal you get nothing.
2023 Oct 05 5:31 AM
Thank you all for comment and answer.
Finally, I can solve this problem by myself.
After get data from program_3, cl_salv_bs_runtime_info=>clear_all() for clear alv data of program_3 and before display data to alv for program_2, I set cl_salv_bs_runtime_info again.
cl_salv_bs_runtime_info=>set(
exporting display = abap_false
metadata = abap_true
data = abap_true ).
So, program_1 can get data from submit of program_2 without displayed alv of program_2.
2023 Oct 05 11:51 AM
-1 just because I think that Raymond answer is much more useful answer for future visitors. The problem is not about the number of programs called, it's just because you used "clear_all" which of course has reset the preceding calls.
2023 Oct 06 2:33 AM
sandra.rossi
If I don't use "clear_all" then I can't use alv for program_2 because alv still use by program_3.
So, I set the alv again with two conditions: