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

BAPI_PR_CHANGE : cannot delete/add multiple account assignment

Former Member
0 Likes
1,007

I found some problem about change purchase requisition via Interface BAPI. Now, I use ECC6.

Case: I have 1 PR Document 1 line item is multiple account assignment distribution by quantity:

Item 00010 : 100 EA

Distribute Account Assignment:

01 10 EA

02 20 EA

03 70 EA

I'd like to change account assignment by delete some line and change distribution quantity to be likes as below.

01 10 EA

02 90 EA

===============================================

First time: I try to use BAPI_PR_CHANGE by input into

PRACCOUNT parameter

item serial qty ...

00010 01 10 EA

00010 02 20 EA

00010 03 70 EA

PRACCOUNTX parameter

item serial itemx serialx deletex qtyx ...

00010 01 X X X

00010 02 X X X

00010 03 X X X X

In this case , successfully created but when I open ME52n, I see likes these

item qty delete indicator

01 10 EA

02 20 EA

03 70 EA X

Account assignment item doesn't delete successfully in ME52n but still be flag deletion in the screen.????

===============================================

Second time: I try to use BAPI_PR_CHANGE again by input into

PRACCOUNT parameter

item serial qty delete_ind

00010 01 10 EA

00010 02 90 EA

00010 03 70 EA X

PRACCOUNTX parameter

item serial itemx serialx deletex qtyx ...

00010 01 X X X

00010 02 X X X

00010 03 X X X X

I got message class 06 , message Number 411 : "Sum of quantities >170< larger than total quantity".

I don't under stand why the summation of quantity include the line flag deletion.

=================================================================

I think that the first time input incorrect because the sum of distribution quantity is 30 (after delete 70)

but BAPI process successfully and still flag deletion.

The second input is correct but the BAPI return wrong sum of quantity.

=================================================================

After that I try to use BAPI_REQUISITION_CHANGE : to change delete/add multiple account assigment successfully done.

But I think the newer version (BAPI_PR_CHANGE) should be better .

=================================================================

Note that : I've already use BAPI_PR_GETDETAIL before call BAPI_PR_CHANGE,

and call BAPI_TRANSACTION_COMMIT after the transaction.

Anybody, could you please help me how to input correctly in to BAPI_PR_CHANGE for deletion/addition multiple account assignment line. Is it bug of BAPI or not?

Sasiporn.

1 REPLY 1
Read only

Former Member
0 Likes
478

This message was moderated.