Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding BAPI_PO_CREATE1

Former Member
0 Likes
981

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.

5 REPLIES 5
Read only

NAeda
Contributor
0 Likes
780

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

Read only

Former Member
0 Likes
780

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.

Read only

Former Member
0 Likes
780

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

Read only

0 Likes
780

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.

Read only

780

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