cancel
Showing results for 
Search instead for 
Did you mean: 

RE: In case of account assignment, please enter acc. assignment data for it

Former Member
0 Kudos

Dear All,

I am getting the Error : 'In case of account assignment, please enter acc. assignment data for item'. when I try to create a service PO(I mean when the 'Item Cat' = 9 (D) and Account assignment category as K) .

I am populating POACCOUNT and POACCOUNTX structures of BAPI Correctly even the POSERVICES structure.

I tried even by creating through me21n, there it is getting created correctly. The order in which I am trying to enter in ME21N is First I am providing Org Data,

Next Item data with Acct assn cat as 'K' Item Category as 'D' short text, PO quantity, Order Unit, Net price, Material group, Plant,

Requisitioner.

Next it is prompting for Services data : short text, quantity, Unit, Gross price.

Then it is prompting for Account assignment of service in line 10, there I am giving GL account, Cost center.

It is creating the PO successfully.

But when I try using BAPI (BAPI_PO_CREARE1) it is giving the error 'In case of account assignment, please enter acc. assignment data for item'.

Please do the needful.

Thanks & Warm Regards,

Jayarama Krishna.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear All,

Who ever facing the above problem can use the below code, problem is solved.

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.

0 Kudos

Hello Jayarama,

Thank you for sharing, I just want to confirm that it's working fine for me.... The PO service was created succesfully.

Regards,

Imad

Former Member
0 Kudos

hello imad,

how did you resolve the issue