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: 

Issue in MB58 & MBLB

divsmart
Participant
0 Kudos

HI Experts,

I have an issue in Submit statement for MB5b and MBLB

1. MB5b data's are not getting (requirements as user enter only 'PLANT' details.
  IF intransit EQ 'X'. "VENDOR

CALL METHOD cl_salv_bs_runtime_info=>set
EXPORTING
display = abap_false
metadata = abap_false
data = abap_true.

SUBMIT rm07mlbb
* WITH lifnr EQ space
* WITH matnr EQ space
WITH werks IN r_ven
* WITH bukrs EQ ' '
WITH alv_def EQ '/D01'
WITH senul EQ ' '
VIA SELECTION-SCREEN .


TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_data ).
ASSIGN lr_data->* TO <lt_data>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'UNABLE TO RETRIEVE ALV DATA' TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).

CLEAR : lt_mblb[] , ls_mblb.
IF <lt_data> IS ASSIGNED.
LOOP AT <lt_data> ASSIGNING <ls_data>.
MOVE-CORRESPONDING <ls_data> TO ls_mblb.
APPEND ls_mblb TO lt_mblb.
CLEAR: ls_mblb, <ls_data>.
ENDLOOP.
ENDIF.
ENDIF.
For MBLB - Getting data but displaying in List view need an ALV grid. 
IF intransit EQ 'X'. "VENDOR

CALL METHOD cl_salv_bs_runtime_info=>set
EXPORTING
display = abap_false
metadata = abap_false
data = abap_true.

SUBMIT rm07mlbb
* WITH lifnr EQ space
* WITH matnr EQ space
WITH werks IN r_ven
* WITH bukrs EQ ' '
WITH alv_def EQ '/D01'
WITH senul EQ ' '
VIA SELECTION-SCREEN .


TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_data ).
ASSIGN lr_data->* TO <lt_data>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'UNABLE TO RETRIEVE ALV DATA' TYPE 'E'.
ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).

CLEAR : lt_mblb[] , ls_mblb.
IF <lt_data> IS ASSIGNED.
LOOP AT <lt_data> ASSIGNING <ls_data>.
MOVE-CORRESPONDING <ls_data> TO ls_mblb.
APPEND ls_mblb TO lt_mblb.
CLEAR: ls_mblb, <ls_data>.
ENDLOOP.
ENDIF.

ENDIF.

IF consignment EQ 'X'. "Customer
BREAK-POINT.
SUBMIT rm07mkon WITH werks IN r_cus
WITH kukns EQ 'X'
WITH lhgut EQ 'X'
WITH variant EQ ' '
WITH xmnul EQ ' '
AND RETURN.

TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_data1 ).
ASSIGN lr_data1->* TO <lt_data1>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'UNABLE TO RETRIEVE ALV DATA' TYPE 'E'.
ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).

CLEAR : lt_mb58[] , ls_mb58.
IF <lt_data1> IS ASSIGNED.
LOOP AT <lt_data1> ASSIGNING <ls_data1>.
MOVE-CORRESPONDING <ls_data1> TO ls_mb58.
APPEND ls_mb58 TO lt_mb58.
CLEAR: ls_mb58, <ls_data>.
ENDLOOP.
ENDIF.
ENDIF.
0 REPLIES 0