FB_CONVERT_FORM_TO_XML ?

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

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.

Similar Messages

  • Problem in FM FB_CONVERT_FORM_TO_XML

    Hello every SDNer,
    I wanna convert a smartform to a Xml-file with FM FB_CONVERT_FORM_TO_XML. The smartform is 'SF_EXAMPLE_01', but the XML-file has always error. who can help me, to find the problem. the code as following.
    regards
    Thanks in advance
    REPORT  ZYLITEST1.
    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 'NLS_STRING_CONVERT_TO_SYS'
      EXPORTING
        LANG_USED                   = 'E'
        SOURCE                      = x
      FROM_FE                     = 'MS '
      IMPORTING
        RESULT                      = xml
      SUBSTED                     =
      EXCEPTIONS
        ILLEGAL_SYST_CODEPAGE       = 1
        NO_FE_CODEPAGE_FOUND        = 2
        COULD_NOT_CONVERT           = 3
        OTHERS                      = 4.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'SOTR_SERV_STRING_TO_TABLE'
      EXPORTING
        TEXT                      = xml
        FLAG_NO_LINE_BREAKS       = ' '
      LINE_LENGTH               =
      LANGU                     = SY-LANGU
      TABLES
        TEXT_TAB                  = itab
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'c:\aa.xml'
        FILETYPE                        = 'ASC'
      APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
        WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
      FIELDNAMES                      =
      EXCEPTIONS
        FILE_WRITE_ERROR                = 1
        NO_BATCH                        = 2
        GUI_REFUSE_FILETRANSFER         = 3
        INVALID_TYPE                    = 4
        NO_AUTHORITY                    = 5
        UNKNOWN_ERROR                   = 6
        HEADER_NOT_ALLOWED              = 7
        SEPARATOR_NOT_ALLOWED           = 8
        FILESIZE_NOT_ALLOWED            = 9
        HEADER_TOO_LONG                 = 10
        DP_ERROR_CREATE                 = 11
        DP_ERROR_SEND                   = 12
        DP_ERROR_WRITE                  = 13
        UNKNOWN_DP_ERROR                = 14
        ACCESS_DENIED                   = 15
        DP_OUT_OF_MEMORY                = 16
        DISK_FULL                       = 17
        DP_TIMEOUT                      = 18
        FILE_NOT_FOUND                  = 19
        DATAPROVIDER_EXCEPTION          = 20
        CONTROL_FLUSH_ERROR             = 21
        OTHERS                          = 22
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    incorporate these changes.
    after the call of 'FB_CONVERT_FORM_TO_XML' remove all other function calls except gui download
    and use the following code
    data: dtab type standard table of solix.
    data: filelength type i .
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = X " variable holding xml in xstring
      TABLES
        binary_tab            = dtab .
    filelength = xstrlen( X ) .
    now use dtab in gui_download and the file type has to be BIN and pass filelength .
    Regards
    Raja

  • - Sapscript output convert to XML -

    Hi Gurus,
    I need to convert sapscript output with values - not template - to an XML File or txt.
    i tried RSTXSCRP program and FB_CONVERT_FORM_TO_XML function module but doesn't help me.
    Please help me with the solution.
    Regards
    Emre.
    Edited by: emre karakurum on May 21, 2010 11:38 AM

    In my opinion, SAPScript form is something quite unstructured - the layout of it can be very complicated and as well containing graphic and so on. XML is, on the other side, something pretty structured. I don't think that you can find something standard for simple conversion SAPScript to XML. SAPScript is simply not like IDOC - it's human readable layout rather than strucutre of data. You will have to write your own print-program which will create your own XML file instead of printing SAPScript form. The logic how to structure the XML file (which tags will be there and which values) will be coded in this print-program.

  • Smartforms - how to use page URL like output option ?

    Hello,
    in the smartofms output options, there's the possibility to set
    BSP Page/URL: ......
    and Output format:  XSF output + HTML.
    My requisite is to send a form in XML via web service, can I use it ? How is run ?
    tks.

    Hello
    Use the function module "FB_CONVERT_FORM_TO_XML" to convert the smartform to XML format table.
    The function module has been used in the method "GET_SMART_FORM_AS_XML" of the class .
    THanks ,
    M.Naveen Kumar

  • Smartform xml output

    Hello Frnds,
    Actually I want to store the output of the smartformx xml output in a file.
    I am able to see it in spool ... but how to get it into a file ?
    How & where to ser port type FILE.
    Thanks & Regards

    Hi ,
    Check this thread, may be it helps you
    xml output from smartforms
    smartform output
    Re: FB_CONVERT_FORM_TO_XML ?
    Re: XML OUTPUT
    http://help.sap.com/saphelp_nw04/helpdata/en/6c/28923c114011d5b675006094192fe3/frameset.htm
    Regards,
    Raghav
    Message was edited by:
            Raghavendra  L

Maybe you are looking for

  • Running Incopy CS5 on Terminal/RDP server

    Hi. Im running Adobe Incopy on a terminal server 2003. My problem is when I log off, the session hangs and must be disconnected by the admin (me). The app that hangs is CS5ServiceManager.exe. I cant find the exe anywhere, and I dont know what it does

  • PGA Limits for 11.1.0.7 on AIX 6.1

    With an 11gR1 Database running under AIX I have the Impression, that requests for pga memory get an ORA-04030 too early. In the following statements there is a skript, that consumes more an more pga memory. It always stops when ~ 113MB of pga are con

  • Firefox v36 - Profile corrupt after clean uninstall / install

    Hi All, Please could I have some help with my Firefox. I have been using Firefox for years and have not had an issue with my profile before. When my machine (windows server 2012) goes to standby and I reconnect, the tabs crash out. I can close the Fi

  • Multiple Approval on single document

    Friends, How we will handle multiple approval on single document. Thanks in Advance Sukhjinder Singh

  • Reverse engineering data model

    Can rational rose reverse enginner data model from database (i.e. read the schema in db and then generate the ER diagram)?