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: 

Fetch data from internal table of a standard transaction

Former Member
0 Kudos

Dear experts,

I have to pick data from internal table of standard transaction

VL71.I have checked that data exists in SAP memory area in debugging mode

after selecting multiple vblen entries using check boxes.

Here is the relevant part of SAP memory map.

5 XU1 (112) <S_DEVELOP OBJTYPE ACTVT DEVCLASS OBJNAME P_GROUP

6 XU2 (240) <DEBUG 01

7 DBG_MAIN_PROGRAM ( 40) <SAPLKKBL >

8 DBG_SOURCE_PROGRAM ( 40) <LKKBLF00 >

9 DBG_SOURCE_LINE ( 5) < 4>

In (7) DBG_MAIN_PROGRAM ,I double click SAPLKKBL there is an internal table T_OUTTAB.

I need to pick some data from this table using my ZPROGRAM.

Is it possible ?.If yes how ?

I got few hints but could not work succeessfully with that

1. DATA: ch(20) TYPE c VALUE '(SAPLKKBL)T_OUTTAB'.

Ch will be having value '(SAPLKKBL)T_OUTTAB'.

2. FIELD-SYMBOLS : <temp> TYPE ANY.

<temp> is not having any value now.

3.ASSIGN (ch) TO <temp>.

Third statement assignes the value of T_OUTTAB to <temp> which is from program SAPLKKBL.

So now <temp> is internal table of type T_OUTTAB and it is similar to T_OUTTAB.

All values of T_OUTTAB are copied to <temp> now.

I am not able to make it run ok.I am not able to refer <temp> fields ,it says not char like etc.

I will be grateful if somebody could give me a running snippet or a matching situation.

7 REPLIES 7

Former Member
0 Kudos

Hi Aditya,

You will need to access memory area / internal table to standard T Code using user exits / BAdi or any enhancement.

If you try to access it after t code is executed Memory area will not be available.

Regards,

Mohaiyuddin

0 Kudos

Dear basically, i have attached my smartform delivery note to this standard transaction.So i am in current memory context.

Thats not a worry point here.

0 Kudos

Ok, then that's not a prob.

In your case, you already know the type you have to assign to field-symbol.

Try to assign the type directly instead of using TYPE ANY.

Regards,

Mohaiyuddin

Former Member
0 Kudos

I would recommend you to use

call function 'LIST_FROM_MEMORY'

tables

listobject = listobject

exceptions

others = 1.

if sy-subrc <> 0.

continue.

endif.

and then

call function 'TABLE_COMPRESS'

  • IMPORTING

  • COMPRESSED_SIZE =

tables

in = listobject

out = objbin

exceptions

others = 1.

if sy-subrc <> 0.

message id '61' type 'E' number '731'

with 'TABLE_COMPRESS'.

endif.

rgds

rajesh

former_member787646
Contributor
0 Kudos

Hi

Try this...

LOOP AT T_OUTTAB Assigning <temp>.

  • // <temp>-fld1 = 'XYZ'. (your code goes here)

ENDLOOP.

Hope it helps.

Murthy

raymond_giuseppi
Active Contributor
0 Kudos

Don't use

FIELD-SYMBOLS : <temp> TYPE ANY.
ASSIGN (ch) TO <temp>

use

FIELD-SYMBOLS : <temp> TYPE ANY. 
FIELD-SYMBOLS : <itab> TYPE ANY TABLE.
ASSIGN (ch) TO <itab>
LOOP AT <itab> ASSIGNING <temp>.
ENDLOOP.

Regards

Former Member
0 Kudos

sds