cancel
Showing results for 
Search instead for 
Did you mean: 

smartform pdf and mail

Former Member
0 Kudos

hi to all ,

i am new to the smartform , if we want to send any form through mail or pdf ,

should we write any programeing or just configuration .i have seen so many programs in sdn . but i am un able to understand where to use .

if we set up in nace as a mail , will it go ?

pls.tell me that if there is any stadard program to do or we have to write own programming?

if it is configuration part , pls.tell me .

Regards,

Kiran.

Accepted Solutions (0)

Answers (4)

Answers (4)

Swetabh
Explorer
0 Kudos

Also check some of the blogs posted by Thomas Jung

<a href="/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface:///people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface

Swetabh
Explorer
0 Kudos

I think just go through this document , it will clarify everything :

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/smartforms/smart%20form%20in%20abap.pdf">PDF and mailing smartforms</a>

<b>do reward points if helpful</b>

regards

swetabh

Former Member
0 Kudos

Hi Kumar,

Which smartform you are using?. In case of Sales/Purchasing you can send smartform via E-mail. Your functional consultant has to do some config. for E-mail or Fax communivation.

Please check Transaction (for Sales/Shipping/Purchasing) : NACE

and select the desired function (Sales/Shipping/Purchasing Example : sales "V1" ) then select your Output type then select your Output.

Then select processing routines and check medium.

Hope this may help you.

Regards,

Lanka

Former Member
0 Kudos

hi kiran

here is the sample program to convert the smartform into pdf format

Here is the sample code.

DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,

i_tline TYPE TABLE OF tline WITH HEADER LINE,

  • Work Area declarations

w_ctrlop TYPE ssfctrlop,

w_compop TYPE ssfcompop,

w_return TYPE ssfcrescl,

  • Variables declarations

v_form_name TYPE rs38l_fnam,

v_len_in LIKE sood-objlen,

v_len_out LIKE sood-objlen,

v_len_outn TYPE i.

Step 1:

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZZZ_TEST2'

importing

fm_name = v_form_name

exceptions

no_form = 1

no_function_module = 2

others = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

w_ctrlop-getotf = 'X'.

w_ctrlop-no_dialog = 'X'.

w_compop-tdnoprev = 'X'.

Step 2:

CALL FUNCTION v_form_name

EXPORTING

control_parameters = w_ctrlop

output_options = w_compop

user_settings = 'X'

IMPORTING

job_output_info = w_return

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Step 3:

i_otf[] = w_return-otfdata[].

Step 4:

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

max_linewidth = 132

IMPORTING

bin_filesize = v_len_in

TABLES

otf = i_otf

lines = i_tline

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

~~Guduri