Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to send mail to a specific vendor by clicking on output type for VF02

Former Member
0 Kudos

Hi friend's,

I have to send mail to a specific vendor for VF02 when click on output type how we can reach that goal can any one tel me..

Regard's,

Shaikh Ali.

27 REPLIES 27

Former Member
0 Kudos

How to send the customer billing document to the vendor - it is wrong!

I guess you want to send the billing document to the customer ( sold-to -party)

- for that need maintain the email address of the customer in customer master

- configure the output type for print program and form

go to the VF31 - enter the sold to party which you want to send the mail and process!

0 Kudos

Hi Kiran,

thanks for soon replay,

actually my requirement is something like that when runing VF02 with value for billing docment and then user go to menu bar billing document and from there he select 'Issue Output To'in that time I need to send mail to given mail id of  Vendor.i written code on save button is it going to trigger on output type.

Regard's,

Shaikh ali..

0 Kudos

Hi,

- From where you are maintaining the mail id's

- are you using the standard print program or customized one?

0 Kudos

When you create our Output, you could select the partner profil & the partner number to send the correspondance. You have to catch this in your Smartforms.

regards

Fred

0 Kudos

hi,

from customized one


0 Kudos

Just based on the output type and output medium just write the own logic to send the mail!

- If you have the spool number - convert to PDF  and send the mail - FM and codes are available

0 Kudos

hi,prasanth,

thank's for replay

let me check first.

Regard's,

sheikh ali..


0 Kudos

Hi shaikh,

Check it,

ask me if you want to further help.

thanks and regards

S V Prasanth

0 Kudos

Hi Prasanth.

k diffentily I will do,

even I have another issue regarding to workflow...which I rise a issue in scn can you go through it...

Regard's,

Shaikh Ali.

Former Member
0 Kudos

Hi Shaikh Ali

  • For your Requirement initially  functionally people need to do some configurations in the SAP system. The Configurations like they need to assign output type for VF02 transaction in NACE.
  • In NACE > At that output type > processing routines they need to assign programs and smartforms.
  • In that program we can write the code to send mail to particular vendor.
  • Use the following FM's to reach your goal.
    EFG_GEN_SEND_EMAIL   --> To send mail for single recipient.
    SO_NEW_DOCUMENT_SEND_API1 -->To send mail for multiple recipient

I hope this will work.

Thanks and regards,

S.V Prasanth

Former Member
0 Kudos

Hi Shaik,

When you configure your out put type in NACE, there is a place where you can register a program and form (subroutine) as shown below:

So create one report program with a subroutine. In the subroutine you can place your code to send email.

For example, create a report with name ZSENDEMAIL and create a form FORM ENTRY.....ENDFORM.

In the above snapshot, enter program = ZSENDEMAIL and FORM routine = ENTRY.

Thank You,

Gajendra.

0 Kudos

Hi gajendra

I know that even I written code by creating subroutine and attached in nace as output type..everything done I want to know when click on menu bar billing document and select issue output to in that time is it vl trigger my output from there or not?it's working on save but I want from menu bar billing documentf-issue output to..

Regard's,

sheikh khalid

0 Kudos

It will trigger! Put the break point on your from entry_XXX   Endform.

0 Kudos

thank you kiran

Former Member
0 Kudos

Hi prasanth,

I am not able to send mail using VF02 BILLING DOCUMENT I want It will send mail when I go menu bar billing document and select output issu to that time can you tel me badi or exit to reach that goal...

regard's,

sheikh ali..


0 Kudos


Hi Shaik,

there may be BADI's or enhancement points exists, while click on menu bar billing document Output type. You can write the Email trigger FM code over there... It will work.

regards,

krishnaek.

0 Kudos

Hi sheikh ali,

As per my knowledge,

     We are not going to enhance the standard things.    

  • After all the configurations of functional team.
  • In the smartform driven program give X for no-dialong in cpu params.
  • Display the SF print preview as pdf in cpu params.
  • After SF call Function
  • Write a code to sent a mail as attachment.

Thanks and Regards

Prasanth.

0 Kudos

Hi Prasanth,

Now i am able to send mail through output...

thank's for your help...

but I have another issue for same SF while sending mail. user are asking when I select output type it will send 2 copy of mail at a time..is it possible if so then how we can reach this goal ?

Regard's,

sheikh ali.


0 Kudos

Hi Shaikh,

Go to VF02 - output messages - Header details - communication method

In that you can set the Number of messages as 2: it will give the two prints for each invoice document!

Rg, Kiran

0 Kudos

Hi Sheikh ali,

You are welcome.

I didnt understand your requirement properly, can u please elaborate your requirement.


what are the 2 copies of mail?. Is that 2 mails or Original copy and duplicate copy of smartform or related to cc and bcc of mails or some thing else?

If u provide this information i will help u to resolve your issue

Regards

Prasanth SV

0 Kudos

hi prasanth,

I need to print 2 copy of smartform which is attach to output type in vf02 but when I run vf02 and select output type and press ok it will not showing pop-up for spool control where I can give number of copyes as'2' how will get that pop-up present it showing form output..

regard's,

sheikh ali.

0 Kudos


hi kiran,

Thank's for your soon replay.

let me check first ,will get back to you ..

regard's,

sheikh ali.

0 Kudos

Hi Sheikh ali,

We dont get that popup when we process through VF02.

If the user need 2 copies all the time then you change your code as follows.

Call SSF_OPEN FM in that

provide exporting parameters pass OUTPUT_OPTIONS-TDCOPIES = 2.


Where we print this form 2 copies will come by default.


Note : when using SSF_OPEN use SSF_CLOSE also.


Hope i fulfill your requirement.


Regards,

Prasanth

0 Kudos

hi prasanth,

let me go through it as you told.

regard's,

sheikh ali.


0 Kudos

hi prasanth,

again my issue come from start when I run VF02 and press enter and go option goto and select output type and press save in that time my output with mail body will triggering correct but from vf02  -menu bar billing document and selecting output type and press print button then it will not triggering mai mail body(which contain text) but direct output will come correct I want mai text to be come with output in pdf?

is any exit or badi else there let me know?I develop code in (BADI_SD_BILLING~INVOICE_DOCUMENT_CHECK)but it not working from vf02 billing document-output type.on high priority

regard's,

sheikh.ali

0 Kudos

hi shaikh ali,

what you want exactly from VF02?

either smartforms ?

or PDF?

or mail with attach PDF?

or you print directly(PDF/SF)?

Please convey your requirement clearly.

if my answers are helpful or correct pl mark that option then i understand which answer is correct which answer is help you.

regards

Prasanth

0 Kudos

Hi,

thank's a lot my problem was solve.

thread was closed..

Regard's,

sheikh ali.