cancel
Showing results for 
Search instead for 
Did you mean: 

Perfoma Invoice

former_member456547
Participant
0 Kudos

Dear sir,

FROM A SINGLE DELIVERY WE CAN CREATE A MULTIPLE PERFORM INVOICE (F8) BILLING TYPE

BUT I WANT ONE DELIVERY AGAINST ONLY ONE PERFORMA INVOICE SHOULD BE GENERATE

SO HOW CAN I CONTROL THIS MULTIPALE INVOICE GENRATE IN SYSTEM

REGARDS

PRASHANT DESAI

MOBILE NO : 09773300665

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use the same logic used in Delivery to Billing Copy control Requirement Routine. You can see that under Tx: VTFL for delivery LF to Billing F2.

Because in that it checks whether a billin document is already exists for that delivery or not.

Use same logic for you copy control requirement routine from LF to F8.

You can ask ABAP guy to do a VOFM Requirement routine with that logic. Then you have to assign that routine numbre in VTFL.

Simply ask your ABAP guy to code it in a such a way, to check whether F* Billing is already available or not & give a error if available.

Best regards,

Anupa

Answers (3)

Answers (3)

former_member456547
Participant
0 Kudos

We have written a routine in Copying Requirements-> Billing Documents

and attached it to required billing type in VTFL.

But when I am debugging it, I the debugger does not stop at breaking pt. I think routine is not getting called.

What could be the reason?

- Neha

former_member315051
Active Contributor
0 Kudos

As Suggested above, maintain 311 routine for Delvery to Billing at Item level Data Copying requirements field.

try and revert back

Regards,

Ramesh

former_member456547
Participant
0 Kudos

We tried with your suggestion but 311 is also not getting called. System is allowing to create an invoice.

Thanks

- Neha.

former_member315051
Active Contributor
0 Kudos

Hi Neha,

As this is a standard routine for the above requirement,as per my knowledge It should work, Pls check with your ABAPer for the same.

Regards,

Ramesh

former_member456547
Participant
0 Kudos

I have checked it with the help of our ABAPer only. But the routine is nt getting called. Wht could be the reason??

former_member315051
Active Contributor
0 Kudos

Hi , I have tested again in my system , It is working fine with Routine 311 - Copying requirements at item level (VTFL) , while creating invoice you will get log info saying document has allready been created, so check again once..

Ex : Copy controls (VTFL) = F8 to LF , Item category TAN (Standard) assign 311 To Item category.

Regards,

Ramesh

former_member456547
Participant
0 Kudos

i have done the setup but it was not working

Regards

Prashant Desai

Lakshmipathi
Active Contributor
0 Kudos

Through standard itself, you can address this requirement.

Go to VTFL, select your item category for the combination of delivery type and billing type and maintain routine 311 for the field "Copying requirements"

thanks

G. Lakshmipathi

reazuddin_md
Active Contributor
0 Kudos

Exactly same requirement we have,

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.

Created New routine in VOFM- Copying requirements - Billing.

assigned the same in copy control from Delivery to billing in Copying requirements.

(here, our client requirement is, without PGI, pro-forma invoice shouldnot be created & one proforma invoice wrt: one delivery only)

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.

ENDIF.*