‎2009 Nov 12 7:23 AM
Hi Freinds,
I am using BAPI_PO_CREATE1 to create a purchase order based on the purchase requisition from ME21n.
but I am struck up with the following 2 errors.
1. 'Procurement without material from vendor with plant assignment is not defined'.
2. 'Subcontracting as stock transfer within a company code not possible'.
Even I search in this forum also not found.
Please help on the above.
‎2009 Nov 12 10:33 AM
See,
To update these error, Check with your functional consultant, check the data and scenario is correct for that particullar document, some where you are missing some filed, ask him to check the data once check the whether you updated the exact data in the internal table.
Rgds
Aeda
‎2009 Nov 12 1:38 PM
Hi,
Thanks for the reply.
as per my research, I found that the field SERRU(Sub contracting which is at Item level) is not available in the BAPI structures. So I am not able to pass the value to that filed.
but I suspect, this can be passed by using Export Memory. but I am not able to use this properly. it means, there are two parameters in the BAPI which are related to MEMORY and also there are two tables in the BAPI related to this Memory.
Can any one suggest on how to use this memory parameters properly.
Thanks a lot..
Regards,
Venkat.
‎2009 Nov 12 2:21 PM
Hi,
You better check your inputs,that if you are not giving material for a line item,you must provide the account assignment category,short text,plant, qty and material group.You check in debuging mode whether appropriate update fields are put.
regards,
Manesh.R
‎2009 Nov 12 2:25 PM
Hi Manesh,
Thanks for the reply.
As I checked I already passed all the necessary data except the Field: SERRU which I am not able to find in the BAPI tables.
Thank you very much.
Venkat.
‎2012 Feb 17 3:24 PM
Hi,
For those who will have the same problem related to passing the subcontract fields
The solution is to fill the table EXTENSIONIN : example :
STRUCTURE VALUEPART1 VALUEPART2
SERRU 1 00010
DISUB_SOBKZ "Q" 00010
DISUB_PSPNR "00000289" 00010
If it is not working try :
TYPES: BEGIN OF lty_ebelp,
ebelp TYPE ebelp,
END OF lty_ebelp.
TYPES BEGIN OF lty_adsub.
include TYPE lty_ebelp.
include TYPE disub_mepoitem_data.
TYPES END OF lty_adsub.
TYPES BEGIN OF lty_adsubx.
include TYPE lty_ebelp.
include TYPE disub_mepoitem_datax.
TYPES END OF lty_adsubx.
DATA: ls_extensionin TYPE bapiparex,
lt_extensionin TYPE STANDARD TABLE OF bapiparex,
ls_adsub TYPE lty_adsub,
ls_adsubx TYPE lty_adsubx.
ls_adsub-ebelp = '00010'.
ls_adsub-serru = '1'.
ls_adsub-disub_sobkz = 'B'.
ls_adsub-disub_pspnr = '00000289'.
MOVE ls_adsub TO ls_extensionin-valuepart1.
ls_extensionin-structure = cl_adsub_constants=>extin_po_struc.
APPEND ls_extensionin TO lt_extensionin.
ls_adsubx-ebelp = '00010'.
ls_adsubx-serru = 'X'.
ls_adsubx-disub_sobkz = 'X'.
ls_adsubx-disub_pspnr = 'X'.
MOVE ls_adsubx TO ls_extensionin-valuepart1.
ls_extensionin-structure = cl_adsub_constants=>extin_po_strucx.
APPEND ls_extensionin TO lt_extensionin.
So data structure LT_EXTENSIONIN will be used when calling BAPI_PO_CREATE1.
Note : The solution is explained in the SAP Note 1566153.
Best regards
Youssef BENAAMOU