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: 

unable to update Cost Center and GL Account while using BAPI_PO_CHANGE

0 Kudos

i am trying to add new service line item in existing Purchase Order via  BAPI_PO_CHANGE the Service line item is added successfully but not able to update Cost Center and GL Account for service line 20 .. any solution for it ?

CALL FUNCTION 'BAPI_PO_CHANGE'

     EXPORTING

       purchaseorder     = ebeln

     TABLES

       return                   = wt_return[]

       poitem                  = it_poitem[]

       poitemx                 = it_poitemx[]

       poschedule            = it_poschedule[]

       poschedulex          = it_poschedulex[]

       poaccount             = it_poaccount[]

       poaccountx            = it_poaccountx[]

       poservices             = it_poservices[]

       posrvaccessvalues = it_posrvaccessvalues[].

1 ACCEPTED SOLUTION

0 Kudos

The Requirement was :

Adjusting existing purchase order with creating new service line to it.

The Issue got Resolved but instead of creating Service line got solution of creating one more PO line item with service line ..

Tried everything for creating service line with GL Account and Cost Center but GL Accounts and Cost Center is missing in created line (As in My Original Question )..

Itab's of Line item with Service Line :

1.Values passed to the 'BAPI_PO_CHANGE' :

2. it_poitem :

3. it_poaccount :

4. it_poservices :

5.  it_posrvaccessvalue :

4 REPLIES 4

JL23
Active Contributor
0 Kudos

your shown code is of no use,  the important part is how you fill  these tables, which fields are filled with what values.

raymond_giuseppi
Active Contributor
0 Kudos

How did you fill (at least) POACCOUNT, POSERVICES and POSRVACCESSVALUES ?

Hint : compare SERIAL_NO in table POACCOUNT and POSRVACCESSVALUES

Regards,

Raymond

0 Kudos

The Requirement was :

Adjusting existing purchase order with creating new service line to it.

The Issue got Resolved but instead of creating Service line got solution of creating one more PO line item with service line ..

Tried everything for creating service line with GL Account and Cost Center but GL Accounts and Cost Center is missing in created line (As in My Original Question )..

Itab's of Line item with Service Line :

1.Values passed to the 'BAPI_PO_CHANGE' :

2. it_poitem :

3. it_poaccount :

4. it_poservices :

5.  it_posrvaccessvalue :

0 Kudos

have you seen the example from OSS note 420332 - BAPI_PO_CREATE: Muster für Dienstleistungen