‎2007 Sep 19 6:47 PM
Hi,
I am working on a BADI called "ADDRESS_UPDATE". Now there is a importing paramater called IM_T_XADRC defined as IM_T_XADRC TYPE ADRC_TAB for interface IF_EX_ADDRESS_UPDATE by SAP.
When I try to code below inside the method <b>IF_EX_ADDRESS_UPDATE~ADDRESS1_SAVED</b>:
IF IM_T_XADRC-NAME3 IS INITIAL.
IM_T_XADRC-NAME3 = IM_T_XADRC-NAME1.
ENDIF.It gives me following error:
"IM_T_XADRC" is a table without header line and therefore has no component called "NAME3".
How do I solve this error ?
Please help.
Regards,
Rajesh.
‎2007 Sep 19 6:55 PM
Hi Rajesh Thomas
IM_T_XADRC is typing a table type of ADRC_TAB, you can not handle its field directly, please loop IM_T_XADRC into a WA and move the field of WA to other data objects.
For example:
DATA: wa type VADRC.
LOOP im_t_xadrc INTO WA.
wa-name3 = wa_name1.
MODIFY im_t_xadrc FROM wa.
ENDLOOP.
‎2007 Sep 19 6:54 PM
HI,
<b> remember u are using OOPS in BADI and all the intenal tables that you declare are with out header line and is so ur problem..</b>
Declare a structure of type IM_T_XADRC and say
read table IM_T_XADRC into strucrure.
IF structure-NAME3 IS INITIAL.
structure-NAME3 = structure-NAME1.
modify im_t_xadrc from strucure index sy-tabix.
ENDIF.<b></b>
‎2007 Sep 19 6:55 PM
Hi Rajesh Thomas
IM_T_XADRC is typing a table type of ADRC_TAB, you can not handle its field directly, please loop IM_T_XADRC into a WA and move the field of WA to other data objects.
For example:
DATA: wa type VADRC.
LOOP im_t_xadrc INTO WA.
wa-name3 = wa_name1.
MODIFY im_t_xadrc FROM wa.
ENDLOOP.
‎2007 Sep 19 6:55 PM
‎2007 Sep 19 7:09 PM
Its giving an error saying, "The field "IM_T_XADRC cannot be changed".
Rajesh...
‎2007 Sep 19 7:24 PM
HI
Check with the paramter IM_T_YADRC.. i think this contains the old address
u do the processing for this table and say
loop at im_t_yadrc into structure.
structrure-name3 = structure-nam1.
append strucute to im_t_xadrc.
endloop.
‎2007 Sep 19 7:33 PM
Same error, But can we actually change it because its a import parameter of and not the changing parameter !!!!
‎2007 Sep 19 7:41 PM
HI,
try with the field symbols and see if it works. something like this am not sure many need some changes
field-symbols : <fs> type any,
<name1> type any,
<name3> type any.
loop at im_t_xadrc assigning <fs>.
assign elemnet 'NAME1' of <fs> to <name1>.
assign element 'NAME3' of <fs> to <name3>.
assign <name1> to <name3>
endloop.
thanks
Mahesh