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

Similar Messages

  • Mapping Problem  ( IDoc to File  )

    Hi,
    I am working on Idoc to file scenario...My input and output structures like below...
    Idoc:
    ZOrderInfo        1----99999
        OrderNumber 0---1
         ZItem       1----99999
         Quantity       0---1
    File:
    Item
       OrderNumber  0-1
       Quantity         0-1
    Problem :  I need to produce Item nodes in output structure based on OrderNumber. like for 4 order numbers in source need to 4 Item segments.
    a) Summation:  If any duplicate Ordernumber comes in picture...we need to omit that and need to take the quantity from that...do summation and send to target.
    like OrderNumber -1...quantity -10 and Ordernumber -1 ....quantity -20
    Need to produce only one ordernumber -1 with the quantity of 10+20 =30.
    b) If the Ordernumber not present in any segment....Need to pass the quantity as is...
    any suggestions would be appreciated.
    -Esha.

    Sunil,
    Note:   In this input Idoc - It has 3 segments, 2 segments have same ordernumber and 1 segment doesn't have order number.
    And I am expecting two Item nodes in output structure - One with quantities summation (500 +500 =1000) for the same order number and One with no ordernumber and quantity as is (600).
    Hope my requirements clear to you! Please help me with the valueable suggestions!
    My input structure  - IDoc:
    <?xml version="1.0" encoding="UTF-8"?>
    <ZORDR01>
       <IDOC BEGIN="">
          <EDI_DC40 SEGMENT="">
             <TABNAM/>
             <MANDT/>
             <DOCNUM/>
             <DOCREL/>
             <STATUS/>
             <DIRECT/>
             <OUTMOD/>
             <EXPRSS/>
             <TEST/>
             <IDOCTYP/>
             <CIMTYP/>
             <MESTYP/>
             <MESCOD/>
             <MESFCT/>
             <STD/>
             <STDVRS/>
             <STDMES/>
             <SNDPOR/>
             <SNDPRT/>
             <SNDPFC/>
             <SNDPRN/>
             <SNDSAD/>
             <SNDLAD/>
             <RCVPOR/>
             <RCVPRT/>
             <RCVPFC/>
             <RCVPRN/>
             <RCVSAD/>
             <RCVLAD/>
             <CREDAT>20080310</CREDAT>
             <CRETIM>104301</CRETIM>
             <REFINT/>
             <REFGRP/>
             <REFMES/>
             <ARCKEY/>
             <SERIAL/>
          </EDI_DC40>
          <Z1ORDAPH SEGMENT="">
             <ORDNO>1234567890</ORDNO>
          <DATE/>
             <Z1ORDAPL SEGMENT="">
                <ORDAPQTY>500</ORDAPQTY>
             </Z1ORDAPL>
          </Z1ORDAPH>
          <Z1ORDAPH SEGMENT="">
             <DATE/>
             <Z1ORDAPL SEGMENT="">
                <ORDAPQTY>600</ORDAPQTY>
             </Z1ORDAPL>
          </Z1ORDAPH>
          <Z1ORDAPH SEGMENT="">
             <ORDNO>1234567890</ORDNO>
          <DATE/>
             <Z1ORDAPL SEGMENT="">
                <ORDAPQTY>500</ORDAPQTY>
             </Z1ORDAPL>
          </Z1ORDAPH>
       </IDOC>
    </ZORDR01>

  • 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

  • Problem IDOC to File scenario:  No service for system SAPIDC, clnt in ID

    in IDOC to File scenario, when IDOCis triggered from R/3 to XI, it gives error in SM58 transaction 
    "No service for system SAPIDC, client 800 in Integration Directory"

    In a scenario, i have a BPM which has a transformation step which contains a mutimapping ...means 2 messages mapped to 1 messgaes, here in the mapping i m using an UDF and written code to extract the file name from dynamic configuration.....
    the problem is ...the same BPM contains another transformation step which contains a message mapping (which is not multi mapping), and here the code (UDF) works to fetch the file name...
    the code is all correct....and it looks like
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String sourceFileName = conf.get(key);
    if (sourceFileName == null ){
         sourceFileName = "ErrorFile.xml";}
    return  sourceFileName;

  • Problem : Idoc to File scneario using Party ..!!

    Hi ,
    lam doing Idoc to file scenario by using party.
    Partner type for receiving system is "LS".
    1. when I use Party for my sending system , the message is not processing showing error as " No receiver could be determined"
    2. When I use the sending system as Without Party and the receiving system as Party,the message is processing.
    Questions:
    1. We should not use Party for the sender system when the partner type is "LS"??
    2. Can we use the Party for my sending system when the partner type is "LI" or "KU".?
    If yes, Do i need to do any Identifier settings in communication channels or at Party side like ALE#KU or ALE#LI??
    Please clarify the main question whether can i use party for my SAP system when the partner type is "LS" for outbound scenario(Idoc to file).
    Waiting for your answers.
    Regards
    Krupakar.

    Hi,''
    a SLD registration of DUMMY system for every Party
    1. We should not use Party for the sender system when the partner type is "LS"??
    The only way I know is to make a Dummy system in the SLD with a LS, which I can use in the headermapping of the receiver agreement.
    You could use pratner type as LS enven for party, but there no need as such because you could do this as per below steps also
    it is not possible to have a logical system within a service, that belongs to a party. Any entries you are doing here, are ignored.
    2. Can we use the Party for my sending system when the partner type is "LI" or "KU".?
    If yes, Do i need to do any Identifier settings in communication channels or at Party side like ALE#KU or ALE#LI??
    Yes you can use the Party for sending system for LI or KU, You difinately need to setup the identifiers for it.
    Usually an IDOC which is received from a customer should have a sender type LI or KU.
    A workaround for your problem: For each service that belongs to a party create a party-less service with the logical system and do a header mapping. You need not maintain this service in the SLD. Just create a business service.
    If the field SNDPRT contains LS, the service is a logical system and the sender party remains blank.
    If it is not a logical system, a party is determined by means of the alternative identifiers (for the party). The following are used as identifiers:
    ·        Agency is the sender service found
    ·        Scheme is “ALE#“ + SNDPRT. If the field SNDPFC contains a value, the following is added: “#“ + SNDPFC
    ·        Name is SNDPRN
    These values are used to search across all parties. The party that is found is used as the sender party.
    For Identifiers go through below link
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f3d027074e1bcae10000000a11466f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e1/63e03fc2269615e10000000a155106/frameset.htm
    Let me know if you need anymore info.
    Thanks
    Swarup

  • Problem : IDoc to file Senario, multiple segments in the IDoc.Intresting !!

    Hello People,
    Just a very good problem, to put your brains work.
    The senario is Idoc to File.
    Now Suppose the structure of IDoc is in such a way.
    segment1 -  fields A, B, C, D --- >> Single
    segment2 - fields E,F            --->> This segment can come multiple times.
    segment3 - fields G, H          -
    >> Single
    segment4 - filds I, J, K          -
    >> Multiple.
    Now the format of the file is Fixed Length.
    The record will be inserted Row wise.
    Let us assume that the number of segments are.
    segment1
    segment2
    segment2
    segment3
    segment4
    segment4
    All segments are at the same level.
    Example of file :-
    A  B  C  D  E1  F1  G H I1  J1 K1
    A  B  C  D  E2  F2  G H I2  J2 K2
    So please let me know, what kind of structure should i create in my repository for the Target and also let me know , the File content Conversion part ..
    Thanks in Advance.
    Harpreet.

    hi,
    Repeat the row for each segment and in the (i)th iteration of the map it to the (i)th segment from the input. Now in your FCC, it will be like writing a normal fixed length conversion.
    For e.g. you target structure will look somewhat like this.
    Document
      Recordset
         Record(i)
           FieldA
           FieldB
           FieldC
           FieldD
           FieldE(i)
           FieldF(i)
    and so on....
    Cheers,
    Sarath.
    Award if helpful.

  • 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

  • Route of the operator.... while creating mapping for idoc to file

    Hi,
    Scenario is IDOC to File but certain rules are there while creating a mapping in XI.
    This is the description for my scenario :
    Within XI this Idoc message needs to be translated into 2 text files:
    1 file for the route of the operator
         - Read the idoc data.
         - When reading a new order first get the customer. This will be a new line in the file.
            The customer number will be set into the filed u2018CustomerIDu2019.
         - Then read the items. For every item create a new line in the file. The machine number will be mapped to the field CustomerID
         - The field RouteOrder should get a sequential number. Starting at 001 and updated by 1 for every new line.
    Could you please guide me how can i implement this above scenario.
    Regards,
    Y.Raj

    Within XI this Idoc message needs to be translated into 2 text files:
    this can be done using multimapping i.e. defining your target messages at mapping tabs in your message mapping.
    When reading a new order first get the customer. This will be a new line in the file.
    The customer number will be set into the filed u2018CustomerIDu2019.
    If there is some condition for identifying new order then you should put condition based on input field.
    if customer no doesnot exists in order then RFC lookup can fetch customerno
    The field RouteOrder should get a sequential number. Starting at 001 and updated by 1 for every new line.
    for this declare varaible in global section and use the same or some builtin function can be used for the same.
    Rajesh

  • Problem : Idoc to File Senario,overriding the segments in Idoc,on condition

    Hello People,
    Idoc to file senario.
    There are fields in the Idoc which i want to populate, if that particular Idoc is going to XI. Can u tell me how can i check this condition .. ???

    you dnt have control fro r/3 to check if the IDOC is reached to XI then XI creates the file then update few thing...
    make sure the IDOC is reached to XI using the port if IDOC is using some port...but if the file is getting places in server using AL11 you can check that....in your condition you can check if file is exist in the target folder thn update .....insead of checking if IDOC sent to XI--XI creating a file...i doubt you have that flexibility...lets wait for other reply what they have to say?

  • Mapping problem:IDoc to JDBC scenario

    Hi Friends,
       Hope you all are doing well.I am doing a ADoc to JDBC scenario where multiple rows of data are to be inserted into the db table at once. When I am mapping the data segments to 'Access' with RemoveContext in between,then it is giving error.If I'm mapping the data segments to 'Access' with CollapseContext in between,then it is inserting only the data in the first row and ignoring the rest. The occurence for 'Access' is 1..unbounded. Please help.
    regards
    Debansu

    Hi,
      It seems your mapping have missing some logic..
      LIke below..
      If E1EDP01 segments enable 3 time.
        You mapped the Access  with that segment.
        In that segment you want to map the "Action" filed to target"XXX".
        If you using remove context between then all the 3 values in the "Action" will try to assign in XXX field.
        But you have "XXX" occurance 1-1.So that you will get the error.
        If your using the Collapse Context then In the 3 value the first value only will copy to that field.
        So it wont give the error.
        How the logic you need? can u breaf your source and target fields?
    Regards,
    Prakasu

  • 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

  • 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 to file senerio...

    Hi XI Gurus
                             I need a help.
    I have an idoc.The output is papped to a file , this being a IDOC to File senerio. The Idoc  contains segmnent1,2,3,4,5,6,7.The occurance of segment 7 is optional.It may come, it may not come. If segment 7 comes then there is  a field callled mwskz which would contain 2 digits,  say 'D1',  or  'D2' or D3' or 'D4' or  D5' or 'D6'  or D7'or 'F8' or D9'. The file has a mapping, where there are 9 fields [ say F1, f2, f3, f4, f5, f6, f7, f8, and f9 ]  in the ROOT. If at any instance, for a given segment 1, there is  a segment7, then the contents of the fields MWSKZ is mapped based on it's content , say if the content ofnwskz is D6 then all fields from F1 - F9 would be populated by the constant term 'N' except for the field 'F6' which would contain 'Y'.
    I have done a mapping, but it is failing...
    I have used, remove contexts for the field as well as segment . I have use the function exists...but, after putting PAYLOASD, what I can see is, the mapping of the occurance of SEGMENT7 is not synchronised with field mwskz.
    Experts Pls help.
    Pls send me ur email address so that I can show u the screen-shots of the mapping !!!!
    Many Thanks in Advance
    Arnab
    Please read the Forum's Rules of Engagement,
    i.e.,
    [/thread/117188 [original link is broken];
    and refrain from using email correspondence as the main objective of the Forums is to share knowledge.
    SDN PI/XI Forum Moderator

    Hi Arnab,
    If i have understood your requirement correctly, you need to duplicate your ROOT node which has fields f1.. f9 for 9 times and map it to a constant. Now you can provide the condition like this:
    mwskz = D6-> createIf -> ROOT
    and so on....
    In the ROOT segment now you can directly map the fields f1 to f9 as per the requirement, i.e., f1 to f5 and f7 to f9 can be mapped to N directly and f6 can be mapped to Y.
    Correct me if i have misunderstood your requirement.
    Regards,
    Sanjeev.

  • IDOC to File Mapping problem.

    Hi all,
    I am working on IDOC to file scenario. Here I need to create CSV file for some fields of the IDOC. Actually flat file should contain around 65 comma separated fields irrespective (independent of the segment presence in the IDOC) of the existence of the corresponding filed in the idoc structure. So could you please tell me how to handle this situation?
    Here file is supposed to be created with 65 fields. But it only contains few of those, as some segments in the IDOC are missing. Is there any dependency between the filed and its header/segment?
    Thanks in advance,
    -Kanth.

    Hi Prasad,
    <i>But it only contains few of those, as some segments in the IDOC are missing. Is there any dependency between the filed and its header/segment?</i> - yes, if your  source IDOC is having some segments missing, then your target will not have those segments, so some of your target data will be lost.......
    To avoid this you can go for a JAVA mapping.....
    Thanks,
    Rajeev Gupta

Maybe you are looking for

  • Filter plugin. Problem after change image depth.

    Hi All ! I already wrote filter plugin it work fine but only for image depth 8bit, after i change image depth on 16 or 32 bits I getting error msg box from photoshop. I try change on 'destination.colBits = 8' or 'destination.colBits = pChannel->depth

  • Send mail with correct encoding

    pleace, can somebody tell me how to create a correct procedure to send mail with central europe signs? i use Procedure MailToOwner as BEGIN UTL_MAIL.send( sender => [email protected], recipients => [email protected], subject => 'subject', message =>

  • Cannot mount file system

    Hi, I have had great advice on this board, and thought maybe someone could help me out. I am following the instructions on installing Enterprise Linux on VMServer. I have just about completed the install, but have ran into the following error message

  • Safari crashing all the time - ios8.0.2

    UPdated from ios7 to ios 8.2 and guess what, not even safari nor any other browser works, the Ll crash after i start them or when i try to type a web adrress!!! Fix that apple !

  • When i am installing any apps or thems in E61i tha...

    iam using NoKIA E61i.why i install any new app or thems form mobile9 or anywhere while installing error occur that content certificate expired.it comes to all app while installing.why it sooo