‎2007 Apr 16 3:03 PM
DATA: wa_zcitorderout TYPE STANDARD TABLE OF zcitorderout
INITIAL SIZE 0
WITH HEADER LINE.This is an obsolete statement in my code. By changing it to
DATA: wa_zcitorderout TYPE STANDARD TABLE OF zcitorderout.It gives me error that wa is not table with header. How do I rewrite the code
‎2007 Apr 16 3:24 PM
Hi,
Please try this.
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout.
DATA: wa_zcitorderout LIKE LINE of it_zcitorderout.
LOOP AT i_custinfo INTO i_custinfo_temp.
clear wa_zcitorderout.
wa_zcitorderout-kunnr = i_custinfo_temp-kunnr.
wa_zcitorderout-vbeln = i_custinfo_temp-vbeln.
wa_zcitorderout-erdat = i_custinfo_temp-erdat.
wa_zcitorderout-erzet = i_custinfo_temp-erzet.
wa_zcitorderout-flag = 'I'.
APPEND wa_zcitorderout to it_zcitorderout.
ENDLOOP.
Regards,
Ferry Lianto
‎2007 Apr 16 3:06 PM
DATA: wa_zcitorderout TYPE STANDARD TABLE OF zcitorderout with header line.If u want to declare workarea then just use
wa_zcitorderout TYPE zcitorderout
Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 Apr 16 3:08 PM
The idea here is to have two separate objects, the internal table and the work area. So define like so.
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout.
DATA: wa_zcitorderout like line of it_zcitorderout.Then when working with your internal table, do this.
Loop at it_zcitorderout into wa_zcitorderout.
...
Endloop.Regards,
RIch Heilman
‎2007 Apr 16 3:08 PM
hi,
give this way
DATA: wa_zcitorderout TYPE STANDARD TABLE OF zcitorderout <b>with header line.</b>
‎2007 Apr 16 3:08 PM
Hi,
You can write it as:
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout.
DATA: wa_zcitorderout LIKE LINE of it_zcitorderout.
or
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout.
DATA: wa_zcitorderout TYPE zcitorderout.
Along with the above change, you may have to change the code where you are using the READ or LOOP on this itab.
You must add the INTO option.
For example:
LOOP AT it_zcitorderout INTO wa_zcitorderout.
....
ENDLOOP.
Hope this helps,
Sumant.
‎2007 Apr 16 3:10 PM
Hi,
Look at the below link, this will have all everything related to your question
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3646358411d1829f0000e829fbfe/content.htm
Regards
Sudheer
‎2007 Apr 16 3:20 PM
This is my code
*------------- Work Area of storage table -----------------------------*
DATA: wa_zcitorderout TYPE STANDARD TABLE OF zcitorderout
INITIAL SIZE 0
WITH HEADER LINE.
LOOP AT i_custinfo INTO i_custinfo_temp.
wa_zcitorderout-kunnr = i_custinfo_temp-kunnr.
wa_zcitorderout-vbeln = i_custinfo_temp-vbeln.
wa_zcitorderout-erdat = i_custinfo_temp-erdat.
wa_zcitorderout-erzet = i_custinfo_temp-erzet.
wa_zcitorderout-flag = 'I'.
APPEND wa_zcitorderout.
ENDLOOP.I have 2 obsolete statements here and I need to change them so I meet extended program check.
Tables with headers are no longer supported in OO
An explicit work area is neccesary in OO. Use Append wa to wa_zcitorderout
‎2007 Apr 16 3:25 PM
change to this
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout
INITIAL SIZE 0
WITH HEADER LINE,
it_zcitorderout TYPE zcitorderout .
LOOP AT i_custinfo INTO i_custinfo_temp.
wa_zcitorderout-kunnr = i_custinfo_temp-kunnr.
wa_zcitorderout-vbeln = i_custinfo_temp-vbeln.
wa_zcitorderout-erdat = i_custinfo_temp-erdat.
wa_zcitorderout-erzet = i_custinfo_temp-erzet.
wa_zcitorderout-flag = 'I'.
APPEND wa_zcitorderout to it_zcitorderout.
ENDLOOP.
‎2007 Apr 16 3:28 PM
hi ,
Change your code this way then
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout with header line.
data : wa_zcitorderout like it_zcitorderout.
LOOP AT i_custinfo INTO i_custinfo_temp.
wa_zcitorderout-kunnr = i_custinfo_temp-kunnr.
wa_zcitorderout-vbeln = i_custinfo_temp-vbeln.
wa_zcitorderout-erdat = i_custinfo_temp-erdat.
wa_zcitorderout-erzet = i_custinfo_temp-erzet.
wa_zcitorderout-flag = 'I'.
APPEND it_zcitorderout from wa_zcitorderout.
ENDLOOP.Regards,
Santosh
‎2007 Apr 16 3:24 PM
Hi,
Please try this.
DATA: it_zcitorderout TYPE STANDARD TABLE OF zcitorderout.
DATA: wa_zcitorderout LIKE LINE of it_zcitorderout.
LOOP AT i_custinfo INTO i_custinfo_temp.
clear wa_zcitorderout.
wa_zcitorderout-kunnr = i_custinfo_temp-kunnr.
wa_zcitorderout-vbeln = i_custinfo_temp-vbeln.
wa_zcitorderout-erdat = i_custinfo_temp-erdat.
wa_zcitorderout-erzet = i_custinfo_temp-erzet.
wa_zcitorderout-flag = 'I'.
APPEND wa_zcitorderout to it_zcitorderout.
ENDLOOP.
Regards,
Ferry Lianto