Problem to transform Flat file to Data Type Structurated and map to IDOC

Hi all,
I have a file to idoc scenario.
The information is like this:
1#!445#!AI12#!1#!20070214#!DVXXXXR#!201#!31GINHG876#!#!
2#!#!ETC
3#!000000000030008888#!#!3000#!#!10#!#!20070215
4#!dades45#!b#!c#!d#!e#!f#!g
5#!pos5
where 1, 2, ... = key segments for the file adapter and #! are the field separator.
this must go to a Data Type with substructures like this:
(xml)
.1
......2
.3
......4
......5
where 2 is inside 1 and 4-5 inside 3.
The reason of this is we can get unbounded replays of 3/4/5 for one header.
But XI reads the information like if all segments are headers.
.1
.2
.3
.4
.5
So the IDOC is bad created.
Where is the issue?  At Message Mapping all substructures are mapped with his default and at TEST option it works fine.
Thanks in advance for your help.
best regards
Message was edited by:
        Federico Martin
Message was edited by:
        Federico Martin

Dear people,
according to license problems at client, it's impossible to get the convert agent.
so now we come back to try to solve with normal mapping.
the next step is try to convert it using 2 message mappings: dt (flat xml) to dt (structurated) and this one to the idoc.
i suppose it can be done adding program at interface mapping.
I created the no hiereachical Data Type for load the information and it's fine. But i am unable to get the first mapping OK, because XI has problems with unbounded segments.
If you agreed and has time, i copy here the information and his structure.
I receive (#! defines separation and key segment fields are 1,2,3,4,5):
1#!445#!AH02#!1#!20070214#!DVPOSTER#!201#!31GINHGIN0#!#!
2#!#!ETC
3#!000000000030008888#!#!3000#!#!10#!#!20070215
4#!dades45#!b#!c#!d#!e#!f#!g
3#!000000000030008888#!#!3000#!#!10#!#!20070215
3#!000000000030008888#!#!3000#!#!10#!#!20070215
4#!dades45#!b#!c#!d#!e#!f#!g
5#!pos5
5#!pos5
5#!pos5
The destination must be:
CHASE A
1 (1..1)
....2 (1..1)
3 (1..unbounded)
....4 (0..1)
3 (1..unbounded)
3 (1..unbounded)
....4 (0..1)
5 (1..unbounded)
5 (1..unbounded)
5 (1..unbounded)
CHASE B
Or, in another case with 5 as child of 3 (like example in last mail)
1#!445#!AH02#!1#!20070214#!DVPOSTER#!201#!31GINHGIN0#!#!
2#!#!ETC
3#!000000000030008888#!#!3000#!#!10#!#!20070215
4#!dades45#!b#!c#!d#!e#!f#!g
5#!pos5
3#!000000000030008888#!#!3000#!#!10#!#!20070215
5#!pos5
3#!000000000030008888#!#!3000#!#!10#!#!20070215
4#!dades45#!b#!c#!d#!e#!f#!g
5#!pos5
1 (1..1)
....2 (1..1)
3 (1..unbounded)
....4 (0..1)
....5 (1..unbounded)
3 (1..unbounded)
....5 (1..unbounded)
3 (1..unbounded)
....4 (0..1)
....5 (1..unbounded)
3 (1..unbounded)
....4 (0..1)
....5 (1..unbounded)
Questions:
How i do for map Data Type (no hierachical) -to-> Data Type (hierachical) and  Data Type (hierachical) -to-> IDOC? Is any loop or context object required?
Thank you in advance for your help and sorry the long thread.

Similar Messages

  • Flat file upload ( data from Non SAP)

    Hi experts --
    Need to create say morethan 400 infobjects in our scenario.
    so can any one help me, is there any alternative to create the same rather than creating manually.Is there any option thru BDC. i mean thru a file with data types,length,..description...  if so would like to get explained clearly.
    I hope my question is clear.
    Thanks and regards,
    Vishwa.

    Hello viswanath krishnamoorthy,
    How r u ?
    I believe this is not possible! because 400 InfoObjects may contain Characteristics and Key Figures, also the main problem is using BDC - Recording method u can update tables but not Activation.
    No other option create them Manually.
    Best Regards....
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/251719850">sankar Kumar</a>
    +91 98403 47141

  • Extraction, Flat File, Generic Data Source, Delta Initialization

    Extraction, Flat File, Generic Data Source, Delta Initialization
    I have couple of questions regarding data extraction.
    1.     If you have Data Source a Flat File e.g. Excel file I know that you have to create Data Source at BW side. How do you upload updates, by selecting Delta Update when executing next Data Load? Do you ever u201Cconvertu201D this Excel file into Application Tables to become SAP Source 
    2.     Can you please give me example of situation where you had to create Generic Data Source? What is difference between Time Stamp, Calend. Day and Numeric Pointer. Which one is most common to select?
    3.     I read somewhere that Generic Data Source does not have Setup Table. I thought that you have to have Setup Table in order to load transaction Data otherwise you will lock the Application Tables. Where am I going wrong im my thinking please?
    4.     What are steps in terms of IP before, under and after Delta Initialization. I belive that you can do two ways:
    Full Update - Initialize Delta Process (without Data Transfer) u2013 Delta Update  or
    Initialize Delta Process (with Data Transfer) u2013 Delta Update
    Am I right? What is most common method and why?
    5.     If you want to add a filed in Data Source after 6 month using it, you want to do it without re-init Delta Queue. You add field in RSA6, then provide info for ABAP to populate new filed (info u2013 name of Data Source, Extract Structure, field added, name of Application Table which contains the field). How does it work now as there is no SetUp table it has been deleted after Initialisation? How does Delta Queue know that it is going to receive data which has been  expanded by one field or it may does not need to know at all?
    THANKSSSSSSSSSs

    Hi,
    1. If you have Data Source a Flat File e.g. Excel file I know that you have to create Data Source at BW side. How do you upload updates, by selecting Delta Update when executing next Data Load? Do you ever u201Cconvertu201D this Excel file into Application Tables to become SAP Source
    Once you create Datasource for A flat file extraction then it is file source system specific hence you cont change to Application table source Data source
    In info package you can change the source as application server instead of desktop no need to change the DS
    2. Can you please give me example of situation where you had to create Generic Data Source? What is difference between Time Stamp, Calend. Day and Numeric Pointer. Which one is most common to select?
    When we don't find any standard extractor then we can go for Generic(if i want information sales along with finance information in a data source then generally we dont get standard one hence we can go for generic DS)
    Check the below link for More about generic DS .
    http://wiki.sdn.sap.com/wiki/display/BI/Generic+Extraction
    for Delta capturing you can use
    Timestamp(if the table has time stamp filed  so it can stamp the last changed record in that table hence it is easy to get delta based on the time stamp)
    Calday- (If the table doesn't have the Timestamp filed then search for Calday where you can stamp the delta based on the date when documents are changed )
    Numericpointer : If the table doesn't above both then we go for this option where you can the numeric value change stamp )
    3. I read somewhere that Generic Data Source does not have Setup Table. I thought that you have to have Setup Table in order to load transaction Data otherwise you will lock the Application Tables. Where am I going wrong im my thinking please?
    Generic datasource nothing but we extracting data directly from the database table without any interface between the application/systems
    4. What are steps in terms of IP before, under and after Delta Initialization. I belive that you can do two ways:
    Full Update - Initialize Delta Process (without Data Transfer) u2013 Delta Update or
    Initialize Delta Process (with Data Transfer) u2013 Delta Update
    Am I right? What is most common method and why?
    Correct
    5. If you want to add a filed in Data Source after 6 month using it, you want to do it without re-init Delta Queue. You add field in RSA6, then provide info for ABAP to populate new filed (info u2013 name of Data Source, Extract Structure, field added, name of Application Table which contains the field). How does it work now as there is no SetUp table it has been deleted after Initialisation? How does Delta Queue know that it is going to receive data which has been expanded by one field or it may does not need to know at all?
    Once you add the new field to structure(DS) you will get the data as on date onwards not historical data hence what is the concept of setup table  ( delta records come from the Delta Que not from the setup table )
    If you want histaric data to new field then you need to setp table deletion ...etc...
    Hope it is clear..
    Regards,
    Satya

  • Flat File - Delete data

    Hi Expert,
    I have flat file as data source. I want to know how to handle deletes with flat files.
    For examaple,
    If this is my flat file data
    Company...Costcenter....Stock
    A......B......10
    M.....Z.......20
    K......W......25
    Company and Costcenter are keys.
    If the above three records are loaded into an ODS last month and this month if I realize that A..B...10 record is wrong and is not needed, how do I delete this from the ODS? Do I need to send some indicator in the flat file for BW to understand that this is a delete entry?
    Another case is if A..B record changes valye from 10 to 35, then I can send the same file or the same record in a diferent file again and it will over write the data, which is ok.
    Can exprets plzz explain these data load streategies?
    Jason

    Hello ,
      For Case1) Do the reverse posting of the record which u wish to delete from the ODS. I Mean (A..B...-10)
    Case2) If you are loading data only till ODS. Then in your ODS u have active data table and a Change log table.
             so this new record A..B..35 will overwrite the existing rec -> A..B..10 to A..B..35 and if you are doing further update to Cube then in change log it will first create a reverse image of the exinging record ie A..B..-10 and the writes the new record A..B..35
    so --> A..B..10
             A..B..-10
             A..B..35  so the remaining will be A..B..35
                   Provided you have to maintain the Delta method in you flatfile
    -- EnjoySAP:-)
    **Award Credits if you find the solution, Have a great day

  • How to convert Flat file(.txt) data to an Idoc format(ORDERS05)

    Hi,
    How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
    thanks in advance,
    Chand
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 26, 2011 11:11 AM

    Hi,
            For more information, please check this link.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
    Regards

  • What are the advantages of idoc compare to flat file. how data is secure

    what are the advantages of idoc compare to flat file. how data is secure in idocs compare to flat file

    Hi Ramana,
    In simple words, Main advantage with idoc over flat file is security....
    I will explain you some scenario here U got a flat file with all the data...Now u r having the flat file if you want u can modify the data in it, or somehow any one can modify the data in it  if they were able to access this file. That means u maintained the file in the presentation server
    One level of higher security to the above level is maintaining the flat file in application server, at point also even though lot of people r not having the access to that file, super user who is  having  the access may modify the data or delete the data from it rite....
    so in both of those levels u don't have 100% security...
    So there come to the picture of idocs, Idocs simply data carriers, those r generated by a program but not manually...data will be divided into number of segments based upon ur program. So manually its not so easy to modify the data in these idocs. If any changes to be made in the data then u have to modify the data in the application and then u have to update the idoc or you have to generate the new idoc with that corresponding data. so in this case not even super user can manipulate the data directly in the idoc....
    I think u got my point what I mean to say.....
    If you find it useful mark the points
    ~~Guduri

  • Can we assign 1 flat file to 2 different structures in LSMW.

    Hi all,
      Can we assign 1 flat file to 2 different structures in LSMW.
    Please help.
    Thanks in Advance,
    Amruta.

    Hi,
    of course you can assign a flat file to as many LSMW structures you want.. If one structure is subordinate to the other, then all fields of your flat file are available to assign to any field in the structures.
    For example, you want to create/change vendor company code data via standard upload program. There are structures BLFB1 for company code data and also BLFBW for vendor withholding tax. If your file is a flat file and contains a record for each vendor and say, up to three withholding tax types, you can assign your structure to both BLFB1 & BLFBW. You have to enter code in BLBW, though to transfer up to 3 BLBW records
    Edited by: Harris Veziris on Dec 31, 2007 10:34 PM

  • Sysgen : How to read the input port data type, width and rate dynamically in a masked subsystem ?

    Hello everybody,
         I am designing a general purpose block in system generator. I pass the user parameters to the block through masking it. Some user parameters can change the block configuration. The input port data type, width and rate can also affect the block configuration.
         The problem is that these values (input port data type, width and rate) are subject to change. So I should read them dynamically, then change the block configuration through programming the "Initialization Commands" field. But unfortunately there is no straight way to read the input port information.
         There are some methods in for example the "Black Box". these are:
    input_width = this_block.port('din').width;
    input_rate = this_block.port('din').rate;
    But these methods are not applicable to a masked subsystem.
    I have tried other ways also. You can find them below. None of them worked.
    Does anybody know how can I solve this problem?
    Other ways I tried:
    1)
    design_name([],[],[],'compile')                                       
    q=get_param(gcb,'PortHandles');
    get_param(q.Inport,'CompiledPortDataType')
    get_param(q.Inport,'CompiledPortWidth')
    get_param(q.Inport,'CompiledPortDimensions')
    design_name([],[],[],'term')
    2)
    ssGetInputPortDataType
    3)
    ts = Simulink.Block.getSampleTimes([gcb '/Input'])
     

    Today we rely on Simulink to perform parameterization of your designs in two ways:
    Parameterizable Subsystems and Blocks : Parameters themselves can be MATLAB expressions that need to be evaluated for which we need the MATLAB interpreter
    The very useful Rate and Type propagation or Simulink compilation that allows us to specify types & rates in one location that gets systematically propagated to all.
    To truly make the HDL Netlist that is generated from SysGen parameterizable, we would have to implement some of this capability in the HDL netlist itself by:
    Using Generics(VHDL) or Parameters(Verilog) - We would have to capture the bit width(type) propagation through levels of hierarchies and finally parameterize the IP itself based on this value
    Since IP itself does not have this capability through generics, we would have to package a separate tcl script that updates the IP parameterization appropriately in response to top level parameters(or GUI parameters)
    Interpreting MATLAB expressions and translating them into VHDL/Verilog expressions (alternatively tcl expressions of IP). In simulink, mask parameters can be passed from one level to the next. Also parameterization of a block can be composed of Matlab expressions using variables from ancestor masks & the MATLAB interpreter – so we will need to somehow capture that as well.
     

  • Data type Replication and ODBC

    I want to convert table that has column with LONG datatype to
    supported datatype by replication. Currently the LONG column
    contains more than 4,000 bytes so I can't convert to Varchar(2).
    If I convert to CLOB then the application that we are using is
    connecting through ODBC drivers and CLOB is not supported by
    ODBC.
    Is any one run into this situation? What is recommended or
    practical solutions for this problem?
    Thanks.
    --Pravin

    Thx,
    I used data type java.sql.Timezone and it works fine ;) This data type parse Date to format yyyy-MM-dd hh:mm:ss, so basically does not matter if I use string or this type :) but this is better ;)
    Problem is in timezone ! :( In data type java.sql.Timezone is not possible set timezone! :(

  • Data from a file need to be read and mapped  into a custom table of R/3

    Hello all,
    This is related to inbound to  SAP ECC via SAP PI.
    There is a requirement concerning PI part that data from a file need to be read and mapped  into a custom table of R/3.
    To have this scenario developed , do we have any other  option than the Proxy ?
    My understanding is as follows : File --> SAP PI --> Proxy
    You suggestions are welcome.
    Regards,
    Rachana

    Hi Ravi,
    As suggested by Inaki, you can use proxy communication in recever.
    but you can also use the below
    FILE -----> PI -------> PROXY
                                  RFC
                                  IDOC
    to communicate to ECC system.
    Regards
    srinivas

  • Copy imported IDOC structure to own data type structure in PI

    I am looking to copy the imported IDOC structure to data type structure, is there any way to do this instead creating whole elements again. The reason to do this is I need to change the occurence of one of the element and standard IDOC structure wouldn't let me do it.
    Thanks,
    Menaga

    Hi Menaga,
    Inorder to change the occurance in IDOC you will need to import the idoc as external definition which you can use for message mapping (once you change the occurance and import the XSD).
    Michal's blog will help you get to it precisely,
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    Gud luck,
    Regards,
    Pavan

  • The data types varchar and varchar are incompatible in the subtract operator

    Hi ;
    I want to fetch values  6,903,00  format ,my query is ;
    SELECT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) AS DEBIT ,CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1),AS
    CREDIT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) - CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1) AS BALANCE
    FROM TABLE
    it was get error :  The data types varchar and varchar are incompatible in the subtract operator.
    I want to Show result ;
    DEBIT         -          CREDIT            -    BALANCE
    6,903,00              4,387.24             2,515.76
    Thanks in advance

    You have to do the subtraction with the MONEY data type (prior to covert-ing).
    Starting with SQL Server 2012, you can use the FORMAT command:
    https://msdn.microsoft.com/en-us/library/hh213505.aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014
    We have to use SQL 2005 due to licensing issue .

  • What is difference between data base structure and stucure  in program

    what is difference between data base structure and stucure  declared in program  level . can  explain cleary if knows

    Hi,
    Data base structure is global decalaration you can reffer this structure in any of your developments, when ever you cahange this structure the changes automatically will get updated in all the programs.
    coming to structures in program it is local to your program only, if you want to change the structure again you have to open the program and do the necessary changes.
    Reward if useful.
    Thanks,
    Sreeram.

  • How to find all the Master data extract structures and Extractors

    I intend to create Master data dimensions closely similar to SAP BI in a 3rd party system. I would like to use SAP's standard extractors for populating the master data structures in SAP BI and then use a proprietary technology to create similar structures in a 3rd party database.
    Question: How to get a complete list of all Master data extract structures and corresponding extractors?
    Example: In ECC if I do SE80 and give 'Package' and 'MDX' and then press the 'display' spectacles, I get a list of structures and views under "dictionary objects" covering Material, Customer, Vendor, Plant Texts and attributes.
    How do I get the remainder of the Master data extract structures viz. Purchase Info Records, Address, Org Unit etc?
    Regards
    Sasanka

    Hi,
    try the table ROOSOURCE and search the data source with string in astrick attr  for master data and for text with text
    This will give you the list of all the master data source in the system and it contains a column which tells about the extract structure and function module used by each.
    Thanks
    Ajeet

  • Problem in loading of flat file transaction data into BI7

    Hi Experts,
    I am new to BI7, got in problem in creation of Data source.
    I have fields in flat file are:
    CUSTID,SREPID,MATID,PRICE PER UNIT,UNIT,QUANTITY,TRANS.DATE
    one of the row under the above fields is
    C100,SR100,MAT01, 50,CS,5,19991005
    Created infoobjects are:
    IO_CUSID
    IO_SRID
    IO_MATID
    IO_PRC
    IO_QTY
    IO_REV
    0CALDAY
    IO_QTY was created with Unit/currency '0UNIT'
    In creation of Data source, under field tab system shown extra CS field, I did confuse that which infoobject should be map to this field. At the same time i created IO_QTY with 0UNIT so when i entered IO_QTY under infoobjects column, system automatically created 0UNIT infoobject. I didn't completly understand why one of the unit (CS) sat under the fields column. could you clarify me please.
    And also could you please tell me the procedure of creating transfer routine for sales revenue as we didn't have this object in flat file (SS). In earlier version of BW(Addison Wesley Step by Step book) i did this at infosource level. Here i am loading the data without infosource so just i would like to know is it possible to create transfer routine at DS level or do i need to create Infosource in this case. If it is the case also could you please make me understand with procedure to create transfer routine for sales revenue.
    Your solutions will be more appreciated with points.
    Thank you,
    Shri

    Hi,
    1.Open Administrator Workbench: Modeling, from the menu or using the transaction RSA1
    2.Go to Source Systems (File)and Create a new System.
    3. Double click on the datasources, create data source
    4.Entitle the Datasource, choose Transaction Data as Data Type Datasource
    5. In next screen, Go to Extraction , Activate the data source
    6.Go to Preview. Press Read Preview Data.
    7.Data will be loaded: Save and activate the datasource
    8.Go to InfoProvider, go to Info area and create Infocube
    9.Entitle the infocube, press create
    10.Display all info objects: . Choose your info objects , Move the characteristics and key figure to the infocube by drag and drop adn activate
    11.Go to InfoCube, create transformation
    12.Click on the ‘Show Navigator’ button. Match the fields in navigator. Save and activate.
    13.go to info provider, your info cube, create data transfer process
    14.Choose: Extraction Mode: full
    Update: Valid records update, Reporting possible (Request green)
    Activate, execute
    14.Double click on the data source, Read Preview Data
    15.Create an InfoPackage by right clicking on the datasource. Execute the load into PSA.
    16.Verify data was loaded into PSA before proceeding with the next step.
    17. Execute the Data Transfer Process
    18.Monitor the results (Menu: GoTo: DTP Monitor)
    19.Try to display the data at the BW Frontend.
    Thanks,
    Sankar M

Maybe you are looking for