Application Development 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: 

submit with reuse_alv_grid_display does not work

ronaldo_aparecido
Contributor
0 Kudos

Hi guys

I use submit for standard program

cl_salv_bs_runtime_info=>set(
display = abap_false
metadata = abap_false
data = abap_true ).

SUBMIT rfitemgl USING SELECTION-SCREEN '1000' WITH sd_saknr IN sd_saknr
WITH sd_bukrs IN sd_bukrs
WITH pa_stida EQ pa_stida
WITH x_norm EQ abap_true
AND RETURN.

TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = gfs_zficag ).
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE text-001 TYPE c_e.
ENDTRY.

ASSIGN gfs_zficag->* TO <gft_zficag>.

I retrieve the data correctly but when i call reuse_alv_grig after the list is not showing and i cant call variant anymore.


Please see my code attached.code.txt

1 ACCEPTED SOLUTION

thkolz
Contributor

Can you try like this?

FIELD-SYMBOLS <fs_itab> TYPE STANDARD TABLE.

cl_salv_bs_runtime_info=>set(
    display  = abap_false
    metadata = abap_true
    data     = abap_true ).

SUBMIT xzy AND RETURN.

TRY.
    cl_salv_bs_runtime_info=>get_data_ref(
      IMPORTING r_data = DATA(alv_itab) ).

    ASSIGN stolen_alv_itab->* TO <fs_itab>.
    DATA(r_meta) = cl_salv_bs_runtime_info=>get_metadata( ).
  CATCH cx_root ##no_handler.
ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).
5 REPLIES 5

Sandra_Rossi
Active Contributor
0 Kudos

Please edit your question (Actions > Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!

thkolz
Contributor

Can you try like this?

FIELD-SYMBOLS <fs_itab> TYPE STANDARD TABLE.

cl_salv_bs_runtime_info=>set(
    display  = abap_false
    metadata = abap_true
    data     = abap_true ).

SUBMIT xzy AND RETURN.

TRY.
    cl_salv_bs_runtime_info=>get_data_ref(
      IMPORTING r_data = DATA(alv_itab) ).

    ASSIGN stolen_alv_itab->* TO <fs_itab>.
    DATA(r_meta) = cl_salv_bs_runtime_info=>get_metadata( ).
  CATCH cx_root ##no_handler.
ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).

0 Kudos
cl_salv_bs_runtime_info=>clear_all( ).

I really thank you very much, you saved my life. I have been working on same issue for last 5-6 hours

ronaldo_aparecido
Contributor

c12b61ded10b4e18beae75c3b6218d2c thanks the cl_salv_bs_runtime_info=>clear_all( ). solved my problem .


Thanks

Good that you indicated explicitly the important line of code that Thorsten added in his answer i.e. (as you say):

cl_salv_bs_runtime_info=>clear_all( ).