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: 

smartform email address

Former Member
0 Kudos

Hi experts,

Iam working on smartform and iam able to send the output to email.But i dont want to give email address in the program. I want give parameter to the user to pass email address.Can any suggest me how can i pass email id explicitly....!

Iam working on VF02>Billing doc>Issue output to-->

Here i have changed the exisitng program to send output to email.


   i_objpack-body_num = v_lines_bin.
      i_objpack-doc_type = 'PDF'.
      i_objpack-obj_name = 'smart'.
      i_objpack-obj_descr = 'Invoice'.
      append i_objpack.


      clear i_reclist.
     <b> i_reclist-receiver = 'abcdefg@gmail.com'.</b>-->here i want to pass email id using parameter.
      i_reclist-rec_type = 'U'.
      append i_reclist.

      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
        TABLES
          packing_list               = i_objpack
          object_header              = wa_objhead
          CONTENTS_BIN               = i_objbin
          contents_txt               = i_objtxt
          receivers                  = i_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          others                     = 8.


thanks

kaki

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If you are sending it your vendor, see if you can store the email address as a part of the vendor master. Then you can retrieve it in your program and set the mail address.

You cannot have it as a parameter of the program as this is not something that the user executes explicitly.

Other options

1. Have a Z Table with table maintenance where the user can maintain the mail address to which the PO needs to be sent.

2. Popup a text box where the user can enter the mail address from the smart form processing program.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

3 REPLIES 3

Former Member
0 Kudos

If you are sending it your vendor, see if you can store the email address as a part of the vendor master. Then you can retrieve it in your program and set the mail address.

You cannot have it as a parameter of the program as this is not something that the user executes explicitly.

Other options

1. Have a Z Table with table maintenance where the user can maintain the mail address to which the PO needs to be sent.

2. Popup a text box where the user can enter the mail address from the smart form processing program.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

0 Kudos

Hi Ravi,

Thanks for the suggestions.

While executing 'DOWNLOAD' function module one screen will pop up with textbox. I want to use this kind of screen. Can u suggest me how to create this type of box with abap.Is there any example??

thank u

kaki

0 Kudos

You can look at the following function modules for the same

POPUP_TO_GET_VALUE

POPUP_TO_GET_ONE_VALUE

Regards,

Ravi