Skip to Content
0
Former Member
Jun 13, 2005 at 12:40 AM

Converting Smartforms output content into HTML File

222 Views

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