Skip to Content

How to share a variable across ABAP blocks in the eCATT

Hello,

I have following eCATT script:

ABAP.
DATA:
      lt_tab1 TYPE STANDARD TABLE OF tab512.
CALL METHOD class1=>method1
  EXPORTING
    i_infoprov    = V_OBJ_NAME
  IMPORTING
    e_t_data      = lt_tab1.
ENDABAP.

SAPGUI ( SAPGUI_1 ).

ABAP.
DATA lv_cnt TYPE int4.
DESCRIBE TABLE lt_tab1 LINES lv_cnt.
WRITE:/ 'Table 1: ',  lv_cnt , ' rows'.
ENDABAP.

The problem is that variable lt_tab1 (that is defined in 1st ABAP block) is not accessible within 2nd ABAP block. The error is as follows:

Field "LT_TAB1" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement.

Is there any way to share the variable across ABAP blocks in eCATT script?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 16, 2013 at 09:25 AM

    Solved by

    ABAP.

    ...

    EXPORT lt_tab1 TO MEMORY ID 'lt_tab1'.

    ENDABAP.

    ABAP.

    IMPORT lt_tab1 FROM MEMORY ID 'lt_tab1'.

    ...

    ENDABAP.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.