ABAP Mapping  is it Possiable to validate my XML from the payload.

Is it possiable to validate my XML from the Payload with the given standard XSD, and one more is that can i verify the files in Archieve , this is due to , i must check whether my file already exist and if exist i should add prefix 1 to that file and store in my arichive , all this using only ABAP mapping
Please help me
thanking you
Sridhar

Workflow Business Events help creating Generate Function to generate an XML payload that in turn is made available to the Subscription's Rule Function. Also, at the time of Raising the Business Event, you could pass the XML payload (in the form of a CLOB) to the Raise API that will be passed along to the Business Event's Subscription Rule Function.
Hope this helps.
Vijay

Similar Messages

  • Abap mapping "How to" not available, can you send me the pdf?

    Hello,
    I need information about ABAP Mapping and all the posts about that kind of mapping have a link to the sdn guide "How to Use ABAP Mapping in Exchange Infrastructure 3.0" --> https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    But that link is broken , is there any way that you can send me that file if you got it?

    Hi Marshal,
    Start with this...........
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    This document will help you to create ABAP Mapping .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping

  • Predelivered ABAP Mapping by SAP (I dont want to go from scatch)

    Hi everybody,
    I have to code a ABAP Mapping.
    Is there somting predelivered by SAP?
    What is the name of the class?
    Thanks
    Regards Mario

    Hi,
    There is no such ABAP mapping code already delivered with XI.
    You have to code it in transaction SE24.
    U can go thru the links :-
    1.     How to u2026 Use ABAP Mapping in XI 3.0
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    2.     iXML ABAP Objects Jumpstart
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    3.     Testing ABAP Mapping
    Testing ABAP Mapping
    Regards,
    Chandra

  • Mapping values from the payload in the standard error message in PI 7.31

    Hi,
    I am working on files that are very large and when such a file fails with some error ,it becomes very difficult to track exactly for which record it is failing.
    For example if the file has 6000 records and the problem is at 641st record,it takes a lot of time to identify which is the 641st record even with Notepad++.
    One of the ways this can be taken care is if we can add any unique value from the record say "employee id" and add it in the error  that we receive in the alert message.
    Please let me know if any one has handled a similar situation or implemented any other solution to reduce delays in error analysis.

    Hi Indrajit,
    Thanks for your response.
    We have a dual stack installation but we have developed the Interface using only java stack.
    In this case if we use SALERT_CREATE and define container variables in ALRTCATDEF,will it work?
    Also the source xsd for all the Interfaces is same ,so we were thinking when a message fails at say Record[50],then we can take the 50th employee id and display it in the alert.
    Do you have an idea if this is possible?
    Nitin

  • XSLT samples for XML- ABAP mapping

    Hi all,
    Does anyone have a XSLT samples for XML->ABAP mapping ?
    regards

    first create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
    <b>XSLT code</b>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:output indent="yes"/>
      <xsl:template match="NewDataSet">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="Table">
                <OUTTAB1>
                  <AIRPORTCODE>
                    <xsl:value-of select="AirportCode"/>
                  </AIRPORTCODE>
                  <CITYOFAIRPORTNAME>
                    <xsl:value-of select="CityOrAirportName"/>
                  </CITYOFAIRPORTNAME>
                  <COUNTRY>
                    <xsl:value-of select="Country"/>
                  </COUNTRY>
                  <COUNTRYABBRIVATION>
                    <xsl:value-of select="CountryAbbrviation"/>
                  </COUNTRYABBRIVATION>
                  <COUNTRYCODE>
                    <xsl:value-of select="CountryCode"/>
                  </COUNTRYCODE>
                  <GMTOFFSET>
                    <xsl:value-of select="GMTOffset"/>
                  </GMTOFFSET>
                  <RUNWAYLENGTHFEET>
                    <xsl:value-of select="RunwayLengthFeet"/>
                  </RUNWAYLENGTHFEET>
                  <RUNWAYELEVATIONFEET>
                    <xsl:value-of select="RunwayElevationFeet"/>
                  </RUNWAYELEVATIONFEET>
                  <LATITUDEDEGREE>
                    <xsl:value-of select="LatitudeDegree"/>
                  </LATITUDEDEGREE>
                  <LATITUDEMINUTE>
                    <xsl:value-of select="LatitudeMinute"/>
                  </LATITUDEMINUTE>
                  <LATITUDESECOND>
                    <xsl:value-of select="LatitudeSecond"/>
                  </LATITUDESECOND>
                  <LATITUDENPEERS>
                    <xsl:value-of select="LatitudeNpeerS"/>
                  </LATITUDENPEERS>
                  <LONGITUDEDEGREE>
                    <xsl:value-of select="LongitudeDegree"/>
                  </LONGITUDEDEGREE>
                  <LONGITUDEMINUTE>
                    <xsl:value-of select="LongitudeMinute"/>
                  </LONGITUDEMINUTE>
                  <LONGITUDESECONDS>
                    <xsl:value-of select="LongitudeSeconds"/>
                  </LONGITUDESECONDS>
                  <LONGITUDEEPERW>
                    <xsl:value-of select="LongitudeEperW"/>
                  </LONGITUDEEPERW>
                </OUTTAB1>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:stylesheet>
    <b>just create a type 1 program and paste the below given code.</b>
    report y_consume_webservice .
    data: wf_user type string .
    data: wf_password type string .
    types: begin of outtab1 ,
       airportcode(6)  ,
       cityofairportname(50),
       country(30)  ,
       countryabbrivation(10),
       countrycode(6)  ,
       gmtoffset(10)  ,
       runwaylengthfeet(15),
       runwayelevationfeet(15),
       latitudedegree(10)  ,
       latitudeminute(10)  ,
       latitudesecond(10)  ,
       latitudenpeers(10)  ,
       longitudedegree(10)  ,
       longitudeminute(10)  ,
       longitudeseconds(10)  ,
       longitudeeperw(10) ,
       end of outtab1 .
    data: outtab type  table of outtab1.
    data: wf_o like line of outtab .
    data: g_okcode like sy-ucomm .
    data: my_container   type ref to cl_gui_custom_container .
    data: g_dock type ref to cl_gui_docking_container .
    data: mygrid type ref to cl_gui_alv_grid .
    data: wf_field_cat type lvc_t_fcat .
    data: wf_field_cat_wa like line of wf_field_cat ,
          wf_is_layout type lvc_s_layo .
    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_fld_cat_wa like line of wf_fld_cat .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    data: xslt_err type ref to cx_xslt_exception .
    constants:
    * encoding for download of XML files
    encoding     type string value 'utf-8' .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: uri2(132) type c lower case .
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default 'proxy.xxx.com' ,
                p_port(4) default '80'.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
    clear wf_string .
    concatenate
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '<soap:Body>'
    '<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
    '<country>' uri2 '</country>'
    '</GetAirportInformationByCountry>'
    '</soap:Body>'
    '</soap:Envelope>'
    into wf_string .
    clear :rlength , txlen .
    rlength = strlen( wf_string ) .
    move: rlength to txlen .
    clear: wf_proxy, wf_port .
    move: p_proxy to wf_proxy ,
          p_port to wf_port .
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Length'
        value = txlen.
    call method http_client->request->set_header_field
      exporting
        name  = 'SOAPAction'
        value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
    call method http_client->request->set_cdata
      exporting
        data   = wf_string
        offset = 0
        length = rlength.
    call method http_client->send
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2.
    call method http_client->receive
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    clear wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).
    replace all occurrences of
        '<' in wf_string1 with '<' .
    replace all occurrences of
    '>' in wf_string1 with '>' .
    replace all occurrences of
    'xmlns=' in wf_string1 with 'xmlns:xsl=' .
    try .
        call transformation (`Y_TEST`)
                source xml wf_string1
                result     outtab = outtab.
      catch cx_xslt_exception into xslt_err.
        data: s type string.
        s = xslt_err->get_text( ).
        write: ': ', s.
        stop.
    endtry .
    break-point .
    Try this and give me your feedback.
    Regards
    Raja

  • ABAP Mapping for Error handling in Proxy to JDBC

    Hi All,
    I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
    I am following the below steps,
    step 1 - In message mapping a UDF is created to catch errors and store them in a variable using  dynamic configuration
    step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
      <SAP:P2>001</SAP:P2/>
      <SAP:P3>Mandatory field is missing[BUKRS] </SAP:P3>
       <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have written the following ABAP code to achieve this:
    method IF_MAPPING~EXECUTE.
      DATA l_record type mpp_dynamic.
    DATA error type String.
    getting dynamic configuration value
    filled in by any previous mapping
    CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
      EXPORTING
        NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
        NAME      = 'ERROR'
      RECEIVING
        RECORD    = l_record.
    error = l_record-value.
    *raising exception with our message
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '001'
        ERROR_TEXT = error .
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '003'
        ERROR_TEXT = error .
    endmethod.
    I am gettign the following message for our code:
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Could you please help in finding the solution for getting currect error message from ABAP class?
    Edited by: SwethaC on Jan 21, 2011 8:18 AM

    The error is due to RFC Call fail from PI system to your ECC Application System.
    Check your RFC Destination for ECC System type 3 in PI System.
    When you are receiving data from ECC System using Proxies & again you are going to ECC System for Validation.
    Why you are not doing this validation on ECC System only in your proxy code ?
    In your proxy code, it will be much better for performance to check your data there on same system.

  • Problem in ABAP mapping

    Hi ,
    I am working with a scenerio where i have 2 diff system to send the data depending upong the sending payload data.
    I am using ABAP mapping where i am able to send accros the data, below is my code
    METHOD IF_MAPPING~EXECUTE.
      BREAK-POINT.
      * initialize iXML
      TYPE-POOLS: IXML.
      CLASS CL_IXML DEFINITION LOAD.
      DATA: L_IXML TYPE REF TO IF_IXML.
    *creating the Interface by calling the create method in class C_IXML
      CALL METHOD CL_IXML=>CREATE
    EXPORTING
       TYPE   = 0
        RECEIVING
          RVAL   = L_IXML.
    create stream factory
      DATA: STREAMFACTORY TYPE REF TO IF_IXML_STREAM_FACTORY.
      CALL METHOD L_IXML->CREATE_STREAM_FACTORY
        RECEIVING
          RVAL = STREAMFACTORY.
    create input stream
      DATA: ISTREAM TYPE REF TO IF_IXML_ISTREAM.
      CALL METHOD STREAMFACTORY->CREATE_ISTREAM_XSTRING
        EXPORTING
          STRING = SOURCE
        RECEIVING
          RVAL   = ISTREAM.
    *This iXML factory can create an empty XML document object named IDOCUMENT.
    initialize input document
      DATA:  IDOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
      CALL METHOD L_IXML->CREATE_DOCUMENT
        RECEIVING
          RVAL = IDOCUMENT.
    parse input document
      DATA: IPARSER TYPE REF TO IF_IXML_PARSER.
      CALL METHOD L_IXML->CREATE_PARSER
        EXPORTING
          DOCUMENT       = IDOCUMENT
          ISTREAM        = ISTREAM
          STREAM_FACTORY = STREAMFACTORY
        RECEIVING
          RVAL           = IPARSER.
      IPARSER->PARSE( ).
      DATA: EL_ELEMENT TYPE REF TO IF_IXML_ELEMENT,
            VALUE TYPE STRING.
      DATA: ROOT TYPE REF TO IF_IXML_ELEMENT.
    get message content of tag
      DATA: INCODE  TYPE REF TO IF_IXML_NODE_COLLECTION,
            INCODE1 TYPE REF TO IF_IXML_NODE_COLLECTION,
            INCODE2 TYPE REF TO IF_IXML_NODE_COLLECTION,
            INCODE0  TYPE REF TO IF_IXML_NODE_COLLECTION.
      CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
        EXPORTING
         DEPTH     = 0
          NAME      = 'MANDT'
         NAMESPACE = 'urn:sap-com:document:sap:rfc:functions'
        RECEIVING
          RVAL      = INCODE0 .
      CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
      EXPORTING
         DEPTH     = 0
        NAME      = 'EMPNO'
         NAMESPACE = 'urn:sap-com:document:sap:rfc:functions'
      RECEIVING
        RVAL      = INCODE.
      CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
    EXPORTING
         DEPTH     = 0
    NAME      = 'EMPNAME'
         NAMESPACE = 'urn:sap-com:document:sap:rfc:functions'
    RECEIVING
    RVAL      = INCODE1.
      CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
    EXPORTING
         DEPTH     = 0
    NAME      = 'DEPARTMENTNAME'
         NAMESPACE = 'urn:sap-com:document:sap:rfc:functions'
    RECEIVING
    RVAL      = INCODE2.
      DATA: URI TYPE STRING.
      URI = 'urn:sap-com:document:sap:rfc:functions'.
    * build up output document =============================================
    create output document
      DATA: ODOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
      CALL METHOD L_IXML->CREATE_DOCUMENT
        RECEIVING
          RVAL = ODOCUMENT.
    DATA: RET_VALUE TYPE I.
    **At this point you can add the nodes (elements, attributes) into the document. First you have to declare the root element node.
      DATA: L_ELEMENT_ROOT TYPE REF TO IF_IXML_ELEMENT.
      DATA: NODE_LIST_COLLECTION TYPE REF TO IF_IXML_NODE_COLLECTION.
    add node to the output document
      DATA: OUTCODE0 TYPE REF TO IF_IXML_NODE.
      DATA: OUTCODE  TYPE REF TO IF_IXML_NODE.
      DATA: OUTCODE1 TYPE REF TO IF_IXML_NODE.
      DATA: OUTCODE2 TYPE REF TO IF_IXML_NODE.
      DATA: INDEX1 TYPE SY-INDEX.
      DATA: INDEX TYPE SY-INDEX.
      DATA IRC TYPE I.
      TYPES:  BEGIN OF TY_IMPORT,
               MANDT             TYPE MANDT,
               EMPNO             TYPE STRING,
               EMPNAME           TYPE STRING,
               DEPARTMENTNAME    TYPE STRING,
         END OF TY_IMPORT.
      DATA: IT_IMPORT TYPE STANDARD TABLE OF TY_IMPORT.
      DATA: WA_IMPORT TYPE                 TY_IMPORT.
      CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
        EXPORTING
       DEPTH     = 0
          NAME      = 'MANDT'
       NAMESPACE = ''
        RECEIVING
          RVAL      =  NODE_LIST_COLLECTION.
      DATA: LENGTH TYPE I.
      CALL METHOD NODE_LIST_COLLECTION->GET_LENGTH
        RECEIVING
          RVAL = LENGTH.
      WHILE INDEX < LENGTH.
       CALL METHOD IDOCUMENT->FIND_FROM_NAME
         EXPORTING
           DEPTH     = index
           NAME      = 'EMPNO'
           NAMESPACE = ''
         RECEIVING
           RVAL      = EL_ELEMENT .
        CALL METHOD INCODE0->GET_ITEM
          EXPORTING
            INDEX = INDEX
          RECEIVING
            RVAL  = OUTCODE0.
       EL_ELEMENT = IDOCUMENT->FIND_FROM_NAME( 'MANDT' ).
        VALUE = OUTCODE0->GET_VALUE( ).
        WA_IMPORT-MANDT  = VALUE.
        CLEAR: VALUE.
        CALL METHOD INCODE->GET_ITEM
          EXPORTING
            INDEX = INDEX
          RECEIVING
            RVAL  = OUTCODE.
       EL_ELEMENT = IDOCUMENT->FIND_FROM_NAME( 'EMPNO' ).
        VALUE = OUTCODE->GET_VALUE( ).
        WA_IMPORT-EMPNO  = VALUE.
        CLEAR: VALUE.
        CALL METHOD INCODE1->GET_ITEM
          EXPORTING
            INDEX = INDEX
          RECEIVING
            RVAL  = OUTCODE1.
       EL_ELEMENT = IDOCUMENT->FIND_FROM_NAME( 'EMPNAME' ).
        VALUE = OUTCODE1->GET_VALUE( ).
        WA_IMPORT-EMPNAME  = VALUE.
        CLEAR: VALUE.
        CALL METHOD INCODE2->GET_ITEM
          EXPORTING
            INDEX = INDEX
          RECEIVING
            RVAL  = OUTCODE2.
       EL_ELEMENT = IDOCUMENT->FIND_FROM_NAME( 'DEPARTMENTNAME' ).
        VALUE = OUTCODE2->GET_VALUE( ).
        WA_IMPORT-DEPARTMENTNAME  = VALUE.
        CLEAR: VALUE.
        APPEND WA_IMPORT TO IT_IMPORT.
        CLEAR WA_IMPORT.
        ADD 1 TO INDEX.
      ENDWHILE.
      TYPES: BEGIN OF TY_DATA,
              DATA TYPE STRING,
                    END OF TY_DATA.
      DATA: IT_DATA TYPE STANDARD TABLE OF TY_DATA,
            WA_DATA TYPE TY_DATA.
      DATA: SSSS TYPE STRING.
      IF SOURCE IS NOT INITIAL.
        CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
          EXPORTING
            IM_XSTRING  = SOURCE
            IM_ENCODING = 'UTF-8'
          IMPORTING
            EX_STRING   = SSSS.
      ENDIF.
    render document ======================================================
    create output stream
      DATA: XX TYPE STRING.
      DATA: XX_1 TYPE STRING.
      DATA: XX1 TYPE STRING.
      DATA: XX2 TYPE STRING.
      DATA: T1 TYPE STRING VALUE ''.
      DATA: T TYPE STRING VALUE '<DATA><MANDT>'.
      LOOP AT IT_IMPORT INTO WA_IMPORT.
       CLEAR: XX1.
       IF SY-TABIX = 1.
        IF WA_IMPORT-EMPNO = '000000000022'.
          CONCATENATE  T WA_IMPORT-MANDT '</MANDT>'
         '<EMPNO>' WA_IMPORT-EMPNO '</EMPNO>'
         '<EMPNAME>' WA_IMPORT-EMPNAME '</EMPNAME><DEPARTMENTNAME>'
         WA_IMPORT-DEPARTMENTNAME '</DEPARTMENTNAME></DATA>'
          INTO XX1   .
         IF SY-TABIX = 1.
         ELSE.
          CONCATENATE    XX1   XX_1 INTO XX_1.
         ENDIF.
        ELSE.
          CONCATENATE  T WA_IMPORT-MANDT '</MANDT>'
    '<EMPNO>' WA_IMPORT-EMPNO '</EMPNO>'
    '<EMPNAME>' WA_IMPORT-EMPNAME '</EMPNAME><DEPARTMENTNAME>'
    WA_IMPORT-DEPARTMENTNAME '</DEPARTMENTNAME></DATA>' INTO XX1   .
          CONCATENATE XX1 XX INTO XX.
         ENDIF.
        ENDIF.
        AT LAST.
          CONCATENATE '<?xml version="1.0" encoding="UTF-8"?><ns1:ZTEST1 xmlns:ns1="urn:sap-com:document:sap:rfc:functions">'
        XX_1 INTO XX_1.
          CONCATENATE  XX_1 '</ns1:ZTEST1>' INTO XX_1.
          CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
    EXPORTING
      IM_STRING         = XX_1
    IM_ENCODING       = 'UTF-8'
    IMPORTING
    EX_XSTRING        = RESULT.
        EX_LEN            = .
          CONCATENATE '<?xml version="1.0" encoding="UTF-8"?><ns1:ZTEST1 xmlns:ns1="urn:sap-com:document:sap:rfc:functions">'
    XX        INTO XX.
          CONCATENATE XX '</ns1:ZTEST1>' INTO XX.
         CONCATENATE XX_1 XX INTO XX.
          CALL FUNCTION 'ECATT_CONV_STRING_TO_XSTRING'
            EXPORTING
              IM_STRING         = XX
             IM_ENCODING       = 'UTF-8'
           IMPORTING
             EX_XSTRING        = RESULT
        EX_LEN            =
        ENDAT.
      ENDLOOP.
    ENDMETHOD.
    here above result parameter will have the target data..But it sends the that same data to both the system , If i will be able to recursively call this method, then i be able to solve the prob easily as first time result will send one data to one system and next time to other system,

    Hi munish,
    I dont think there is any thing wrong with the ABAP code.
    Try testing your ABAP mapping using transaction code SXI_MAPPING_TEST in XI.
    Enter the Details asked and then enter TEst data in XML format.. 
    Also, you can make use of the Trace element to find out if there is any thing wrong with the code.
    Include the following Statements after every step in the ABAP code to ensure that the particular step is completed successfully.
    data : l_trace type string.
    concatenate l_trace '<Message you want to display>' into l_trace.
    trace->trace(level = '<level>'
    message =l_trace).  
    The trace is visible in SXMB_MONI (click on "Trace" in the left pane to view).
    using this you will get to know i the code is functioning as desired.
    Regards,
    Yashaswee.

  • ABAP Mapping - Message shown in Standard Change List Process Log

    Hi
    I am working with ABAP Mapping program. I had created ABAP class using ABAP workbench. Before this, in exchangeProfile..data was provided for com.sap.aii.repository.mapping.additionaltypes ==>> as " R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine) " and 'Saved'.
    In Interface Mapping, after providing the Class Name under 'Mapping Program' and activated. After activation (Standard Change List), it is showing the following messages under 'Processing Log'.
    --> Standard Change List - Process Log message
    Activation of the change list canceled Check result for Interface Mapping IM_ABAP_MAPPING | http://ABAP_Mapping_SREE:  Type R3_ABAP of
    program ZSREETEST is invalid because it is not registered in the exchange profile . Check the values for the exchange profile parameter
    IntegrationBuilder.Repository.com.sap.aii.repository.mapping.additionaltypes
    --> End of Log message
    Can some one please guide me in resolving the ABAP mapping issue.
    Thanks in advance.
    ..Sree

    Sree,
    The log says that there is ABAP mapping included in your exchange profile. Do the things what michal have told and also check your mapping program whether working fine or not in SXI_MAPPING transaction.
    You can see this weblog for reference:
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ---Satish

  • Message split ABAP mapping

    Hello everybody,
    for a special mappging I use ABAP mapping -everything fine.
    But I need to split the message with ABAP mapping.
    Does anybody know if this is possible ?
    In the ABAP-class I use the interface IF_MAPPING. This has as a result parameter the parameter RESULT Type XSTRING (no table).
    It only works to add to XMLs in 1 XML string, but my result have to be 2 XML files.
    Alternatively would it be an idea to use multi message mapping (graphical first) AND then ABAP-mapping for special mappings?
    Thanks a lot,
    Florian

    Florian,
    for multimappings in coded mappings (xslt, java and abap mappings) you'll also create a single stream, but in this case, the stream may have the following format:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
        <b><enter your first message here></b>
    </ns0:Message1>
    <ns0:Message2>
        <b><enter your second message here></b>
    </ns0:Message2>
    </ns0:Messages>
    where <ns0:MessageX> tags refer to each different target message type.
    In the case you have a 1:n split, you'll have only 1 message type, but may have several messages within it.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
        <b><My_message id=1></b>
        <b></My_message></b>
        <b><My_message id=2></b>
        <b></My_message></b>
    </ns0:Message1>
    </ns0:Messages>
    Also, remember that, when you define an interface mapping as multimapping (meaning, you set either source, target or both interfaces to multiple messages, your input stream will also contain the <ns0:Messages> and <ns0:MessageX> tags, so you need to treat them in your mapping program.
    Regards,
    Henrique.

  • Unicode in ABAP-Mapping (u00E9 becomes u00C3u00A9)

    Hello all,
    I implemented this guide to create a flatfile from an IDoc. It works fine, but some characters are not mapped correctly: an "é" for example becomes "é" and an "ú" becomes "ú". Is this a Unicode problem or something? If yes, how can I use Unicode in ABAP mapping?
    As the XML-IDoc is transfered correctly to XI the problem is not in communication channels... it's in the ABAP mapping.
    Best regards,
    David

    Hi David,
    As michal said the problem needs to be isolated whether it is at the mapping level or at the file adapter level.
    In case it the file adapter then you can mention the encoding standard and if its at the abap mapping the your objects should be unicode enabled.
    Regards
    joel

  • ABAP Mapping Pretty Print

    Hi Everybody,
    I have an issue with linefeed in ABAP Mapping.The ouput document generated by ABAP Mapping is as follow:
    <?xml version="1.0" encoding="utf-8" ?<Header Node><T_H><SEND_ID value="XYZ"/>
    <REC_ID value="PQR"/>
    <DATE value="2007"/>
    </T_H>
    <O_H><L_NO value="252517"/>
    <W_NO value="298"/>
    <U_NO value="298"/>
    </O_H>
    </Header Node>
    If we can see the above payload, i have the <Header Node> coming in the same line as that of the utf-8 and also the subnode <T_H> starting in the same line and its first field <SEND_ID > in the same line.The same is repeating for the second subnode <O_H>. I want to do a pretty print for this payload.I have used the method <b>set_pretty_print( )</b> in the ABAP Mapping, but there is no effect of this on the output.
    To make it clear let me give the required output Xml
    <?xml version="1.0" encoding="utf-8" ?
    <Header Node>
    <T_H>
    <SEND_ID value="XYZ"/>
    <REC_ID value="PQR"/>
    <DATE value="2007"/>
    </T_H>
    <O_H>
    <L_NO value="252517"/>
    <W_NO value="298"/>
    <U_NO value="298"/>
    </O_H>
    </Header Node>
    Can anybody help me out on this.
    Thanks & Regards,
    Zabiula

    Insert a new line character as per the ABAP rules in the generated XML. It is normally "/n" for microsoft based languages. Not sure what it is in ABAP. May be an ABAPer must be able to help you.
    VJ

  • ABAP Mapping for Large Messages

    Hi Folks,
    We are exploring different options for dealing with the fact that XI will choke on very large messages/files. One of the options that we are considering is a third party tool that bypasses XI. However, we've just learned that it may be possible to solve the large message problem by using ABAP Mapping, because supposedly, by doing so, one would bypass the large message being converted to XML as it comes into XI. The scenario involves messages coming into XI on their way to SAP R/3. Does the ABAP Mapping option appear to be viable to you experienced folks out there?
    Thanks
    Nic

    Hey
    tunneling as per the term is used mainly for IDOC but we use the term bypass to implement the same concept but with other interfaces.
    see if u have simple 1-1 mapping then u can do a bypass scenario in which u are not doing anything in IR,u simple do the configurations in ID.
    you can not drastically increase the performance just by choosing some specific mapping.mappin is not made for this .
    for best performance you can design a bypass JDBC to IDOC scenario(but then you wont be able to do any message mapping.
    have a look at the following for bypass scenario
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    if u want to do message mapping then design a JDBC to Proxy scenario.
    proxy is mainly used to enhance performance and would be the best bet for u i guess
    Thanx
    Aamir suhail
    Message was edited by:
            Aamir Suhail

  • Mapping Issue ( ABAP Mapping ).... Help me out..

    hi masters.
    i want some help from ur side.
    i just jumped to XI domain..
    and got object of abap mapping..
    can u hep me.. out..
    the steps.. required for mapping..
    i went through some materials..
    still
    do u hv any idea..
    to clear my doubts..
    as
    suppose
             input idoc--
                            segment 1
                            segment 2
                                        segment 2.1
                                        segment 2.2
                                                     segment 2.2.1
                                                     segment 2.2.2
                            segment 3
    i wnat .....
                 a file having record of each  segment with its segment name
                 using   ABAP code..
    10xxxxxxxxxxxx   In advance
    Thanks & Rdegards.
    Someswar.

    Hi Keith,
    Look at these..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • ABAP MAPPING SAMPLE SOURCE

    Hi,
    I have to make abap mapping like bellow it.
    Sender
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Legacy_Msg xmlns:ns0="http://test/xi/test001">
         <item>
              <A>TEST1</A>
              <B>TEST2</B>
         </item>
         <item>
              <A>TEST2</A>
              <B>TEST3</B>
         </item>
    </ns0:Legacy_Msg>
    Receiver
    <?xml version="1.0" ?>
    <MsgOut>
         <item>
              <C>TEST1</C>
              <D>TEST2</D>
         </item>
         <item>
              <C>TEST2</C>
              <D>TEST3</D>
         </item>
    </MsgOut>
    I want to get result like over.
    I don't know how to code abap mapping.
    Please help me.
    Thanks.

    check "How to Use ABAP Mapping in XI 3.0" in this
    http://www.erpgenie.com/sap/netweaver/xi/howto.htm

  • ABAP mapping  constraints/restrictions ?

    what are the  ABAP mapping  constraints/restrictions? Please answer its urgent.

    vinod ,
    constrains are basically
    1) ABAP mapping are very complex....
    2)generally ppl go for ABAP mapping  when its not possible to do the mapping dwith graphical,java or XSLT.
    3) there is no ABAP mapping editor in XI
    4) u have to import the ABAP mapping in IR..then u can use it in Interface mapping.
    ABAP Mapping is used whenever you explicitly need to build your output XML structure . Its entirely depends on your call which approach you want to adopt i.e. JAVA mapping or ABAP mapping as in both the cases you need to explicitly build the output structure . ABAP Mapping however creates a DOM tree in the memory . Therefore it can be a performance issue whenever your source structure is complex . In case you need an idea of how to go about ABAP mapping here is a link which you can refer
    http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
    Also ABAP mappings have the handicap that they are separated from usual development in Repository. Additional there is more (ABAP, DOM) experience required as for example for XSLT or graphical mapping (my point of view). So they are used for special reasons like access to ABAP stack (transparent tables!).
    Refer this Pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken]
    And these Blog also
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    u can achieve value mapping using ABAP mapping..
    see here..
    ABAP Mapping with Value Mapping
    u can have a look
    Using ABAP XSLT Extensions for XI Mapping
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    regards
    biplab
    Use a Good Subject Line, One Question Per Posting - Award Points

Maybe you are looking for

  • Adobe air installer

    I am trying to download an app that needs the adobe air installer. I have adobe air installed, but when I download the app I want I get an error message that the installer file is damaged and to get a new one from the author. Is adobe the author and

  • Capturing Issues

    Setup: Mac Pro 2X2.26 Ghz Quad Core Xeon Mac OSX v. 10.6.5 FCP: v. 7.0.3 AJA Kona LHi Capture Card AJA KLHi Breakout Box Problem: Whenever I capture anything through my AJA Kona LHi Capture Card, I have an issue of a thin strip of distorted lines at

  • Display PCR in MSS

    Hi, Manager can create PCR in MSS. Once he fills details it goes to HR administrator. When HR is processing he will get action box like maintain pa30, pa40, view form,display form. pa30,pa40 is working fine, but when HR click the display or change fo

  • Print Size in mail always defaults to 70%

    Every time I go to print an email the print size is shown as 70% and I have to change it to 100% to print at full size. I cannot find what I need to change to set the default to 100%. I do not think it is a mail issue as I keep my mail accounts on an

  • Help with Syncing my boyfriends different Apple account to my computer

    I am updating my boyfriends phone on my computer, he has the old update and also uses a different apple ID. Will this delete everything on his phone or just sync it to my iTunes and allow him to keep everything on his phone?