Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FI document created by IDoc

Former Member
0 Likes
992

Hello,

We are creating FI documents on R3 using IDocs issued from SRM system. I want to get the created document number in realtime. There are user exits in fg BBPI like EXIT_SAPLBBPI_001 etc  but these are called before the document creation. Is there a user exit which I can use?

Best regards.

Ali

Hello,

We are creating FI documents on R3 using IDocs issued from SRM system. I want to get the created document number in realtime. There are user exits in fg BBPI like EXIT_SAPLBBPI_001 etc  but these are called before the document creation. Is there a user exit which I can use?

Best regards.

Ali

2 REPLIES 2
Read only

vijay_hariharan
Contributor
0 Likes
688

Hi Ali,

From experience, the accounting document number is not available in Exits/BADis/BTE's. If this is an absolute requirement, you would probably have to look for an implicit enhancement somewhere in the AC_DOCUMENT_CREATE Function Module.

You can also check Function Module Number_Get_Next as can be seen below to find the real time document number:

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

  NR_RANGE_NR                   = '1'       "Number range interval

  OBJECT                        = 'ZNRANGE' "Number range object (SNRO)

IMPORTING

  NUMBER                        = ld_number

  RETURNCODE                    = ld_error

But there is a Risk involved with this i.e. if you have multiple Accounting documents of the same type being posted parallel, the Number might be incorrect. Hence only if you are sure that Accounting document is posted from one place and one by one, I would recommend you use this.

Also. lastly, you can wait for other posts from people more experienced than me who may be able to provide a better solution.

Hope this helps.

Regards,

Vijay

Read only

former_member188827
Active Contributor
0 Likes
688

Check if you can get this information through BTE "00001030": POST DOCUMENT.

Regards