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: 

Runtime error of GETWA_NOT_ASSIGNED using cl_salv_bs_runtime_info=>get_data_ref

vin_abap
Explorer
0 Kudos

My below code runs in foreground, but gives a dump in background.

SUBMIT rpuaud00 WITH lo_blg = 'X'
      WITH r_tclasa = 'X'
      WITH SELECTION-TABLE it_selection
    AND RETURN.

TRY.
    cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_pay_data ).
    ASSIGN lr_pay_data->* TO <lt_pay_data>.
  CATCH cx_salv_bs_sc_runtime_info.
    MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).
LOOP AT <lt_pay_data> ASSIGNING <lt_test>.
  MOVE-CORRESPONDING <lt_test> TO wa_list .
  APPEND wa_list TO it_list 
ENDLOOP.

-----------------------------

Runtime Errors GETWA_NOT_ASSIGNED

Field symbol has not yet been assigned.

You attempted to access an unassigned field symbol (data segment "-1").

-------------------

Kindly advise.

8 REPLIES 8

matt
Active Contributor
0 Kudos

Please in future use the "code" button when posting code. If copy pasting from an editor, using right-click paste as plain text.

I've done it for you this time. See how it makes your question more readable?

matt
Active Contributor
0 Kudos

Run in debug. Is lr_pay_data->* initial?

0 Kudos

Hi Matthew

Yup it is initial.

The cl_salv_bs_runtime_info is not fetching values when run in background mode.

hubert_heitzer
Contributor
0 Kudos

ALVs are used to communicate with users.
In background mode there are no users for a direct communication.
I think the system does not provide support for the (CONTROL?-)framework in background task..

Regards,

Hubert

0 Kudos

Any other ways to get the data read in bg?

0 Kudos
IF sy-batch EQ abap_true.
  " you do not need ALVs ;)
ENDIF.

0 Kudos

How to bring the data from 'rpuaud00' into my program?

vin_abap
Explorer
0 Kudos

I think the ' SUBMIT rpuaud00 ' itself is not working in the background