on 12-04-2018 10:37 AM
I have to create an output processing routine (NAST, RSNAST00, APP "V3").
The message is a special file with an internal serial number.
Requierments:
The file shoud be transferred by FTP to customer. For network failures, the conditions must be met!
Theses:
My first concept "select single for update"
I create a table with serial number. In the output processing program:
But it does not work in all cases, not safe in all cases!
Reason: Implicit commit: if the program is extracted from the work process. The database lock is released. A parallel process pulls the same number. The number is NOT unique!
How do i create a unique sequence number without gaps in a output processing program, safely?
Thanks 🙂
> Use an enqueue object to make sure that the transmission not performs twice at the same time
... that's my problem. How do i set the _SCOPE parameter in the context of "SAP update processing" correctly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this approach:
- create a table where you create a line whenever you start the sending procedure. Use a GUID as the key for this table. Create also a field for the customer number of the recepient and a serial number that is left empty on creation. Save the invoice number from VBRK-VBELN in this table also.
- create a second table with two fields: customer number (recepient party) and last serial number.
When starting the sending process:
- select all lines with empty serial numbers and matching recepient from the first table. From this table, take the line with the lowest GUID.
- read the second table with the customer number of the recepient.
- add 1 to the number found there and generate the output using this number
- perform the transmission
- update the serial number in both tables
Use an enqueue object to make sure that the transmission not performs twice at the same time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.