Start of Content Area

Background documentation Export Data Provider as XML  Locate the document in its SAP Library structure

Use

Using the Export Data Provider as XML command (EXPORT_XML), you can export a data provider as XML. By using the Redirect URL parameter, you can pass the current navigational state or the results data to another application.

Command Parameters

The following information lists the command parameters in the same sequence that they appear in the command wizard when you insert the command:

Parameter

Description

Data Provided Affected (TARGET_DATA_PROVIDER_REF)

You use this parameter to specify which data provider the command is to relate to.

Redirect URL (REDIRECT_URL)

 

You use this parameter to specify the URL that is to be displayed when the command is executed. The navigational state or the results data is passed to the URL as XML in the xml form field. This data is transferred using the POST request. If you do not specify a redirect URL, the XML is displayed directly in the Web browser.

Output Navigational State (NAVIGATIONAL_STATE)

You use this parameter to specify whether the navigational state of the data provider is to be transferred or output as XML.

By default, the navigational stare is transferred or output.

Output Result Data (RESULT_SET)

You use this parameter to specify whether the query results are to be transferred or output as XML.

By default, the results data is not output.

Application Context

This command is useful if you want to pass the current navigational state or results data to another application and process it further. This other application can be a BSP application (Business Server Page), a JSP page (Java Server Page), an ASP page (Active Server Page), and so on. The BSP application requires an ABAP system; the BI system can therefore also be used for the BSP application. The application has to read and process the xml form field.

Example

The following example is a BSP application that outputs the passed XML in a multiline input field.

You can create the BSP application by using the transaction for the Web Application Builder (transaction SE80). Create a new page with the following properties:

Layout

<%@page language="abap"%>

<html>

  <head>

    <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">

    <title> Export XML </title>

  </head>

 

  <body class="bspBody1">

    <h1>XML String</h1>

    <p>

      <textarea name="xml_string" cols="120" rows="40">

        <%= p_xml_string %>

      </textarea>

    </p>

  </body>

</html>

 

Event Handler for OnInitialization

* event handler for data retrieval

data:

      l_xml_string type string.

l_xml_string = request->get_form_field( 'xml' ).

p_xml_string = l_xml_string.

 

Page Attributes

P_XML_STRING      TYPE    STRING

 

End of Content Area