cancel
Showing results for 
Search instead for 
Did you mean: 

billing document header reference no. field, reference number

Former Member
0 Kudos

Hi,

this case is about billing document header reference no. field, reference number i.e, XBELNR should be updated only at the time of releasing to accounting.

Some body can share your ideas to construct this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Suman,

ON basis of vbrk-rfbsk field status" C" i can able to control some how, but i am not sure this status how it impact other documents such as credit note, debitnote etc.,

Ofcourse i am trying to restrict to normal invoice only, but is there any chance of knowing about the POSTING STATUS C will impact what are all the other areas.

i request other people also to throw some light on this.

Thanks

suman_sardar2
Active Contributor
0 Kudos

Hi Bhaskar,

As you told that you release the Billing document manually.

Therefore at the time of Billing creation the Status is not = 'C' and when you release it via VF02 it becomes 'C'.It means SAP transfer the data to accounting successfully.

The above is the impact of posting status.

Thanks,

Suman$

former_member182378
Active Contributor
0 Kudos

Bhaskar,

for argentina as per govt. requirement they have one seperate sequence numbers, that should be updated in reference no. of billing header. the same will updated in invoice layout and accounting document.

Now the issue is if billing needs to be cancelled, the billing doc already taking that no. So sequence should not disturb that

I have worked for processes for Argentina. The sequence number is populated in the reference number (VBAK-XBLNR); sales order, at header level.

Important point is that this number populates in (flows to) VBRK-XBLNR, even if the billing document is cancelled and new billing document is created; this reference number remains the same.

As the (new or old) billing document is created with reference to the same sales order.

Furthermore, after reading your suggested solution -

Posting status (VBRK-RFBSK) would remain C, even if a billing document is cancelled.

So to identify the relevant billing documents -

Take into consideration -

1. TVFK VBRK-FKART

2. VBRK-RFBSK = C

3. VBRK-FKSTO = blank

Message was edited by: TW Typewriter - Edited in blue color.

suman_sardar2
Active Contributor
0 Kudos

Hi Bhaskar,

I am unable to understand your requirement what is impact if it is updated at the time of Billing creation or at the time of Accounting release.

Please note that I am alos not aware that which field your are updating in VBRK-XBLNR as per functional config you can update only below options in Copy control VTFA or VTFL.

APurchase order number
BSales order number
CDelivery number
DExternal delivery number
ECurrent billing document number
FExternal delivery no. if avaialable, otherwise delivery no.

Apart from the above you have to take help of User Exit USEREXIT_FILL_VBRK_VBRP in Program RV60AFZC.

If you have any doubt let me know.

Thanks,

Suman$

Former Member
0 Kudos

Hi Suman,

for argentina as per govt. requirement they have one seperate sequence numbers, that should be updated in reference no. of billing header. the same will updated in invoice layout and accounting document.

Now the issue is if billing needs to be cancelled, the billing doc already taking that no. So sequence should not disturb that is why they are sending it to accounting which leads to customer complaints.if they miss the sequence they penalised.

So if we can update the field at the time of releasing to accounting (they will validate if every thing is correct then only they will release to accounting) then sequence will not get disturb.

suman_sardar2
Active Contributor
0 Kudos

Bhaskar,

I think this can be done provide the same logic to the ABAPer with the check Sy-Tcode = VF02 as I think you are releasing it by VF02 only.There are Posting Status in VBRK-RFBSK and according this User Exit will fill the Reference field.

Thanks,

Suman$

former_member186385
Active Contributor
0 Kudos

Hi Bhaskar,

You can have Billing document Number and Accounting document number with same number range

Create Billing range for Argentina in VN01 and accounting document number range in FBN1

In FBN1, for accounting document set it as External ( which plays a significant role ) and assign to respective document types

Now when you create the Billing , system will create with number and same will be taken as to accounting

hope it will suffice

Former Member
0 Kudos

Hi vemuri,

here nothing to do with invoice number and account number, this is external sequence number, and second thing same billing document type is used by other portfolios.

suman_sardar2
Active Contributor
0 Kudos

Hi Bhaskar,

You can go for the User Exit I have mentioned above.

I talked to the ABAPer and it can be done.

Do let me know if you face any issue.

Thanks,

Suman$

Former Member
0 Kudos

Hi Suman,

I am checking on it, i will let you know.

krishg
Active Participant
0 Kudos

Hi Bhaskar,
We share your pain. Our customers have to cancel the billing document and then require elevated access to reset the number range.


What is the version and support pack of SAP (EHP?)... Are you using custom solution (third party solution) or SAP standard solution for electronic invoicing?


I was told by a third party provider that there are std. SAP notes which will ensure that legal number is assigned after you get the CAE approval . I have not validated that statement. May be this can be confirmed by someone with AFIP Implementation using SAP solution. Please do check the OSS note 1558532, where it indicates the following,

- Document can be saved but cannot be transferred to accounting before it is

authorized.

- Document which is authorized shall not be cancelled.

- When

the billing document is created, validation is run to see if this document is

applicable for webservice scenario. (This check is based on branch details in

table J_1ASNR). If yes, then an entry for this billing document will be created

in table J_1ACAE with status 'New'.

- Validations that are done while saving

invoice is to check the mandatory fields of table J_1ACAE. If there is any

error, then logs are updated and document is not saved. (Other details are

validated at the time of sending this document to AFIP.)

- Once document is

saved in table J_1ACAE, you can trigger the 'send to AFIP' process using

monitoring tool (details in the attachment) or else by scheduling a background

job using monitoring tool (details in the attachment)

- If the validation

fails before sending data to AFIP, document status is updated to 'Validation

Error' and processing of current document is stopped. Once the error is

corrected for that particular invoice, you have to reprocess this document from

the monitoring tool using button 'Send to AFIP'.

- When all required data is

built correctly, system pre-assigns an ODN number to the document.

- The

system sets the status 'Sent to AFIP' and assigns a RFC lock.

(Note: This

status prevents the next authorization to take place before the current one is

finished)

- If document is approved by AFIP, it returns CAE number and status

of document is changed to "Approved", ODN is updated in complete format in VBRK

table and also in J_1ACAE.

Note: The billing document can now be transferred

to accounting.  This will take place automatically if the billing type has been

configured to automatically transfer to accounting.

- If document is

rejected, then status of document will be changed to 'Rejected' and rejection

codes will be updated in table J_1A_WS_REJ. And same pre-assigned ODN will be

reused for the next document.

Former Member
0 Kudos

Hi Gopal,

Thanks for detailed mail, i agree with you for invoice number creation. here we are using ERP 6 EHP4.

Here invoice number is different and external no. is different, here we have customised tables and validations that will create the number after taking the different tax types and different alphanumerics. (001a777..), j_1ACAE table is not maintained.

I am trying with some user exits.

krishg
Active Participant
0 Kudos

Bhaskar,

I am familiar with AFIP process. We have installed the third party solution as Std. solution was not completely developed at that time.  If there is an opportunity, I would recommend looking at std. SAP solution for AFIP (as it will meet your requirements).

If the validation

fails before sending data to AFIP, document status is updated to 'Validation

Error' and processing of current document is stopped. Once the error is

corrected for that particular invoice, you have to reprocess this document from

the monitoring tool using button 'Send to AFIP'.

- When all required data is

built correctly, system pre-assigns an ODN number to the document.

I I understand that it may not be possible to revert to std. process, but when you have changes like this coming from business, you have a case to build saying that we need to do this as a project and adopt std. SAP process!!!

Former Member
0 Kudos

Hi Suman,

ON basis of vbrk-rfbsk field status" C" i can able to control some how, but i am not sure this status how it impact other documents such as credit note, debitnote etc.,

Ofcourse i am trying to restrict to normal invoice only, but is there any chance of knowing about the POSTING STATUS C will impact what are all the other areas.

i request other people also to throw some light on this.

Thanks