Skip to Content

SAP NetWeaver 7.0 BI: How to send XML data to BI – enhancement

SAP NetWeaver 7.0 BI: How to send XML data to BI – enhancement

Hello, this blog refers to the How to Guide “How to send XML data to BI”.

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f027dde5-e16e-2910-97a4-f231046429f2
You will learn how to send data from SAP NetWeaver 2004s XI/PI to SAP NetWeaver 2004s BI with full quality of service.

The proxy coding mentioned in Step 27 is fixed to a certain PSA structure of the WebService DataSource.

Please find below an example of an enhanced proxy implementation. The coding determines the PSA structure on the fly and therefore it can be reused for any other WebService DataSource using the XI-BI integration. The name of the function module and the exception class are still necessary to add. These constants are maked bold in the example.

I hope the enhancement helps. Comments are very welcome!

 

Enhanced Coding:

 

method ZII_DATA_TO_BW~EXECUTE_ASYNCHRONOUS.
* ==== To be adapted ==========================================================

* Note: only /BI/CF functions keep the name in target system
  DATA: l_function     TYPE funcname VALUE ‘/BIC/CQSENDXML00001000‘,
            l_exception    TYPE seoclsname VALUE ‘ZCX___BIC__CQSENDXML00001000_E’.* –


Get FM

  CALL FUNCTION ‘RPY_FUNCTIONMODULE_READ’
    EXPORTING
      functionname       = l_function
    TABLES
      import_parameter   = l_t_import_parameter
      changing_parameter = l_t_changing_parameter
      export_parameter   = l_t_export_parameter
      tables_parameter   = l_t_tables_parameter
      exception_list     = l_t_exception_list
      documentation      = l_t_documentation
      SOURCE             = l_t_source
    EXCEPTIONS
      error_message      = 1
      function_not_found = 2
      invalid_name       = 3
      OTHERS             = 4.

  IF sy-subrc <> 0.
    CALL FUNCTION ‘RS_MESSAGE_TO_EXCEPTION’
      EXPORTING
        i_exception   = l_exception
        i_msgid       = sy-msgid
        i_msgno       = sy-msgno
        i_msgty       = ‘E’
        i_msgv1       = sy-msgv1
        i_msgv2       = sy-msgv2
        i_msgv3       = sy-msgv3
        i_msgv4       = sy-msgv4
      IMPORTING
        e_r_exception = l_rx_exception.
    RAISE EXCEPTION l_rx_exception.
  ELSE.

* –


Get structure* –


Map data* –


Primary segment* –


Secondary segments: not yet supported* –


Submit to receiver

12 Comments
You must be Logged on to comment or reply to a post.
  • Mic, excellent job.

    I am in a situation and hope you can provide some inputs.

    I have data coming in from a XML file.

    Data in this file is at 3 levels.
    1st level contains the header info. Next two levels contain the transaction data info.
    Ex: Level 2 has the product name and level 3 has amount and corresponding time period. To be more specific Level 2 has all the products and Level 3 has the corresponding transaction amount and calday for that transaction….

    Any tips on how to design a datasource in this case?
    If just add all the fields at both levels to the data source then the generated WSDL file/web service considers all the fields coming at the same level.

    Thanks,
    sam