Mapping IDOC ORDERS05

Hello.
I'm new on idoc mapping so I think that  this is not very difficult for you guys.
I'm trying to map ORDERS05's E1EDKA1 and E1EDP01 to an output xml. The problem is that this structures can have more than 1 occurrences and the mapping seems to find only the first one.
Example:
If I create a condition like:
IF E1EDKA1-PARVW is 'AG'.
  map.
ENDIF.
It works because AG is the first to come. WE doesn't work. It seems that it only finds the first occurrence of this structures.
I found removecontexts function but I'm not getting how to use it. ...
Any help?
Thanks and regards,
Valter Oliveira.

Hi mark.
Using your suggestion the problem was almost solved (the partner part is solved, thanks).
I made:
PARVW-removecontexts-Equals-LF-IFwithoutElse-PARTNER
PARTN-removecontexts /
And it works!! My partner has the LF context PARTN.
Now, the material part. Is working only for one fieId (matnr). I want to map 2 fields (matnr and description). Matnr should be E1EDP019-IDTNR and description should be E1EDP019-KTEXT if E1EDP019-QUALF = '001'.
If I make:
Items = 1
item = E1EDP01
QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-MATERIAL
IDTNR-removecontexts /
DESCRIPTION = constant
It works too ...
But of I make:
Items = 1
item = E1EDP01
QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-MATERIAL
IDTNR-removecontexts /
QUALF-removecontexts-Equals-001-IfwithoutElse-SplitByValue-DESCRIPTION
KTEXT-removecontexts /
It gives error on second item. Am I missing something?
Regards,
Valter Oliveira.

Similar Messages

  • How to Map Idoc-Orders05 Qualifier permitted values to a flat file Str

    Hi All,
    My scenario is IDoc-xi-flat file. I have a problem in mapping the respective qualifier value in IDoc to the flat file structure. I am using the function fix values in Message Mapping. Suggest how should the target field should look like to map to the qualifier.
    Thanks
    Gowri K.

    hi,
    can you tell a little bit more on what are you trying to achive?
    do you only need one qualifier in file or all or what?
    can you use the same structure as in IDOC ?
    be a little more precise
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Problem in message mapping (outbound IDOC ORDERS05 from SAP R/3)

    Hi to all,
    I have an outbound interface from sap r3
    sap r3 --> XI --> ftp server
    idoc --> XI --> text file
    Using IDOC orders05
    The problem is in segment E1EDP01/E1EDP19
    Segment E1EDP01 is unbounded and i map it well. If it contains E1EDP19, works fine. But in some cases, E1EDP19 not appears at E1EDP01segments. So then XI fails at mapping:
    IDOC OUTPUT (OK)
    1-E1EDP01/E1EDP19
    2-E1EDP01
    3-E1EDP01/E1EDP19
    4-E1EDP01
    XI WRITES (FAILURE)
    1-E1EDP01/E1EDP19
    2-E1EDP01/E1EDP19 (INFORMATION FROM LINE 3)
    3-E1EDP01 (WRONG)
    4-E1EDP01 (WRONG)
    You can take a look of Mapping mode here:
    <a href="http://img505.imageshack.us/my.php?image=orders05mappingcj8.jpg">[IMG]http://img505.imageshack.us/img505/1536/orders05mappingcj8.th.jpg[/IMG]</a>
    We don't use BPM and wanna use a solution without it.
    Pls ask me for more information if necessary.
    Thanks a lot for your help; Regards

    Hi all,
    The mapping function includes an exists and a mapwithdefault.
    Now the creation of the segment is handled ok, but not as well its fields. Its unable to determine the write of the second E1EDP19 segment and it does:
    1- OK
    2- OK
    3- Writes E1EDP20 but not the 19
    4- OK
    Thanks for your interesting

  • Message Mapping IDoc-segment

    Hello,
    In my scenario I will do the following mapping with an source structure to an ORDERS05 Idoc:
    file structure:
    #E1EDP01|10|33|ST
    #E1EDP20|33|20050823
    inbound message:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:MT_ORDERS_OUT xmlns:ns="http:/ /ORDERS">
      <E1EDP01>
      <IDENTIFIER>#E1EDP01</IDENTIFIER>
      <POSEX>10</POSEX>
      <MENGE>33</MENGE>
      <MENEE>ST</MENEE>
      </E1EDP01>
      <E1EDP20>
      <IDENTIFIER>#E1EDP20</IDENTIFIER>
      <WMENG>33</WMENG>
      <EDATU>20050823</EDATU>
    </E1EDP20>
    </ns:MT_ORDERS_OUT>
    MT_ORDERS_OUT    to      IDOC ORDERS05 :
    E1EDP01     ___>     E1EDP01
    POSEX   ____>           - POSEX
    MENGE   ____>           - MENGE
    MENEE   ____>           - MENEE
    E1EDP20 ______>               E1EDP20
    WMENG   ________>                  - WMENG
    EDATU   _________>                  - EDATU
    configuration of the file adapter:
    recordsetstructure: E1EDP01,,E1EDP20,
    keyfield:  IDENTIFIER
    E1EDP01.keyFieldValue     = #E1EDP01
    E1EDP01.endSeparator      = 'nl'
    E1EDP01.fieldSeparator    = |
    E1EDP01.fieldNames        = IDENTIFIER,POSEX,MENGE,MENEE
    E1EDP20.keyFieldValue     = #E1EDP20
    E1EDP20.endSeparator      = 'nl'
    E1EDP20.fieldSeparator    = |
    E1EDP20.fieldNames        = IDENTIFIER,WMENG,EDATU
    With this configuration, the result is only a mapping of the E1EDP01 fields.
    I can't see the E1EDP20 fields in the IDoc.
    Did I  something wrong?
    Regards
    Christoph

    Hello Shravan,
    I guess my file adapter is not doing the correct conversion.
    The payload of the inbound message must look as follow:
    <E1EDP01>
    <IDENTIFIER>#E1EDP01</IDENTIFIER>
    <POSEX>10</POSEX>
    <MENGE>33</MENGE>
    <MENEE>ST</MENEE>
    <E1EDP20>
    <IDENTIFIER>#E1EDP20</IDENTIFIER>
    <WMENG>33</WMENG>
    <EDATU>20050823</EDATU>
    </E1EDP20>
    </E1EDP01>
    my actuel payload looks like:
    <E1EDP01>
    <IDENTIFIER>#E1EDP01</IDENTIFIER>
    <POSEX>10</POSEX>
    <MENGE>33</MENGE>
    <MENEE>ST</MENEE>
    </E1EDP01>
    <E1EDP20>
    <IDENTIFIER>#E1EDP20</IDENTIFIER>
    <WMENG>33</WMENG>
    <EDATU>20050823</EDATU>
    </E1EDP20>
    Who can help me, with the conversion?
    Christoph

  • Inbound IDoc ORDERS05

    HI,
    I have to design an Inbound IDoc for create an Sales Order from a plain file
    The Idoc I use is ORDERS05
    Can anybody help me with some easy example???
    I have some problem when I tried to match the fields in the segments of the Idoc and the fields in the transaction VA01....

    Hi,
    Please check this links for inbound IDOC ORDERS05 data mapping.
    http://www.erpgenie.com/sapgenie/docs/sapedi/ordersin.xls
    http://www.erpgenie.com/sapgenie/docs/sapedi/ordedi.xls
    http://www.erpgenie.com/sapgenie/docs/sapedi/ordi1.doc
    If the above links do not work for you, then please try to use WE19 (IDoc testing tool) for data mapping and simulate the inbound sales order. You can also use this tool for testing purposes as well.
    Once done, then you can try to process your inbound IDoc file using standard program RSEINB00 to read the file and generate IDoc(s). Please ensure all your ALE and IDoc configuration are done such as distrribution model (BD64), partner profile (WE20), IDoc Port Processing (WE21) and so on.
    Hope this will help to start with.
    Regards,
    Ferry Lianto

  • JDBC to IDoc (ORDERS05) IDoc

    Hi,
    My scenario is JDBC (from 2 tables) to single IDoc ORDERS05.
    There are 2 source tables , HEAD, ROW. For every row in HEAD I need to create one Sales order through IDoc in R3.
    I am doing inner join on HEAD, ROW and say for example I am getting the following rows:
    HEAD.ID   ROW.ITEM
    1                     ABC
    1                     XYZ
    1                     PQR
    2                     ABC              
    2                     JKL
    3                     IOP
    Now for each unique HEAD.ID, I need to map to ORDERS05  IDoc. ( In our example I need to create 3 orders).
    How do i do this?
    And also, I need to map only (ABC,XYZ,PQR) in the first occurrence of ORDERS05, then (ABC,JKL) in the second occurrence and (IOP) in the third occurence.
    Could you please help me, how to do this?

    Now for each unique HEAD.ID, I need to map to ORDERS05 IDoc. ( In our example I need to create 3 orders).
    How do i do this?
    -->write a  UDF on HEAD.ID field to strip duplicates and map this to IDOC header.
        your UDF shd take 1,1,1,2,2,3, and give you 1,2,3.
    And also, I need to map only (ABC,XYZ,PQR) in the first occurrence of ORDERS05, then (ABC,JKL) in the second occurrence and (IOP) in the third occurence.
    Could you please help me, how to do this?
    -->you can use the same UDF in remaining fields. use IF statement and check with the UDF output to the HEAD.ID

  • Inbound Sales Order IDoc ORDERS05

    Hi there,
    I'm using the Idoc ORDERS05 Process Code ORDE to create Sales Order, all the process it's working perfectly. I would like to know if I can fill the header text of the order using the Idoc. The FM that I'm using is IDOC_INPUT_ORDERS
    I have included in the idoc the following segments:
    E1EDKT1                     003 EN   0001      0001
        E1EDKT2                     XXXXXXXXXXXXXXXXX
    but the header text in the order created is empty.
    Any idea about this, thanks in advance.
    Alexis Ramirez

    Hello Alexis
    Below you see part of the XSLT mapping (on SAP-XI) for EDI purchase orders which are mapped to ORDERS.ORDERS05 IDocs (-> sales order).
    I assume that in your case the name of TDOBJNAME (here = 'String') is missing.
                             <E1EDKT1 SEGMENT="1">
                                  <TDID>Z091</TDID>
                                  <TSSPRAS>D</TSSPRAS>
                                  <TSSPRAS_ISO>DE</TSSPRAS_ISO>
                                  <TDOBJECT>VBBK</TDOBJECT>
                                  <TDOBNAME>String</TDOBNAME>
                                  <E1EDKT2 SEGMENT="1">
                                       <TDLINE>
                                            <xsl:if test="../S_UNB/C_S002/D_0004='12345'">
                                                 <xsl:value-of select="S_BGM/D_1004"/>
                                                 <xsl:text>/RY</xsl:text>
                                            </xsl:if>
                                            <xsl:value-of select="S_FTX/C_C108/D_4440"/>
                                       </TDLINE>
                                       <TDFORMAT/>
                                  </E1EDKT2>
                             </E1EDKT1>
    Regards
      Uwe

  • Problems with idoc ORDERS05

    Hi experts,
    I created a new Z segment for idoc ORDERS05 and it works fine. This idoc is generated whenever a PO is created or modified. But if the PO has locked or deleted items, there is no segment for this items in the IDOC. Should I modify any code or something in SPRO??
    Thanks in advance,
    Maria

    Hi again...
    I'm trying to make a copy of the standr FM IDOC_OUTPUT_ORDERS because I think it may be easier to add the segments I need. I have also created in tx. WE41a new operation code ZME10 with my new fm. An in tx. WE20 I have assigned ZME10.
    The problem is when I run ME9F i get this error:
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_FUNC',
    was neither
    caught nor passed along using a RAISING clause, in the procedure
    "NEW_DYN_PERFORM" "(FORM)"
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.
    The reason for the exception is:
    The program "RSNASTED" contains the CALL FUNCTION statement.
    The name of the function module to be called is "ZIDOC_OUTPUT_ORDERS".
    but "ZIDOC_OUTPUT_ORDERS" cannot be found in its function group.
    Any idea ??
    thanks in advance !

  • Creation of a line item in the existing PO by inbound idoc (ORDERS05)

    Hi friends,
       I have the following requirement.This is for the  inbound idoc ( orders05).
    If there is an extra item line in the confirmation idoc, for which no corresponding purchase order line is found, check if the extra line's NOB-number is found in the new NOB-number check -table.
    Fetch NOB-number check table with database keys:
    E1EDP19-IDTNR (when E1EDP19-QUALF = ZNO) = NOB-number in the table
    EKPO-WERKS (from 1st purchase order item line) = site number in the table.
    If the NOB-number + WERKS is found in the control table, create a new item line in the purchase order.
    If the NOB-number + WERKS is not found in the control table, put the idoc into error.
    Can you please tell me that how to create a new item line in the purchase order.
    Waiting for your help.
    With Regards,
    Ajit Prasad.

    You like to add new line item in existing purchase order or new po.
    Thanks,
    Narayan

  • Problem with mapping [Idoc to EDI]

    Hi experts,
    i am facing a new problem in my mapping (idoc to edi scenario)
    my target is as follow:
    InvoiceDME
    >Invoice 1..1
    >>InvoiceHeader 1..1
    >>>IncotermsCode 1..1
    My Idoc is as follow:
    IDOC
    >E1EDK17 0..20
    >>QUALF
    >>LKOND
    >>LKTEXT
    There can be 2 scenarios in my source:
    1st:
    IDOC
    >E1EDK17
    >>QUALF = 001
    >>LKOND = lkond001
    >>LKTEXT
    2nd:
    IDOC
    >E1EDK17
    >>QUALF = 001
    >>LKOND = lkond001
    >>LKTEXT
    >E1EDK17
    >>QUALF = 002
    >>LKOND = lkond002
    >>LKTEXT = lktext002
    If QUALF=002 then I have to take both values of LKOND and LKTEXT and map them to incotermcode
    else if qualf=001 alone, then map LKOND to incotermcode
    my mapping is as follow:
    http://www.flickr.com/photos/30317046@N05/2862446903/
    as you can see, the problem is if i am in my second scenario, i get the wrong value in incotercode (lkond001 instead of the concatenate of LKOND and LKTEXT for QUALF = 002)
    Do you have any idea how I can solve this??
    Thanks a lot,
    Regards,
    Jamal

    Actually i used java mapping:
        //write your code here
    try
         String returnString = "";
         for (int i = 0; i < QUALF.length; i++)
              if (("002".equals(QUALF<i>.trim())))
                   returnString = returnString +" "+ LKOND<i> +" "+ LKTEXT<i>;
                   result.addValue(returnString);                   
    catch(Exception e)
         e.printStackTrace();
    and the condition on the 'count' of QUALF (if = 2 then else)
    Thanks,
    Regards,
    Jamal

  • Using PI to map IDoc BENEFIT3 to EDI 834

    Has any used PI/XI to map IDoc BENEFIT3 to EDI 834?  We are looking to use this approach but have had problems finding a standard map.  You would think SAP would have one since they stand by their BENEFIT3 IDoc being sufficient to map to the 834.  This will take forever to do it from scratch or even without an example.  Help please.

    Hi
    You can do 1:n multimapping
    in message mapping in messages tab ..add both the structures in target tab and do the mapping
    and in operation mapping add both the message interface on the target side
    PLease go through this blog
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

  • I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sending data to Message borker.(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to save file in SAP fold

    I have a scenario,  ECC-PI-Message broker. ECC sending IDOC to  PI, PI execute mapping and  sends data to Message borker(thru JMS channel).(with almost one to one mapping)., IDOC(AAE)-PI-JMS. Now my requirement is., from PI  after mapping we need to create file with same data what ever send to Message broker and put the file in SAP folder without touching mapping. Is it possible? Please advise with the steps. We are using the ICO for this senario. Quick response is appriciated.

    Hi Pratik,
         http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42?quicklink=index&overridelayout=true
    This link might help.
    regards
    Anupam

  • How to map idoc segment field E1IDB02-FIIKONTO with BSEG-ESRNR.

    Hi,
    I have searched for lot of threads in the forum , and also i tried myself but i am not able to map this fields segment with my logic, so please anyone kindly contribute in mapping idoc segment field  with the logic given below:
    idoc type :PAYEXT  outbound idoc.
    message type: PEXR2002
    This is my logic: i need to populate the ISR number(BSEG-ESRNR  ) in idoc segment field( E1IDB02-FIIKONTO)
    DATA : str1 TYPE string,
          len1  TYPE i,
          len2  TYPE i,
          str2  TYPE string,
          str3  TYPE string.
    str1 = '01-1234-4'. ---> BSEG-ESRNR  "ISR Subscriber Number
    REPLACE FIRST OCCURRENCE OF '-' IN str1 WITH '_'.
    REPLACE ALL OCCURRENCES OF  '-' IN str1 WITH space.
    CONDENSE str1.
    len1 = STRLEN( str1 ).
    IF len1 LT '9'.
    len2 = '9' - len1.
    CASE len2.
       WHEN '1'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '00'.
       WHEN '2'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000'.
       WHEN '3'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0000'.
       WHEN '4'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000000'.
       WHEN OTHERS.
    ENDCASE.
    ELSEIF len1 EQ '9'.
    REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0'.
    ELSEIF len1 GT '9'.
    REPLACE ALL OCCURRENCES OF '_' IN str1 WITH space.
    CONDENSE str1.
    ENDIF.
    Thanks in Advance.

    Resolved.

  • How to map Idoc fields with external file

    Hi All,
    How to map Idoc fields with external file.
    I want to check the settings where Idoc fields are mapped with external file.
    Thanks in advance.
    Regards,
    Govind.

    If you have configured a fileport where on trigger of IDOC you are creating the file, you can look at the message type documentation and get the offset values for each field in each segment

  • HOW TO MAP IDOC TO XML

    Hi,
      I need to map IDOC to xml but the problem is I have 400 fields in IDOC which  are to be mapped to 20 elements in XML.
          As it a tedious process to go to 400 fields for each xml element.Is their any better way to find correct field in IDOC with very minial time rather going 400 fields for each xml element.
    thanks
    sreeram

    hi,
    >>1)Even SAP it self does not encourage to use ABAP >>MAPPING and
    i dont know where you have read this, but ABAP mapping is one of the most popular/ most efficient and highly recomended by SAP. I have used it in tons of places.
    >>2)More over Iam not ABAP resource.
    you could also do a java mapping.
    there is no other easy way if you are not doing abap/java mapping. you are then left with the only option of using the graphical editor.
    cheers,
    Naveen
    Message was edited by: Naveen Pandrangi

Maybe you are looking for

  • Skype 7.1 Windows-XP-SP3-crashes-at-launch

    Hello, Type of Analysis Performed   Hang Analysis Machine Name Operating System   Windows XP Service Pack 3 Number Of Processors Process ID   2444 Process Image   C:\Program Files\Skype\Phone\Skype.exe System Up-Time   00:00:00 Process Up-Time   00:0

  • ADF 11g - How to do save-cascade?

    Hello, Suppose that I have entities PurchaseOrder (1) <-> (*) PurchaseItem, how do I create PurchaseOrder and related PurchaseItem in one transaction? (much like cascade=PERSIST in JPA). Any examples? Thanks before. Rgds, Rudi

  • Window Clock Listed 4 Times in Startup Items

    Hello, all! On the job I work on a Mac running 10.3.9, and I have an odd little question. Everything runs fine, but I was curious about this. In my System Preferences I have the Date & Time control panel set to show the Date and Time, view in window,

  • Three questions about OSI/RM.

    1. we all know MAC is short for media access control, which is used in Layer 2 , and only in IEEE802 standard system. in another type of network Frame Relay, we used Data Link Control Interface instead. so i guess that we use different tool to identi

  • Invalid or no mapping to system data types found.

    Hello Netweaver gurus. One of my client faces this issue. Has anybody come across similar error types ? Regards, Nitin Koushik