10-09-2007 6:22 AM
Hi all,
plz expalin what is the idea of header data and item data in Bapi.
How i will know about which one is header and which item. how to use it in bapi. for any t-code provide sample flatfile for the same for better reference.
thanks, points sure.
anshu
10-09-2007 7:34 AM
hi,
i will explain with an example..
when you go to restaurant... hotel name is the header name.
then u ask for food items that are availabel in the restaurant,, these are items...
u can recognize the header and item data in the flat file..
the same header data repeats for each item data...
ex.. taj is the restaurant name.. restaurant no. and name are header...
and item no., item desc, price are the fields
then the flat file would be..
1 taj 1 rice 20
1 taj 2 curd 30
2 oberoi 1 cocktail 30
2 oberio 2 beer 40
this is how the flat file looks ..
regards
sree
10-10-2007 5:38 AM
Hi sree,
Thanks.
Is It mean that first row will be header or column of every row. agian the no of header data shuold be equal to item data.
10-10-2007 6:29 AM
Hi Anshu,
in term of order,
you may have 2 orders, for example order no 001 and order no 002 .
Each order has 3 items, item 001, 002, 003 for each.
It would become like this :
ORDER 001
header information :
order no 001 ; created by : TSW ; created date : 01jun07 ; order type : ZXXX
detail item information
order no 001, order item no : 001, material : 10001 ; qty : 10 pcs
order no 001, order item no : 002, material : 10002 ; qty : 10 kg
order no 001, order item no : 003, material : 10001 ; qty : 20 pcs
ORDER 002
header information :
order no 002 ; created by : TTT ; created date : 02jun07 ; order type : ZXZX
detail item information
order no 002, order item no : 001, material : 10001 ; qty : 10 pcs
order no 002, order item no : 002, material : 10002 ; qty : 10 kg
order no 002, order item no : 003, material : 10001 ; qty : 20 pcs
To pass the values to BAPI, there could be 2 separate inputs :
- ORDER_HEADERDATA
- ORDER_ITEMDATA
Assign the values of order header data, that is the value corresponding to table VBAK to ORDER_HEADERDATA ,
and then assign the values of order item data, that is the value corresponding to table VBAP to ORDER_ITEMDATA .
Rgds,
Tuwuh Sih Winedya