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

Reading value from Stack

Former Member
0 Likes
8,121

Hi All ,

I am doing enhancement and in debug mode i can see the values inside the table (SAPLFKB4)XXXXX[] .

I want to validate this (SAPLFKB4)XXXXX[] inside my program , when i write the code with the if condition , i am getting error as this is not declared .

So i came to know , i have to get this value by reading the stack ,

Please share your ideas how to read the stack and how to get the value inside my program ? and i have to declare the same table which has the values in DEBUG mode .

Thanks,

Pradeep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,691

  Try the following.....

  It relates to obtaining the table contents using field-symbols.....

   data  : name(100)   type c.
   field-symbols:  <global>     type any table.       

 

   name = '(SAPLFKB4)XXXXX[]'.

   assign (name) to <global>.

   if sy-subrc = 0.

"  Pass values from <global> to your specific internal table Type

   endif.

  Hope It Helps.

3 REPLIES 3
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
7,691

You will have to declare field symbol type table of internal table. Then use assign statement assign (progaram name (itab)) to fs

Read only

Former Member
0 Likes
7,692

  Try the following.....

  It relates to obtaining the table contents using field-symbols.....

   data  : name(100)   type c.
   field-symbols:  <global>     type any table.       

 

   name = '(SAPLFKB4)XXXXX[]'.

   assign (name) to <global>.

   if sy-subrc = 0.

"  Pass values from <global> to your specific internal table Type

   endif.

  Hope It Helps.

Read only

Former Member
0 Likes
7,691

Hi Nabheet and Byju ,

Its working fine now , Thanks for help and sharing .