09-25-2008 7:00 AM
hi,
i have some line items in (SAPMV50A)XLIPS during run time,
may i know how to assign it to an internal table for further processing it?
thanks.
09-25-2008 7:06 AM
Hello,
You can do it like this.
DATA: LV_MEMORY_1(15).
" For exporting the table to Memory
CONCATENATE SY-UNAME SY-MODNO 'XLIPS' INTO LV_MEMORY_1.
EXPORT XLIPS TO MEMORY ID LV_MEMORY_1.
" For importing the table for further usage.
data: xlips like lips occurs 0 with header line.
CONCATENATE SY-UNAME SY-MODNO 'XLIPS' INTO LV_MEMORY_1.
IMPORT XLIPS FROM MEMORY ID LV_MEMORY_1.
Hope this will helps you.
Cheers,
Vasanth M
09-25-2008 7:03 AM
09-25-2008 7:06 AM
Hello,
You can do it like this.
DATA: LV_MEMORY_1(15).
" For exporting the table to Memory
CONCATENATE SY-UNAME SY-MODNO 'XLIPS' INTO LV_MEMORY_1.
EXPORT XLIPS TO MEMORY ID LV_MEMORY_1.
" For importing the table for further usage.
data: xlips like lips occurs 0 with header line.
CONCATENATE SY-UNAME SY-MODNO 'XLIPS' INTO LV_MEMORY_1.
IMPORT XLIPS FROM MEMORY ID LV_MEMORY_1.
Hope this will helps you.
Cheers,
Vasanth M
09-25-2008 7:21 AM
hi Vasanth M,
the table will available only i type (SAPMV50A)XLIPS in the debuggin window. in this case how should i code that in abap program, since it will throw me error if i
put EXPORT (SAPMV50A)XLIPS TO MEMORY ID LV_MEMORY_1.
?
09-25-2008 7:32 AM
try using user exit : MV50AFZ1 , in whcih u can export or import data to / from memory , or if u want to modify values in lips tables u can do in this exit .
Hope this solves ur problem.
Regards,
Ramesh
09-25-2008 7:49 AM
Hi,
This can be done by Field symbol
field-symbols <fs_xlips> type standard table.
data: lt_xlips_t(50) value '(SAPMV50A)XLIPS[]'.
assign (lt_xlips_t) to <fs_xlips>.
Now the field symbol <fs_xlips> contains the data of table XLIPS[].
Cheers,
Kothand
09-25-2008 8:07 AM
hi Kothand,
i'm have one problem with this, i'm able to get the value through the below
DATA: LOC_FIELD(85) VAlUE '(SAPMV50A)XLIPS',
P_LIPS TYPE LIPS,
FIELD-SYMBOLS: <LOC_FS_LIPS> TYPE ANY.
ASSIGN (LOC_FIELD6) TO <LOC_FS_LIPS>.
P_LIPS = <LOC_FS_LIPS>.
however in the exists, when i access p_lips, it always contain only the last row of the internal table only. no matter how many line items there, and how many times the system loop through the exits based on the count of line items, it will only contain the last line item.
any idea where is going wrong?
thanks.
09-25-2008 8:25 AM
Hi,
P_LIPS is a structure as per your declaration Also you have declared field-symbols as any.It should be table form. Try this
DATA: loc_field(85) VALUE '(SAPMV50A)XLIPS',
p_lips TYPE STANDARD TABLE OF lips. "Should be table
FIELD-SYMBOLS: <loc_fs_lips> TYPE STANDARD TABLE. "Should be Table
ASSIGN (loc_field) TO <loc_fs_lips>.
p_lips[] = <loc_fs_lips>[].
Cheers,
Kothand
09-25-2008 9:49 AM
09-25-2008 7:10 AM
For assigning data from memory: first you will have to export that memory and then import it in your program provided that memory name is kept same.