Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP : Add Yes / No popup before invoice print

Dear Abap Experts,

We want to give the user a popup message (Yes / No) before printing the billing document (Invoice , The Tcode is VF01).

I mean user must select Yes for print out and no for no print out by the printer.

How can we do this.? Should we use user-exit or by some ABAP code.? The program name in the NACE is RLB_INVOICE.

I have tried all the userexits for the Tcode VF01 but no success. I have checked many threads on SCN but no solution found.

I will be very thankfull to you if any one can help. Image is also attached for more clarification.


Aneel Munawar

VF01.png (56864 B)
Former Member replied

Hi Aneel,

As the output is only triggered in V1 update process ( When you use Dispatch time "4" - Send Immidiately ) there is no way you can give popup before printing the form ).

Do this. It should work.

1. Write the code to give popup before invoice save . You can use BADI/EXIT/ BTE based on the floowing post. Custom Function Module in VF01

2. In the exit code save the response of user ( Yes / No ) along with the invoice number in a custom table. The reason we need custom table instead of ABAP Memory option is that by the time the print program will be called the memory will be refreshed by the COMMIT issued by SAP.

3. Copy the driver program ( RLB_INVOICE ) . Select the response from the newly created custom table and set the flag TDIMMED of output options accordingly. Unfortunately the driver program has to be copied to write the code or you can use the generic BADI for driver program ( I am not sure RLB_INVOICE calls that or not ) to write the code. If you copy the driver program the output type configuration needs to be changed or you can ask for new output type copied from the standard one to use your custom driver program.

4. Delete the response from the custom table if necessary.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question