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

xml output from smartforms

Former Member
0 Likes
3,308

Hi,

I need to get xml (xsf?) output from I-SU Print Workbench/Smartforms document. Has anybody done this? I would apriciate some hints of how to solve this?

regards,

erki

5 REPLIES 5
Read only

Former Member
0 Likes
1,599

On the header of the Smartform on the <Output Options> tab, I think you will be able to use the output format field.

Here is the help on this field :

SAP Smart Forms: Output Type

You can select one of the following:

Standard Output

during form processing, the output data is generated in OTF format.

XSF Output

during form procesing, the output data is generated in XSF format.

XSF is an XML-based language that is determined in the SAP Smart Forms DTD.

(for the definition refer to BSP page /bc/bsp/sap/smart_forms/smart_forms_xsf.dtd)

XSF Output + HTML

during form processing, the output data is generated in XSF format as well as any HTML data which the application can send to the browser for display.

XDF Output

there is no form processing, but the data from the interface is

converted to XML and written into a spool request. The parameters are filled with the DDIC type and the time stamp of the last activation.

Hope this helps.

If this fixes the problem, please allocate the points

Thanks

Colin

Read only

0 Likes
1,599

Hi,

thanks for answer, but is there any more detailed example of how to do it in ABAP code?

regards,

erki

Read only

0 Likes
1,599

You do not need to do it in the ABAP code if you follow my last post.

Read only

Former Member
0 Likes
1,599

Hello Erki,

This is how i did it.

data : s_archive_index TYPE toa_dara,

s_archive_index_tab TYPE tsfdara,

s_archive_params TYPE arc_params,

s_control_param TYPE ssfctrlop,

s_mail_appl_obj TYPE swotobjid,

s_mail_recipient TYPE swotobjid,

s_output_options TYPE ssfcompop,

s_mail_sender TYPE swotobjid,

s_doc_output_info TYPE ssfcrespd,

s_job_output_info TYPE ssfcrescl,

l_line(1024) TYPE C,

l_table like table of l_line,

xsf_line like line of s_job_output_info-xsfdata.

s_output_options-xsfcmode = 'X'.

s_output_options-xsf = 'X'.

s_output_options-xsfoutmode = 'A'.

s_output_options-XSFFORMAT = 'X'.

CALL FUNCTION v_fm_name

EXPORTING

ARCHIVE_INDEX = s_archive_index

ARCHIVE_INDEX_TAB = s_archive_index_tab

ARCHIVE_PARAMETERS = s_archive_params

CONTROL_PARAMETERS = s_control_param

MAIL_APPL_OBJ = s_mail_appl_obj

MAIL_RECIPIENT = s_mail_recipient

MAIL_SENDER = s_mail_sender

OUTPUT_OPTIONS = s_output_options

USER_SETTINGS = 'X'

LV_SALES = p_sales

LV_PADDR = v_address_num

LV_ADRNR = v_adrnr

LV_EQUNR = v_equnr

LV_SERNR = v_sernr

IMPORTING

DOCUMENT_OUTPUT_INFO = s_doc_output_info

JOB_OUTPUT_INFO = s_job_output_info

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.

loop at s_job_output_info-xsfdata into xsf_line.

l_line = xsf_line.

append l_line to l_table.

endloop.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\temp\test.xml'

TABLES

DATA_TAB = l_table.

Read only

0 Likes
1,599

Hello Kalyan,

I too got the same requirement. i am also done with half development.

Did you get the solution for this requirement.

Kindly, let me know the solution.

Thanks in advance

Regards,

Naresh.