Skip to Content
-2

User Exit or BADI for "After Saving VF01 or VF04 Tcode".

Sep 01, 2017 at 07:36 AM

440

avatar image
Former Member

Hi Gurus,

I need a user exit/BADI after saving the VF01 or VF04 tcode - i need the billing doc to be created in VBRK table - so that i can use the table VBRK.

My Requirement :

I need a PDF attachment of the output type ZBXX(newly created billing document output type) - the PDF file is to be attached in shipment number which is already created.

For this i have coded in include ZXVVFU08(EXIT_SAPLV60B_008) - but i could see it is triggering before the billing doc is created.

for this i am using this method:

cl_gos_document_service->create_attachment

passing :

ls_object-objkey = lv_tknum. "'shipment number'.
ls_object-objtype = 'VTTK'.

though it is creating the attaching - but i am manually selecting the file from desktop - is there any other way to convert the newly created billing doc output type to PDF file and attach that directly to shipment number(VT03N) tcode??

Also where to save the newly created PDF file - is it possible by spool??

Thanks in advance.

10 |10000 characters needed characters left characters exceeded

I am confused what is the business reason to ask for attaching billing PDFs to the shipment.

I have seen valid requests by the business users to view or print all invoices, belonging to a shipment, but this takes it to a different level...

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Jelena Perfiljeva
Sep 01, 2017 at 06:24 PM
1

The user exits won't help you with this, I'm afraid. Why don't you use a custom output with "special function" media? Then you can have the output triggered and it will execute the function with whatever code you put there.

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Jelena,

Can you please let me know how to implement this - "Why don't you use a custom output with "special function" media?"

Thanks in advance.

0

The easiest way to understand what one can do with Transmission medium 8 - special function, is to have a look at some standard outputs, which utilize this.

A good example is SPED output for application V2 - Shipping. The program, which is maintained in NACE, has a routine (also specified there), which creates an inbound delivery from an outbound one.

1
Former Member

Thanks Veselina - For my ZBXX output type there is already one zprogram assigned for Special function 8 - but it is having different form where as print output 1 has different form - i have kept a breakpoint in the zprogram of special function 8 program - i was expecting the breakpoint to be stopped at while billing document creation - but it not stopping - i need it to be stopped after creation of billing document - as i need it to be created in VBRK table...

0

Please use Google. Answers to all your follow-up questions can be found in the existing SCN posts. How to use special function, how to debug output - it's all there, asked and answered before. Google -> site: sap.com -> profit.

0
Former Member
Jelena Perfiljeva

My question is...the breakpoint in zprogram in the special function, will it be triggered after the billing document is created or while creation of the billing document?

0

Output is triggered after transactional data has already been committed, so technically I guess it is "after". Although when you use immediate output it's a rather thin line.

0
Former Member
Jelena Perfiljeva

Hi Jelena Perfiljeva,

Still i am unable to find the required - is there any other option to attach the output type PDF file in the shipment tcode ?

Thanks.

0
avatar image
Former Member Sep 01, 2017 at 12:02 PM
-1

Can anyone help on this??

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Bumping up a post just 4 hours after posting is generally frowned upon on SCN and other online forums. SCN is not a help desk, sorry.

1
Sanjeet Kumar Yadav Sep 04, 2017 at 01:45 PM
0

Hi,

Please go through below link, you will be able to find out your answer.

https://archive.sap.com/discussions/thread/3485342

Share
10 |10000 characters needed characters left characters exceeded