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

FB_CONVERT_FORM_TO_XML ?

Former Member
0 Likes
1,771

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,533

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,533

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

Read only

0 Likes
1,533

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

Read only

0 Likes
1,533

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

Read only

0 Likes
1,533

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

Read only

0 Likes
1,533

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

Read only

Former Member
0 Likes
1,533

Hi yaning,

1. thats nothing but the xml in

in raw format.

regards,

amit m.

Read only

Former Member
0 Likes
1,533

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

Read only

Former Member
0 Likes
1,534

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.

Read only

0 Likes
1,533

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

Read only

0 Likes
1,533

Hi Amit,

FM 'LXE_COMMON_XSTRING_TO_STRING' i have not found.

is that correct?

regards

Yaning

Read only

0 Likes
1,533

check out this weblog.

/people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp

Regards

Raja