Reputation: 11
I have a requirement to update XBLNR_ALT
field using a number range on the header BKPF
when posting a document. This update needs to happen only after all validations are successful.
My requirement is to update the field using continuous number range. If this update happens before all validations are successful, a number from a number range gets created but is not used in case validation fails. This causes a gap in the numbers and I'm looking for ways to avoid that.
For example, the number range is from 0010000
to 0020000
.
I'm trying to post a document.
0010001
and assigns to field XBLNR_ALT
.I correct the validation errors and try to post the document again.
0010002
and assigns to field XBLNR_ALT
.XBLNR_ALT
on Doc1
= 0010000
XBLNR_ALT
on Doc2
= 0010002
I have tried two ways to update this field:
By creating a substitution exit in GBB1
. XBLNR_ALT
was populated. However, this caused the number range to be not continuous as the validation exits are called after the substitution is done.
By creating a BTE
- 00001120
DOCUMENT POSTING: Field substitution header/items. This BTE
FM is also called before the validations.
Upvotes: 0
Views: 1439