Application Development 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: 

PO Upload through BAPI_PO_CREATE1 - Problem in Service Item

Former Member
0 Kudos

Dear All,

I am using BAPI_PO_CREATE1 for PO upload. I am facing problem in Service account assignment. I am supplying following:

wa_POACCOUNT-PO_ITEM = '00010'.

wa_POACCOUNT-GL_ACCOUNT = '7234676'.

wa_POACCOUNT-COSTCENTER = '1001'.

Append wa_POACCOUNT To itab_POACCOUNT.

wa_POACCOUNTX-PO_ITEM = '00010'.

wa_POACCOUNTX-GL_ACCOUNT = 'X'.

wa_POACCOUNTX-COSTCENTER = 'X'.

Append wa_POACCOUNTX To itab_POACCOUNTX.

In POSERVICES and POITEM, I am giving Package No = '0000000001' to link them and POACCOUNT is linked through Item No to POITEM.

It gives me error "In case of Account assignment, please enter acc. assignmrnt data for item". Although I am supplying account assignment as described above. Please tell me what is the reason of error. Is there any other way to link item with its service details.

Regards

Nadeem

1 REPLY 1

Former Member
0 Kudos

When we create Purchase Order using "BAPI_PO_CREATE1", it works for all cases but we can have problems when we create Service Items in PO. Either we get an error u201CPlease maintain services or limitsu201D or u201CIn case of Account assignment, please enter acc. assignment data for itemu201D.

Service PO occurs when we enter item category u2018Du2019 (Service) and Account category u2018Ku2019 (Cost Center).

When we use BAPI_PO_CREATE1 to create service PO, following tables are populated at item level:

a) POITEM

b) POITEMX

c) POACCOUNT

d) POACCOUNTX

e) POSERVICES

f) POSRVACCESSVALUES

For service items: POITEM-PCKG_NO = u20180000000001u2019. (assign package no as a dummy number)

Set PCKG_NO flag in POITEMX table as u2018Xu2019.

Package No is the link that connect POITEM table to POACCOUNT table through tables POSERVICES and POSRVACCESSVALUES.

Set POACCOUNT-SERIAL_NO to u201801u2019.

Set same PCKG_NO to u20180000000001u2019 in POSERVICES table. Maintain two entries in POSERVICES table like this:

WA_POSERVICES-PCKG_NO = u20180000000001u2019.

WA_POSERVICES-LINE_NO = u20180000000001u2019.

WA_POSERVICES-OUTL_IND = u2018Xu2019.

WA_POSERVICES-SUBPCKG_NO = u20180000000003u2019. (Dummy No.)

WA_POSERVICES-QUANTITY = u2018100.000u2019.

WA_POSERVICES-BASE_UOM = u2018EAu2019.

WA_POSERVICES-PRICE_UNIT = u20181u2019.

WA_POSERVICES-GR_PRICE = u2018100.000u2019.

WA_POSERVICES-SHORT_TEXT = u2018SERVICE TESTu2019.

APPEND WA_POSERVICES TO IT_POSERVICES.

WA_POSERVICES- PCKG_NO = u20180000000003u2019.

WA_POSERVICES- LINE_NO = u20180000000002u2019.

WA_POSERVICES-QUANTITY = u201810.000u2019.

WA_POSERVICES- BASE_UOM = u2018EAu2019.

WA_POSERVICES--PRICE_UNIT = u20181u2019.

WA_POSERVICES-GR_PRICE = u2018100.000u2019.

WA_POSERVICES-SHORT_TEXT = u2018SERVICE 1u2019.

WA_POSERVICES-MATL_GROUP = u20180012u2019.

APPEND WA_POSERVICES TO IT_POSERVICES.

Set PCKG_NO as SUB_PCKG_NO in table POSRVACCESSVALUES this:

WA_POSRVACCESSVALUES-PCKG_NO = u20180000000003u2019.

WA_POSRVACCESSVALUES-LINE_NO = u20180000000002u2019.

WA_POSRVACCESSVALUES-SERNO_LINE = u201801u2019.

WA_POSRVACCESSVALUES-SERIAL_NO = u201801u2019.

WA_POSRVACCESSVALUES-QUANTITY = u201910.000u2019.

APPEND WA_POSRVACCESSVALUES TO IT_ POSRVACCESSVALUES.

This logic will work definitely and PO Service Items will be created.

Thanks & Regards.

Rakesh Bajaj