cancel
Showing results for 
Search instead for 
Did you mean: 

Billing

0 Kudos

Dear All
When i enter t.code vf04 in system and excute there are alot of document although this all documents have invoice the reason is in those orders we have material rejection
How can i solve this problem i want system didn't appear this document in vf04

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Hadeer

As outlined above when you run the VF04 transaction the system selects all of the entries in the VKDFS table that fit into the selection criteria and it will then try to bill them all one at a time combining them where the type date and partner are the same.

In this case if there were several unbilled items in one reference document, it would not be known that at this point why a particular item or document could not be billed, the system would have to try to bill it and when it fails it would write the log to the VBFS table. (in standard)

You have 2 options to meet your requirement here:
In the customising of the reason for rejection you can set it as relevant for billing or not.

SPRO > SALES > SALES DOCUMENTS > SALES DOCUMENT ITEM > DEFINE REASON FOR REJECTION (set the BIC flag field V_TVAG-FK_ERL)

When this flag is set in the reason for rejection, if you had a document with one item it would not be written to the VKDFS table so it would not appear in VF04.

If you have more than one item in a sales order and only one is rejected then that sales order would be in VKDFS and VF04 would try to bill ALL the items in the sales thus writing a log for all the rejected items it tries to generate a billing document for but failed. If you did not want these entries to appear in the log or did not want to write a log for the background job you could avoid it with a small modification to a copied routine.

Pick routine 002 (LV60A002) for example.

* Billing block

  IF VBAP-FAKSP NE SPACE.

    SELECT SINGLE * FROM TVFSP WHERE FAKSP = VBAP-FAKSP

                               AND   FKART = TVFK-FKART.

    IF SY-SUBRC = 0.

      PERFORM VBFS_HINZUFUEGEN USING VBAP-POSNR '015' SPACE             >>>>>>

                                                      SPACE SPACE.

      SY-SUBRC = 4.

      EXIT.

    ENDIF.

    SY-SUBRC = 0.

  ENDIF.

The VBFS_HINZUFUEGEN routine is writing the job log so you could check if the program is SDBILLDL and the sy-batch flag is set, so you have a background job. In that case skip the call to VBFS_HINZUFUEGEN only in the background case, that way the job log is not clogged up with all your rejected items that you do not need to know about. In dialog the user would still get the information for example.

So you would need to implement such a custom routine in place of the one you have which is checking the reason for rejection.

Hope it helps you further
Kind regards
Brian

 
 

phanikumar_v3
Active Contributor
0 Kudos

Dear Brian

Very helpful answer--If you activate BIC option for your Reason for rejection--then assign this to a sales order line item (even though you are having a cancelled billing doc for this line item)--then this order will not be visible in VF04.(normally BIC will be active in some Standard rejection key settings)

Further the net value for this rejected line item will be reduced based on your ""Statistical"" column (Either X/Y) in Rejection key settings..

X-Option: Rejected line item value will be reduced from Total net value--But these rejected line item value cannot be used as a statistical info in later days..

Y-option: It is also like X--But rejected line item value can be used for further statistical calculations..

Thank you again Brian for your detailed answer.

Now i need to change as suggested by you in my PRD server with my TRs..

Phanikumar

Answers (5)

Answers (5)

phanikumar_v3
Active Contributor
0 Kudos

Dear Hadeer,

It is quite possible to have VF04 appearance even though reason for rejection assigned  at Sales Order level for every line item..(Order relevant billing--credit memo/Debit memo)

Dear Lakshmipathiji--Any particular SAP note-To make this Deactive??Pl help..

Also Once You have created a billing ( later cancelled also) for a Order relevant billing--If you are trying to Delete the sales order-system will stop you due to proceeding document existence...

Also These sales orders will be visible in VF04 again--(Not to make this-there was only option of changing billing date to 01.01.1900 or 31.12.9999 at SO level)

Is there any other alternative--Let us wait to hear from members..

0 Kudos

not assign to sales order assign in one item in sales order

tao_sun2
Employee
Employee
0 Kudos

Hi Hadeer,

You can run report RVV05IVB for these sales orders and check whether billing due index can be fixed.

Note 128947 is helpful.

Best Regards,

Tao

former_member204407
Active Contributor
0 Kudos

Dear Magdy,

Have you assigned reason for rejection for all the line items in the sales order which is displaying  in VF04.

As suggested by Mr.Lakshmipathi please check the document flow along with that  check the status in the header & item for the sales order which is displaying in VF04.

if there is any subsequent document with out any reason for rejection in sales order line item (PGI should be completed) it will be displayed in VF04 .

If everything fine then check with your ABAPER.

Thanks,

Krishna.

0 Kudos

no i put the reason for rejection for one item only and others not

Lakshmipathi
Active Contributor
0 Kudos

Do you mean to say though Reason for Rejection is assigned to line items in sale order, still it appears in VF04?  Ideally it should not happen with the standard functionality.  Check the document flow of that sale order

G. Lakshmipathi

0 Kudos

i checked this we make a billing with order related

RahulHanda
Active Contributor
0 Kudos

Hi Hadeer,

VF04 will show you documents for which billing document yet not created. You can do simulation/create individual or collective documents.

Now your requirement is to restrict certain orders to appear in this list, is it correct?

If you have different order type and finally different billing type you can restrict the same by billing type itself. On the other hand if you want to restrict with your own logic then try with exit.

Regards

Rahul