Skip to Content
-2

Revert the number generated by NUMBER_GET_NEXT

Dec 30, 2016 at 07:06 PM

106

avatar image

My requirement is like - I am using FM NUMBER_GET_NEXT to generate a number to be printed on smartform. But If user clicks on print preview, the generated number is wasted. It should generate the number only when the user clicks on print button.
How can I do it so that if user clicks on preview button, the number generated should revert back and no number will be wasted.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi Dec 31, 2016 at 10:55 PM
2

The solution in standard SAP programs is to use a dummy number (for instance $000000001) until the time the "object" is being saved for real. Note that it's not possible to use ROLLBACK WORK because there's a dialog which automatically commits the database changes (if your range object is not based on memory).

Share
10 |10000 characters needed characters left characters exceeded