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

Error creating purchase order With BAPI_PO_CREATE

Shwetha58shetty
Explorer
0 Likes
2,284

Hi,

I am trying to create a purchase order using BAPI_PO_CREATE with item category 'D' (Services).

BAPI returns error message "Item category D does not exist (Please correct)". i am able to create the same manually.

can someone please guide me to resolve this.

Thanks in Advance.

Shwetha

8 REPLIES 8
Read only

Former Member
0 Likes
1,310

Hi,

this is maybe a kind of conversion exit. Did you try with item category 9 ?

Have a look at T163Y. Item category 9 leads to item category D.

Maybe this helps!

Regards,

Klaus

Read only

0 Likes
1,310

Thanks for your reply. That partially solves my issue . when I pass item ctaegory as 9 in place of 'D' I get this error "No reference services exist".

Read only

0 Likes
1,310

Hi Shwetha,

Please check with your functional people whether that item category is there or not. This is a small issue. Post if need help .

Regads,

Madhu.

Read only

0 Likes
1,310

Hi,

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.

Dhina..

Read only

0 Likes
1,310

I am Using BAPI_PO_CREATE passing the following values to table PO_SERVICES

Pacakge Number

Line Number

Service

Quantity

unit of measure

Gross price

am I missing out something here.

Thanks in Advance

Shwetha

Read only

0 Likes
1,310

Hi,

when fm MS_SERVICE_PACKAGE rises this package, it needs a 2nd field comsrv-ref_packno in background mode.

I don't know the matching field in your BAPI, maybe it is field SUBPCKG_NO in structure BAPIESLLC.

Regards,

Klaus

Read only

0 Likes
1,310

Resolved. Thanks

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,310

Hi Shwetha,

Given they numbers according to the item category.

Regards,

Madhu.