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: 

Error while reversing the GR

Former Member
0 Kudos

Hi

I have a function module which is used to create and reverse a GR for a purchase order based on movement type. When the movement type is 101 it creates the GR and when it is 102 reverses the GR.

For creating the GR, function module BAPI_ENRTYSHEET_CREATE is used which creates a service entry sheet and inserts this record in ESKN table.

his function module is followed by BAPI_TRANSACTION_COMMIT and BAPI_ENTRYSHEET_RELEASE.

For reversing the GR, function module BAPI_ENTRYSHEET_RESET_RELEASE is used in which corresponding service entry sheet is fetched based on PO number and item number and this record is inserted in ESKN table.

I have a situation in which we are creating a GR for a PO of movement type 101 and the corresponding details are inserted into ESKN table and then we are reversing the GR of movement type 102 for the same PO, here details corresponding to this GR has to be inserted into ESKN table but it is trying to insert the details of previous record of movement type 101 and throwing the dump as duplicate entries.

please help to avoid this error.

Thanks.

1 REPLY 1

joao_sousa2
Active Contributor
0 Kudos

If you are using only standard BAPI and absolutely zero direct table inserts, open an support message in http://service.sap.com/support.

Create an example in SE37 for the BAPI that is throwing the error, and include that test data in the support message.


SAP will not support Z programs, so don't even try to talk about your program. Just talk about the BAPI that is throwing the error. This is very important.