‎2021 Sep 20 6:56 AM
Hi,
I am trying to fetch the data from customized zreport (ZMB5B) with is a copy of standard report ZMB5B. Now I am using the SUBMIT statement to fetch the data but my submit statement gets failed. Can anyone please tell me how to rectify or find the solution to this issue.
I have mentioned the code which i was used below.
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_false
data = abap_true ).
SUBMIT yrm07mlbd WITH matnr IN matnr
WITH bukrs IN bukrs
WITH werks IN werks
WITH lgort IN lgort
WITH mtart IN mtart
WITH matkl IN matkl
WITH charg IN charg
WITH bwtar IN bwtar
WITH bwart IN bwart
WITH sobkz EQ sobkz
WITH budat IN datum
WITH bwbst-bwbst EQ 'X'
WITH xsum-pa_sumfl EQ 'X'
WITH xselk-pa_dbstd EQ 'X' EXPORTING LIST TO MEMORY
AND RETURN.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = lt_item ).
ASSIGN lt_item->* TO <lt_item>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'UNABLE TO RETRIEVE DATA' TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
IF <lt_item> IS ASSIGNED.
ENDIF.
‎2021 Sep 20 6:59 AM
Do you have an error message ? why do you said it fails ?
‎2021 Sep 20 7:08 AM
Again somebody who did a copy of a standard report, that's really something to never do! I think that's a large consensus among many ABAP developers nowadays, especially in the forum.
NB: rm07mlbd is a 6.000 lines program, so it's really not a good idea to duplicate it.
‎2021 Sep 20 7:09 AM
Impossible to help you, YRM07MLBD is a custom program, don't know what it contains.
‎2021 Sep 20 10:14 AM
1. Never ever ever copy a standard program. If you inherited it, then you have my sympathies.
2. Without explaining the error, how do you expect anyone to help you? "gets failed" is not an error condition I recognise!
‎2021 Sep 20 2:11 PM
Error means not fetching the data from the another report.
‎2021 Sep 20 2:13 PM
exporting to memory and ALV getdata together?
‎2021 Sep 20 3:58 PM
Try to remove the 'EXPORTING LIST TO MEMORY' in the SUBMIT statement, Not sure if it is compatible with cl_salv_bs_runtime_info which already prevent the display.
Also you can get more information on the error
SUBMIT rm07mlbd WITH matnr IN matnr
WITH bukrs IN bukrs
WITH werks IN werks
WITH lgort IN lgort
WITH mtart IN mtart
WITH matkl IN matkl
WITH charg IN charg
WITH bwtar IN bwtar
WITH bwart IN bwart
WITH sobkz EQ sobkz
WITH budat IN datum
WITH bwbst-bwbst EQ abap_true
WITH xsum-pa_sumfl EQ abap_true
WITH xselk-pa_dbstd EQ abap_true " removed text
AND RETURN.
" Replace
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'UNABLE TO RETRIEVE DATA' TYP
" with
CATCH cx_salv_bs_sc_runtime_info INTO oref.
text = oref->get_text( ).
MESSAGE text TYPE 'E'.
‎2021 Sep 21 7:40 AM
Thanks Raymond ,
Mentioned above SUBMIT statement has been working fine does not through any error. when I debug the submit statement it is giving SY-SUBRC = 0. but the problem here i am facing is that the SUBMIT which i have used for ZMB5B (yrm07mlbd) program is not fetching the values or records. Please help out to find the solution to overcome.
Thanks,
Senthil.G
‎2021 Sep 21 9:13 AM
Your program yrm07mlbd is not returning data for the supplied parameters/select options. Since it is a Y program it's not standard SAP, no one here knows the code, and cannot help you.
Run the calling program in debug. Note the values of matnr[], bukrs[] etc. Then using those values, call YMO7MLDB directly, and debug that to find out why there's no data.
‎2021 Sep 21 12:25 PM