Hi experts.
I don't know why the list not defined. I need to pull up a list of storage bin. I used the LAGP table. But the list is unfortunately not defined.
Tell me what I did wrong.
FUNCTION ztest_sb_change_pbo. *"---------------------------------------------------------------------- *"*"Local Interface: *" CHANGING *" REFERENCE(RESOURCE) TYPE /SCWM/S_RSRC *"---------------------------------------------------------------------- DATA: ls_stbin TYPE lagp, ls_rsrc TYPE /scwm/rsrc. DATA: lt_stbin TYPE TABLE OF lagp. IF resource IS INITIAL. CALL FUNCTION '/SCWM/RSRC_RESOURCE_MEMORY' EXPORTING iv_uname = sy-uname CHANGING cs_rsrc = ls_rsrc. MOVE-CORRESPONDING ls_rsrc TO resource. ENDIF. SELECT * FROM lagp INTO TABLE lt_stbin WHERE lgnum = ls_rsrc-lgnum. CALL METHOD /scwm/cl_rf_bll_srvc=>init_listbox EXPORTING iv_fieldname = '/SCWM/S_RF_INQ_ST_BIN-LGPLA'. LOOP AT lt_stbin INTO ls_stbin. CALL METHOD /scwm/cl_rf_bll_srvc=>insert_listbox EXPORTING iv_fieldname = '/SCWM/S_RF_INQ_ST_BIN-LGPLA' iv_value = ls_stbin-lgpla. ENDLOOP. ENDFUNCTION.