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.
Showing results for 
Search instead for 
Did you mean: 

check this error (urgent)

Active Participant
0 Kudos

hai SDNs..

i have a problem...

DATA: lt_doc TYPE tt_doc,

lt_final TYPE tt_final.

PERFORM fr_get_data_from_mseg CHANGING lt_doc .

      • from this sub routine i am getting values into lt_doc

perform fr_final_output_data changing lt_final.

        • i am using the same lt_doc table in this particular table like:

loop at lt_doc..

"""" but it is saying undefined lt_doc...

could you pls help me out.. its urgent..

waiting for reply...


Active Contributor
0 Kudos

loop at lt_doc..

"""" but it is saying undefined lt_doc...

try with

loop at lt_doc into wa_doc.




Former Member
0 Kudos

Try this:

perform fr_final_output_data <b>TABLES lt_doc</b>

changing lt_final.


Former Member
0 Kudos


This problem is coming because of the declaration of it_doc.

As per your declaration it_doc does not have a header line ( you are missing 'occurs 0 with header line' ). So you cannot use it as changing parameter in the perform.

Using it as Tables parameter in the perform can solve the problem.

Else you can try changing the declaration of it_doc by adding 'occurs 0 with header line '.

Hope this helps.


Former Member
0 Kudos

Hi RamaKrishna,

I think the problem is with <b>SCOPE of VARIABLES</b> so Declare variables at Global scope ie at the begging of the program then you can access these variables through out your program for all subroutines.

<b>Before the start-of-selection, declare these variables.</b>

DATA: lt_doc TYPE tt_doc,

lt_final TYPE tt_final.

If your lt_doc is table then you need to specify <b>OCCURS 0</b> clause in the defintion of variables as follows.

DATA: lt_doc TYPE tt_doc <b>OCCURS 0 WITH HEADER LINE,</b>

lt_final TYPE tt_final <b>OCCURS 0 WITH HEADER LINE.</b>

and you need to change in PERFORM to as follows.

PERFORM fr_get_data_from_mseg <b>CHANGING TABLES lt_doc</b>

perform fr_final_output_data <b>CHANGING TABLES lt_final.</b>



Message was edited by: Vinaykumar G

0 Kudos

Hi buddies,

CHANGING TABLES is not possible.

Instead of loop into you should use loop assigning for two reasons. One is, you don't need modify and two is it's faster, much faster.

Like this:


FORM xyz changing pt_doc type ttdoc.

field-symbols: <doc> like line of ttdoc.

loop at pt_doc assigning <doc>.

<doc>-whatever = somethingelse.