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: 

BAPI_ALM_ORDER_MAINTAIN dumps in SAPLIPAR

kkoetter
Participant
0 Kudos
323

Hello all,

for a customer project I have to update serveral service order and create confirmations within one session.

The update of the service order is done with BAPI_ALM_ORDER_MAINTAIN (mainly adding partners), each call is done with a SAVE in IT_METHODS; with respect to SAP note 770626 also with DESTINATION 'NONE'.

Quite strange is, that e.g. the second call of the BAPI gives me success messages about the successfull creation of the first and the second order(?!). The third call gives success messages about the first, second and third order and so on...

When I then commit the transaction, I get a dump SAPSQL_ARRAY_INSERT_DUPREC in prog SAPLIPAR, Incl LIPARU08, FM PM_PARTNER_UPDATE at

INSERT IHPA FROM TABLE H_IHPA.

What does the SAVE in IT_METHOD mean exactly - does it only SAVE the REFNMUBER, or does it save anything submitted to the BAPI within one session?

Any further hints?

Thanks & best regards,

Karsten

2 REPLIES 2

mvoros
Active Contributor
0 Kudos
92

Hi,

have you tried to look for OSS notes? Maybe it's a bug in SAP. Try this one 1057555. It describes a similar error for transactions but I guess that it can affect BAPI as well.

Cheers

0 Kudos
92

Yes, I searched the notes and found nothing. Then I contacted SAP support - they told that each call of this BAPI must be followed by BAPI_TRANSACTION_COMMIT ! More advanced transaction handling is not possible!

After that I changed my program logic and now BAPI_ALM_ORDER_MAINTAIN is only called once.

The METHOD table is filled like this:

IT_METHODS

refno objty method objkey

000001 PARTNER CREATE 000480069260

000001 PARTNER CREATE 000480069259

000001 PARTNER CREATE 000480069830

000000 SAVE

IT_PARTNER is filled like this:

orderid parnter_role partner

000480069260 CP 000000000021

000480069260 CP 000000000037

000480069259 ZO 000000120617

000480069830 CP 000000000026

The BAPIRET looks like this

S IW 085 Order 480069259 saved with notification 310061801

S IW 085 Order 480069260 saved with notification 310061802

S IW 085 Order 480069830 saved with notification 310062372

I would expect, that Partners CP 21 and CP 37 would be added to Order 480069260, Partner ZO 120617 to Order, and Partner 26 to Order 480069830.

But instead the first two partner were added to all three orders?! What is this for a freakish BAPI??

Thanks & best regards,

Karsten