‎2006 Nov 10 2:49 AM
Hi,
I am doing open purchase order upload prog using BAPO_PO_CREATE1.Here i am passing the internal table data to POHEADER,and same i want to do for POHEADERX.I dont know what to pass there and same fro the POITEMX also.the coding i given below
LOOP AT DATA_TAB.
POHEADER-DOC_TYPE = DATA_TAB-BSART.
POHEADER-VENDOR = DATA_TAB-LIFNR.
POHEADER-PURCH_ORG = DATA_TAB-EKORG.
POHEADER-PURCH_ORG = DATA_TAB-EKGRP.
APPEND POHEADER.
POHEADERX-DOC_TYPE =
POHEADERX-VENDOR =
POHEADERX-PURCH_ORG =
POHEADERX-PURCH_ORG =
APPEND POHEADERX.
XXXXXXXXXXXXXXXX
APPEND POITEM.
ENDLOOP.
same case for the POITEMX also i dont know what to pass.
pls help me to solve the issue as i am doing first time using bapi.
Thanks,
RAJ.
‎2006 Nov 10 3:05 AM
HI Rajendra
The Structure/Tables with X -extension is to set the updating flags.
The fields that are set in the X strcutures are only use for updation.
Apart from this in few structure, we will find a Field for UPDATE_FLAG, this is to identify if we want to insert/delete/update.
In your case it should be:
LOOP AT DATA_TAB.
POHEADER-DOC_TYPE = DATA_TAB-BSART.
POHEADER-VENDOR = DATA_TAB-LIFNR.
POHEADER-PURCH_ORG = DATA_TAB-EKORG.
POHEADER-PURCH_ORG = DATA_TAB-EKGRP.
APPEND POHEADER.
POHEADERX-DOC_TYPE = 'X'.
POHEADERX-VENDOR = 'X'.
POHEADERX-PURCH_ORG = 'X'.
POHEADERX-PURCH_ORG = 'X'.
APPEND POHEADERX.
XXXXXXXXXXXXXXXX
APPEND POITEM.
ENDLOOP.
Also check the example in documentation of the FM for more info.
Hope this info gives you some idea.
Kind Regards
Eswar
‎2006 Nov 10 3:05 AM
HI Rajendra
The Structure/Tables with X -extension is to set the updating flags.
The fields that are set in the X strcutures are only use for updation.
Apart from this in few structure, we will find a Field for UPDATE_FLAG, this is to identify if we want to insert/delete/update.
In your case it should be:
LOOP AT DATA_TAB.
POHEADER-DOC_TYPE = DATA_TAB-BSART.
POHEADER-VENDOR = DATA_TAB-LIFNR.
POHEADER-PURCH_ORG = DATA_TAB-EKORG.
POHEADER-PURCH_ORG = DATA_TAB-EKGRP.
APPEND POHEADER.
POHEADERX-DOC_TYPE = 'X'.
POHEADERX-VENDOR = 'X'.
POHEADERX-PURCH_ORG = 'X'.
POHEADERX-PURCH_ORG = 'X'.
APPEND POHEADERX.
XXXXXXXXXXXXXXXX
APPEND POITEM.
ENDLOOP.
Also check the example in documentation of the FM for more info.
Hope this info gives you some idea.
Kind Regards
Eswar
‎2006 Nov 10 3:07 AM