‎2012 Jun 25 10:51 AM
Hi Guys,
I am using cmd_ei_api=>maintain_bapi to upload customer data in to SAP. Everything is working fine except the number range. We are having internal number range. When a customer goes into error, it is not created, but the number is consumed. For example if I give wrong company code, I am getting correct error for it and customer is not created, but the number for the customer is used and next time I will have sequentiality next number.
Kindly Advice how can I have the current number if it customer creation is not successful.
Thanks,
‎2012 Jun 25 11:11 AM
This is sap buffer logic. You can check the replies from Jurgen & Clemens in this thread http://scn.sap.com/thread/3171954.
‎2012 Jun 25 11:33 AM
Hi Kesavadas,
What I understood from the link that you have given is, we need to clear or delete the buffer to retrieve number back.Am I correct?
‎2012 Jun 25 11:38 AM
To be frank , I have not worked in such scenario's. But what I understood from that thread is the we have to change the buffer settings through transaction SNUM for the respective object.
But, why cannot you let it go and use the next number proposed ?
‎2012 Jun 26 4:06 PM
Will it be good idea if I change standard table NRIV(Number Range Intervals).
I mean if customer is not successfully created, and if I reduce the NRIV counter by 1. Will it cause any other effect? Any Suggestion?
‎2016 May 26 10:23 AM
Hi Brijesh,
I do not know if this thread is still open, I faced the same kind of issue and suggest you to use ROLLBACK WORK in case of failure.
check below example.
cmd_ei_api=>maintain_bapi(
EXPORTING
is_master_data = lwa_main_data
IMPORTING
es_master_data_correct = lwa_master_data_correct
es_message_correct = lwa_message_correct
es_master_data_defective = lwa_master_data_defective
es_message_defective = lwa_message_defective
).
IF lwa_message_defective IS INITIAL.
COMMIT WORK AND WAIT.
ELSE.
ROLLBACK WORK.
ENDIF.
Reward me if found useful.
Thanks,
Swapnil Joshi