Map the second occurrence of IDOC

Hi All,
        i have been facing problem to map the second occurences of IDOC to target field.Ex:IDOC[02]-field1.
In the mapping for source i have specifed IDOC and generated advanced used defined function and mapped to target field. But i have entered the value in field1 ex: field1. the values not came in IDOC.i have checked in DISPLAY Queue also.if i map field1 i have received these values. But field1 contains occurences of 0..1. so i am getting error in used defined funtion.
     Please guide me.

Ok, This is a bit clearer.
you want to send <u>only the Description item</u> from the source message.
question:
1)Is it possible to have more then 2 items like and would and will you need them as well?:
E1MARAEXTRT[01]-FIELD1- vALUE
E1MARAEXTRT[02]-FIELD1- DESCRIPTION.
<b>E1MARAEXTRT[03]-FIELD1- BLABLABLA</b>
2)Is the <b>DESCRIPTION</b> you wrote is a name of a segment ?is it a visible value that can be used for the mapping?
You can try to use the graphical\own java function mapping to one of  the following actions:
- concatenate the two fields into one and map them to the target field (decide what you wanna do with the value prefix..)
-write a java mapping program or XSLT to map the desired node with condition on the number of nodes.
Don't give up.
Nimrod

Similar Messages

  • Mapping the first occurance of condition

    HI friends,
    I am mapping the 271 Inbound mapping.I am receiving the Multiple EB segment.
    Only I need to map the first occurrences of the Segment.
    EB*B*IND*30***29*200~
    EB*B*IND*88****3~
    EB*B*IND*91****3~
    EB*B*IND*92****1~
    EB*1*IND*MH~
    EB*1*IND*82~
    EB*1*IND*88~
    EB*R*IND*30~
    REF*18*098806799M
    Condition is if Eb1= B i need to Map EB7 value to copayment field.
    this scenario i need to map the value of 200.
    Thanks
    hk

    Hi Friends,
    I am able to XSLT for 271 inbound copay amount.But this is XSLT giving the first occurrence of subscriber loop.It not giving the all subscribers for copay amount.Any idea how do we need map all occurances for subscriber loop.
    <xsl:if test="(//*[local-name()='EB_SubscriberEligibilityorBenefitInformation'][EB01_EligibilityorBenefitInformation='B'])[1]/EB07_BenefitAmount/text()">
    <Co-PaymentAmount><xsl:value-of select="(//*[local-name()='EB_SubscriberEligibilityorBenefitInformation'][EB01_EligibilityorBenefitInformation='B'])[1]/EB07_BenefitAmount/text()"/></Co-PaymentAmount>
    </xsl:if>
    hk

  • Count for item records reaches 999 the second idoc gets triggered!

    Hi Experts,
         I have an issue. Sender is file and receiver is idoc with a header and item  level records. Only one header and n number of records can be there.
    Now we want to make  this way that as soon as the count for item records reaches 999 the second idoc gets triggered.
      Hints / Solutions Pls.
    Regards,
    Arnab .

    incorporate mapping logic such that for every 999 item records create new IDoc node
    check with this UDF for IDoc node mapping, item records will be input to UDF
    int count = a.length;
    int k=999;
    result.addValue("");
    for(int i=0;i<count;i++)
          if (i>=k){
              result.addValue(""); // if records > 999, add IDoc node
              k=k+999;     
    Do rest of the mapping accordingly

  • How to call the second mapping in the first mapping fails in the BPM

    Hi All,
    I have a scenario like this.
    There are two mappings. There is a one condition while genearying the root element of the first mapping. If this condition is not satisfies the first mapping will fail. If this mapping fails i want to trigger another mapping.
    How to achieve this functionality.
    If it is possible with BPM. how to call the second mapping in the BPM.

    Hi
    you can not create the containter for the synchronous interfaces.
    you have to craete the two asysnchronous abstact interfaces .
    thenusing those two abstract interfaces you have to define the containers in the BPM.
    and you also have to define the interface mapping b/w those two abstract interfaces.
    once you define the interface mapping you will be able to select the interface mapping using the transformation step in BPM.
    once you select the interface mapping in BPM then you will be able to selece the interfaces
    if you still face the problenm please reply me back.
    Thanks
    Rinku Gangwnau

  • I have a program that uses Bing Maps, but the map only loads after the second search.

    On my website, I have an Agency Locator that uses Bing Maps to locate and display agencies near a zip code. In Chrome and IE, the map loads fine. If I clear the cache in FireFox, the map doesn't show up on the first search. The second search displays fine. I am not quite sure if there is something wrong with my code or if it is a bug with FireFox, Bing Maps, or the two of them together. I am using FireFox V27.0 on a Windows 7 pc.

    As an aside, I think attachEvent is a proprietary method of Internet Explorer. The script's method of browser detection might need to be updated.

  • Mapping the IDOC fields for Inbound PO

    Hi,
    I am trying to map the fields for PO for IDOC type ORDER05, but unable to do so for the following IDOC fields in segments.
    Document Date
    Vendor
    Account Assignment Category
    Delivery Date
    Requirement No.
    Requisitioner
    Purchase Requisition
    Preq Item No.
    Outline Agreement
    Outline Agreement No.
    What fields in the IDOC match these in SAP R/3.
    Thanks,
    Randy.

    Hi Did you manage to get this IDoc working? I'm having the same problem with the mapping and the documentation is really bad.
    Thanks.

  • Get the second last occurrence of character

    Hi
    I want to get the second last occurrence of "_" from the following string and then take the 3 characters before this.
    Does anyone know how to do it in a simple query?
    The string is
    ALS_AKM-G-2500_BASED_pre_paid_akm_mis_stv1

    user2360027 wrote:
    I wanted a simple query. The regular expressions are too much for me to understand :-)Not difficult at all:
    regexp_replace(txt, '.*(.{3})_[^_]*_.*$', '\1')
    \------------------/ \/\----/|\---/|\/|   \--/
             |           |    |  |  |  || |    |
             |           |    |  |  |  || |    and replace that found matching pattern with what is in backreference 1
             |           |    |  |  |  || |                                    (the 3 characters found in the pattern)
             |           |    |  |  |  || followed by the end of the string
             |           |    |  |  |  ||
             |           |    |  |  |  |followed by any characters
             |           |    |  |  |  |
             |           |    |  |  |  followed by an "_" character
             |           |    |  |  |
             |           |    |  |  followed by any number of non "_" characters
             |           |    |  |
             |           |    |  followed by an "_" character
             |           |    |
             |           |    followed by any 3 characters (mark as a back reference using brackets)
             |           |
             |           where it matches any number of characters
             |          
             replace the section of string txt

  • Lost my iphone and located on map it using the fing phone app. The second I located it the phone went offline. Whoever has it knows how to disable the find feature. What are my alternatives? Can at

    Lost my iphone and located it on the map, using the find a phone app. The second I had the location the phone went offline. Apparently, whoever has it knows how to disable the find a phone feature. Do I have any alternatives? Can AT&T or the police track the phone?

    ATT won't unless they are asked to do so by the police and unless a major crime is involved, the police won't request this just for a stolen phone.
    If the iPhone is running iOS 6, sounds like you didn't have the passcode lock feature enabled. Nothing prevents someone from powering the iPhone off and the same for removing the SIM card.

  • What is the second, third, etc. next-hop address in the route-map set command for?

    What is the second, third, etc. next-hop address in the route-map set command for?
    route-map TEST_PBR permit 10 match
    match ip address 101
    router(config-route-map)#set ip next-hop 1.1.1.1 ?
    A.B.C.D IP address of next hop

    Hi,
    You may get your answer in below link
    http://www.groupstudy.com/archives/ccielab/200812/msg00999.html
    First next-hop will be used unless until that is not unreachable. If first is unreachable, then next one will be used. Since these next-hops are directly connected, router can easily come to know whether they are active or not. In case you want to set some loopback ip as next-hop then you need to use keyword recursive "set ip next-hop recursive"
    --Pls dont forget to rate helpful posts--
    Regards,
    Akash

  • JDBC to IDoc ( error when mapping multiple JDBC records to IDoc)

    Hi,
    I am working on JDBC to IDoc scenario, I have declared row as 0 to unbounded and by default the IDoc structure is 1..1.
    Inorder to map multiple rows from JDBC to get multiple IDoc's, I have changed the occurrence of IDoc in "Messages" tab of Message mapping to 0 to unbounded.
    I have mapped "row" to "IDoc".
    When I test the mapping, it works fine, giving the same number of IDoc's with that of row.
    When I test end to end, in SXMB_MONI, it gives me following error:
    <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>MSGGUID 54A3A64E895D48EC3F20C69FEFE2E82B: Tag found instead of tag IDOC BEGIN=</SAP:P1>
    can any one help me out with this.
    Thanks in advance.

    Hi Jwalith,
    Check this blog from Michel
    The specified item was not found.
    Make sure that you changed occurance as per this blog.
    hope this is helpful
    regards,
    Venkat.

  • Too few values in the second queue in function useOneAsMany

    Hi - I am having problems with useOneAsMany while doing sales transactions.
    The simplified Source Mapping is
    POSLog   0..1
    ......Transaction unbounded
    ...........SequenceNumber  1..1
    ...........RetailTransaction   unbounded
    ................LineItem               unbounded
    .....................Sale                       0..1
    ........................Field                         1
    The Target Mapping is...
    SalesOrderLine_JDBC     unbounded         Sale(Context:POSLog)
    ........Insert                        1
    ...........access                  1
    ...............OLGUI                0..1    (SequenceNumber goes here)
    ...............OLOVP              0..1     (sale specific price goes here)
    Only Sales are written to the Line file and the POSLogs that are being sent are often multi-transactional.
    I have tried to resolve this problem using graphical variables (SAP PI 7.1 Mapping Enhancements Series: Using Graphical Variable) that helped save the ItemID but incorrectly in the case of multi-transactional POSLogs.
    The UseOneAsMany function seemed to be the answer (http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm) but when I try and use it I get an exception - I get this exception no matter how I set the context for the Sale node for the 2nd parameter...
    + Exception:com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the second queue in function useOneAsMany. The number of values for all contexts must be the same as the number of values for the third queue in class com.sap.aii.mappingtool.flib7 +.
    Is it possible to do this in Graphical mapping or will I have to fall back on XSLT???

    Hi...
      Please find the below link,about how to configure IDOC adapters .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d19fe210-0d01-0010-4094-a6fba344e098
    Regards,
    Leela

  • Mapping Logic in XI for Idoc to File

    Hi All,
    I have the scenario like this Idoc to File
    I have Quantity field inside E1EDL24(Line Item)--E1EDL43Quantity, i have to Sum up the Quantity field.
    I have used the ligic like this and works perfectly.
    Quantity--Sum-Total and the context od Quantity is set to IDOC level.
    Now the problem is, Inside the Line item(E1EDL24) Segment, we have E1EDL43 Segment and this E1EDL43 can repeats twice
    then, i have to consider only first Segment quantity value coming from E1EDL43 . I should not take the second E1EDL43 segment .
    But here in my case what is  happening is while doing the SUM function it is considering the second segment quantity also. and giving the total.
    For Example...
    -E1EDl24
    --E1EDL43
    ---Quantity -
    20
    --E1EDL43
    ---Quantity -
    30
    And second line item
    -E1EDl24
    --E1EDL43
    ---Quantity -
    10
    --E1EDL43
    ---Quantity -
    50
    In this case i shld get 20 + 10 = 30
    But iam getting 203010+50 = 110 which is not correct.
    Please help me on this
    Regards

    set the context to Idoc level
    use the UDF
    int sum=0;
    for(int i=0;i<a.length;i++)
    sum =sum + Integer.parseInt(a<i>);
    i++;
    String res = sum;
    return res;
    Do the mapping as
    Quantity----->UDF---->Total
    this  logic works if  E1EDL43 should  repeats twice

  • How to map the appointment date in CRMXIF_ORDER_SAVE_M02-4x ?

    Hi Team,
    I want to map the field in CRMXIF_ORDER_SAVE_M02-4X, how to map..please help ..where we need to do ..could you please tell me the steps.
    CustomerAppointmentDate  
    CRMXIF__ORDER__SAVE__M02-4x/ E101CRMXIF__BUSTRANS/ E101CRMXIF__APPOINTMENT__XT/E101CRMXIF__APPOINTMENT/ TIMESTAMP__FROM
    Thanks
    Kalpana  

    Hi Kalpana,
    Below is a sample code. Modify this as per your input.
    * Header details
      CLEAR itab_edidc40. 
    MOVE sy-mandt TO itab_edidc40-mandt .
    MOVE sy-saprl TO itab_edidc40-docrel. 
    itab_edidc40-docnum = '0000000000000001'.
    itab_edidc40-direct = '2' . 
    CONCATENATE 'SAP' sy-sysid INTO itab_edidc40-rcvpor. 
    itab_edidc40-rcvprt = 'LS'. 
    itab_edidc40-rcvprn = t000-logsys. 
    CONCATENATE 'SAP' sy-sysid INTO itab_edidc40-sndpor. 
    itab_edidc40-sndprt = 'LS'. 
    itab_edidc40-sndprn = t000-logsys. 
    itab_edidc40-mestyp = 'CRMXIF_ORDER_SAVE_M' . 
    itab_edidc40-idoctyp = 'CRMXIF_ORDER_SAVE_U02' . 
    itab_edidc40-arckey = ' '.
    itab_edidc40serial = l_serial . 
    APPEND itab_edidc40  .  CLEAR itab_edidc40  .
      CLEAR: itab_edidd40 ,e101crmxif_bustrans. 
    itab_edidd40-segnam = 'E101CRMXIF_BUSTRANS'. 
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_bustrans-object_task = ’I’.
    e101crmxif_bustrans-object_type = eg: 'BUS2000117'.
    e101crmxif_bustrans-process_type = process type of your transaction.
    e101crmxif_bustrans-description = ’Test’.
    MOVE e101crmxif_bustrans TO itab_edidd40sdata . 
    APPEND itab_edidd40  .  CLEAR itab_edidd40  .
    itab_edidd40-segnam = 'E101CRMXIF_APPOINTMENT_XT'.
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_partner_xtdatax =  'X' . 
    MOVE  e101crmxif_partner_xt TO itab_edidd40-sdata . 
    APPEND itab_edidd40  . 
    CLEAR: itab_edidd40,e101crmxif_bustrans  .
    *** Pass the Value   
    itab_edidd40-segnam = 'E101CRMXIF_APPOINTMENT'.   
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_appointmenttimestamp_from = ‘01/03/2015’.   
    MOVE e101crmxif_appointment TO itab_edidd40sdata .   
    APPEND itab_edidd40  .    CLEAR itab_edidd40  .
    * Create IDoc
    CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'   
    TABLES    
    idoc_control_rec_40 = itab_edidc40     
    idoc_data_rec_40    = itab_edidd40.
    SELECT  * FROM edidc   WHERE serial = l_serial .  
    l_range-low = edidc-docnum.    l_range-sign = 'I'.    l_range-option = 'EQ'.    APPEND l_range.  ENDSELECT .
    * report program to create transaction 
    SUBMIT rbdapp01 WITH docnum IN l_range                WITH p_output = ' '  AND RETURN.  COMMIT WORK.
    WAIT UP TO 2 SECONDS. 
    SELECT  status countr statyp stapa4     INTO (l_status, l_countr, l_statyp,l_stapa4)    UP TO 1 ROWS     FROM  edids     WHERE docnum = edidc-docnum      ORDER BY countr DESCENDING . 
    ENDSELECT. 
    SELECT SINGLE object_id guid INTO (lv_object_id , lv_object_guid)     FROM crmd_orderadm_h     WHERE guid = l_stapa4+0(32).
    IF lv_object_id IS NOT INITIAL.  
    object_id = lv_object_id.
    ENDIF. 
    COMMIT WORK.
    You can test it using WE02 or WE05 transaction.
    Give Points if useful.
    Regards,
    Abi

  • Closing the Second instance of the browser.

    Hello,
    I am working on a project written in Java. When applet is running in Browser, we can open the new instance of the browser using File->window->new (or pressing CTR-N). Since the second window runns in the context of first window, It is causing some problem.
    Is there any way for me to close the second instance of the browser from my Java applet?? If not is there any way for me to disable both the File->new->Window and CTR-N options.
    I am new to java and java script. If it is not possible in Java Applet, is it possible in java Script. Please Provide me with full information.
    Thanks and Regards,
    Ratna.

    Hi,
    There is no way you can close the browser window that the user opens. Even if there is a way through some hack, it will not completely give u a solution, independant of browsers and all. And moreover it is not advisable to restrict the user like that.
    A more elegant way would be to handle it in the server side. I can give u one ligical way. U can make the page expire as soon as it gets loaded. U can do that by using the code below. And you have to have a server side function to check for a request from the same client machine for the same page.
    <%
        if (request.getProtocol().compareTo("HTTP/1.0") == 0)
            response.setHeader("Pragma", "no-cache");
        else if (request.getProtocol().compareTo("HTTP/1.1") == 0)
            response.setHeader("Cache-Control", "no-cache");
        response.setHeader("Expires", "-1");
    %>So when the user opens a new browser window, he will be shown page expired message, or the page will be requested again from the server. U can have a map storing the remote address and the session of the user.

  • Dates fields issue in the sales orders through IDOC

    Hi all,
    I'm trying to create a sales order through Inbound IDOC using IDOC_INPUT_ORDERS.
    I have 2 custom fields in the sales order which are date fields.
    I'm populating them from the IDOC segments(using E1EDKT1-tdid, E1EDKT2-tdline) in the user-exit just before the call trasacation statement. These dates are not coming for a few orders... but are getting populated normally for few of them.
    But the tricky part is that... if I process the same IDOC for the second time.. the order created is having the dates.
    My issue is that.. i need all the orders to be populated with the dates which IDOC have.
    Could anyone please help me with this issue.
    All the answers/replies are highly appreciated!!
    Thanks for you help!

    hi,
    the following may be of help
    There are 2 major exceptions to the batch input internal table. All text data from the segments E1EDKT1/2 and E1EDPT1/2 are not part of the batch input session. Text elements from these segments are posted directly to the data base AFTER the sales order has been created (please note: in order that item texts are posted correctly to the sales order the field POSEX from segment E1EDP01 MUST be transmitted). Also, configurable material information from the IDOC is exported to a global memory and therefore will not be part of the batch input session. Configurable material data is performed in Form CHECK_CONFIGURATION and the data is exported to global memory in the following code:
    Exportiert IDOC Daten ins globale Memory     
    export IDOC data to global memory            
      call function 'CUXC_IDOC_TO_MEMORY'          
           tables                                  
                cfg_instref = xe1curef             
                cfg_ref     = xe1cucfg             
                inst        = xe1cuins             
                part_of     = xe1cuprt             
                value       = xe1cuval             
           exceptions                              
                error       = 1                    
                others      = 2.                   
    One extra piece of useful infomartion if you wish to debug the process is to set your breakpoints at the following points
    for Function module IDOC_INPUT_ORDERS
    include LVEDAF0F..
      CALL TRANSACTION 'VA01' USING bdcdata
                                MODE  input_method
                                UPDATE 'S'
                                MESSAGES INTO xbdcmsgcoll.
    Now input_method is A foreground process and N for background processing but try changing it to P (pass through mode)
    If you have breakpoints in va01, e.g. MV45AF0B_BELEG_SICHERN,(the part where the sales document is saved)
    they will be hit, e.g
    perform userexit_save_document_prepare.
    perform userexit_save_document.
    Lastly, don't forget using program SDJEDI , see note 380603 for more information on this
    Hope this is useful
    Paul Quinn

Maybe you are looking for

  • Video not included in web gallery

    I imported a collection of photos and videos. The videos appear in the library, but not in the web module. Is there a way to include these videos in the exported web gallery? If Lightroom does not support this directly, are there any web tutorials th

  • Disable inline viewing of attachments in Mavericks mail

    Dear all In previous version of the OS, there was an easy terminal fix to disable inline viewing of attachments in mail. Instead of bulky and cumbersome images and PDFs, I used to get nice, neat icons. This terminal fix doesn't seem to work in Maveri

  • How do i get quicktime for my iphone4 to watch tv commericals sent to me

    I need to understand why i can not open and view my commercials sent as attachments to my phone?

  • Business rules inside the dabase - how to avoid

    Dears, I have a friend who is working on our project and he is an Oracle DBA. The problem is that he's been very stubborn when it comes to the app's business rules. He insists that all of the business rules should be inside the database, represented

  • Partitioning oracle table on varchar2 field

    hi all, i would like to know if one can create table partitions based on varchar2 data type. if possible please tell me which type of partition is best suited and also whether the same can be done in oracle version 8i. thanks in advance thomaskparkas