Transform 4 level structure to CSV

Target Message (receiver)
Root
--Tag (1..1)
Field1
Field2
Field3
--Line(0..n)
Item(0..n)
Field1
Field2
Field3
Given my structure above, how can I transform this into CSV? I've researched that FileContentConversion can only cater to 3 levels. Mine has 4 levels.
Any suggestion?

Hi,
1.
Root
--Tag (1..1)
Field1
Field2
Field3
--Line(0..n)
Item(0..n)
Field1
Field2
Field3
For this structure, u can have FCC.
This structure i think can be treated as 3 level , instead of 4 levels.
The Item(0..n) is a node not a element... which is under Line(0..n).. gain a node.
So , the structure is same as
Root
--Tag (1..1)
Field1
Field2
Field3
Item(0..n)
Field1
Field2
Field3
I think there is no difference it will impact in mapping or any where.
2. go with Java mapping, and access all the rows as a single element. And based on contents u can recognise them.
U will have a lot of control on the data. So the mapping will become easy.
I hope this wil solve ur prblm.
If prblm still exist, pl do post.
Babu

Similar Messages

  • Structure of csv file

    1)i wanted to know the structure of csv file,
    2)how to read data from csv file .

    Use the library at http://ostermiller.org/utils/CSV.html

  • Formula at Transformation level

    Hi All,
    One formula has written at transformation level for the infoobject Zvendor. 
    Formula is as follows RIGHT( 10, REPLACE_FIRST( '2VEN', '0000', GN_VENDOR ) ).  As per my understanding Vendor number will take 10 digits and it is replacing with '0000' if the value is '2VEN'
    Can you please confirm whether my understanding is correct or not?
    Thanks in advance.

    What i understood is:
    It will replace the first occurance of 2VEN with 0000 and take first 10 digits of the resulting string.
    Edited by: Pravender on May 26, 2010 1:26 PM

  • Absolute Value in Transformation level

    Hi Team,
    I want to insert abolute value in Transformation routine level.Pl provide me the routine code to instert absolute value of Exchange Rate.
    I have tried to put below code but its not working.
    ABS(Exchange Rate).
    Regards
    Ramakanth.

    Hi,
    In your case, I'd strongly recommend you to use formula instead of routines (where you do have absolute function working).
    If you still want to go for Routine:
    data: abs_val type f.
    if SOURCE_FIELDS-EXRATE_ACC < 0.
    abs_val = SOURCE_FIELDS-EXRATE_ACC * -1.
    else.
    abs_val = SOURCE_FIELDS-EXRATE_ACC.
    endif.
    RESULT = SOURCE_FIELDS-NETVAL_INV * abs_val.
    --Akashdeep

  • XSLT and ABAP Transformation Deep Structure

    Hello Everyone,
    While I've read the forums and the links of a number of folks doing the same thing. I am stuck in that I cannot figure out how to populate a deep structure via XSLT.  Not sure what is going wrong, but I suspect it is obvious. The simple problem is that my structure is not getting populated. It is blank.  The transformation works in testing STRANS (and in Stylus Studio). 
    I cannot figure out what is wrong that makes the t_pexr2002 table blank.  Thanks for any insight. 
    Greg
    The simple program is:
    TYPES: BEGIN OF ty_head,
              sndprn TYPE string,
              bgmref TYPE string,
              moabetrh TYPE string,
              create_date TYPE string,
              settlement_date TYPE string,
              no_lines TYPE string,
           END OF ty_head.
    TYPES: BEGIN OF ty_pricing,
            moabetr TYPE string,
           END OF ty_pricing.
    TYPES: BEGIN OF ty_item,
              docname TYPE string,
              docnummr TYPE string,
              pricing TYPE ty_pricing,
            END OF ty_item.
    TYPES: BEGIN OF ty_summary,
              status_message TYPE string,
           END OF ty_summary.
    TYPES: BEGIN OF ty_mn,
            header_data  TYPE ty_head,
            item_data    TYPE ty_item,
            summary_data TYPE ty_summary,
           END OF ty_mn.
    DATA: t_pexr2002 TYPE STANDARD TABLE OF ty_mn.
    DATA: xml_doc TYPE REF TO cl_xml_document, xml TYPE string.
    CREATE OBJECT xml_doc.
    CALL METHOD xml_doc->import_from_file
      EXPORTING
        filename = 'C:\temp\2640273.xml'.
    CALL METHOD xml_doc->render_2_string
      EXPORTING
        pretty_print = 'X'
      IMPORTING
        stream       = xml.
    CALL TRANSFORMATION zusl_pexr2002_v1
    SOURCE XML xml
    RESULT output = t_pexr2002.
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

    Here is my XSLT:
    Here is the transformation: Also pretty simple...
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... >
      <xsl:strip-space elements="*"/>
      <xsl:template match="/PEXR2002/IDOC">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTPUT>
                <HEADER_DATA>
                  <SNDPRN>
                    <xsl:value-of select="EDI_DC40/SNDPRN"/>
                  </SNDPRN>
                  <BGMREF>
                    <xsl:value-of select="E1IDKU1/BGMREF"/>
                  </BGMREF>
                  <MOABETRH>
                    <xsl:value-of select="E1IDKU5/MOABETR"/>
                  </MOABETRH>
                  <CREATE_DATE>
                    <xsl:value-of select="EDI_DC40/CREDAT"/>
                  </CREATE_DATE>
                  <SETTLEMENT_DATE>
                    <xsl:value-of select="E1EDK03/DATUM"/>
                  </SETTLEMENT_DATE>
                  <NO_LINES>
                    <xsl:value-of select="count(E1IDPU1)"/>
                  </NO_LINES>
                </HEADER_DATA>
                <ITEM_DATA>
                  <xsl:for-each select="E1IDPU1">
                    <DOCNAME>
                      <xsl:value-of select="DOCNAME"/>
                    </DOCNAME>
                    <DOCNUMMR>
                      <xsl:value-of select="DOCNUMMR"/>
                    </DOCNUMMR>
                    <PRICING_DATA>
                      <xsl:for-each select="E1IDPU5[MOAQUAL = '006']">
                        <MOABETR>
                          <xsl:value-of select="MOABETR"/>
                        </MOABETR>
                      </xsl:for-each>
                    </PRICING_DATA>
                  </xsl:for-each>
                </ITEM_DATA>
                <SUMMARY_DATA>
                  <xsl:for-each select="EDI_DS40">
                    <STATUS_MESSAGE>
                      <xsl:value-of select="STAPA1"/>
                    </STATUS_MESSAGE>
                  </xsl:for-each>
                </SUMMARY_DATA>
            </OUTPUT>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

  • Create transformation from structure

    HI,
    There is option to create simple transformation structure on transction STRANS
    and move the structure to internal table  ?
    any simple example will help i need to do poc for that ,
    Thanks in advance
    Alex
    Edited by: Alex Dean on Mar 25, 2010 1:07 PM

    HI 
    I am familiar with the option to transfer abap table to XML via TR.STRANS
    and call transformation but i am not familiar how to do the opposite i.e. create structure
    in TR. STRANS and transfer it to internal table .
    Regards
    Alex

  • Exact file-structure of .csv to import without problems into AddressBook?

    Hello,
    i tried to import a .csv-file into my osx-address-book. Everything seemed to be all right but after klicking OK for the import nothing happened. I had to cancel. I think that the structure of my .csv-file is not compatible with address book. If i use AddressBookImporter everything is working but I guess that it's easier to import the data directly so my question is if anybody here knows more about the structure of the .csv-file address book expects?
    thank you.
    Andre

    field1,field2,field3,return
    field1,field2,field3,return
    As long as the fields are in the same sequence, it doesn't matter what sequence it is. When AB tries the import it will give you a dialog box allowing you to associate each field in your file with the appropriate field (last, first, email etc) in AB.
    If this isn't appearing then you should get an error message saying the file is not csv.
    Make sure when you click Import that you select the text file option.
    You could try pasting this into text edit and saving it - I have just tried it here and it worked.
    Joe,Smith,[email protected]
    Pete,Murphy,[email protected]
    AK

  • Tree-Level Structural programming

    I have to do tree structural programming for the below query service_type in first level and then followed by item_number in second level and third level by component_id and fourth level by benefit_id. Let me know your thoughts
    for this programming structure. Any help here is appreciated.
    SELECT max(product_fee_version) max_product_fee_version,       p.description as product_description,       pf.cover_state,       i.service_type,       i.item_number,       i.description as item_desciption,       c.component_id,       c.description as component_description,       c.component_level,       bc.benefit_condition_id,       bc.from_date as benefit_effective_date,       bc.description as benefit_description,       bc.condition_period_length as waiting_period,       bc.single_amount,       bc.family_amount FROM item i INNER JOIN service_type st ON i.service_type=st.service_type AND st.claim_type='A' INNER JOIN component c ON i.item_number=c.item_number AND c.service_type IN (select service_type from service_type where claim_type='A')INNER JOIN benefit_condition bc ON bc.component_id=c.component_id AND bc.end_date IS NULL and bc.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL)INNER JOIN product_fee pf ON pf.product_id=bc.product_id and pf.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL) and pf.status_flag='A'INNER JOIN product p ON pf.product_id=p.product_id and p.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL) and p.termination_date IS NULL GROUP BY        p.description,       pf.cover_state,       i.item_number,       i.service_type,       i.description,       c.component_id,       c.description,       c.component_level,       bc.benefit_condition_id,       bc.from_date,       bc.description,       bc.condition_period_length,       bc.single_amount,       bc.family_amount order by  p.description,       pf.cover_state,       i.item_number,       i.service_type,       i.description,       c.component_id,       c.component_level,       c.description,       bc.benefit_condition_id,       bc.from_date,       bc.description,       bc.condition_period_length,       bc.single_amount,       bc.family_amount
    -kccrga http://dbatrend.blogspot.com.au/

    Hello,
    instead of writing 3 times the same subquery I would suggest using a CTE where the logic is written once, then INNER JOIN the tables to this CTE instead of using the IN operator:
    WITH pp (product_id)
    AS (select product_id from product where product_type='A' and termination_date IS NULL)
    SELECT max(product_fee_version) max_product_fee_version, p.description as product_description, pf.cover_state, i.service_type, i.item_number
    , i.description as item_desciption, c.component_id, c.description as component_description, c.component_level,
    bc.benefit_condition_id, bc.from_date as benefit_effective_date, bc.description as benefit_description,
    bc.condition_period_length as waiting_period, bc.single_amount, bc.family_amount
    FROM item i
    INNER JOIN service_type st ON i.service_type=st.service_type AND st.claim_type='A'
    INNER JOIN component c ON i.item_number=c.item_number
    AND c.service_type IN (select service_type from service_type where claim_type='A')
    INNER JOIN benefit_condition bc ON bc.component_id=c.component_id AND bc.end_date IS NULL
    -- and bc.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL)
    INNER JOIN pp ON bc.product_id = pp.product_id
    INNER JOIN product_fee pf ON pf.product_id=bc.product_id
    --and pf.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL)
    and pf.status_flag='A'
    INNER JOIN pp ON pf.product_id = pp.product_id
    INNER JOIN product p ON pf.product_id=p.product_id
    --and p.product_id IN (select product_id from product where product_type='A' and termination_date IS NULL)
    INNER JOIN pp ON p.product_id = pp.product_id
    and p.termination_date IS NULL
    GROUP BY p.description, pf.cover_state, i.item_number, i.service_type, i.description
    , c.component_id, c.description, c.component_level, bc.benefit_condition_id, bc.from_date
    , bc.description, bc.condition_period_length, bc.single_amount, bc.family_amount
    order by p.description, pf.cover_state, i.item_number, i.service_type, i.description
    , c.component_id, c.component_level, c.description, bc.benefit_condition_id, bc.from_date
    , bc.description, bc.condition_period_length, bc.single_amount, bc.family_amount
    Some remarks:
    I would not use andpf.status_flag in the INNER JOIN, rather in a where statement before the group by.
    The Group by has slightly different ordering than the order by: c.component_level,       c.description, Is this on purpose?
    Jan D'Hondt - SQL server BI development

  • Weird explain plan on multi-level structured XmlType column

    Hello,
    am running an explain on the follwing query on 11.2.0.2:
    SELECT
    T1.EVENT_ID,
    ACTION_SUB_ID,
    PARAM_KEY,
    PARAM_VALUE,
    TO_DATE('2013-12-10', 'YYYY-MM-DD')
    FROM  T_C_RMP_MNTRNG_XML_FULL_IL ,
      XMLTABLE('/monitoring' PASSING XML_CONTENT COLUMNS
      EVENT_ID VARCHAR2(4000) PATH 'eventId',
      ACTIONS XMLTYPE PATH 'action'
    ) T1,
      XMLTABLE('/action' PASSING T1.ACTIONS COLUMNS
      ACTION_SUB_ID NUMBER(10,0) PATH 'actionSubId',
      PARAMS xmltype PATH 'param'
    ) T2,
      XMLTABLE('/param' PASSING T2.params columns
      PARAM_KEY VARCHAR2(4000) PATH 'key',
      PARAM_VALUE VARCHAR2(1000) PATH 'value'
    ) T3
    WHERE MESSAGE_ID = 4972102 ;
    Although MESSAGE_ID is the primary key of T_C_RMP_MNTRNG_XML_FULL_IL and thus there is only one record matching the condition, I get an explain plan with huge costs, 500MB of data and an estimated 10 hour runtime:
    PLAN_TABLE_OUTPUT
    Plan hash value: 4011854835
    | Id  | Operation                      | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                       |   223K|   489M|  3111K  (1)| 10:22:17 |
    |   1 |  NESTED LOOPS                  |                       |       |       |            |          |
    |   2 |   NESTED LOOPS                 |                       |   223K|   489M|  3111K  (1)| 10:22:17 |
    |   3 |    NESTED LOOPS                |                       |   140K|    11M|  1678   (1)| 00:00:21 |
    |*  4 |     INDEX RANGE SCAN           | X1B                   |     1 |    53 |     3   (0)| 00:00:01 |
    |   5 |     TABLE ACCESS BY INDEX ROWID| T_OR_MON_ACTION       |   140K|  4542K|  1675   (1)| 00:00:21 |
    PLAN_TABLE_OUTPUT
    |*  6 |      INDEX RANGE SCAN          | X3                    |   140K|       |     4  (25)| 00:00:01 |
    |*  7 |    INDEX RANGE SCAN            | X4G                   |  4083 |       |    22   (0)| 00:00:01 |
    |   8 |   TABLE ACCESS BY INDEX ROWID  | T_OR_MON_ACTION_PARAM |     2 |  4428 |    52   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("MESSAGE_ID"=4972102)
       6 - access("SYS_ALIAS_0"."NESTED_TABLE_ID"="T_C_RMP_MNTRNG_XML_FULL_IL"."SYS_NC0001200013$")
       7 - access("NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0000500006$")
    PLAN_TABLE_OUTPUT
    Note
       - dynamic sampling used for this statement (level=2)
    When I run the query, the result comes back within 0.3 seconds.
    Why is the explain plan off like that?
    Is this just the way it is, or is there something going wrong here?

    This is my table create statement:
    CREATE TABLE QQRCSBI0.T_C_RMP_MNTRNG_XML_FULL_IL (
      MESSAGE_ID NUMBER(22,0) NOT NULL ENABLE,
      XML_EVAL_ID NUMBER(22,0),
      VIN7 VARCHAR2(7 BYTE),
      FLEET_ID VARCHAR2(50 BYTE),
      CSC_SW_VERSION VARCHAR2(100 BYTE),
      RECEIVED DATE,
      XML_CONTENT SYS.XMLTYPE ,
      DWH_LM_TS_UTC DATE NOT NULL ENABLE,
      CONSTRAINT PK_C_RMP_MNTRNG_XML_FULL_IL5 PRIMARY KEY (MESSAGE_ID)
    ) NOLOGGING TABLESPACE CATALOG
    VARRAY "XML_CONTENT"."XMLDATA"."ACTION" STORE AS TABLE "T_OR_MON_ACTION" (
      NOLOGGING TABLESPACE "CATALOG"
      VARRAY "PARAM" STORE AS TABLE "T_OR_MON_ACTION_PARAM" (
      NOLOGGING TABLESPACE "CATALOG"
      ) RETURN AS LOCATOR
    ) RETURN AS LOCATOR
    XMLTYPE XML_CONTENT STORE AS OBJECT RELATIONAL XMLSCHEMA "http://mydomain.com/csc_monitoring_session.xsd" ELEMENT "monitoring";
    I set all default table names in the schema to blank and registered the schema with genTables=false.
    I am still running into problems retrieving the 3rd level T_OR_MON_ACTION_PARAM data. The query just crashes after a while because it is running out of either TEMP space or UNDO space (it keeps changing). I'll take a step back to re-evaluate and post another thread about that in a bit I guess...
    You said "SQL*Plus explain plan, goes most of the time bananas" - is there a difference in what client (SqlPlus or SqlDeveloper) I use to get the explain plan? I thought the plan was generated by the DB and the clients just display the result, and the only difference is the way the clients display the plan?!

  • Simple two level structure

    This is a two part exercise...
    1.  Complete ABAP program zstudent_registration.  The program will display the first level list.  The list consists of fields:
    <i>course_id
    course_name
    course_type
    programme </i>
    (The records come from the database table zshafeek_course.)
    2.  The second level list consists of students registered for a course selected from the first level list.  The tables involved is zshafeeek_student_registered. 
    The fields in the zshafeek_student_registered are:
            <i>course_id
            student_id
            student_name
            student_major</i>
    The fields that need to be displayed on the list are:
           <b> student_id
            student_name
            student_major</b>
    (List the modifications with its ABAP statements required in program zstudent_registraton in order to generate the detail list).
    Ive already done it, just need to compare it with someone else's for correctness' purposes...
    Any help?

    I got ur point and everything looks good with respect logic..
    Now you want to display header level and item level type list.
    Then use Example program,you will  get good idea in ALV.
    Program : BCALV_TEST_HIERSEQ_LIST
    Main FM : REUSE_ALV_HIERSEQ_LIST_DISPLAY
    if you want to display in normal way ,then use Internal table events
    AT first
    endat
    at new
    enat
    at end of
    endat.
    at last
    endat.
    Reward Points if it is useful
    Thanks
    Seshu

  • Schema level  structure

    hi,
    How to get schema level structureexport only using export utility......

    Hi,
    How to get schema level structureexport only using export utility......See these threads/docs.
    Data Pump - export without data
    Data Pump - export without data
    Oracle® Database Utilities 11g Release 2 (11.2)
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/dp_export.htm
    Thanks,
    Hussein

  • Cumulated Value updation in Transformation level

    Hi All,
    Pl provide me the logic for the below requirement
    Plant   ;   Date                   ;               Issues   Qty  ;             Receipts     qty                ;   Closing Stock
    1011  ;   01/08/2011  ;                       100    ;                30                                          ;              70
    1011  ;   02/08/2011 ;                        40     ;                 10                                          ;           100
    So every day clsong stock should calculte (Issue - Receipts ) and should give <= the date.
    Regards
    Ramakanth.
    Edited by: Ramakanth Deepak Gandepalli on Aug 16, 2011 3:16 PM

    Hi Ramakanth,
    maybe you can do it thanks to an internal table and a sort statement.
    First you can loop at source_package in an internal table in start routine. This has to be declared in global declaration for using it in end routine.
    In end routine sort the internal table by ascending date, loop it and use an internall variable for calculate your cumulated value of closing stock. Afterall you can move corresponding fields of this internal table into result_package.
    Hope it helps.
    Best regards.
    Simone.

  • Anything for DDIC-structure to XSD transformation available???

    Hi,
    do you know a function module/class/transaction that allows <b>to transform any ddic structure to its XSD representation</b>?
    I know that with "CALL TRANSFORMATION" you can transform ddic structures to an XML representation. But I need a simple XSD (Scheme) representation.
    Any idea??

    Hi Christian,
    the XSD editor is part of the XI Integration Builder and is running in the design part (Java). There you can create manually data types and the editor is converting that to XSD automatically. Another option there is to import existing XSD... My problem is I have a lot of ddic structures in R/3 and I need them for XI. -> import
    I have asked this question also in the XI forum - not really helpful answers yet.
    I thought there must be a standard SAP function module to create that XSD presentation. If not you have to create complex structures manually within XI. Nice work
    Thanks anyway and best regards to Dr. Muller

  • How to activate the transparent table along with append structure

    Hi,
    I add the new fields in existing append structure on tale VBAP.
    Initially i provide them the data type as Char with length 20.
    Similarly i added the fields in user exit on scree 8459 to add fields on screen.
    Until this eveything was working fine.
    Then my functional consultant ask me to delete one field from structure and change the length of other data types to 40 characters.
    I done this changes but when i go to activate that append structure its giving me error that certan structures in which it is been used are not adjusted and activated.
    The table is not adjusted through SE14 - Database Utlity.
    Its showing me that Runtime Object and Transparent table are different and not consistent.
    Can i delete the runtime object?
    The domains which i ave changed are also not geing activated.
    Suggest me the node of problem and solution also.
    What should be the problem.
    What should i do to solve the problem.
    Suggest me the solution if any.

    Give a trail that instead of activating all together, activate low-level objects (domains, data elements etc)first and then high levels (structures, tables) individually. With this approach you could find the errors easily and can resolve quickly.
    Regards,
    Prasanth

  • Regarding 0txtmd field mapping in Transfomration level dso to cube

    Hi All,
            When I was creating transformations from my dso to cube,I faced a problem where I did not get a infoobject field 0TXTMD in the source level(dso).
    But when I was checking in my dso transformation level the field 0TXTMD was present and mapped.So what colud be the problem as that field was present in dso level but not visible in cubelevel when I was creating transformations.How to go ahead with this issue.
    regards

    Hi Siggi,
    In bw 3.5 i have this scenario.The same i would like to implement in BI 7.0,
    Where is in bw3.5 i have a object called 0txtmd in infosource is assigned to ZDOCTXT element in cube.
    The same as i need to implement in bi 7.0
    while creating the trasnformastion from dso to cube..i could not able to find the field 0txtmd  to map with the field ZDOCTXT in cube.
    Regards

Maybe you are looking for

  • Swatches folder for photoshop cc 2014

    hi, is there a possibility to group my swatches - may be in folders or something? as a designer, i have several customers and they have several colors on their project, but i don't want to have dozens of swatches in my library unsorted. thanks

  • Is it possible to flip stage video playback horizontally on iOS?

    I'm using stage video in an app to play back some video and it would be useful if I could offer users the option to flip the video along the horizontal axis.  i.e. the equivalent of scaleX = -1 on a normal display object.  The reason I want to do thi

  • Failed to install the new preview build, please try again later 0xC1900204

    I upgraded in-place from Windows 8.1 to Build 9926. I am unable to upgrade past 9926. Windows Update finds the new preview build on both fast and slow rings. It downloads it successfully. Upon attempting to install, it fails. I get a screen overlay w

  • RECORD GROUP QUERY PROPERTY

    Hi: Is there any way you can get at runtime the query of a record group?. I can't find any property for this. Can I use a tree to put there the record group and after this get it with Ftree.GET_TREE_PROPERTY( htree, 'QUERY_TEXT') Thanx

  • How to built essbase cube by means of extended analytics

    Hi all! In Oracle db i've created 2 users(hfm and hfme) Then i created application and loaded data, after then i created hfme.udl where i pointed on the hfme udl. Then i created a star schema by using of HFM application.Checked in oracle DB , tables