Mapping Requirement for File to IDOC

Hi All,
I have a requirement related to Mapping and need your help on this. There is a financial posting Interface and the data is being fetched from database using strored procedure.
The source file is having structure like as shown below
<FIExport>
    <resultset>
         <row>
           <headerid>12345</header id>
            <field2>5</field2>
           <field3>1</field3>
           <field4>29</field4>
           <field5>3</field5>
          </row>
         <row>
           <headerid>12345</header id>
            <field2>5</field2>
           <field3>1</field3>
           <field4>48</field4>
           <field5>3</field5>
          </row>
         <row>
           <headerid>12345</header id>
            <field2>5</field2>
           <field3>1</field3>
           </field4>
           <field5>3</field5>
          </row>
          <row>
           <headerid>12346</header id>
            <field2>5</field2>
           <field3>1</field3>
           <field4>2</field4>
           <field5>3</field5>
          </row>
         <row>
           <headerid>12347</header id>
            <field2>5</field2>
           <field3>1</field3>
           <field4>2</field4>
           <field5>3</field5>
          </row>
      </resultset>
    </FIExport>
Condition:
For creating target structure follwoing conditions are required
1) IDOC at receiver side will be created as per unique header id  therefore in the current source structure 3 Idocs will be created for 3 unique header id like 12345 , 12346 , 12347
2) Target EIFISEG which is line item will be created based on per row per unique header id under each IDOC and there has to be 2 SEGMENTS (2A & 2B ) per row based on the VAT amount presence and also two additional E1FISEG has to be created statically per idoc for BSCHL = 34
so for the above source structure the target should have number of EIFISEG as follows:
As there are 3 rows for header id 12345, therefore under IDOC1 the number of EIFISEG will be
since VAT Amount(field 4) is present therefore for 2rows of 12345 header id IDOC it will generate 2X2=4 , E1FISEG segments (each for 2A & 2B) and 1 E1FISEG for 3 row of header id IDOC 12345.
In addition to this 2 additional segment will be created for BSCHL=34( it's duplicate segment of E1FISEG, so no issues in this)
Total number of E1FISEG segments in IDOC for header id(12345) will be = 4 + 1 + 2 = 7 segments
Similarly for IDOC  with header id (12346) the total number of EIFISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
Similarly for IDOC with header id(12347) the total number of E1FISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
So the target strcuture should look like:
Target Structure
IDOC1 for header id= 12345
    E1FIKPF
        field 1
          E1FISEG1
            field 2
          E1FISEG2
            field 2
          E1FISEG3
            field 2
          E1FISEG4
             field 2
          E1FISEG5
             field 2
          E1FISEG6
              field 2      
          E1FISEG7
              field 2
IDOC1 for header id= 12346
    E1FIKPF
        field 1
          E1FISEG1
            field 2
          E1FISEG2
            field 2
          E1FISEG3
            field 2
          E1FISEG4
             field 2
IDOC1 for header id= 12347
    E1FIKPF
        field 1
          E1FISEG1
            field 2
          E1FISEG2
            field 2
          E1FISEG3
            field 2
          E1FISEG4
             field 2
Please help me to complete this mapping requirement as it seems to be complex.
Thanks & Regards
Prabhat

Hi,
There was one typo mistake, the TARGET structure will be
Target Structure
IDOC1 for header id= 12345
   E1FIKPF
     field 1
         E1FISEG1
           field 2
         E1FISEG2
           field 2
         E1FISEG3
           field 2
         E1FISEG4
            field 2
         E1FISEG5
            field 2
         E1FISEG6
            field 2
         E1FISEG7
            field 2
IDOC2 for header id= 12346
      E1FIKPF
        field 1
           E1FISEG1
              field 2
           E1FISEG2
              field 2
           E1FISEG3
              field 2
           E1FISEG4
              field 2
IDOC3 for header id= 12347
           E1FIKPF
               field 1
                 E1FISEG1
                    field 2
                 E1FISEG2
                    field 2
                 E1FISEG3
                    field 2
                 E1FISEG4
                    field 2
Thanks & Regards
Prabhat

Similar Messages

  • Suggessions required for File----XI----Idoc Interface

    Dear All,
    I have developed File-XIIdoc Interface and works fine.
    Query: When the Source application is trying to write the data into file, XI needs to wait until it completes
    Once the writing is completed then only XI has to pickup the file from Source location.
    If XI is not checking this check point, File adapter is picking up the file in the middle of the data writing itself.
    Please suggest me your thoughts and experience on this
    REgards
    Suman

    Hi Suman,
    For writing a module please check the blog and articles in SDN.
    The module logic should be as follows:
    1. it should read and store intermeidiately the size & filenam of all files present in the folder.
    2. do a wait of say 30 sec in the module (by sleep or any other such waiting command of java).
    3. Then recheck the size of only those files read in step one (don;t read entire files present in folder now as some new files may have been created in this 30 seconds sleep time)
    4. If the file size changes don't do anything else send the content to PI and /archivethe file (should be done inside the module code)
    5. Keep the file sender channel in Test mode (as the module will do the necessary archival/deletion)
    PS: This blog can be a starting point for you /people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location
    Regards
    Suraj

  • UDF for file to IDoc.

    Hi,
    I could like to create an UDF for file to IDoc secenario.
    Srouce:
    MTCashPosting_
    Header
    CashPosting
    PubDiv
    DocType
    DocDate
    PostDate
    RefDocNo
    HeaderTxt
    Customer
    Value
    Currency
    ExchangeRate
    Ledger
    Item
    Material
    TaxValue
    VAtValue
    Trailer
    Traget: (IDOC Type: FIDCCP02 Message Type: FIDCC2)
    FIDCCP02
    IDoc (Under FIDCCP02)
    Begin (Under IDoc)
    EDIDC40_:DISABLED
    E1FIKPF (Under IDoc)
    E1FISEG (Under E1FIKPF)
    Segment
    buzei
    bschl
    shkzg
    mwskz
    dmbtr
    hkont
    matnr
    "The secenario is the 'Value,TaxVAlue & VatValue' should be handled by replicating E1FISEG like (HAve used External definition for IDoc)"
    Value -> Line item 1
    IF TaxValue exists->Line Item 2
    IF VatValue exists-> Line item 3
    Finally Line item 4 for cerdit.All above are debit
    Value____________UDF______________E1FISEG
    TaxValue_________|
    VatValue_________|
    Value____________UDF______________DMBTR
    TaxValue_________|
    VatValue_________|
    How should I map?? Inputs plzzzzz

    Hi
    I am not sure whether my understanding is correct.
    As per my understanding
    You need to duplicate E1F1SEG segment 4 times as there are 4 conditions
    and those nodes need to be enabled or suppressed based on your condition .
    Regards
    sandeep

  • Alert Configuration for File to IDoc scenario

    I have followed Alerts : Step-by-Step /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    and configured Alerts for file to IDoc scenario.
    But the problem is, I did not notice any alerts being generated. I could notice the IDocs being posted to destination system. So I was going through Alerts-Troubleshoute Guide. In intension to maintain monitoring level, I clicked Configuration tab. But I did not notice my sender and receiver system there to maintain.
    Can any body help me to detail out the procedure to add sender and receiver systems to maintain the monitoring level?
    Regards,
    Suraj Kumar

    hi Suraj,
    WHich SP version are you on??
    If you are on Sp14 or above, then unfortunately, Michal's Trouble Shooting for Alerts will not help.
    From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note <b>870232</b> for this info.
    Next, to test if your Alerts have been defined correctly, go to SE38. In the program , type RSALERTTEST and then click on EXECUTE button ( F8 ). In the next window, it will ask you for your ALERTCATEGORY. Just give the name of your ALERT CATEGORY and click EXECUTE.
    If you have configured your alerts correctly, you will receive a message that tells ALERT IS GENERATED and will give the ALERT ID.
    Now, go to your Run TIme workbench and then select ALERT INBOX and see if you have got the ALERT message in your ALERT INBOX.
    If this is working fine, then the last step, implement the note 913858.
    Regards,
    Bhavesh

  • Namespace Creation for file to idoc scenario

    Hi ,
    while creating new  namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
                                           system :..............
                                           Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.
    Further when we go for
                                   imported objetcs ->
                                                IDOCS -import of sap object-->
                                                Application server Name :....................
                                                System No:..............................
                                                User :.................
                                                Name :................
                                                Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.
    pl help.

    Hi,
    <b>while creating new namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
    system :..............
    Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.</b>
    Ans <b>R/3</b>
    <b>Further when we go for
    imported objetcs ->
    IDOCS -import of sap object-->
    Application server Name :....................
    System No:..............................
    User :.................
    Name :................
    Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.</b>
    Ans: <b>R/3</b>
    Regards,

  • Is graphical mapping best for a large IDoc mapping to file?

    Hello,
    I have to map an IDoc to a file and 450+ lines are mandatory or needed to go a file output.  A lot of the lines need some value mapping.  Is XSLT or Java mapping better for this task? 
    John Xi

    Hi,
         If you require to do a lot of lookups and for large payloads, it would make sense to go for a Java mapping as in this case it would improve performance to some extent.
    For large messages, please refer the follwong link to improve system performance.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7?quicklink=index&overridelayout=true
    Regards

  • 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

  • Lookup issue for File to Idoc scenario-- Urgent Pls.

    Hi All,
    Iam doing File to IDoc scenario with one file --> any of 3 R/3 systems.
    Routing has to be done dynamically using a lookup file, based on the incoming GLN code and last character of the Order Reference number.
    The last character of the Order ref Num will have A,B or C.
    Where,  ' A'  for  R/3 152 Client
                 ' B' for  R/3 142 Client
                 'C'  for  R/3  132 Client.
    1. PlantGLN_Routing lookup file :
    DestinationSystem,   Plant GLNCode,       Partner Number,  
    A,                            5000243000473,         GDKDVRC152,     
    B,                            5000243000473,         GDKDVRC142,      
    C,                            5000243000473,         GDKDVRC132,      
    A                                 500034000487           GDKDVRC152,     
    B                                 500034000487           GDKDVRC142,     
    C                                 500034000487           GDKDVRC132,
    By Using DestinationSystem and Plant GLN Code as lookup key --> I need to get the value of partner system.
    2.  IdocCtrlLookup
    Purpose: To read the IdocCtrlLookup file to populate the Idoc control segment
    Now based on the partner system from previous table --> I need to get the details of Sender Port , Sender Partner Type , Sender Partner Function , Sender Partner Number , Rx Port , Rx Partner Type , Rx Partner Function , Rx Partner Number.
    Please help me how can acheive this scenario with the help of lookups.
    Its very urgent.
    Regards
    Krupakar.

    HI,
    Here you would have to use one mapping for dynamic routing , based on this create IM and use it in receiver determination.
    the another mapping is general to file to idoc.
    see the dynamic routing link here
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping -
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Also if you know the field name the context object can be defined for partner no that can be used in receiver determination in condition. to particular partner no in receiver determination.
    Regards
    Chilla

  • Suggestions for File to IDOC Scenario

    Experts,
    Here is the requirement A Legacy System will Produce the Customer data file and we have to transform certain data and post it to DEBMAS.
    As Part of the information in the file there is a field Which could have a value Update,Amend or Delete.
    My Question is How do it handle this.
    Please give me your valuable thoughts.
    Is it Possible to go for File2IDOC here?
    Thanks
    Vasu.

    Hi Vasu,
      If Customer data file is of type xml then file to IDOC scenario is preferable.
    Else you have to convert Customer data file to xml first and then proceed for that you can use content converson feature of File Adapter.
    The information for Update,Amend or Delete will be provided by customer or you have to decide it based of data in table?
    if it is provided by customer then you can go for ABAP Proxy for that take help of ABAPers.
    If you have to decide the Update,Amend or Delete logic.
    Then fetch the data from table compare it with incoming data decide the Action and then perform the action this can also be handled in ABAP Proxy.
    Reward Points if HElpful
    Thanks
    Sunil Singh

  • Requirements for file to multi file scenario

    Hi,
    Please tell me what are the System Requirements(of XI System) for running of file to multi-file scenarios.
    Also are there more requirements for some other similar scanarios.

    refer  this blog
    /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    1. If u want to split the file coming from the sender, the u will have to use multi-mapping.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    2. If u want to send the same file to all the receivers then it would be better to go for configuring multiple receivers in the same receiver determination step.
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>
    Thanks,
    Abhishek Agrahari

  • Partner Profile for file to IDOC scenario

    Hi experts,
    I am doing file to Idoc scenario. I did the ALE configuration steps between XI and r/3. For sender (ThirdParty) system, I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
    Thanks
    Manoj

    Hi,
    >>I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
    in most cases you will only use one logical system in WE20
    this will be XI's logical system - and you can route all the traffic
    via this logicail system - this is the most popular case
    for more about IDOCs and XI have a look at my book:
    Mastering IDoc Business Scenarios with the SAP XI
    http://www.sap-press.com/product.cfm?account=&product=H1935
    Regards,
    Michal Krawczyk
    http://mypigenie.com - XI/PI FAQ

  • Help required for file to Multi file Blog

    Hi,
    I'm working with following blog for file to multi file scenario...
    "/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    But in Configuration part, I'm unable to find ..TITLE_IDTYPE option for RB_SPLIT.. Screen, there is only two options are available one is Standard and another one is Extended ???!!!
    Note : we are using SP16
    So,  How can I go ahead to complete this scenario ??!!!
    Can anybody help me out to complete this file to mulfile scenario without BPM.
    Thanks.,
    Esha

    Hi Esha,
    the names seem to have changed since SP14 (the version of this blog entry).
    I did a multi-mapping with SP15 once, using "Extended".
    Kind regards,
    Dennis

  • Steps required in File to Idoc Scenario

    Hey guys i m doin a file to Idoc scenario and just wanna make sure my steps r correct.
    steps done on the XI server
    1.Create RFC destination(test the destination by giving the target host as the R/3 server).
    2.Create port for the RFC destination.
    steps on the R/3 side
    1.Create/verify logical system name.
    and finally create business system for this logical system in SLD.
    now do i need to do partner profile as well or not? and if i have to do it how is it accomplished.
    thanx
    ahmad

    Hi,
    The following are needed for idoc to file scenario...
    In R3...
    RFC dest to XI (sm59)
    Logical system (bd54)
    Port to XI (we21)
    Partner profile for the logical system (we20)
    In XI...
    RFC dest to R3 (sm59)
    Port to R3 (idx1)
    create metadata for the idoc (idx2)
    In sld...
    create business system for R3.
    Regards,
    Uma

  • Mapping issue in FIle to IDoc

    Hello friends,
    In file to IDoc scenario,
    Source structure is
    1: header
       n: itemdetails
    For Item details, IDoc structure has got 2 sub segments under E1EDP01 segment. as below.
    E1EDP01
    --E1EDP02
    --E1EDP26
    When I try to post message with multiple line items, I am getting  as below
    E1EDP01
    --E1EDP02
    --E1EDP02
    --E1EDP26
    --E1EDP26
    E1EDP01(no sub sement).
    But the expected result is  as below.
    E1EDP01
    --E1EDP02
    --E1EDP26
    E1EDP01
    --E1EDP02
    --E1EDP26
    Please help me in this regard.
    Many thanks
    Sam
    Edited by: Guest on Mar 18, 2008 7:41 PM
    Edited by: Guest on Mar 18, 2008 7:43 PM

    Hi,
    just put a split by value in the mappings for E1EDP02 and E1EDP26:
    field1>Split By Value\[Each Value\]>E1EDP02
    field2>Split By Value\[Each Value\]>E1EDP26
    Reward points if helpful.
    Sankar Choudhury

  • For  file to IDOC scenario, do i need to make a partner profile in XI  ?

    for a file--->XI--->IDOC scenario, do i need to make a partner profile in XI(for the R/3 system which is going to receive the IDOC),
    or only a port maintenance in idx1 will do.....

    hi Sudheer,
    yes u need to maintain partner profile in R/3
    Check below link in WIKi for complete File to IDOC
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/fileToIDOC&
    Sachin

Maybe you are looking for

  • Deployment error while running the application

    Hi Every body, I am new to JEE though an old pro at JDK.I have also worked on tomcat. I have got Sun Java System Application Server 9.1 installed with NetBeans 6.1 on winXP. I am trying to create a EJB app-client module.I even tried to run the sample

  • Complete Beginner

    What do I need to get started with Java. I've never used it before and would appreciate advice on what I need to download and install. Also is there a good tutorial to start me off? Thanks to anyone who replies

  • Value date rules

    Hi, I would like to clarify on the below 3 column in the configuration above. what is the purpose of the below and can provide an example? S (+/- sign for the difference in days) , DEV (Deviation from reference date in days) and D (Rule for setting t

  • HT4623 I want to unistall the ios latest version - don't like it?  Can anyone help me?  I am NOT a techie.

    I have an IPhone 4 I installed the latest version of IOS and don't like it.  Can anyone tell me how to uninstall and go back to what I have before?  I am not a techie... Thanks

  • How do I purchase an app but not download it now?

    There are times when I want to purchase an app on the Mac App Store immediately but don't want to download it at the same time. This happens occasionally when I'm at work on one Mac and need to make the purchase immediately but don't want it to downl