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

access structure from another program

Former Member
0 Likes
614

I am in user exit EXIT_SAPMM06E_013 include ZXM06U44. I want to access structure aekko in program SAPLMEPO. I am able to do something like this with internal table ptv. How do I do the same with a structure. Basically I want to know the header data for the purchase order.

As you can see wa_table = '(SAPLMEPO)PTV[]'. this for the table ..

  DATA: BEGIN OF aekko.
          INCLUDE STRUCTURE ekko.
  DATA: END OF aekko.
  DATA: wa_ekko LIKE aekko.
  DATA: wa_aekko TYPE string.
  FIELD-SYMBOLS: <fs_aekko> TYPE ANY.
  DATA: wa_table(100) TYPE c, 

  wa_table = '(SAPLMEPO)AEKKO'.
  ASSIGN (wa_table) TO <fs_aekko>.
  aekko = <fs_aekko>.

  wa_table = '(SAPLMEPO)PTV[]'.
  ASSIGN (wa_table) TO <fs_ptv>.              "Assign (SAPLMEPO)PTV[] to field symbol
  t_ptv[] = <fs_ptv>[].                       "Move field symbol to itab

1 REPLY 1
Read only

Former Member
0 Likes
434

I_EKKO does the trick