Mapping IDoc to File Doubt

Hello!!
I have send the IDoc CHRMAS.CHRMAS04 from my R/3 to another system via file adapter.
My problem is I have to pass several fields of the idoc to a complex structure on the XML with the structure:
<ITEM>
   <FIELDNAME>Weight</FIELDNAME>
   <FIELDVALUE>17.0 </FIELDVALUE>  
</ITEM>
<ITEM>
   <FIELDNAME>Colour</FIELDNAME>
   <FIELDVALUE>Blue</FIELDVALUE>  
</ITEM>
Somebody knows how to map for each segement of the IDoc an ITEM substructure?
I hope will be clear enough.
Thanks and regards,
Manuel.

And in which way is this workflow related?
Regards,
Martin

Similar Messages

  • IDOC to FILE doubt

    hi,
    I am doing IDOC to FILE scenario.
    and I have imported MATMAS.MATMAS05 to IR
    and Mapped the following fields to the target  message type
    MaterialNumber
    MaterialType
    IndustrySector
    MaterialGroup
    OrderUnit
    NameWhoChanged
    Please explain me the following
    1.
    I want to know from where the data (from IDOC's segment ? / from Master data table ? / from message type?)  will be transferred to Target File.
    I need flow of data like when we activate the change list in ID. After that what happens in R3 part and XI part ?
    I know IDOC is a data container. It contains segment and segment contain field. Field will have data. Then Idoc is a class and Idoc type is an instance  and message type has what type of data is transferred in the IDOC type.
    2.
    Can I give value to some of the fields of MATMAS05 at XSD level, if yes how ?
    Thanks
    srinivas

    HI,
    Go thru this help to understand IDOc processing in IDOC adapter:
    http://help.sap.com/saphelp_nw70/helpdata/en/b9/c5b13bbeb0cb37e10000000a11402f/content.htm
    <i>
    I want to know from where the data (from IDOC's segment ? / from Master data table ? / from message type?) will be transferred to Target File.</i>
    >>>Idoc will be generated in the SAP system on some activities like Material Master creation etc, i.e data is sent from IDOC segment and corresponding fileds in the IDOC segment,
    <i>Can I give value to some of the fields of MATMAS05 at XSD level, if yes how ?</i>
    >>You can map any fields from the IDOC segment into Target Structure. probably not understood your question rite
    Rgds,
    Moorthy

  • Graphic Mapping:IDOC to File-Avoid Error in Adapter Engine

    Hi all,
    I'm using Graphic Mapping in my IDOC to File scenario in which each segment in source IDOC will generate a ROW in target File with the condition: DATBI >= currentdate (and some other conditions)
    I have a UDF and use the mapping function CREATEIF for this purpose:
                                 DATBI -> UDF -> CREATEIF -> ROW
    Problem scenario: In the source IDOC if all the segments have DATBI < currentdate then there is no ROW created, and I get the error in Adapter Engine
    Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure ...
    How can I avoid this?
    I've tried to put this condition using XPATH in Interface Determination and got the error.
    There is a way to use function current-date() in XPATH condition?
    Thanks for your help,
    Elaine

    Hi all,
    How can I "suppress the row node if condition fails"? I'm new in PI, so please give more details.
    My FCC as follows:
    Record Structure: Record, Row
    Row.addHeaderLine 0
    Row.fieldSeparator ,
    Record.fieldSeparator 'nl'
    Row.endSeparator ; 'nl'
    It works fine if the condition satisfied.
    In Message Mapping, I've use Test to double check my mapping, and in the scenario that conditions fails, there is no Row in the target message.
    Please advise.
    Thanks,
    Elaine

  • Mapping IDoc to file

    Hi,
         I am using INVOIC02 idoc at the sender side and file at the receiver side.I have a doubt in mapping.
    Mapping rule is as follows.
    map E1EDK02-BELNR if   QUALF=009  .
    E1EDK02 is the segment and BELNR is the field.
    target field is  billing doc number.
    My understanding is map belnr to billing doc number and map qualf to constant 009.
    Am i right or wrong?
    Can someone help me?

    Dear Mani,
    You suppose to use QUALF to check for the constant value of 009. And map if this is only true, This is what your requirement is.
    For this in Message Mapping take
    get
           Billing Doc Number    from target structure
           BELNR                     from Source IDOC
           QUALF                     from Source IDOC
    Use If - witout else function then map the fields like this
    you need a constant for this mapping scenario to work.
    assign 009 to constant
    Map like this:
    If  BELNR is equal to Constant(009) then ---> Billing Doc  Number
    you can use If-then-else as well
    just map with some dummy value if the condition is false.
    Best Regards
    Praveen

  • Mapping IDoc--Flat file

    Hi,
         I ahve a following mapping requirement.
    map E1EDK02-BELNR if   QUALF=009  .
    Source field is BELNR and target is Billing document number.
    I have done mapping as follows.
    Map QUALF and constant[009] to equalsS function fron text function.Then output of the above is mapped to  if condition and BELNR is mapped to then condition.Output of if then condition is apped to billing document nymber.
    I am getting the following error.
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MT_BillingDocuments/PONumber. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast 01 to boolean] in class com.sap.aii.mappingtool.flib3.Bool method or[01, 17, com.sap.aii.mappingtool.tf3.rt.Context@1cb2d89]

    Hi,
       The value which is mapped to PO Number
      is throwing an Exception.
      please copy the payload from moni..
    and try to test it at message mapping.
    warm regards
    mahesh.

  • Error/Doubts in Idoc-XI-File scenario

    Dear All,
    I am doing one scenario in which DELIVERY idoc is posted from R/3 to XI and then from XI that idoc is to be sent as flat file to one local folder.
    For this scenario, I have done all ALE settings and I am able to see the idoc in XI in cXML format.Now I want to sent it as flat file.
    Now, for doing this I created 2 BS & 2 TS. 1 BS & TS of type Third Party for receiver & 1 BS & TS are of type Web as ABAP for sender. Then I have created one namespace in IR. I have not created any DT, MT, MI, MM becoz the structure of source and target file are same. Now, I created one IM in which I specified specified Type as "ABAP Class" & Mapping program name as one of the Z function module as specified in one of the SAP Guides.
    Then in ID, I created 2 Parties ie. one for Sender & one for receiver. Sender is having a communication channel of type Idoc & receiver is having communication channel of type File. And thn further Receiver Agreement, Inetrface Determination, Sender Agreement & Receiver Agreement are configured.
    In my system there is one scenario already configured which is using Delivery idoc so I have used party in my scenario for both sender & receiver.
    Now, when I am sending the idoc from R/3, I am able to see cXML in SXMB_MONI but it is taking receiver as the one which is defined for the already existing scenario but not the receiver defined by me.
    Can anybody guide if I have followed the correct steps & where I am doing the error.
    Warm Regards,
    N.Jain

    Hi ,
    Plese refer the following blogs ,
    IDoc to File
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    You have to do all this settings mentioned in the docuemnt:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapR3%28Idocs%29ToXI--Steps+Summarized&
    Also can you check this weblogs on the same:
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    /people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    /people/saravanakumar.kuppusamy2/blog/2005/01/20/configuration-tips-for-a-business-serviceintegration-process-to-send-back-ale-audit-idoc
    Thanks ,
    Suvarna
    Award pts if  it helps .

  • Mapping Error- In IDoc to File scenario

    Hi Experts,
    Got the Mapping error for one interface (IDoc to file). After comparing with successful message found that the field value (TDLINE) is not availbale in first segment (E1EDT10) in idoc for this failed one.
    Mapping is :
    TDLINE -- Exists --- Creatif --- Receiver field(in the file)
    But here due to the the empty value in first segment the message is failed in XI system, next segment values is not trasmitted to the recever end(maping is the same above). To overcome this issue please suggest the suitable mapping design in IR.
    Regards
    Mahesh

    Hi,
    After your CreateIf, use a "IfWithoutElse" by selecting the properties "Keep SUPPRESS Values". To do that, do a right click on IfWithoutElse, choose "Properties".
    With this option, you will keep the fact that you have nothing in the source, and so the target context will have a "SUPPRESS" line.  I have not THE solution, so do your own test.
    If it's not enough, see also about the "mapWithDefault" (but that depends of your real rule).
    Regards.
    Mickael

  • IDOC- XI- FILE(s) 1..n mapping problem

    I am working on a IDOC->XI->FILES scenario and am stuck on mapping of idoc segments to output structure.
    IDOC structure is as following,
    WBBDLD05 (1..1)
         IDOC (1..1)
              EDI_DC40 (1..1)
              E1WBB01 (1..10000) ...
    so the idoc being sent has multiple E1WBB01 segments, i need to do some content check for each E1WBB01 segment and create files based on thats. (ie. if there are 10 of E1WBB01 segments that meets a condition like "E1WBB02:ATTYP = 01", then i should create a file with 10 lines, and if there are 5 segments that meets "E1WBB01.E1WBB02:ATTYP = 00 or 02" condition , then i need to ALSO create another file with another structure with 5 lines)
    i intend to use ccbpm as i find it easier to manipulate control steps. So far i am able to receive abstract idoc message interface, but as i am stuck on this mapping issue, i am not able to use the transformation step for checking content of each E1WBB01 data.
    thank you in advance for any help

    u wud need to loop thru to check for all the contents and have them transformed accordingly. u can check with block . but before that have E1WBB01 into a multiline interface and then use this interface in the transformation step.
    <u>Message Mapping</u>
    SOURCE                                        TARGET
    WBBDLD05 (1..1)
    IDOC (1..1)
    EDI_DC40 (1..1)
    E1WBB01 (1..10000)---------------------------MI_E1WBB01

  • 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

  • Problem in idoc to file mapping

    Hi Experts,
    I am doing a idoc to file scenario...
    There is a single idoc with multiple header and line items .
    I am using multi mapping for header and lineitems.
    The problem i am facing is regarding the occurences in target strucure...
    at which level they should be specified so all the headers come in one strucure and line items in another...or should the occurences be o to unbounded at each field level.
    Kindly help me regarding the same ...

    hi
    i have the same scenario : IDOC (orders) to Flat File. can you plz help in mapping. the input format to XI is in the given way
    idoc
        a1---(0-1)
        a2---(0-1)
           b1--
        a3---(0-1)
           b1---(0-n)
             c1---
           b2---
             c1---
        a3---(0-n)
           b1---
           b2---
        a3---
          b1---
          b2---
        a3
          b1---
          b2---
    i have created the same output DT in the same format (parent-child) for flat file. and my questions are
    1. is that correct, do i need to create the same DT as the above idoc (like parent and child) or different?
    2. how to map the idoc fields to my file DT..do i need to map parent to parent and child to child...or different.
    plz help me out
    Thanks
    ram

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

  • Questions to a Mapping for IDOC-to-File Scenario

    Hi all,
    I want do develop a Message-Mapping for an IDOC-to-File Scenario. A SAP System sends an IDOC to the XI-System and the XI-System should make a mapping an send a XML-File to a FTP-Server. The Strukture of the target message is very easy:
    <xdoc>
       <Invoice>
          @purno
          <HeaderInfo>
             <invno/>
             <shipdate/>
             <extvalue/>
          </HeaderInfo>
          <DetailInfo>
             <LineItem>
                @lineno
                <vpartno/>
                <descrip/>
                <qtyord/>
                <cost/>
                <vendmemo/>
             </LineItem>
          </DetailInfo>
       </Invoice>
    </xdoc>
    The source message is an IDOC. This IDOC can contain one or more positions (E1EDP01). Those different positions should be mapped into different LineItem's (see target structure) -> so in the target file one or more LineItems can appear.
    Is it possible to implement this process with a common message-mapping or have I to implement a business process?
    Thanks
    with best regards
    Christopher

    Hi Christopher,
    <i>Is it possible to implement this process with a common message-mapping or have I to implement a business process?</i> - This thing is possible with common message mapping......you dont need business proces for it.......in msg mapping after taking the source IDOC and target xml struc, map the E1EDP01 field to LineItem field.......just check the occurance of these nodes.....it should be 0..unbounded.........so as many E1EDP01 nodes will be there in idoc, that many LineItem nodes in target will be created.......
    Thanks,
    Rajeev Gupta

  • Context handling in message mapping  for an IDoc to File Scenario

    Hi,
    Can somebody help me with this issue. I have an Idoc to file scenario. heres my idoc structure. Its a custom Idoc
    Header (1..1)
    Detail (0..Unbounded)
             DependentDetail (0...Unbounded)              Note: This dependentdetail is a subelement of Detail
    Trailer(1...1)
    I  created my target structrure the same way as the Idoc structure.
    My output is a simple text file. I need the output in this format
    Header
    Detail1
       Dependentdetail1
       DependentDetail2
       DependentDetail3
    Detail2
       DependentDetail1
       Dependentdetail2
    Detail3
    Detail4
    Trailer
    Since the Detail and Dependent Detail records are unbounded .
    But right now i m getting my output like this:
    Header
    Detail1
    Detail2
    Detail3
    Detail4
    Trailer
    But the DependentDetail record in not showing up in the output file. I didnot do any context change in my mapping. So do I need to do any context handling??...If so can somebody explain me with this.
    Thanks,
    Adam
    Edited by: hymanroth on Apr 29, 2011 11:11 PM

    Thanks Kenneth foryour quick reply,
    Yes, I see the payload for Dependent detail in SXMB_MONI. So as you said earlier there's a problem with my content conversion.
    my content conversion is as follows:
    Header.fieldNames                             
    Header.fieldFixedLengths                
    Header.endSeparator                        
    Detail.fieldNames                               
    Detail.fieldFixedLengths                    
    Detail.endSeparator
    DependentDetail.fieldNames
    DependentDetail.fieldFixedLengths                   
    DependentDetail.endSeparator
    Trailer.fieldNames                             
    Trailer.fieldFixedLengths                
    Trailer.endSeparator  
    So As I told  earlier. With the above content conversion. I am not able to get the Dependent detail record in my output file. So If there is a change in my content conversion can u check it and tell me where I went wrong.
    Thanks,
    Harsh
    Edited by: hymanroth on May 2, 2011 7:03 PM

  • Pass through scenario in SAP PI with no mapping for File to IDoc and Idoc to file scenarios

    Hi Experts,
    Can i have step by step process in SAP PI for pass through scenario with no mapping in case of file to Idoc and Idoc to file both cases please.
    What objects i can skip.
    My PI system is 7.3 dual stack.
    I have seen below blogs, still its confusing to me.
    When and how to create an scenario in SAP PI without mapping objects.
    Pass Through Scenario with no Mapping in PI 7.1
    Appreciate your help on this.
    Regards,
    Mohan.

    Hi Mohan
    In pass thru interface you don't need to create any ESR objects, only ID objects are required.
    Just Create a Receiver Determination and Receiver Agreement for your scenario (no need for Interface Det. and Sender Agreement).
    Specify the IDOC in the Sender Interface and namespace as urn:sap-com:document:sap:idoc:messages
    Or instead of creating objects manually, Run the wizard with Idoc name/namespace in sender/receiver interface
    Regards
    Osman

  • 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

Maybe you are looking for

  • Multiple Libraries on one computer

    I want to store more music in iTunes than my iPod has room for (original iPod). I want to use one library for music that I don't want on my iPod and the other for the music I want to sync. I also want to be able to move music back and forth between t

  • Slideshow Gallery in Dreamweaver cs3

    Hi, at the moment i am new to dreamweaver. I have the dreamweaver and flash cs3 package. I am trying implement an image to my home page which will in turn change every 5-10 seconds. I dont want any controls to show up like the ones that come with the

  • Need to change jobcreated by name

    HI All,       I have created a JOB in SM37 with all parameter (when to run,what timings) using my User ID. Now they want me to change the jobcreated by name to some other USER ID. For ex: Job        Job CreatedBy  Status Z_TEST   MYNAME       Release

  • Program to collect user u2013 transaction execution data for past period

    Hi Experts We are developing a program to collect user u2013 transaction execution data for past period ( 3 months-1 year ). We are getting required User and Tcode output but unable to find exact count per tcode ( executed by respective user). We hav

  • Deleting Artwork

    At times, I have dragged in the wrong artwork for a given song and then I've tried dragging the right artwork over top of it. What usually happens is that, I have two pieces of artwork in the square below my menue and the default is somehow set, to s