cancel
Showing results for 
Search instead for 
Did you mean: 

Billing block in sales order but system allowing to create Inter company invoice and normal invoice

former_member476626
Participant
0 Kudos

Hello,

In our sales order, billing block is set. But still system allows to create inter-company invoice (wrt delivery) and normal invoice (with ref to delivery) . It should not allow. We have ZIV inter company and ZF2 as normal invoice.

Any pointers where there could be issues in config or if it is an ABAP issue, which user exit or routine one needs to debug to find out the cause ?

regards

sonu

Accepted Solutions (0)

Answers (2)

Answers (2)

VeselinaPeykova
Active Contributor
0 Kudos

In this case the next thing that I would check would be the VOFM routines in VTFL on item level, e.g. ZF2 ->LF for TAN. In standard systems you have routine 004 (LV60A004) which checks the billing block on order header level:

* Billing block for order header
  IF vbak-faksk NE space.
    SELECT SINGLE * FROM tvfsp WHERE faksp = vbak-faksk
                               AND   fkart = tvfk-fkart.
    IF sy-subrc = 0.
      lv_doc_cat_descr = cl_sd_doc_category_util=>get_description( iv_document_category = vbak-vbtyp ).
      PERFORM vbfs_hinzufuegen USING lips-posnr '064' lv_doc_cat_descr
                                                      vbak-vbeln
                                                      space.
      sy-subrc = 4.
      EXIT.
    ENDIF.
    sy-subrc = 0.
  ENDIF.

If you do not have a routine assigned - this could be a possible reason why the process does not work as you expected.

If this is a custom routine - check if you have similar coding in it. If you are not sure about the performed checks in a custom routines- place a breakpoint in the routine and debug.

If you use 004 - you can start from the routine via debugging and check if some custom logic overwrites the error.

former_member476626
Participant
0 Kudos

Thanks a lot Veselina.

VeselinaPeykova
Active Contributor
0 Kudos

Check in customizing again if the billing block which you use is assigned to billing types ZIV and ZF2. Setting a billing block in the sales document is not enough, this billing block should be assigned to the corresponding billing types:

former_member476626
Participant

Thanks Veselina,

Billing blocks are assigned to billing types. Now what should I do ? which exits/routines do we need to look at ?

rgds

sonu