Application Development and Automation 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: 
Read only

how to find the function module sending email in Script print program SAPFM06P

Former Member
0 Likes
1,276


Hi All,

Can any one tell me how to find the function module sending email in Script  print program SAPFM06P.

I am unable to find as this looks different. I could find two function module in routine entry_neu which are 1. ME_READ_PO_FOR_PRINTING

2. ME_PRINT_PO. But I am not finding how SAP is sending email from this function modules. Can any one help me in finding out the function module for sending email.

Please find the standard program below.

Request help ASAP.

Thanks

Raj

*----------------------------------------------------------------------*

*   INCLUDE FM06PE02                                                   *

*----------------------------------------------------------------------*

form entry_neu using ent_retco ent_screen.



  data: l_druvo like t166k-druvo,

        l_nast  like nast,

        l_from_memory,

        l_doc   type meein_purchase_doc_print.



  clear ent_retco.

  if nast-aende eq space.

    l_druvo = '1'.

  else.

    l_druvo = '2'.

  endif.



  call function 'ME_READ_PO_FOR_PRINTING'

       exporting

            ix_nast        = nast

            ix_screen      = ent_screen

       importing

            ex_retco       = ent_retco

            ex_nast        = l_nast

            doc            = l_doc

       changing

            cx_druvo       = l_druvo

            cx_from_memory = l_from_memory.

  check ent_retco eq 0.

  call function 'ME_PRINT_PO'

       exporting

            ix_nast        = l_nast

            ix_druvo       = l_druvo

            doc            = l_doc

            ix_screen      = ent_screen

            ix_from_memory = l_from_memory

            ix_toa_dara    = toa_dara

            ix_arc_params  = arc_params

            ix_fonam       = tnapr-fonam          "HW 214570

       importing

            ex_retco       = ent_retco.

endform.

3 REPLIES 3
Read only

former_member197132
Participant
0 Likes
881

Hi Vysyaraju,

first Convert output to pdf and then mail it as a attachment via FM "so_new_document_att_send_api1"

Read only

Former Member
0 Likes
881

Hello,

Are you looking at how the standard program sends an email or do you want to know how to send an email.

Regarding the program SAPFM06P, the mail is not triggered by any FM as per my understanding. It uses BCS to trigger an email.

you will find the relevant code in the include FM06PE04 and look at the section for

*sending Document out via mail or FAX

Read only

kiran_k8
Active Contributor
0 Likes
881

Satish,

Enable trace using ST05 and then analyse the trace to get the info of all the function modules that are getting triggered.

K.Kiran.