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: 

Problem with Submit

nisha24
Discoverer
0 Kudos
331

I've developed a program that calls program RM06BZ00 and automatically populates the selection criteria of this program. Program RM06BZ00 is not doing an export of its internal table which is what I need. Then I will import this internal table into my program and do some more filtering.

But The Program is getting exit after its Execution and the assignment to filed symbol used as the reference to data is getting failed,
kindly Help

5 REPLIES 5

matt
Active Contributor
0 Kudos
227

Please supply more detail. Exactly what code are you writing?

And you should use the tag ABAP Development.

nisha24
Discoverer
0 Kudos
227

Hi,
I am wring it as,

TYPES: BEGIN OF gty_me57_tab.

INCLUDE STRUCTURE MEREP_OUTTAB_EBAN.

TYPES: END OF gty_me57_tab.

DATA: gt_me57_tab TYPE STANDARD TABLE OF gty_me57_tab WITH HEADER LINE.

DATA: lr_me57_data TYPE REF TO data.

FIELD-SYMBOLS : <lt_me57_data> TYPE ANY TABLE,

<lfs_me57> TYPE any.

cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false

metadata = abap_false

data = abap_true ).

*START-OF-SELECTION.

SUBMIT rm06bz00 ##SUB_PAR

WITH ba_ekgrp IN ba_ekgrp

WITH s_werks IN s_werks

WITH s_lfdat IN s_lfdat

WITH s_knttp IN s_knttp

WITH p_Zugba IN p_zugba

WITH p_memory IN p_memory

WITH p_bstba IN s_bstba

WITH p_selgs IN s_selgs

WITH p_selpo EQ p_selpo

WITH p_lstub EQ p_lstub

WITH p_srtkz eq p_srtkz

AND RETURN.

TRY.

cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_me57_data ).

ASSIGN lr_me57_data->* TO <lt_me57_data>.

CATCH cx_salv_bs_sc_runtime_info.

* Error message

MESSAGE TEXT-001 TYPE gc_e.

ENDTRY.

cl_salv_bs_runtime_info=>clear_all( ).

IF <lt_me57_data> IS NOT ASSIGNED.

* Error message

MESSAGE TEXT-002 TYPE gc_e.

ENDIF.

* Get the COOIS report data into internal table

LOOP AT <lt_me57_data> ASSIGNING <lfs_me57>.

MOVE-CORRESPONDING <lfs_me2n> TO gt_me57_tab.

APPEND gt_me57_tab.

ENDLOOP.

Sandra_Rossi
Active Contributor
227

Please edit your comment (Actions>Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks!

Sandra_Rossi
Active Contributor
0 Kudos
227

In your question, you say "filed symbol used as the reference to data is getting failed", do you mean that the data reference is not bound? i.e. do you see the value {A:INITIAL} via the debugger?

DominikTylczyn
Active Contributor
0 Kudos
227

Right after running the RM06BZ00, you try to get the result with:

cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lr_me57_data ).

How do you know it even works? I don't think it does and you get no data in LR_ME57_DATA.