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

Help w/ABAP code during Packing Instruction Determination

Former Member
0 Likes
980

Hi,

I need to write some logic during out Packing Instruction Determination routines.

We have all of the Config done and we have created requirement 901.

I am coding in FORM KOBED_901 and FORM KOBEV_901.

My question is this:  How do I gain access to the data at this point.  I have found other code that looks like this in another requirement:

data: ex_komgp type komgp.
   import komgp to ex_komgp from memory id 'SAPLVHUPO01'.

but this does not get me access to anything in ex_komgp after the import statement has executed.

Can someone please direct me as to how to gain access to the internal variable/data at this point?

I hope that question makes sense...thanks for your help!

Andy

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
820

Hi Andy,

sometimes, you could see it in debug.

standard debug --> call stack

go to the calling of the routine or just before, you will see the tables / structure in parameters.

or worst go in standard debugger --> menu Goto --> System Areas --> Abap memory (and find a table)

or worst worst .... (again one time: worst)  (PROGRAM)table[]

with this you could access any table of the calling area, you have to put the programme name between () ...

regards

Fred

Hi,

I need to write some logic during out Packing Instruction Determination routines.

We have all of the Config done and we have created requirement 901.

I am coding in FORM KOBED_901 and FORM KOBEV_901.

My question is this:  How do I gain access to the data at this point.  I have found other code that looks like this in another requirement:

data: ex_komgp type komgp.
   import komgp to ex_komgp from memory id 'SAPLVHUPO01'.

but this does not get me access to anything in ex_komgp after the import statement has executed.

Can someone please direct me as to how to gain access to the internal variable/data at this point?

I hope that question makes sense...thanks for your help!

Andy

4 REPLIES 4
Read only

FredericGirod
Active Contributor
0 Likes
821

Hi Andy,

sometimes, you could see it in debug.

standard debug --> call stack

go to the calling of the routine or just before, you will see the tables / structure in parameters.

or worst go in standard debugger --> menu Goto --> System Areas --> Abap memory (and find a table)

or worst worst .... (again one time: worst)  (PROGRAM)table[]

with this you could access any table of the calling area, you have to put the programme name between () ...

regards

Fred

Read only

0 Likes
820

Fred,

Thank you very much for the information...very helpful.

I was able to find the data in the KOMGP table in the previous program (SAPLV61P) in the call stack.

Do you have any idea why this will not allow me access to the data from my ABAP code:

data: ex_komgp type komgp.
   import komgp to ex_komgp from memory id 'SAPLVHUPO01'.

I tried using 'SAPLV61P' and 'SAPLV61P901' in the code.

Thanks again.

Andy

Read only

0 Likes
820

You choose the worst

do you try the break-point in your routine to see if the KOMGP or XKOMGP is readable ?

if not try

data : w_field type char20.

field-symbols <KOMGP> type table of KOMGP. "I'm not sure about this declaration

move '(SAPLV61P)KOMGP' to w_field

assign (w_field) to <KOMGP>.

check sy-subrc eq space.

....

regards

Fred

Read only

0 Likes
820

Fred...thank you very much for this info.  You got me very close and I was able to get it setup for my specific situation.

Here is my final code:

     data w_field type char20.
   FIELD-SYMBOLS <x_likp> type likpvb.

   move '(SAPMV50A)XLIKP' to w_field.
   ASSIGN (w_field) to <x_likp>.

Thank you again...could never have gotten this without your help!

Andy