cancel
Showing results for 
Search instead for 
Did you mean: 

Cancelled Invoice shouldn't be printed

Former Member
0 Kudos

Hello SAP gurus,

Please guide me how should I control printing of commercial invoices (F2), as client doesnt want to print a cancelled F2 billing document.

Please help.

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

in your driving program you can put this condition that if the cancellation indicator is set in vbrk then hte invoice shud not be priinted.

saurabh

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Amit,

Your problelm looks simple. You dont want the system to determine any output for cancelled documents.

Since output procedure is a mandatory field in billing type configuration, you cannot remove the procedure to stop it. So the best way is, do not maintain any condition record for cancellation document type. This depends on what key combination is used for output type. If the output type is defined with billing type as one of the key then it would be simple for you to exclude cancellation type from output records. If you dont want to change your condition table then as our friends have already suggested use code to control the printing.

Regards,

Naveen Kumar M

Former Member
0 Kudos

Hi,

--> Check which condition type you are using to print the invoice , is it RD00 or some customer one ...

---> Check which Output determination procedure was assigned to your Billing type using tcode V/25 .

--> Now Go to the Output Determination procedure using Tcode V/42 and go to the control data. Here check the Requirement routine # for the condition type that u are using to print the invoice.

--> If you are already using some standard routine like "4" copy them to a custom routine, or create a new Requirement routine using VOFM.

--> In this routine write a code to get the data from VBRK table , Use KOMKBV3-VBELN field to get invoice data from VBRK. Check if the field VBRK-FKSTO is selected or not..

If selected SY-SUBRC = 4 (.I.e billing doc was canceled, so no OUtput should be generated)

else SY-SUBRC = 0. ( Output should be generated)

Hope this solves your issue.

Regards,

Ajai

Don't forget to reward points if helpful.

koolspy_ultimate
Active Contributor
0 Kudos

hello sir can you send me the code for the routine for Cancelled Invoice shouldn't be printed

Former Member
0 Kudos

Hi,

Remove the output determination procedure for that particular Billing type (cancelled billing type) in t.code V/25

Regards

Senya

Former Member
0 Kudos

Tell your abaper to put the validation for (F2) billing type and not S1 billing type.

If VBRK-FKSTO field in blank then only the print-out should come.

When F2 invoice get cancelled it generates another invoice (S1 type, which is true also for debit memo). I assume that your requirement is that once there exists a cancellation invoice for the original F2 invoice the user should not be able to take the print out of the original F2 invoice.

Former Member
0 Kudos

Hey Saurabh, Ashish,

Thanks for your immediate reply.

By the way can anyone tell me the proper logic to be maintained in the programme.

Thanks in advance

Amit

Former Member
0 Kudos

Ask your abaper to put the validation that based on the document type of Invoice (cancelled billing document type S1), printing should be blocked or if it is affecting other billing documents then copy S1 & create ZS1.

Reward Points if it helps,

Regards,

N