0

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.

Iteration 1

I'm trying to post a document.

  • Substitution logic creates a number 0010001 and assigns to field XBLNR_ALT.
  • Validation fails
  • Document is not posted.

Iteration 2

I correct the validation errors and try to post the document again.

  • Substitution logic creates a number 0010002 and assigns to field XBLNR_ALT.
  • Validation successful.
  • Document posted.

XBLNR_ALT on Doc1 = 0010000
XBLNR_ALT on Doc2 = 0010002

I have tried two ways to update this field:

  1. 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.

  2. By creating a BTE - 00001120 DOCUMENT POSTING: Field substitution header/items. This BTE FM is also called before the validations.

AlexSchell
  • 953
  • 1
  • 1
  • 18

0 Answers0