Show TOC

 ABAP Interface IF_BICS_CONS_WEBITEM_CUST_EXITLocate this document in the navigation structure

Attributes and Methods

ABAP interface IF_BICS_CONS_WEBITEM_CUST_EXIT has ABAP attributes and ABAP methods. The ABAP attributes are constant values. The ABAP methods belonging to this interface are more important. These are described below.

Methods Description

Initialize

(IF_BICS_CONS_WEBITEM_CUST_EXIT~INITIALIZE)

This ABAP method is called in the following cases:

  • When initially rendering the Web template
  • If the parameters of Web item Custom Extension have been set (using command SET_ITEM_PARAMETERS).

You can set the following import parameter:

Properties (I_T_PROPERTIES) The properties form a table with name/value pairs and are specified in the Web template. You can find more information under Custom Extension at the Property List parameter (NAMED_PROPERTY_LIST).

Release Resources

(IF_BICS_CONS_WEBITEM_CUST_EXIT~FREE)

This ABAP method is called in the following cases:

  • Closing the application
  • Logging off from the system
  • Changing the Web template

Execute

(IF_BICS_CONS_WEBITEM_CUST_EXIT~EXECUTE)

This ABAP method is called for rendering the output: It is called when a dependent data provider is changed, or the parameters are set:

You can set the following import parameters:

  • XML Entry (I_XML)

    Depending on the entries under the Access Data Provider List parameter, this import parameter contains the navigational state and/or the result set. You can find more information about the Access Data Provider Listparameter under Custom Extension .

  • Format (I_REQUESTED_RESULT_FORMAT)

    This import parameter specified the required format (HMTL or PDF)

The following export parameter is returned:

XML Output (E_XML)

Using Import Parameter XML Input (I-XML)

The navigational state and/or the result set of the relevant data provider(s) are passed to the ABAP class using import parameter I_XML as XML.

You can use a number of easy-to-use methods for working with XML data.

Note

There are currently no easy-to-use methods available for extracting the result set to an internal ABAP table.

Call XML Nodes from Data Providers and Variable Containers

ABAP class CL_BICS_CONS_WEBITEM_UTIL contains the ABAP method PARSE_XML. This method returns the XML nodes of all data providers and variable containers. The variable container contains all variables and their values.

*     All data passed to the webitem exit is hold in I_XML using XML.*     The XML is UTF-8 encoded. You can convert the UTF-8 xstring*     to a simple ABAP string by calling the following method:*     ==================================================================      CALL METHOD cl_bics_cons_webitem_util=>utf8_xstring_2_string        EXPORTING          i_utf8_xstring = i_xml        RECEIVING          r_string       = l_xml.*     The XML includes sections about the used data provider and about the*     variable container. The following method parses the XML and*     provides the IF_IXML_NODE instances for data providers and for the*     variable container.*     ==================================================================      CALL METHOD cl_bics_cons_webitem_util=>parse_xml        EXPORTING          i_xml                  = i_xml        IMPORTING          e_t_data_providers     = l_t_data_providers          e_r_variable_container = l_r_variable_container.

Convert XML to an ABAP Structure

The following coding parses the navigational state to an ABAP structure of type RRXI_SX_VIEW. This ABAP structure provides access to information about structures, characteristics, variables, filters and so on (but does not include information about the result set). The result set is not passed to the ABAP structure.

 DATA: l_xml_1 TYPE string,

l_xml_2 TYPE string,

l_sx_view TYPE rrx1_sx_view.

*     For more information about this method: see comment above *     ==================================================================      CALL METHOD cl_bics_cons_webitem_util=>utf8_xstring_2_string        EXPORTING          i_utf8_xstring = i_xml        RECEIVING          r_string       = l_xml_1.*     This transformation extracts the XML node of a specified *     data provider

*     ==================================================================      CALL TRANSFORMATION bics_cons_webitem_filter_by_dp

 PARAMETERS dataprovider = 'DP_2'

 SOURCE XML l_xml_1

 RESULT XML l_xml_2.

 

*     The XML of the data provider is passed to the method convert_xml

*     The structure l_sx_view is filled with the values of the data

*     provider

*     ==================================================================      CALL METHOD cl_bics_cons_state_converter=>convert_xml         EXPORTING

 i_xml_string   = l_xml_2

 IMPORTING          e_sx_view      = l_sx_view.