cancel
Showing results for 
Search instead for 
Did you mean: 

Document reference = document number

former_member1095384
Active Participant
0 Kudos

Hi,

We want to have the document reference to be equal to the document's number.

I made a new substitution rule via OBBH which replaces BKPF-XBLNR by BKPF-BELNR but unfortunately it doesn't work. Probably because the document number is only known after saving the document.

Someone any clue to get this replacing done?

Accepted Solutions (1)

Accepted Solutions (1)

former_member197269
Active Contributor
0 Kudos

Hi Johan,

Subsitution might not work correctly, as stated above create a zprogram to replace reference number with doc number using 1- sys-date (previous date) via tcode FB02. ensure that this is run first hour next date.

Hope this helps

pls assign points as way to say thanks

former_member1095384
Active Participant
0 Kudos

Is there a possibility to make this program dependant on the document type? Because we only need it for invoices/credit notes posted directly in FI (FB70/75; document types DR and DG)

The reference for all other FI documents should not be changed.

JozsefSzikszai
Active Contributor
0 Kudos

yes, of course, you can select like:

SELECT bukrs belnr gjahr

INTO ==> work_area here

FROM BKPF

WHERE bukrs EQ whatever

AND ( blart EQ 'DR'

OR blart EQ 'DG' )

AND cpudt EQ yesterday

ec

Don't reward if not helpful

Former Member
0 Kudos

why not have the SD document number the same as the Finance document?

This is easily done, you need to make doc type RV externally calculated.

The only reason why you cant you this is if you use invoice lists, which create more than one a/c per invoice or payment terms with two payment dates.

It wont affect what the business sees, and for statements and so on use the BELNR field.

Answers (1)

Answers (1)

JozsefSzikszai
Active Contributor
0 Kudos

hi Johan,.

I am afraid, you can do it only afterwards: as you realised, the number you have only, after you saved the document.

I have no idea, why this makes any sense, storing an information <i>twice</i> (in the same table!)... However if you really need this feature, you should write a program, which runs as a job each night at 1:00 (for example) and changes each document posted on the previous day (CALL TRANSACTION FB02 for example).

hope this helps

ec

former_member1095384
Active Participant
0 Kudos

Hello Eric,

For SD invoices the reference field contains the SD-invoice number.

In order to have both SD and FI invoice numbers displayed in the same column there's this need.

Regards,