05-21-2008 11:34 AM
hi,
my item table is not getting populated.below is my code...
itab delaration:
data:it_item type BAPI2017_GM_ITEM_CREATE occurs 0 with header line,
im moving data from flat file to internal table and then populating it_item using
loop at itab.
move: itab-pdate to it_header-PSTNG_DATE,
itab-ddate to it_header-DOC_DATE.
APPEND it_header.
move: itab-matnr to it_item-MATERIAL,
itab-plant to it_item-PLANT,
itab-stloc to it_item-STGE_LOC,
itab-mtype to it_item-MOVE_TYPE,
itab-quant to it_item-ENTRY_QNT,
itab-rplan to it_item-MOVE_PLANT,
itab-rsloc to it_item-MOVE_STLOC.
APPEND it_item.
when i pass this it_item to my bapi FM. it_item is not populated....
can anyone help....
regards
mano
05-21-2008 11:48 AM
Hi,
What is the structure of itab? if this is the table containing the flat file, then the code will not work since itab will not have any structure.
You will have to split the file into proper format and then do your loop.
Shruthi
05-21-2008 11:48 AM
Hi,
What is the structure of itab? if this is the table containing the flat file, then the code will not work since itab will not have any structure.
You will have to split the file into proper format and then do your loop.
Shruthi
05-21-2008 11:56 AM
hi,
this is my structure for itab.
types: begin of gi_ty,
pdate type BUDAT,
ddate type BLDAT,
matnr type MATNR,
plant type WERKS_D,
stloc type LGORT_D,
mtype type BWART,
quant type ERFMG,
rplan type UMWRK,
rsloc type UMLGO,
end of gi_ty.
should i maintain separate internal table for header and item data..
in my case, it_header is getting populate but it _item is not. is it because im using single itab for them...
regards
mano
05-21-2008 12:13 PM
Hi ,
Put a breakpoint at the loop and check if data is really getting assigned to it_item.
Shruthi
05-21-2008 12:18 PM
08-05-2008 2:29 PM
Hi shruthi,
my problem is
i have header & item fields
how will i enter in flat file that header fields & item fields.
thanks in advance.