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

Incorrect costs in PMCO table after using BAPI_ACC_ACTIVITY_ALLOC_POST

Former Member
0 Likes
1,031

Hi.

We use BAPI_ACC_ACTIVITY_ALLOC_POST and BAPI_ACC_DOCUMENT_POST to post costs to a CS-order from an external system. The BAPIs are called via RFC.

CO- and G/L documents seem to be created correctly, but table PMCO for the CS-order is only updated occasionally.

Calling the BAPIs from an ABAP program gives correct update of table PMCO.

Anyone got a clue what the problem could be?

/Elisabet

5 REPLIES 5
Read only

abdul_hakim
Active Contributor
0 Likes
707

Hi

If you are calling the BAPIs from external system then ensure that there is a valid RFC Connectivity exists between these systems.Also try to call BAPI_TRANSACTION_COMMIT once you have done your update too.

Cheers,

Hakim

Read only

Former Member
0 Likes
707

Hi Hakim.

Yes, ther is an RFC-connection. The CO and G/L documents are posted ok.

And, ther is a BAPI_TRANSACTION_COMMIT. Otherwise there would not be any updates at all.

Regds

Elisabet

Read only

0 Likes
707

Hello Elisabet,

first of all, I would have a look at the OSS (as you're using a standard BAPI and a standard table isn't updated (PMCO)). When you don't find a note, I would raise a message to SAP.

Perhaps you should think about the following work around:

Create an own RFC. Export the order no. to the RFC. Submit the report, to refresh the PMCO (unfortuantelly I've forgotten the name, but as far as I remember, PMCO is part of the name), for this order (selection criteria in this report).

Best regards

Stephan

Read only

Former Member
0 Likes
707

Hi Stephan.

The problem only occurs then the BAPIs are called from an external sytem... When they are called from inside SAP, everything works fine.

The report name is RIPMCO00, which updates the PMCO table for a given order.

Regds

/Elisabet

Read only

0 Likes
707

Hello Elisabet,

even if it's only a problem of the external call, you're using a standard rfc, which should update the PMCO. Therefore I would search for an OSS note, resp. create an OSS message. Another idea: have you checked SM13 for problems with updates? As far as I know, a problem in the update of the PMCO doesn't cancel the update of the CO document.

Or you develop an own rfc where you submit the RIPMCO00 for the order(s) used in BAPI_ACC_ACTIVITY_ALLOC_POST. Then the PMCO records for these orders should be fine (not the best way, for sure).

Best regards

Stephan