2006 Jul 03 3:28 PM
Hi,
I am trying to modify SAP data in a user exit before it gets posted.
I need to capture the data into a field symbol, modify the data and pass it back to program.
However I guess,am unable to define the correct field-symbol type in this case as my program is DUMPING:-(
For you reference I have attached my code below .
Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA',
<fs_lfza> type any table.
ASSIGN (lw_lfza) TO <fs_lfza>.
As you can see I am trying to assign the SAP table XLFZA to my field symbol <FS_LFZA> where I wish to modify it.
But this code only points the header values of XLFZA into <FS_LFZA> and not the whole table as expected.
Can you please help let me know what am I doing wrong.
I only want to get all the data(table) from (SAPMF02K)XLFZA to my field symbol table <FS_LFZA>.
Regards
RK
2006 Jul 03 3:30 PM
Hi
If you need to transfer tha data of internal table you have to the sign [], so:
This definition is wrong
*----->Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA',
This right definition
Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA[]',
<fs_lfza> type any table.
ASSIGN (lw_lfza) TO <fs_lfza>.
Max
2006 Jul 03 3:30 PM
Hi
If you need to transfer tha data of internal table you have to the sign [], so:
This definition is wrong
*----->Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA',
This right definition
Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA[]',
<fs_lfza> type any table.
ASSIGN (lw_lfza) TO <fs_lfza>.
Max
2006 Jul 03 3:30 PM
Try with []
Data:lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA[]',
<fs_lfza> type any table.
ASSIGN (lw_lfza) TO <fs_lfza>.
2006 Jul 03 3:31 PM
2006 Jul 03 3:33 PM
Hello,
U can try like this.
DATA: BEGIN OF z_type_vedavb1.
INCLUDE STRUCTURE vedavb.
DATA: END OF z_type_vedavb1.
TYPES: z_table_vedavb1 LIKE z_type_vedavb1 OCCURS 0.
FIELD-SYMBOLS: FROM wa_xveda.
ENDIF.
ENDLOOP.
ENDIF.
Hope this will be useful for u.
Dön't forget to award points.
2006 Jul 03 3:35 PM
Hi rajiv,
1. Do like this , and it will work.
2. I just tried now.
3. In mycase, the program name, and table name is different,
so accordingly, change your code.
4. t001 is the record 1 i want to read.
*--- IMPORTANT VARIABLES
data : t001 like t001.
field-symbols : <F> type table.
data : varname(35) type c.
BREAK-POINT.
*----
ASSIGNMENT - NOTE []
varname = '(ZAM_TEMP00)T001[]'.
assign (varname) to <F>.
*----
READ RECORD 1 - WE CAN READ ANY
read table <F> into t001 index 1.
regards,
amit m.
2006 Jul 03 3:48 PM
Hi,
Tried the logic but realised I still am getting the short-dump.
The short dump message is
""You attempted to assign a field to a typed field symbol,
but the field does not have the required type.""
and my modified code is
lw_lfza(15) TYPE c VALUE '(SAPMF02K)XLFZA[]'. ASSIGN (lw_lfza) TO <fs_lfza>. <fs_lfza> type table,
Any insghts?
Thanks and regards
RK