Application Development and Automation 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: 
Read only

Error occurred while using submit statement.

divsmart
Participant
0 Likes
2,551

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.
10 REPLIES 10
Read only

FredericGirod
Active Contributor
2,296

Do you have an error message ? why do you said it fails ?

Read only

Sandra_Rossi
Active Contributor
2,296

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.

Read only

Sandra_Rossi
Active Contributor
2,296

Impossible to help you, YRM07MLBD is a custom program, don't know what it contains.

Read only

matt
Active Contributor
2,296

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!

Read only

divsmart
Participant
0 Likes
2,296

Error means not fetching the data from the another report.

Read only

abo
Active Contributor
0 Likes
2,296

exporting to memory and ALV getdata together?

Read only

RaymondGiuseppi
Active Contributor
2,296

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'.
Read only

0 Likes
2,296

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

Read only

2,296

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.

Read only

0 Likes
2,296

Try to call the standard report and then yours.