Mapping on Idoc

hi all,
i want to map records obtain from a table into an idoc. the xml representation has two parts on which i need to map my record. the first one is the header node and the second one is the item node. the item node is a sub element of header node.
so i am trying to build a mapping rule which can cater for records(obtained from the table) don't have a header or don't have an item line.
i was able to create such a rule but now whenever i have a record with a proper header and several items my resulting idoc gives me a header and n+1 items i obtained from the record(table) the surplus item is empty.
that is if i have one 1 header and 3 items, the idoc produce 1 header with 4 items. the first items is blank.
i figures out that since i implemented the rule to create an empty segment for item when i got a header only, each time the system is generating a header it is acting as if there is no item and creating this blank item.
so i want to have a rule which allow me to
1. create an idoc with empty items if i got only header
2 .and secondly to create an idoc with a header  and n items i got from the table.
hope i was able to explain my problem clearly.
thanks in advance.
Edited by: click_17 on Sep 11, 2009 1:53 PM

hi,
i was able to prevent the system to create an empty segment. the problem was the idoc i was using was restricting the header an item segment to occur, having a minOccur as 1. hence i must modify the attributes and import the new idoc. having the minOccur as 1, the mapping crashes since the segment is required and hence when it was failing the check condition the system was throwing an error.
however i stil have a problem. i must be able to create several item segments for a header. i am not able to find the correct mapping rule to create this scenario.
thanks in advance.

Similar Messages

  • BPM - doubt in N:1 mapping of IDOCs

    Is there any DETAILED document on Mapping multiple Idocs into a single Idoc package using BPM.My doubt is in the latter part in this process(During Receiver Determination) :
    Scenario : CRM->XI->R3
    We will download the CREMAS03 and then make changes in the xml so that it can hold multiple IDOCs.
    and then we will be collecting the Idocs(say 3 idocs at a time)...that is, appending the IDOCS(CREMAS03) into a multiline container of type CREMAS03.
    In the transformation step, the multiline container containing CREMAS03 IDOCs is transformed to IDOC PACKAGE(N:1 Mapping).
    In Integration Directory,We will create 2 RECEIVER DETERMINATIONS :
    1.CRM->BPM :
    Receiver Service  :BPM Object
    Inbound Interface :CREMAS
    Interface Mapping :Maps the Outbound interface (vendor_out_interface) to CREMAS(Abstract Asynchronous)
    2.BPM->R3 :(I have my doubt here!)
    Sender Service     : CREMAS_COLLECT_PACKAGE(BPM Object)
    Outbound Interface : CREMAS_package(Abstract Async, Message is the modified Multi-CREMAS PACKAGE)
    Receiver Service   : R3
    Inbound Interface  : CREMAS.CREMAS03
    Interface Mapping  : NONE (WHY is that No Interface mapping is needed ???...Please elaborate)
    1.HOW will the XI engine MAP the CREMAS_package to CREMAS.CREMAS03 at the end of BPM PROCESS ?
    2.In BPM we have Transformed the individual Idocs into a IDOC Package BUT then at BPM->R3 Receiver Determination WHY are we mapping the CREMAS Package into Individual CREMAS Idoc ??
    3.Does the R3 receive the IDOCs as a Package OR does it receive it as individual Idocs ?And when we say a Package does it mean it will contain 1 Control record & multiple Data Records(EDID) ??
    4.If the R3 receives the IDOCs as a PACKAGE, THEN How does the R3 System separate the Idocs into Individual Idocs ??
    Is there any specific configuration in the partner profile at the R3 side to process A IDOC package ??.
    5.Also when I compare Posting Function Module IDOC_INPUT_CREDITOR and IDOC_OUTPUT_ORDERS , It seems that IDOC_INPUT_CREDITOR    can process multiple Idocs at a time while IDOC_OUTPUT_ORDERS CAN process only ONE IDOC at a time.Am I right ?)
    It would be great if someone has the patience to give a detailed reply.Looking forward to the reply !!
    Thanks,
    Arun.

    Hi Arun,
    You dont need a BPM for ur requirement. All you need to do is IDOC Message pacakages. where the IDOC are sent as a single package. here is the link to the page that details on hwo to do idoc packaging.
    http://help.sap.com/saphelp_nw04/helpdata/en/99/2653429392ab53e10000000a1550b0/content.htm
    you also refer to Michals weblog on IDoc pacakaging. But the approach i have jsut mentioned to you is more efficent and the one suggested by SAP. Michel was supposed to write one more weblog describing this approach.
    Cheers,
    Naveen

  • Multi-Mapping in IDOC without using BPM ?

    Hi ,
    Please check ..
    Can below given blog can be used to achive Multi-mapping in IDOC without using BPM ?
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Regards
    PS

    Solved .. Thx every one .
    Approache Used :
    1. Created mapping  with Change signature on target Message type(idoc) with 1..N Occurence.
    2. Operation mapping with change Occurence on Target Operation(1..Unbounded) .
    3. Used same Operation mapping in Interface Determination with 0..unbounded(Multiplicity).

  • Mapping problem: IDOC - XI - File

    Hi,
    in my scenario (Z-IDOC - XI - File) I have problems with the mapping:
    Z-IDOC :
    ZFIBUCH1
    _IDOC
    ___Begin
    ___EDI_DC40
    ___Z1L061 (0..999999999)
    _____Z1L062 (0..999999999)
    example
    L061 18000 DE 0101 23236318 050605 EUR
    __L062 18000 XXX XXX
    __L062 18000 XX1 CCC3
    L061 87000 DE 0101 050605 EUR
    __L062 87000 XXX XXX
    __L062 87000 XX1 XAA4
    the result should look like this :
    L061 18000 DE 0101 23236318 050605 EUR
    L062 18000 XXX XXX
    L062 18000 XX1 CCC3
    L061 87000 DE 0101 050605 EUR
    L062 87000 XXX XXX
    L062 87000 XX1 XAA4
    I tried the following  (target)-data types in the mapping but nothing did’nt work very well :
    MT_ZIFUCH_FILE
    __ row
    _____L061
    _______L062
    or
    MT_ZIFUCH_FILE
    __ row
    _____L061
    _____L062
    or
    MT_ZIFUCH_FILE
    _____L061
    _____L062
    Do I need here a BPM? Or should I use XSLT-Mapping??
    Or knows somebody a easyer way?
    Regards
    Christoph

    Hi,
    As per  my understanding to have a flat file struture you would require a flat structure at the target side.One similar to the second structure mentioned by you.
    DT_Target
    |_Header
           |______L61.....segment (child of header)
           |______L62.....segment (child of header)
    Using the mapping we convert the idoc structure to flat structure and then use content conversion like this :
    Recordset structure : L61,L62
    L61.fieldSeparator = ,(for you this value should be space)
    L62.fieldSeparator = ,
    I have not been able to convert the Target hierarchial structure to a flat file via content conversion.
    when i tried I got the values as
    L61,1800,...EUR,L62,8700,......
    Hope this helps,
    Regards,
    Sulakshana

  • Advanced mapping from IDOC to SOAP with reversed 3 level context change

    Hi everyone.
    I am having a though time mapping the HRMD_A01 IDOC into a SOAP message. The reason is that the reciever expects an xml structure where the root node is cost center instead of employee which is the case in the IDOC.
    Mapping from:
    IDOC (1..1)
       E1PLOGI (1..unb)
         SEGMENT (String)
         OBJID (String)
         E1PITYP (1..unb)
           E1P0001 (1..unb)
             SEGMENT (String)
             KOSTL (String)
    To this structure:
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above  
    I expect several occurances of E1PLOGI which states multiple employees sent in the IDOC. I also expect several occurences of E1P0001 containing cost centers.
    My conclusion is that I need an advanced mapping and I have created one which collects all KOSTL for the IDOC context, deletes duplicates, and creates the CostCenters segment. This is now working. But my problem is that I can't create the employees segment in the right place. They are only created once under the first CostCenters node.
    Here's the java-code for mapping between KOSTL and CostCenters/KOSTL:
    public void costCenters(String[] var1, ResultList result, Container container) throws StreamTransformationException{
      Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Any ideas on how to proceed?
    Best Regards

    Hi,
      Do the mapping like below.
      UDF should be select as context.
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above
    Mapping:
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--Removecontext--CostCenters
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--SplitbyValue(Each Value)--KOSTL
    constant---Employees
    OBJID----------------------------------------------Use One As Many---SplitByValue (EachValue)----------OBJID
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    Regards,
    Prakasu.M
    Edited by: prakasu on May 20, 2009 3:28 PM

  • Multi Mapping - Receiver IDOC & Mail with BPM

    Hi,
    Is it possible to use BPM with Multi Mapping for IDOC & Mail receivers sent parallely..
    Appreciate your help ..
    Thanks,
    vasanth.

    Hi Michal,
    Thanks Michal,
    We are using PI 7.1, Our Scope to do File to IDOC & Mail scenario in between we have to do RFC Lookups..
    Could you pls guide me thru the steps fo BPM,
    1 SA -> OB to AA
    2 ID  -> OB to AA & AA to Recv
    3.RD -> OB to AA & AA to Recv
    4.RA -> AA to IB & AA to IB
    Correct me if i'm wrong..
    Clarification : Is there is any way out to implement this scenario with out BPM.
    We already implemented this scenario with 2 MM & 2 OM, Scenario works fine...but we have to use 1 Mapping..
    Appreciate your help in advance..
    Thanks,
    vasanth.

  • Payload in String need Java mapping to IDOC structure

    Hi
    I have a payload in a field and that payload needs to  be mapped to IDOC sturcture. As per my understanding I will have to write java mapping for the same.
    I don't have any background of java, can anyone help me do this stuff or give me some inputs for the same.
    Regards
    Ria

    Dear Ria,
    Does the Source field consists of payload, then there must be original payload for which you have created Source Structure in XI right.
    I think your source structure look like this if I'm not wrong:
    <Data Type>
        < Field>
          <Field>
           <Field-Payload>
           </Field-Payload>
           </Field>
           </Field>
    </DataType>
    If this is so, you can split the values in the field by FCC. If your field consists of simple payload you can use String functions to extract the value and map it to IDOC field.
    Best Regards
    Praveen K

  • Mapping for IDoc to File

    Hi,
           I am doing mapping for IDoc to file scenario.
    Idoc is INVOIC02.
    Source field  is KRATE from segment E1EDP05
    Target field is Rate.
    Mapping rule is as follows.
    zero when Condiditon type (E1EDP05-KSCHL ) = YCSE  ( enter total 15 digits without any decimal in it. The last 2 digits will be treated as digits after decimal )
    Can someone explain the mapping?
    I have to map KRATE and Rate but where does KSCHL comes into this?
    Please explain

    TAKE HELP FROM THESE LINKS : These links can be helpful for you.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/db0e83e8e74202a5bff527055ab7e5/content.htm
    Regards,
    Sandeep Kaushik

  • Fields to be mapped for Idoc/Xi interface

    For customer collaboration we need to map the Idoc/Xi interface for following things
    In FS what field should be mentioned for following
         u2022     Integration SNC with R/3:
    u2022     ORDERS (PI) (Order Creation)
    u2022     ORDERSP (PI) (Order Confirmation)
    u2022     DESADV (PI) (ASN)
    u2022     Integration with the customer
    o     PROACT = new integration with SNC (PI)
    o     Product Forecast Notification
    o     ( Order ID Notification ) - To be evaluated for PO nrs.
    o     ORDERSP = AS IS
    o     DESADV = AS IS
    o     Proof of Delivery

    I am closing this Thread
    Thanks

  • Message Mapping of IDOC "MATMAS.MATMAS05"

    Hi!
    I would like to execute the following message mapping for  IDoc
    MATMAS05 <--> MATMAS05.
    What are the recommended fields to map?
    Is the a button to automatically map the fields with the same names?
    Thank you very much!
    regards
    Thom

    Hi,
    you could use the button "Map Selected Fields and Substructures if Names Are Identical"
    it's explained here:
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    Or if you do it without a mapping:
    simple IDoc to IDoc scenario with SAP PI
    Regards
    Patrick

  • Header Mapping in Idoc scenarios

    What is the use of Header Mapping in IDOC based scenarios?

    Hi,
    Header maping can be used to determine the destination in the interface based upon any particular field .If the field is populated with the value then that value can be used for receiver determination to send message for example you have one file that can be mapped to any one pf the multiple IDOCs then based upon the header value you can determine the destination or the IDOC goin to be used
    Ckeck this link this will help you a lot
    reg:HEADER MAPPING
    Check these links also
    Header Mapping in File to IDoc
    Header mapping while using IDoc as receiver communication
    Thanks
    Vikranth
    Edited by: Khimavath Vikranth on May 28, 2008 9:30 PM

  • I facing one situtation in mapping  Custmosied IDOC  a new segment is add t

    HI Gurus
    I facing one situtation in mapping  Custmosied IDOC  a new segment is add to that IDOC.... i want to display values in queues in mapping test.. but queue is empty it showing ,,,
    already i have checked IDX2 .. in that it is updated about the segement .. let me know solutiuon y it is not populate in that segemnt ..\
    thanks in advance.

    Hi ,
    Have you imported the IDOC into ESR after the changes were done in the ECC side?
    Is the mapping done for the new segment/fields properly?
    Please check what values are passed in the segment from ECC?Try triggering a message from WE19 with test values and check if you are receiving the same?
    Please explain little more on this...
    Regards,
    Srinivas

  • 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

  • Multi Mapping in IDOCs

    Hi all i have a senario in which i have to send 990 IDocs at a single point of time not more then tht.
    I have done the mapping and changed the occurences of the IDocs node by externally exporting it and then importing it back again.
    I also needed to repeat the main node so i changed the message ocrrences in the Message mapping to 0.. unbounded.
    The problem i am facing is like it is showing errors in the end to end.
    The error describtion is as follows:
    Category>XIServer</SAP:Category>
      <SAP:Code area="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Messages in multi-message format can only be sent to one Adapter Engine</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    is it not possible to change the occurences for the IDoc Message. If so how can i do this without it.
    Rgds
    Aditya

    Hi,
    I don't think that you need to make occurence change in mapping.
    1) First export your idoc change the occurance then import
    2) Then do the mapping *Don't change occurance for source idoc in mapping
    check the weblog again
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    btw if you can put wht the entire scenario is dat will be better.
    <b>Cheers,
    *RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • Error in message mapping of IDoC Invoic02

    Hi,
    i have imported the invoic02 idoc into PI system. i have mapped the required field os idoc with standard XSD which is imported through ED. I'm able to most of the fields with idoc and XSD. however, some of the node in xsd are repaeting.
    so here the part of xsd with which i'm mapping.
    (first_node)ListOfTaxSummary                      0..1
    (second_parent_node)TaxSummary                   1..unboubed
    (child_node) tax                                 1..1
    (element)TaxAmount                                0..1
    (element)TaxCategoryCoded                         0..1
    here the i have mapped  ListOfTaxSummary    with the idoc node E1EDS01
    TaxSummary  with E1EDS01
    tax with E1EDS01.
    i tried all possibilities with different mapping. but i'm able to get the tax node under taxsummary with the element. the problem its been repeated as  E1EDS01 idoc repeats.
    please help us in solving this problem.
    Thanks
    Kind regards,
    Lalitkumar.

    Could someone tell me is there any relation for the above error in XML messages and to the message mapping?
    The error mentions that you have used an IDOC in your mapping program which is not found in the ESR....you need to check if the IDOC is present in the ESR and is present under the correct SWCV.
    Once you have done the check do some dummy change to the mapping and activate it (if in DEV) and then check the CACHE.

  • Error in Operation Mapping for Idoc to File Scenario

    Hi Experts,
    I am doing Idoc to File Scenario for Timesheet IDoc "HRSM_C" and following step are through,
    Sender agreement --> Receiver Determination --> Interface Determination
    got stuck in Operation mapping, it sahows error
    "Unable to find resource 193c0e01-bd37-11dd-850c-d879ac131b1f in the following software component versions: http://clarityPOCcom/sap/xi/tf/_MM_Timesheets_iDocToFile_.class-1"
    Also not all the fields of IDoc HRSM_C are transferred to the XI server as I am unable to see all the fields in xml file using transaction idx5, as I suppose the reason behind may be there are no values in those fields.
    Please suggest how to resove the issue and transfer all the fields from R3 to XI in Idoc eventhough it doesn't contain any value.

    Hi
    Refresh CPA cache using user PIDIRUSER.
    Look Note 951318 for Mapping Cache Refresh.

Maybe you are looking for

  • Need help with long sync times - busy optimizing unchanged pictures

    Before the latest update I was having a problem with long sync times, often with time spent optimizing pictures that hadn't changed since the last sync. This morning I did the latest update and now it's going on hours updating. Again, optimizing >800

  • Payment method not check in payments

    Hi If I set some payment method (P) in vendor master data and leave blank payment method in dodument item then F110 create proposal (P) for payment for this document. Is it possible to turn on checking document items for payment methods when is blank

  • Service Entry Sheet table

    Hi all, Any anybody tell me which table i can get the short text, quantity, gross price, currency, cost center, net value for Service Entry Sheet? I tried in ESLL table with packeage number but all the above fields are cuming 0.00 in this table Regar

  • Message-Mapping: Button Connect marked field and subsructures is disabled

    Hi everybody, I have a graphical mapping. And I want wo use the button "Connect marked field and subsructures". But the button is disabled. (Other buttons in this panel are also disabled) Do you know any reasons? Thanks Regards Mario Edited by: Mario

  • Polish Language & Currency Support

    Hi, I'm an AM in the UK and one of my customers has asked me to check if the following applications families are available in Polish: Do we support the polish language and currency? Financials HR & Payroll Order Fulfillment Warehouse Management In ad