XSLT Help Request - Building Hierarchy

Hi everyone,
We are receiving a file that has the following structure, where fields that start with H are header fields, and fields that start with D are detail fields (like a header and line items in an FI posting).
H1, H2, H3, D1, D2, D3, D4, D5
On the first line of the FI posting, the H and the D fields are populated (i.e. contains the header information, and the first line item information).  Then on the next lines, the H fields are all blank, and the D fields are populated.  So like this:
H1, H2, H3, D1, D2, D3, D4 (for line item 1)
, , ,D1, D2, D3, D4 (for line item 2)
The file can also have more than 1 FI posting (i.e. more than 1 Header):
H1, H2, H3, D1, D2, D3, D4 (for line item 1)
, , ,D1, D2, D3, D4 (for line item 2)
H1, H2, H3, D1, D2, D3, D4 (for line item 1)
, , ,D1, D2, D3, D4 (for line item 2)
We are trying to map this into a FIDCC1 idoc posting, which looks like this:
<FIDCCP01>
  <IDOC>
    <Header>
      <H1></H1>
      <H2></H2>
      <H3></H3>
      <Item><D1></D1><D2></D2><D3></D3><D4></D4></Item>
      <Item><D1></D1><D2></D2><D3></D3><D4></D4></Item>
    </Header>
  </IDOC>
  <IDOC>
    <Header>
      <H1></H1>
      <H2></H2>
      <H3></H3>
      <Item><D1></D1><D2></D2><D3></D3><D4></D4></Item>
      <Item><D1></D1><D2></D2><D3></D3><D4></D4></Item>
    </Header>
  </IDOC>
</FIDCCP01>    
We can't make this work alone in the concent conversion, so was thinking that this could be done in XSLT.  We have created a data type that contains the fill H and D fields and are taking this into XI no problems, but we are having problems putting it into the hierarchy.  Any help is greatly appreciated.
Thanks
Peter

Here is the input file, top line being the field breakdown
12222333333334444566666666666666667777777777777777
1FB0104052007ARP 20000000026590.000000000000000.00
/////////////////20000000098765.000000000000000.00
1FB0104052007USD 20000000012345.000000000000000.00
/////////////////20000000054321.000000000000000.00
Field 1, when it is a "1", is the start of the header line.  Field 5 will always be a "2", and is the start of the detail line.  Also all null fields are populated with a slash.
My idea was to take this in all on 1 line where the structure contains both the header and the detail fields, because I wasn't sure if content conversion could do what I wanted.  When I do that, here is the result:
<?xml version="1.0" encoding="utf-8"?>
<ns:IFS_MT xmlns:ns="http://xx.com/xi/fin/gl/iams/ifs">
     <Detail>
          <STYPE1>1</STYPE1>
          <TCODE>FB01</TCODE>
          <BLDAT>04052007</BLDAT>
          <WAERS>ARP</WAERS>
          <STYPE2>2</STYPE2>
          <WRBTR>0000000026590.00</WRBTR>
          <DMBE2>0000000000000.00</DMBE2>
     </Detail>
     <Detail>
          <STYPE1>/</STYPE1>
          <TCODE>////</TCODE>
          <BLDAT>////////</BLDAT>
          <WAERS>////</WAERS>
          <STYPE2>2</STYPE2>
          <WRBTR>0000000098765.00</WRBTR>
          <DMBE2>0000000000000.00</DMBE2>
     </Detail>
     <Detail>
          <STYPE1>1</STYPE1>
          <TCODE>FB01</TCODE>
          <BLDAT>04052007</BLDAT>
          <WAERS>USD</WAERS>
          <STYPE2>2</STYPE2>
          <WRBTR>0000000012345.00</WRBTR>
          <DMBE2>0000000000000.00</DMBE2>
     </Detail>
     <Detail>
          <STYPE1>/</STYPE1>
          <TCODE>////</TCODE>
          <BLDAT>////////</BLDAT>
          <WAERS>////</WAERS>
          <STYPE2>2</STYPE2>
          <WRBTR>0000000054321.00</WRBTR>
          <DMBE2>0000000000000.00</DMBE2>
     </Detail>     
</ns:IFS_MT>
I am open to changing the file content conversion if there is a better way!
The desired result is:
<FIDCCP01>
     <IDOC>
          <E1FIKPF>
               <TCODE>FB01</TDOCE>
               <BLDAT>04052007</BLDAT>
               <WAERS>ARP</WAERS>
               <E1FISEG>
                    <WRBTR>0000000026590.00</WRBTR>
                    <DMBE2>0000000000000.00</DMBE2>
               </E1FISEG>
               <E1FISEG>
                    <WRBTR>0000000098765.00</WRBTR>
                    <DMBE2>0000000000000.00</DMBE2>
               </E1FISEG>
          </E1FIKPF>
     </IDOC>
     <IDOC>
          <E1FIKPF>
               <TCODE>FB01</TDOCE>
               <BLDAT>04052007</BLDAT>
               <WAERS>USD</WAERS>
               <E1FISEG>
                    <WRBTR>0000000012345.00</WRBTR>
                    <DMBE2>0000000000000.00</DMBE2>
               </E1FISEG>
               <E1FISEG>
                    <WRBTR>0000000054321.00</WRBTR>
                    <DMBE2>0000000000000.00</DMBE2>
               </E1FISEG>
          </E1FIKPF>
     </IDOC>
</FIDCCP01>
Thanks again!
Peter

Similar Messages

  • Help for Building Hierarchial Organisation chart

    Hi All,
    I need to build organisation chart for my company to display in a web page with basic functionality of zoom-in , zoom-out and expanding and collapsing of nodes. I did some seach on google and found that ADF hhierachial viewer can be used aptly for this purpose. Though I know how to use JDeveloper tool but i am not aware of ADF and hierarchial viewer. Can any tell me how to do that or atleast point me to some link to build organisation chart example app. Or if someone has used some other tool please guide to gather me information and build the chart. This is urgent for my organization.
    Thanks
    Edited by: J2EE_Life on Mar 20, 2012 10:41 PM

    I have never used "ADF and hierarchial viewer" and it is unlikely that anyone in this forum is going to write a tutorial especially for you so Google is your friend. The first hit I found was https://blogs.oracle.com/shay/entry/exploring_the_hierarchy_viewer .

  • Ipad 2 won't restore, it says is not elegible for the requested  build. HELP!!!

    I KEEP TRYING TO PDATE MY IPAD2 TO THE LATEST UPDATE, BUT EVERYTIME IT GETS TO THE PART WHERE IT GET RESTORED IT STOPS. I THEN GET A ERROR MESSAGE SAYING : "THE IPAD COULD NOT BE RESTORED. THIS DEVICE ISN'T ELEGIBLE FOR THE REQUESTED BUILD". AT THIS POINT I DON'T KNOW WHAT ELSE TO DO, I HAVE RESET IT MANUALLY, MY ITUNES IS UP TO DATE AND SO IS MY MAC. HELP PLEASE!!!

    You cannot go back.  There is no supported way to downgrade iOS.  Sorry.

  • HT201210 Help me with this error...This device isnt eligible for the request build..

    i got this message while trying to fix my friends iphone ..... The iphone could not be restored. This device isnt eligible for the request build..
    pleas help me

    Sounds like you're trying to update an older iPhone to an unsuppoerted iOS version. What specifically are you trying to do?

  • Please help every time i try to update my iphone it says the iphone could not be restored this device isint eligible for the request build i tryed the hosts thing and the apple thing wasant there please tell me how to do it the terminal way :D

    PLEASE  HELP PLEASE PLEASE

    Did you try the things listed here? Error 3194, Error 17, or "This device isn't eligible for the requested build" - Apple Support  Is your device jailbroken? Have you ever used the computer to jailbreak a device? Are you trying to load an iOS other than the current one? What version of iPhone are you using? Is this occurring when attempting to update via iTunes and the computer?

  • HELP!!! Error 3194 "This device isn't eligible for the requested build"

    HELP!!! Error 3194 "This device isn't eligible for the requested build"
    my iPhone 4 cannot restore on my mac...
    my iphone dead and no SHSH
    i updated my itunes and my mac osx to the latest version...
    i had on my firewall..
    i changed the file host...
    i buyed a new USB Cable...
    i restored on another computer and other internet connection...
    but the Error 3194 "This device isn't eligible for the requested build" still there and my phone still dead...
    HELP me please...

    Try a DFU restore.  Plug in your phone.  Hold the Sleep/wake button and the home button for 10 seconds.   Release the sleep/wake button and continue to hold the home button until Itunes detects a phone in recovery mode.  Now restore.

  • HT201442 Im trying to restore our ipod because it was disabled. An error (3194) pops up stating "this device isnt eligible for the requested build." Any help??

    I'm trying to restore our ipod after it was disabled. Keeps stating error 3194, this device isn't eligible for the requested build. Any suggestions?

    See:
    iOS: Restore error 3194 or 'This device isn't eligible for the requested build'
    How to Fix iTunes Error 3194?
    Fix Error 3194 from iTunes during iPhone restore

  • When trying to restore and update my ipod touch it comes up with an error message saying: "The ipod can not be restored this device isnt eligible for the requested build"

    When trying to restore and update my ipod touch it comes up with an error message saying: "The ipod can not be restored this device isnt eligible for the requested build" How do i fix this?

    I am having the same issue. I just had the battery replaced at a third party store. The battery powers the ipod up but it needs to be restored. It is saying it isn't eligible for rebuild. I am running MAC OS 10.4.11  itunes v. 9.0   and I just want it to be restored. I need help.  Oh and its an 8 gb ipod touch.

  • Error Message when i try to restore my iPhone: The iPhone "iPhone" could not be restored. This device isn't eligible for the requested build

    Error Message when i try to restore my iPhone: The iPhone "iPhone" could not be restored. This device isn't eligible for the requested build. HELP PLEASE!!!!

    My Ipad and Iphone 3gs is both have issues too! I'm ready to give up! lol HELP ANYONE......

  • IPHONE 3GS This device isn't eligible for requested build

    Well with all the crazy troubles with iOS 5 I thought I'd share some help with the community since I finally got mine to work.
    I have a iPhone 3Gs and 4.3.5 never jailbroke it but I did install Tinyumbrella as a precaution just incase I ever needed to downgrade for whatever reason.
    I attempted to update but since I was still texting I downloaded the update to my computer first. When I backuped, synced and everything else just to make sure my data is safe. I tried to update.
    This is where my troubles started. I couldn't get my device to update. I had it downloaded so what was the problem. I searched high and low for the answer and nothing was coming up....well nothing recent that would have to deal with iOS 5 and my 3Gs. So I did a little digging.
    People kept talking about editting hosts files and changing ip addresses for whatever reason and being a recent convert to Apple I was still not getting it fully.
    So here is it in a nutshell.
    1. Open the Terminal utility. For newer users it is located in the Utilities folder.
    2. Type in (without the quotes) "sudo pico /private/etc/hosts". You may have to enter a password for admin rights.
    3. A screen will pop up and hopefully you will see a bunch of words looking like this....
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1       localhost
    255.255.255.255 broadcasthost
    ##My Ecenica Hosting Websites
    100.100.100.100       example.com
    4. If by chance you have edited the hosts file uninvertendly the apple ip address may be here. It may look very similar to this "
         74.208.105.171 gs.apple.com"
    5. If there is the apple.com ip there you might need to put a "#" infront of it to null/disable that specific line of code. Don't worry it can be undon.
    6. Use the arrow keys to move down and in front of the ip address. Again, put a # infront fo the ip address from apple.
    7. Control (not command) + O will allow you to save it (there is a small line just about the commands that you will see "write to.....". Hit enter and close the window.
    8. Before heading away from the Terminal window you have to flush the DNS. So type in "dscacheutil -flushcache"....hit enter.
    9. Close down and try to instal/update again. As I finished this my iPhone has just update and installed. Good luck to all and I hope you all have quick and easy updates!
    CHEERS

    Try updating iTunes and disabling your security software/firewall.  From http://support.apple.com/kb/TS3694:
    This device is not eligible for the requested build (Also sometimes displayed as an "error 3194")
    Update to the latest version of iTunes.
    Third-party security software or router security settings can also cause this issue. To resolve this, followTroubleshooting security software issues.
    Downgrading to a previous version of iOS is not supported. If you have installed software to performunauthorized modifications to your iOS device, that software may have redirected connections to the update server (gs.apple.com) within the Hosts file. Uninstall the unauthorized modification software from the computer.
    Edit out the "gs.apple.com" redirect from your hosts file, and then restart the computer for the host file changes to take affect. For steps to edit the Hosts file and allow iTunes to communicate with the update server, see iTunes: Troubleshooting iTunes Store on your computer, iPhone, iPad, or iPod—follow steps under the heading Blocked by configuration (Mac OS X / Windows) > Rebuild network information > The hosts file may also be blocking the iTunes Store. If you do not uninstall the unauthorized modification software prior to editing the hosts file, that software may automatically modify the hosts file again on restart.
    Avoid using an older or modified .ipsw file. Try moving the current .ipsw file (see Advanced Steps > Rename, move, or delete the iOS software file (.ipsw) below for file locations), or try restoring in a new user to ensure that iTunes downloads a new .ipsw.

  • Problem updating to iOS5. Error message: "This device isn't eligible for the requested build."

    Hi
    I've been trying to uodate my iPhone to iOS5 since last night. Initially, I kept getting the "Internal Error" messages since I'm assuming that the server was busy. A little later, that changed to the "Server is unavailable" messages. Which is when I gave up trying yesterday.
    I've now resumed my efforts since today morning & I've started getting a different message: "The iPhone could not be restored. This device isn't eligible for the requested build." I have no idea why this is happening. I've updated my iTunes & OSX Lion to the newest versions.
    Any help would be appreciated.
    iPhone 4 (OS 4.3.5 8L1)
    OSX Lion (10.7.2)
    iTunes 10.5 (141)
    Thanks.
    d

    OK so problem solved. Turns out that I had used Tiny Umbrella last night to kick the phone out of recovery mode when it got stuck during one of the attempted upgrades. And I forgot to uncheck the "set host to Cydia" option before quitting.
    All done. iOS5 is here!

  • I try to restore my iphone 4 and this message pops up and sais the iphone could not be restored. The device isn't eligible for the requested build

    i try to restore my iphone 4 and this message pops up and sais the iphone could not be restored. The device isn't eligible for the requested build... can anybody help me ?

    sounds like your phone was jailbroken.  If this is the case, you're hosed.

  • Build Hierarchy  with nodes with ABAP for custom Infoobject

    Hi,
    Need to build hierarchy with nodes with abap for custom infoobject.
    Thanks

    Hi,
    Using information from:
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm
    you can bulid flat file with hierarchy data and then load in into BW...
    Krzys

  • IPad not eligible for requested build

    Dear apple support users,
    I'm dealing with the following problem on my iPad, and though I already searched the entire internet for help, the problem is still not fixed.
    A few months ago, the 4.2 GM version was released for developers, and because I wasn't able to wait for the official release i manually installed this 4.2GM version by manual downloading and option-click restore. This way I was able to manually select my update file.
    Now, as 4.3 is already released for a few months of time, iTunes keeps showing me the message "This iPad (Name of iPad) is up to date", while it is still 4.2GM so not up to date.
    I figured that the only way to solve this problem is manually installing the 4.3 update, so after a few Google-searches I was able to download the iOS update manually. I tried the option-click restore for a few times, and my iTunes tells me that "This iPad is not eligible for the requested build". Also when I try to option-click update, the same error is displayed.
    The hosts file is untouched, and I checked the entries in this file. There are no entries concerning any apple websites. The device has no jailbreaking history and I've never used any hacking software like TinyUmbrella.
    Can some of you please help me with my problem?
    Thanks!

    Dear Merlin37,
    As already mentioned in my first posting in this thread, the hosts file is untouched. When I received your reply I double-checked and there are no entries containing gs.apple.com.
    So unfortunately your reply didn't help much. I've already checked the forum posts you're referring to.
    Does somebody know other causes of this error?

  • This divise isn't eligible for the requested build.

    I've just bought a new iPhone 4 the when i went to update his firmware to iOS 4.3.2 I read this message above: "This device isn't eligible for the requested build." Is there somebody wich could help me?
    Thanks!

    http://ipadhelp.com/ipad-help/ipad-iphone-isnt-eligible-for-the-requested-build/

Maybe you are looking for