Control Multiple Invoices
Control Multiple Invoices
com/erp2005_ehp_04/helpdata/EN/dd/5610c954
5a11d1a7020000e829fd11/frameset.htm
The following billing types are available for pro forma invoices in the standard version of the SAP System:
Processing pro forma invoices differs from processing normal invoices in the following ways:
• Goods issue is not required before you create a delivery-related pro forma invoice.
• You can create as many pro forma invoices as you like for a sales order or a delivery
because the billing status in the sales order or delivery is not updated.
• Data from the pro forma invoice is not passed on to financial accounting.
I've found that in STO routine 311 is used to generate proforma invoice without doing PGI.
I've found one link where you can write routine with the help of abaper.. May be this one helps you
but not sure..
In std SAP,
- Aainst single delivery , you can create n. no of Pro-forma invoices, where as only Excise Invoice
is possible.
- You can create invoice w/o PGI
- You can cancel delivery document , though there is Pro-forma invoice exists.
so we addressed all the above cases in the Routine.
take the help of ABAPer. for your info, find the code we adopted for our requirement.
*FORM bedingung_pruefen_901.
IF likp-vkorg = '1100' OR
likp-vkorg = '2100'.
DATA: v_status TYPE wbstk.
DATA: BEGIN OF t_profm OCCURS 0,
vbeln TYPE likp-vbeln ,
END OF t_profm .
DATA: BEGIN OF t_profm_x OCCURS 0,
vbeln TYPE likp-vbeln ,
fksto TYPE fksto ,
END OF t_profm_x.
DATA: v_lines TYPE i.
SELECT SINGLE wbstk
FROM vbuk
INTO v_status
WHERE vbeln = likp-vbeln.
IF sy-subrc = 0.
IF v_status <> 'C'.
MESSAGE a398(00) WITH 'PGI Awaiting for delivery' likp-vbeln.
ELSE.
SELECT vbeln
INTO TABLE t_profm
FROM vbfa
WHERE vbelv = likp-vbeln AND
vbtyp_n = 'U' .
IF t_profm[] IS NOT INITIAL.
SORT t_profm BY vbeln.
DELETE ADJACENT DUPLICATES FROM t_profm COMPARING vbeln.
IF NOT t_profm[] IS INITIAL.
SELECT vbeln
fksto
INTO TABLE t_profm_x
FROM vbrk
FOR ALL ENTRIES IN t_profm
WHERE vbeln = t_profm-vbeln .
ENDIF.
DELETE t_profm_x WHERE fksto EQ 'X'.
DESCRIBE TABLE t_profm_x LINES v_lines.
IF v_lines >= 1.
MESSAGE a398(00) WITH 'Proforma Invoice already created fotr this delivery'.
ENDIF.
ENDIF.
ENDIF.
ELSE.
MESSAGE a398(00) WITH 'No delivery exists'.
ENDIF.