2006 May 05 1:39 PM
hello all SDNers,
FM FB_CONVERT_FORM_TO_XML , for example ,import parameter->I_FORMNAME =
'SF_EXAMPLE_01', then Export parameter->E_XML of type XSTRING , what's that
export XML? How can i use this export? can you give me some tips?
thanks in advance
Yaning
2006 May 05 2:04 PM
Hi yaning,
1. this will generate the XML file for this.
2. just copy paste.
REPORT ABC.
*----
data : x type xstring.
data : begin of itab occurs 0,
f(100) type c,
end of itab.
data : xml type string.
*----
CALL FUNCTION 'FB_CONVERT_FORM_TO_XML'
EXPORTING
I_FORMNAME = 'SF_EXAMPLE_01'
IMPORTING
E_XML = x
EXCEPTIONS
NO_NAME = 1
NO_FORM = 2
NO_ACTIVE_SOURCE = 3
CONVERSION_ERROR = 4
ILLEGAL_FORMTYPE = 5
GENERATION_ERROR = 6
OTHERS = 7
.
*----
CALL FUNCTION 'LXE_COMMON_XSTRING_TO_STRING'
EXPORTING
IN_XSTRING = x
IN_CODEPAGE = '4110'
EX_CODEPAGE = '0000'
IMPORTING
EX_STRING = xml
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
*----
XML
CALL TRANSFORMATION ('ID')
SOURCE tab = itab[]
RESULT XML xml.
*----
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml
i_tabline_length = 100
TABLES
et_table = itab.
*----
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\aa.xml'
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab
.
regards,
amit m.
hello all SDNers,
FM FB_CONVERT_FORM_TO_XML , for example ,import parameter->I_FORMNAME =
'SF_EXAMPLE_01', then Export parameter->E_XML of type XSTRING , what's that
export XML? How can i use this export? can you give me some tips?
thanks in advance
Yaning
2006 May 05 1:45 PM
Hi,
What is the purpose of calling this function?
Looks like this takes the SMART Forms name as input and gives the output of the SMART Form in a XML format.
So, do you require something in a XML format?
Regards,
Ravi
Note : Please mark the helpful answers
2006 May 05 1:57 PM
hello everyone,
i want to know ,if this XML is similar as that XML, which is used for customizing , over parser to create a BSP-page?
In fact i wanna dynamic create a SmartForm corresponding my BSP-Page. I don't know ,how do it. can you give me some tips?
Yaning
2006 May 05 2:00 PM
Hi,
This function is going to produce a XML of a existing SMART Form. I don't there is any way of creating and executing a SMART Form on the fly.
You need to design the Windows / pages etc at design time.
You cannot create a SMART Form dynamically.
Regards,
Ravi
Note :Please mark the helpful answers
2006 May 05 2:09 PM
Hi Ravi,
I wanna create a SystemAction ,which can create a PDF corresponding my BSP-page. So i need a according SmartForm. If i cannot create a SMART Form dynamically, Okay i predefine a Smartform , can i modify it dynamically?
Yaning
2006 May 05 2:15 PM
No You cannot.
You can only execute by passing the parameters.
However, you can design your SMART Form in such a way that parts of it will get executed upon satisfying specific conditions. SO, depending on the parameter values, you can make a WINDOW / PAGE appear / disappear.
Regards,
Ravi
Note : Please mark the helpful answers
2006 May 05 1:45 PM
Hi yaning,
1. thats nothing but the xml in
in raw format.
regards,
amit m.
2006 May 05 1:46 PM
hi,
try this way,..
data: formname type string,
xml type XSTRING.
formname = 'SF_EXAMPLE_01'.
CALL FUNCTION 'FB_CONVERT_FORM_TO_XML'
EXPORTING
I_FORMNAME = formname
IMPORTING
E_XML = xml
EXCEPTIONS
NO_NAME = 1
NO_FORM = 2
NO_ACTIVE_SOURCE = 3
CONVERSION_ERROR = 4
ILLEGAL_FORMTYPE = 5
GENERATION_ERROR = 6
OTHERS = 7
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Regards
vijay
2006 May 05 2:04 PM
Hi yaning,
1. this will generate the XML file for this.
2. just copy paste.
REPORT ABC.
*----
data : x type xstring.
data : begin of itab occurs 0,
f(100) type c,
end of itab.
data : xml type string.
*----
CALL FUNCTION 'FB_CONVERT_FORM_TO_XML'
EXPORTING
I_FORMNAME = 'SF_EXAMPLE_01'
IMPORTING
E_XML = x
EXCEPTIONS
NO_NAME = 1
NO_FORM = 2
NO_ACTIVE_SOURCE = 3
CONVERSION_ERROR = 4
ILLEGAL_FORMTYPE = 5
GENERATION_ERROR = 6
OTHERS = 7
.
*----
CALL FUNCTION 'LXE_COMMON_XSTRING_TO_STRING'
EXPORTING
IN_XSTRING = x
IN_CODEPAGE = '4110'
EX_CODEPAGE = '0000'
IMPORTING
EX_STRING = xml
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
*----
XML
CALL TRANSFORMATION ('ID')
SOURCE tab = itab[]
RESULT XML xml.
*----
Convert to TABLE
CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
EXPORTING
i_string = xml
i_tabline_length = 100
TABLES
et_table = itab.
*----
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\aa.xml'
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab
.
regards,
amit m.
2006 May 05 2:30 PM
Hi Amit,
thanks for your replay!
Do you konw, if exists a FM ,which convert a XML file to SmartForm?
Thank you very much.
regards
Yaning
2006 May 05 2:40 PM
Hi Amit,
FM 'LXE_COMMON_XSTRING_TO_STRING' i have not found.
is that correct?
regards
Yaning
2006 May 07 1:48 PM
check out this weblog.
/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp
Regards
Raja
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |