ABAP Mapping - Queue problem

Hello experts,
I have an idoc for a PO that has 3 line items and within each line item there is a segment that is repeated twice.  I need to capture the segment that has PARVW = 'ZS' in each item while supressing the others ('ZW') in my PO output.
<PO>
<item>
  <1>
    <Partner>
       <ZS>
       <Name1>
    <Parnter>
       <ZW>
       <Name2>
  <2>
    <Partner>
       <ZS>
       <Name1>
    <Parnter>
       <ZW>
       <Name2>
  <3>
    <Partner>
       <ZS>
       <Name1>
    <Parnter>
       <ZW>
       <Name2>
The mapping I have is checking Partner-PARVW = 'ZS' (using text function EqualsS) using the context for Partner. 
I've tried many other variations but I've been unable to grab only the ZS partner information.
Any ideas?
Thanks,
Matt

Hi,
This could be easily fixed using graphical mapping by following the methods from this example:
[http://help.sap.com/saphelp_nw04/helpdata/en/e6/e6ae42e0fac911e10000000a1550b0/frameset.htm]
But, looks like you are using a ABAP mapping here. For this we will have to look at the logic you're using to collect the data from the idoc.
In my case (2 mappings I developed in ABAP), first I read all the data from the source structure and store it into an internal table. Then map the data from internal table to target structure.
Regards,
Sumant.

Similar Messages

  • Problem in parsing in ABAP mapping

    Hi all , In our ABAP mapping  we are trying to create a DOM tree from a XML file but we are getting the error in the following statement
    l_rc = if_iparser->parse( ).
    when we track the error using
    i = l_error->get_line( ). (result 0)
    i = l_error->get_column( ). (result 2017)
    str = l_error->get_reason( ). (Expected '<' or '/>' tag)
    but strange thing is we can open the file using Stylus studio/ Altova / IE ..so may the problem is not in the XML file ....Has anybody faced the problem before ??
    Kind regarrds
    Goutam

    Hi,
    Have a look at this link.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    I guess,your code may have problem.
    Try doing this from document.
    iparser = ixmlfactory->create_parser( stream_factory = streamfactory
    istream = istream
    document = idocument ).
    iparser->parse( ).
    Regards,
    Akshay Jamgaonkar.
    Hope this will help.

  • Abap mapping problem

    Hi friends,
    I am trying Abap mapping in my scenario.
    I am using DOM parsers
    By default the first line of the output xml document generated is
    <b><?xml version="1.0" ?></b>
    But I want to add encoding to it. i.e it should be
    <b><?xml version="1.0" encoding="UTF-8"?></b>
    I have written the code to change this , but it is not working. my code is
    data: temp1 type string.
    temp1 = 'UTF-8'.
    data : encode type ref to IF_IXML_ENCODING.
    encode->set_character_set( CHARSET = 'UTF-8' ).
    data: odocument type ref to if_ixml_document.
    odocument = ixmlfactory->create_document( ).
    odocument->SET_ENCODING( encode ).
    This code is giving exception
    - <u><CX_XMS_SYSTEM_ERROR>
      <ID>APPLICATION_PROGRAM_ERROR</ID>
      <P1>Z_COSTCENTER_ABAP_MAPPING</P1>
      <P2>SAP-ABAP</P2>
      <P3>UNCAUGHT_EXCEPTION</P3>
      <P4>Program Z_COSTCENTER_ABAP_MAPPING=====CP Include Z_COSTCENTER_ABAP_MAPPING=====CM001 Line 1</P4>
      <INFO />
      <CATEGORY />
      <AREA />
      <RETRY />
      </CX_XMS_SYSTEM_ERROR>
      <CX_XMS_SYSERR_MAPPING />
      </cls:CX_XMS_SYSERR_MAPPING>
    - <cls:CX_SY_NO_HANDLER id="o215">
    - <CX_ROOT>
      <TEXTID>1F09B73915F6B645E10000000A11447B</TEXTID>
      <PREVIOUS href="#o216" />
      <KERNEL_ERRID>UNCAUGHT_EXCEPTION</KERNEL_ERRID>
    - <INTERNAL_SOURCE_POS>
      <PROGID>196</PROGID>
      <CONTID>47</CONTID>
      </INTERNAL_SOURCE_POS>
      </CX_ROOT>
      <CX_NO_CHECK />
    - <CX_SY_NO_HANDLER>
      <CLASSNAME><b>CX_SY_REF_IS_INITIAL</b></CLASSNAME>
      </CX_SY_NO_HANDLER></u>
    Can anyone please tell me how to add the encoding parameter in the Output XML document which we are building through ABAP MAPPING.
    Thanks,
    Yomesh

    Hi Yomesh,
    Did you solve this problem. If yes could you please tell. I am also facing the same problem.
    Regards,
    Dinakar

  • Problem in the ABAP mapping

    hi all ,
    We are facing a strange problem in ABAP mapping , we are uisng the  below syntax
        if_node_collection = if_idocument->get_elements_by_tag_name( 'E1MVKEM').
        l_rows = if_node_collection->get_length( )
    It is not showing the exact no of  E1MVKEM segments. Suppose it has 3 segments l_rows is '2'. Now in our custom code ( we have created a DOM from the XML) then used the same syntax, it is working fine ...
    Has anybody faced the same problem b4????
    Kind Ragards
    Goutam

    Solved

  • Idoc  - JMS queue using ABAP Mapping

    Hi all,
    I am doing a idoc to JMS queue scenario using ABAP Mapping. I am new to ABAP
    Basically i want to know how to read the OUTBOUND idoc segments and their field values. I have gone through link : IDOC--XI--IDOC Using ABAP MAPPING(Idoc to Idoc using ABAP Mapping).
    If any body could suggest me how to read idoc->segment->fields or give some sample code, it would be very helpful.
    Thanks in advance&
    Regards,
    Mani

    Hi Mani,
    Maybe it would be easier to use graphical mapping. In ABP mapping you have to parse XML and than create target document. If you want to do it I'd strongly advice you to read it:
    http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
    Regards,
    Wojtek

  • 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.

  • Problem with ABAP mapping

    Hi...
    I have  the following issue: I create an ABAP mapping class and activate it, but when I test the mapping via TC SXI_MAPPING_TEST it doing nothing, that is, in the result page, in the option TRACE its throw the following message: No mapping configured.
    Previously:
    1.- Create DT, MT and MI for each interfaces.
    2.- Create IM in wich put the name of the ABAP class of the mapping (and activate too).
    3.- Check in the IM the namespaces of both MT.
    Do I miss something?
    Hector

    Hi,
    Where did you created your ABAP mapping . is it in R3 instance of XI or in external R3?.
    If you are in R3 of XI then you can test it with SXI_MAPPING_TEST
    see the below links for more details
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ABAP mapping
    Testing ABAP mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/de/705c3c3806af06e10000000a11402f/frameset.htm
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c30a4
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/06114a70-0701-0010-5db6-93dbadaed321?prtmode=navigate
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    Regards
    Chilla..

  • Has any one ever met this kind of ABAP-mapping problem ??

    Dear all,
    our scenario is:     
    (remote)MQ(ssl connection)->(local)MQ-(jms)>XI---(proxy)>ECC
    I met a very strange question during mapping which we use  abap mapping inside xi.
    the message come out from the abap mapping step.after the abap-mapping, the generated target message still has the source message concatenated with. it occurs only when all servers integrated together, but not occurs when we mannully put the source msg at local MQ (means this way, it works all right).
    even during error case, it still can go through all the remaining steps of IE, and the out bound jms adapter then goes into the
    target SAP ECC system, but of cause at the final step, it will reach u2018CX_ST_GROUP_MISSING_CASEu2019 error (this is because the message is not a valid xml file, and abap proxy can not consume it...
    sample file after abap mapping:
    <?xml version="1.0" encoding="utf-8"?>
    <ns:MT_MQIVMessage xmlns:ns="urn:ianes:mqiv">
         <MQIVMessage>
         <MQIVPayload> ..data..</MQIVPayload>
         </MQIVMessage>
    </ns:MT_MQIVMessage>
    <?xml version="1.0"?>
    <ns:MT_K2 xmlns:ns="urn:ianes:prp:ipsc">
         <header> .header.</header>
         <data>..data...</data>
    </ns:MT_K2>

    Dear expert,
    after detail analysis, i found the 1st place that the soap header was wrongly set...
    in call adater setp...
    <SAP:Sender>
      <SAP:Service>BS_PRP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:ext:ips">MI_MQIV_outb</SAP:Interface>
      </SAP:Sender>
      <SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>BS_SAP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K3</SAP:Interface>
      </SAP:Receiver>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
      </SAP:Main>
    you can see the k5  was wrong set to k3
    correct soap header should be this
    <SAP:Sender>
      <SAP:Service>BS_PRP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:ext:ips">MI_MQIV_outb</SAP:Interface>
      </SAP:Sender>
    - <SAP:Receiver>
      <SAP:Party agency="" scheme="" />
      <SAP:Service>BS_SAP</SAP:Service>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
    - <SAP:Mapping notRequired="M">
      <SAP:ObjectId>RXmJZiHCMPynqzPehi20YQ==</SAP:ObjectId>
      <SAP:SWCV>z+4XcK+qEduCcMP2oNwEVQ==</SAP:SWCV>
      <SAP:SP>-1</SAP:SP>
      </SAP:Mapping>
      </SAP:Receiver>
      <SAP:Interface namespace="urn:ianes:prp:ipsc">MI_K5</SAP:Interface>
      </SAP:Main>
    i guess this is the root of error, does any one give some hints on this ?
    Thanks
    Wu

  • Access MIME from ABAP Mapping for Attachment

    Hi,
    I am adding an attachment in ABAP Mapping and sending that message to Ariba System through HTTP Adapter channel.
    I am able to send the message successfully and also I can see the attachment in the PI RWB But I am not able to see any
    attachment in the Receiver's end along with the message.Ariba is able to receive the message successfully though.
    It looks like I need to change MIME Header a bit before sending the message.
    I check this link.
    XI Attachment and main document MIME sequence
    But Its about SOAP Adapter with PayloadSwap Bean. Since HTTP adapter is on ABAP we can not use the Module
    Tab of the channel.
    I need to know how can I use ABAP Mapping to access the MIME HEADER to change/ check Content Disposition and
    other properties.
    Thanks,
    Vijay
    Edited by: tech.info012 on Oct 12, 2010 6:33 PM

    When I tried the 2nd option It is giving me this error in response message. Do you have any idea what problem can cause this.
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive
    for message 4cb474bf-00c1-02af-e100-80000aa00d4b(INBOUND). Reason: java.lang.NullPointerException:
    </SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Thanks,
    Vijay

  • IDOC-XI-FILE Scenario: Error in ABAP Mapping

    Dear All,
    I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
    structure to a flat file and vice versa in XI 3.0".
    I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
    <SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
    Please help me out in resolving this error.
    Regards,
    N.Jain

    HI,
       Log saying that, u have problem in the mapping program.
      i.e Z_ABAP_MAPPING_PACKING_LIST
       the problem is due declaration of data.
       i hope that, you have some methods.
       those are declared under intialization section in mapping program.
      please use start of selection before the method.
    other wise, it will come under intilization section.
    warm regards
    mahesh.

  • Abap mapping and variable substitution in File adapter

    Hi experts!!.
    I am new in abap mapping, but I can do one abap mapping succesfully, but my problem is:
    I need to do a variable substitution in my file receiver adapter:
    Target directory = %cliente&/out
    File Name Scheme = TC%Fecha%.EFI
    ¿Using abap mapping is this possible? How I can do it?.
    Please is very urgent.
    Thanks in advance, and best regarts.

    Yes you can,.
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    will become
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “Directory”);
    In the receive file adapter all you would need to do is select Adapter Specifc Attributes --> File Name and Directory and givce some dummy values for the filename and directroy. In the runtime values will be taken from the SOAP header which you set in the mapping.
    Regards
    Bhavesh

  • Enqueue lock object in abap mapping

    Hi,
    In a idoc to file scenario, i need to garantee a unique target filename for message.
    I have a ZXI_I2155 table to mantain a counter by some key fields (cliente, anyo, mes)
    So, in an abap mapping I have:
       CALL FUNCTION 'ENQUEUE_EZXI_I2155'
          EXPORTING
            MODE_ZXI_I2155 = 'E'
            MANDT          = SY-MANDT
            keycli         = d_cliente
            anyo           = d_anyo
            mes            = d_mes
            _WAIT          = 'X '
          EXCEPTIONS
            FOREIGN_LOCK   = 1
            SYSTEM_FAILURE = 2
            OTHERS         = 3.
        if sy-subrc = 0.
          select single * from ZXI_I2155 into wa_registro
                          where keycli = d_cliente and  anyo = d_anyo and mes = d_mes.
              add 1 to  wa_registro-contador.
            modify ZXI_I2155 from wa_registro.
          endif.
          CALL FUNCTION 'DEQUEUE_EZXI_I2155'
            EXPORTING
              MODE_ZXI_I2155 = 'E'
              MANDT          = SY-MANDT
              keycli         = d_cliente
              anyo           = d_anyo
              mes            = d_mes.
        endif.
      concatenate 'ART' d_cliente d_mes wa_registro-contador '.XML' into d_fichero.
      l_record-namespace = 'http://sap.com/xi/XI/System/File'.
      l_record-name = 'FileName'.
      l_record-value = d_fichero.
      dynamic_configuration->add_record( l_record ).
    With a normal situation, this scenario works well, but with a great volume of messages, some duplicate filename appears.
    Why?
    Thanks, in advance
    Carme

    Try increasing the "enque/table_size" parameter to allow more IDOCs to be handled/locked at the same time. You can increase the value for this parameter up to 102400 (beyond that can cause performance issues).
    Please refer to the notes below for more information about the lock queue overflow and management.
    [Note 552289 - FAQ: R/3 Lock management|https://websmp230.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=552289]
    [Note 13907 - System error in the block handler, overflow lock table|https://websmp230.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=13907]

  • When we wil go for abap mapping ??

    Hi,
    As we know there are graphical, XSLT, JAVA mappings are there apart from ABAP mapping. I have gone through below weblog.
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    and also help.
    http://help.sap.com/saphelp_nw04/helpdata/en/12/05731a10264057badc32d3d3957015/frameset.htm
    None of them says ABAP mapping is either faster or stable as compared to other mappings. Even though it is the case, still when we will go for abap mapping ??
    Is it like that it is totally depend on the available resources in hand ??
    thanks
    kumar

    > The SAP XI/PI mapping is the most efficient as it
    > only loads the part of the source message that are
    > used to create the target message(s) at runtime.
    >
    > Java and XSLT have to load the whole message into
    > memory to process the message. This can be
    > inefficient and if dealing with large messages can
    > cause issues.
    About your statement.
    If you consider the field mapping (or UDF) runtime, then you are correct. But if you consider the whole mapping runtime, you also have to "load" the full message in message mapping, obviously. What happens is that it is transparent to the developer, since loading and parsing is done by standard. But message mapping also deals with loading and parsing the whole message (and it is done with Java underneath). Then I don't think message mapping will have a significantly better/worse performance, when compared with Java mappings (performing normal xml processing methods).
    As for XSLT, the performance problems happens because you have a XSLT processor running over Java VM. Then, if you have heavy load on it, the mapping runtime will consume the resources necessary to run the xslt processor (which is, by itself, very resource consuming) and also to treat that heavy input.
    Regards,
    Henrique.

  • ABAP Mapping in PI 7.1

    Hi
    I am looking for the ABAP mapping scenario, Can anyone send me the link
    Thanks
    PR

    Hi PR,
    I don't think there are many examples on ABAP mapping for 7.1, but there is hardly any difference from previous versions. So, search for an example based on 7.0.
    If you face any problem, you can come back to the forum anytime
    regards,
    Neetesh

  • Exception handling in BPM and ABAP mapping

    Hello all,
    We have a BPM with this structure:
    . REC (receiver)
    . <begin BLOCK1>
      . TRANSFORMATION1 (Abap Mapping)
      . <begin EXCEPT> (exception branch)
        . CONTROL (Cancel Process)
    . <end EXCEPT>
    . <end BLOCK1>
    The same exception is assigned to the block; to the mapping and to exception branch.
    The problem is that, when in the Abap Mapping the exception CX_MAPPING_FAULT is raised, the exception branch seems to be ignored and so, the BPM doesn't finish.
    This problem only occurs in some of ours BPMs, because the same thing, when done in other BPMs, works fine.
    I know i can change the BPM to turn around this problem, but i would very much like to know the solution to this.
    Please, help us with this posting.
    thanks in advance
    Filipe Barreira

    Hi again,
    We are in SP19, witch invalidates the note 921757 listed.
    Also, i made an abap mapping witch only raises the exception. So i think it is not an ABAP error.
    Also the XML seems to be correct, because this is a duplicates check routine. A message (with the same data) already entered previously (we trying to avoid another entry).
    In the trace analysis for the message, it is stated that the exception has occurred:
      <?xml version="1.0" encoding="utf-8" ?>
    - <MappingTrace>
      <Trace level="1" type="T">Mapping-Namespace:http://xi.es/suministros</Trace>
      <Trace level="1" type="T">Mapping-Name:IM_SALIDAS_TESTE1</Trace>
      <Trace level="1" type="T">Mapping-SWCV:7CE651C00ABC11DBCBF0C8E8C0A901F6</Trace>
      <Trace level="1" type="T">Mapping-Step:1</Trace>
      <Trace level="1" type="T">Mapping-Type:R3_ABAP</Trace>
      <Trace level="1" type="T">Mapping-Program:ZCLTD_MM_SALIDAS_CARGA_TESTE</Trace>
      <Trace level="1" type="T">Creating Abap mapping. Classname =ZCLTD_MM_SALIDAS_CARGA_TESTE</Trace>
      <Trace level="1" type="T">CALL APPLICATION MAPPING.</Trace>
      <Trace level="1" type="T">Application error in mapping program ZCLTD_MM_SALIDAS_CARGA_TESTE, error code: , error text:</Trace>
      </MappingTrace>
    the problem is that the process keeps running.
    regards Filipe Barreira

Maybe you are looking for

  • "Repair Disk" option in Disk Utility need to repair drive.

    I have a Seagate GoFlex Desk 2TB external hard drive. I use it as a backup drive for Time Machine. When I plug it into my iMac it dosen't open, I opened Disk Utility and clicked "Verify Drive" and then I got this... I have backups on this drive. If I

  • RMI firewall issue - opening port 1099 is not enough

    Hello, We have a distributed java desktop app that uses RMI with callbacks to communicate amongst the clients. It all works really well at our dev site and at 2 trial sites. We are about to deploy out to more customer sites - so I have been doing mor

  • Billing document is generated automatically How to control ?

    Hi...    After creating outbound delivery in VL01N  , then the Billing document is also to be generated automatically , How to control this ? I want to create the billing document thru VF01 . Regards Deepa. Edited by: Deepa Manian on Jun 27, 2008 5:2

  • I forgot my passcode for my iPhone 4s what can I do ?

    I forgot my passcode what can I do ? Thanks, in Advance

  • Rate of Obtaining Data

    Hi everyone, I have recently constructed a VI which obtains data from a DAQmx, and saves it to a log file, a long with the time duration of the test (Hence the Elapsed time VI). The data saves to a immediatley a file, which can be analysed later usin