Skip to Content
avatar image
Former Member

PO Print via emails to vendors

All champs,

I have developed one PO Print.

Our requirment is to send this PO Print

via email automaticaly to my respected vendor.

In my driver program where and wht i have to

write code so that when my user use one

radio button then the print send to the respected


Please help me, rewards must be give up to the top.

Thanks and regards


waiting for your reply.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 01, 2008 at 06:27 AM

    No coding is required.

    in nace we define output type

    for document type EF

    i.e., purhcase order

    copy existing output type and create a new output type while creating you need put some values

    in overview screen of output type

    you will find General data tab

    in that you give program name as FM06AEND

    Form routine CHANGE_FLAG



    in default values tab i.e, next tab

    Dispatch time 3 Send with application own transact

    Transmission Medium 5 External send

    Partner function VN Vendor

    Communication strategy CS01 Internet/Letter

    select the created output type and double click on mail title and text


    assing the porcessing routines and partner functions

    in processing routines give medium as 5

    programme zprogramme

    from routing enry_neu

    Smart form zsmartform

    in partner functions

    select the medium 5 and funtion VN, OA what ever they maintained in the partner functions

    now in the me22n assign the same and check

    these things has to do by functional people

    you ask functional people

    If he don't know anything on thing we can't help him rite

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 01, 2008 at 06:32 AM


    For sending the mail automatically u need to code as follows.

    After passing the parameters to the smartform in your print program using CALL FUNCTION function module name:

    1. Fetch the LIFNR from EKKO for the particular Purchase document number.

    2. Fetch ADRNR form LFA1 for the LIFNR fetched.

    3. Fetch SMTP_ADDR (email address of that vendor) from ADR6 using ADRNR fetched.

    4. Call function SO_DOCUMENT_SEND_API1 and fill the required structures and tables to send mail to vendors automatically.

    5. Firstly u need to convert the form from OTF to PDF using FM 'CONVERT_OTF' and attach the pdf document in the above FM and send it.

    To test the PO, u need to release output using ME9E t-code. later u can view the mails sent using SOST transaction.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Vivek,

      As murali mentioned there is no coding required if u r using standard program and smartform in the NACE for EF for the output types.

      If u have changed the program and smartform into Z then u need to code as I mentioned.

      Also if u want the mail format to be user defined then u need to code accordingly as SAP will have the standard format of mail.



  • avatar image
    Former Member
    Oct 04, 2008 at 07:18 AM


    Add comment
    10|10000 characters needed characters exceeded