0% found this document useful (0 votes)
71 views2 pages

XML To Sap Test

This function takes XML data as input and displays it in an HTML control. It first converts the XML to a DOM document, then to a raw XML table. It creates an HTML control container if it doesn't already exist, and loads the raw XML table data into the HTML control for display. Finally, it calls screen 9002 to display the output.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views2 pages

XML To Sap Test

This function takes XML data as input and displays it in an HTML control. It first converts the XML to a DOM document, then to a raw XML table. It creates an HTML control container if it doesn't already exist, and loads the raw XML table data into the HTML control for display. Finally, it calls screen 9002 to display the output.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

C:\Documents and Settings\Administrator\Desktop\test.xml FUNCTION Z_U_ONEBTI_XML_DISPLAY.

*"---------------------------------------------------------------------*"*"Local Interface: *" IMPORTING *" REFERENCE(IP_XSTRING) TYPE XSTRING OPTIONAL *" REFERENCE(IP_STRING) TYPE STRING OPTIONAL *" REFERENCE(IP_TITLE) TYPE SYTITLE OPTIONAL *" REFERENCE(IP_FILENAME) TYPE STRING OPTIONAL *"---------------------------------------------------------------------DATA lf_xstring TYPE xstring. DATA lf_xml_document TYPE REF TO if_ixml_document. FIELD-SYMBOLS <fs_xstring> TYPE xstring. IF ip_string IS SUPPLIED. lf_xstring = cl_proxy_service=>cstring2xstring( ip_string ). ASSIGN lf_xstring TO <fs_xstring>. ELSEIF ip_xstring IS SUPPLIED. ASSIGN ip_xstring TO <fs_xstring>. ELSE. EXIT. ENDIF. CHECK <fs_xstring> IS ASSIGNED AND NOT <fs_xstring> IS INITIAL. * create DOM document from XML xstring CALL FUNCTION 'SDIXML_XML_TO_DOM' EXPORTING xml = <fs_xstring> * SIZE = * IS_NORMALIZING = 'X' IMPORTING document = lf_xml_document EXCEPTIONS invalid_input = 1 OTHERS = 2. IF sy-subrc <> 0. * fall back to old XML-Display version... PERFORM old_display_xml USING <fs_xstring>. EXIT. ENDIF. * create RAW XML-Table CALL FUNCTION 'SDIXML_DOM_TO_XML' EXPORTING document = lf_xml_document pretty_print = 'X' IMPORTING size = gf_rawtable_size TABLES xml_as_table = gt_xml_rawtable EXCEPTIONS OTHERS = 01. IF sy-subrc <> 0. EXIT.

ENDIF. * * create container for HTML-Control IF gcn_container_display IS INITIAL. CREATE OBJECT gcn_container_display EXPORTING container_name = 'HTMLDISPLAY' EXCEPTIONS OTHERS = 0. * create HTML-Control CREATE OBJECT gcn_html_control EXPORTING parent = gcn_container_display EXCEPTIONS OTHERS = 0. ENDIF. * create HTML-Control gf_url = 'XML_DISPLAY_NEW'. CALL METHOD gcn_html_control->load_data EXPORTING url = gf_url subtype = 'xml' CHANGING data_table = gt_xml_rawtable EXCEPTIONS OTHERS = 0. CALL SCREEN 9002. ENDFUNCTION.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy