cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Smartforms output content into HTML File

Former Member
0 Kudos
344

Hi,

I have a requirement, Smartforms output contents needs be converted as HTML File and it should be sent as email.

I am able to get the Smartforms output in html format but the output is shown as binary format.

After the fm call the job_output_info parameter is holding the smartforms output content in

job_output_info-XMLOUTPUT[] (xsf content)

job_output_info-XMLOUTPUT-STSHEET[] (css content)

job_output_info-XMLOUTPUT-TRFRESULT[] (html content)

Help me out how to handle the job_output_info details to html format.

Code

-


DATA v_fm_name TYPE rs38l_fnam.

DATA v_tdsfname TYPE tdsfname VALUE 'ZVR39_SF'.

DATA output_options TYPE ssfcompop.

DATA job_output_info TYPE ssfcrescl.

DATA document_output_info TYPE ssfcrespd.

DATA job_output_options TYPE ssfcresop.

DATA w_control TYPE ssfctrlop.

*-Finding the Smartform Layout Name

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = v_tdsfname

IMPORTING

fm_name = v_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

*-Defining the output to HTML Format

*-Activating XSF Output

output_options-xdfcmode = 'X'.

output_options-xdf = space.

output_options-xsfcmode = 'X'.

output_options-xsf = 'X'.

output_options-xsfoutmode = 'A'. "

output_options-xsfoutdev = 'P863'.

output_options-xsfformat = 'X'.

*-Calling the Smartform Layout

CALL FUNCTION v_fm_name

EXPORTING

output_options = output_options

user_settings = 'X'

IMPORTING

document_output_info = document_output_info

job_output_info = job_output_info

job_output_options = job_output_options

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Giri

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Giri,

I am having exactly the same problem today. Can you please let me know how you converted the XSF version to XML format ? If possible, please send the code logic for that.

Thanks in advance,

Mohit Singh

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this link.In that,I am converting the output of smartform to PDF and then attaching it through mail.

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap code samples/smartforms/smartform in abap.pdf

Former Member
0 Kudos

Hai, Given link is not working. Please give me a valid link or examples.

Giri