Hierarchy format in Flat file
Hi gurus,
please tellme the Hierarchy format in Flat file.
ThanQ.
Regards,
Ramesh.
Hi
1.Defining the source system from which you want to load data:
Create For a flat file, choose: File System, Manual Metadata; Data via File Interface.
2.Defining the InfoSource for which you want to load data:
Create Application Component.
Create InfoSource , Direct Update
Choose an InfoObject from the proposal list, and specify a name and a description.
3.Assigning the source system to the InfoSource
Assign Source System. You are taken automatically to the transfer structure maintenance.
The system automatically generates DataSources for the three different data types to which you can load data.
Attributes, Texts,Hierarchies (if the InfoObject has access to hierarchies)
The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
4. Maintaining the transfer structure / transfer rules
Choose the DataSource to be able to upload hierarchies.
Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance.
PSA transfer method: The transfer methods and the communication structure are also generated here.
5. Maintaining the hierarchy:
Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy.
PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields. This option allows you to load characteristic values having a length greater than 32 characters.
Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32.
The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic).
The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects):
The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system.
The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.
6. Save your entries.
Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA.
Further Steps:
Maintaining InfoPackages
Result
You have uploaded the hierarchy data for the corresponding characteristic.
Similar Messages
-
Dear All,
We are in the process of creating the flat file interfaces for hierarchies to load into BW. We have few hierarchies for customer, product and few hierarchies for custom time dimensions. I would like to know the format in which we can request the master data management team to give hierarchy data in that format. Can any body guide in creating the format for flat file hierarchy to load. Meanwhile can any body tell me whether any restrictions are there in BI7 for hierarchy load from flat file. I heard as part of BI7 hierarchy load from flat file is not yet introduced, is it true.
Regards
VijayHi Chandra,
Did you check this blog? Its a step by step example
/people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
hope this can be useful too.
http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/frameset.htm
Regards,
R.Ravi -
Numbering nodes when loading hierarchy from a flat file.
Hi All,
I want to load a hierarchy from a flat file. When we number the nodes, do they have to be in a sequence or can I give them any number I want? I want to make the GL account number as the node number since it makes it easy to generate the node number that way. The way I see it, the important thing is the parent node number; so this approach should be fine. Please correct me if I am wrong.
Thanks,
UdayHi Uday,
You need to have a running sequence numbers for Node Id field in the flat file. The file structure is as
NODEID IOBJNM NODENAME TLEVEL LINK PARENTID
00000001 0GLACC GL233344 00000001
00000002 0GLACC GL435556 00000001
00000003 0GLACC GL545666 00000001
00000004 0costcenter cc433232 00000002
00000005 0costcenter cc433233 00000002
00000006 0costcenter CC555551 00000003
The Parentid will calculated by the system automatically.
when you prepare you file csv please ensure that you have 8 characters for the Node ID " 00000003" other wise you will get error.
And if you want to add GL Account number to your hierarchy then you need to add GL A/c Number as external characteristics in hierarchy and add it to your flat file .
Hope it helps.
Cheers,
Balaji -
Date format in flat file is MM/DD/YYYY
I want to to change date format in flat file from MM/DD/YYYY to in info cube YYYYMMDD.
What is the step by step procedure to do this.Hi,
The date format should be YYYYMMDD in flat file.
IF the date format is not the above mentioned way, then you can change setting.
Going to System in Menu
System->User Profile->Own data.
Under Owndata you can change the date format to your requirement.
Check the below link also for detain info of coding:
Mandatory for Date field
regards
shoba -
Creating Hierarchy by Loading Flat File
Can any one give steps to load hierarchy using flat file
Uploading Hierarchies from Flat Files
http://help.sap.com/saphelp_bw30b/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm
Hierarchy Upload from Flat files - Blogs
/people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
Hope it helps.. -
Extract hierarchy from a flat file
Hello,
Im trying to extract hierarchy from a flat file.
The hierarchy is built from 3 different infoObjects each infoObject represent different level in the hierarchy. I built the hierarchy in the last level of the hierarchy and put all the levels as external chars in the hierarchy.
(I used the blog: Hierarchy Upload from Flat files: /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files )
When I extract the data into the PSA it looks fine but when I choose to update the PSA data into the infoObject the request stays yellow. Three is no dump and I cant find the job in SM50.
Please Advice,
DavidHi David,
Thats the problem with using PSA for flatfile hierarchy loads. If you can change the transfer method to "IDOC" then change and retry the load. The IDoc method gives you an advantrage when dealing with flatfiles as you can debug and notice which record # has errors.
Bye
Dinesh -
BW 2.1C Download a hierarchy to a flat file
Hello
I copy and paste the BW ABAP source "download a hierarchy to a flat file" in a BW 2.1C system.
When I check programm a error occurs " The type RSSH_S_HTAB" is unknown.
Can you help me ?Hi,
DATA : BEGIN OF I_DISPLAY OCCURS 0,
REC(400),
END OF I_DISPLAY.
based on date
select StudentNo S_Course from Course Record
into i_Course Record
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
select StudentNo S_Course from Student Details
into i_Student Details
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
select StudentNo S_Mark S_Subject
from Student_results
into i_Student_results
****if parameter
where date eq p_Date_join
****if select-options.
where date in s_Date_join.
DATA : FNAME(255) TYPE C VALUE '/data/sapdata/eu_ums/astdetails'.
CONSTANTS : C_COMMA TYPE C VALUE ','.
********Fields to insert
I_FINAL-StudentNo = 'StudentNo.
I_FINAL-S_Course = 'S_Course'.
INSERT I_FINAL INDEX 1.
CLEAR I_FINAL.
LOOP AT I_FINAL.
CONCATENATE
I_FINAL-DOCNUM
I_FINAL-STATXT
into I_DISPLAY-REC SEPARATED BY C_COMMA.
APPEND I_DISPLAY.
CLEAR I_DISPLAY.
ENDLOOP.
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
LOOP AT I_DISPLAY.
TRANSFER I_DISPLAY TO FNAME.
ENDLOOP.
CLOSE DATASET FNAME.
Do this for all tables.
Don't forget to reward if useful -
Time characterstis format in flat file
hi all,
can any one plz tell me the how we can give the format for time characteristics in flat file..
thanks & RegardsFollow this,
For Calendar year/month - 200612
For Fiscal year/Period - 2006012
This would be the format we would specify in flat files.Hope this helps. -
Hi Experts,
I need to load date from flatfile. In flatfile the date format is hh:mm:ss.
I have an infoobject with type TIMS which can store only 6 CHAR length.
How is it possible to read 8 characters length in file with this info object ??
Two solutions i have is to ask for a file in hhmmss format or
the second one is to read the date with a new infoobject and write a routine to convert date to the required format in the transforamtion.
Is there any better way to handle this situation with out asking for a change in file ??Hello Narasimha,
You can perform a conversion from 8 characters to 6 characters in the transfer rules of your flat file datasource.
In the transfer rule of the infoobject (with type TIMS), do the following:
1) Create an ABAP rule code
2) Select the 8 char field in the list of source fields
3) write the following ABAP code. This converts the data from the 8 char field to 6 chars:
concatenate trans_structure-<your 8 char field here>(2) trans_structure-<your 8 char field here>+3(2) trans_structure-<your 8 char field here>+6(2) into RESULT.
Hope this helps. -
Date format in flat file of bdc
Hi Folks,
In BDC I have a flat file which has to be uploaded from a flat file and 4 users are using each of one has their date format.
so inorder to get their required date format what i need to do .Hi,
use the below logic in your code.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-031.
PARAMETERS: date1 RADIOBUTTON GROUP rad1 DEFAULT 'X', "SAP date format YYYYDDMM
date2 RADIOBUTTON GROUP rad1, "Date format like aprial31, 2006
date3 RADIOBUTTON GROUP rad1, "Date format like 31 apr,2006
date4 RADIOBUTTON GROUP rad1, "Date format like DD/MM/YYYY
date5 RADIOBUTTON GROUP rad1. "Date format like DD.MM.YYYY
SELECTION-SCREEN END OF BLOCK b2
FORM getmonth .
SELECT mnr
ktx
ltx
INTO TABLE T_month
FROM t247
WHERE spras = 'EN'.
IF sy-subrc NE '0'.
MESSAGE I "Message - Not able to get month values from the table T247
ENDIF.
ENDFORM.
DATA : temp_date(16) TYPE c,
temp1_date(60) TYPE c,
year(4) TYPE c,
daymonth(11) TYPE c,
daymonth1(11) TYPE c,
month(9) TYPE c,
day(2) TYPE c,
mon LIKE t247-ktx,
len TYPE i .
MOVE date TO temp1_date .
CONDENSE temp1_date NO-GAPS.
MOVE temp1_date TO temp_date .
IF date2 EQ 'X'. "The date format is like Aprial 31, 2007
CONDENSE temp_date NO-GAPS.
SPLIT date AT ',' INTO daymonth year.
IF STRLEN( year ) NE '4'.
error = 'X'.
WRITE : 'Invalid date format.'.
ELSE.
daymonth1 = daymonth.
CONDENSE daymonth1 NO-GAPS.
_len = STRLEN( _daymonth1 ).
l_len = 13 - len.
SHIFT daymonth1 RIGHT BY len PLACES.
CONDENSE daymonth1 NO-GAPS.
month = daymonth1.
CONDENSE month NO-GAPS.
SORT t_month BY monthltx.
READ TABLE t_month WITH KEY monthltx = month.
IF sy-subrc <> 0.
error = 'X'.
WRITE : 'Invalid date format.' .
ELSE.
len = STRLEN( month ).
CONDENSE daymonth NO-GAPS.
SHIFT daymonth LEFT BY len PLACES.
day = daymonth.
CONDENSE day NO-GAPS.
CONCATENATE year t_month-monthnumber day INTO o_date.
ENDIF.
ENDIF.
ELSEIF p_date3 EQ 'X'. "The date format is like 31 apr, 2007
CONDENSE temp_date NO-GAPS.
SPLIT i_date AT ',' INTO daymonth year.
IF STRLEN( year ) NE '4'.
error = 'X'.
WRITE : 'Invalid date format.'.
ELSE.
daymonth1 = daymonth.
CONDENSE daymonth1 NO-GAPS.
SHIFT daymonth1 LEFT BY 2 PLACES.
CONDENSE daymonth1 NO-GAPS.
month = daymonth1.
CONDENSE month NO-GAPS.
TRANSLATE month TO UPPER CASE.
SORT t_month BY monthstx.
MOVE month to mon.
READ TABLE t_month WITH KEY monthstx = mon.
IF sy-subrc <> 0.
error = 'X'.
WRITE : 'Invalid date format.' .
ELSE.
CONDENSE daymonth NO-GAPS.
day = daymonth+0(2).
CONDENSE day NO-GAPS.
CONCATENATE year t_month-monthnumber day INTO o_date.
ENDIF.
ENDIF.
ELSEIF p_date4 EQ 'X' OR p_date5 EQ 'X'. "Date format is like DD.MM.YYYY or DD/MM/YYYY
CONDENSE temp_date NO-GAPS.
IF STRLEN( temp_date ) EQ 10.
o_date0(4) = temp_date6(4).
o_date4(2) = temp_date3(2).
o_date6(2) = temp_date0(2).
ELSE.
error = 'X'.
WRITE : 'Invalid date format.' .
ENDIF.
ENDIF.
IF STRLEN( o_date ) NE '8'.
error = 'X'.
WRITE : 'Invalid date format.'.
ENDIf.
ENDFORM.
regards -
Format of flat file!!!
hello friends!!!
We are uploading opportunities in our system from a flat file. I am using LSMW with CRMXIF_ORDER_save for that. All has been the test data is working fine.
But the problem i am facing is in which format the file should be for?? in regards to item and partner function?? one opportunity can have several products and many partner functions.... does it should have a seperate field name for each item and each partner function..???
Please help its a bit urgent and also if you have a sample file please send to me on [email protected]
i hope iwas able to define my requirement clearly;
Many many thanks!!
PankajThis is now going into a general discussion please input your views.
In my opinion the flat file will have all the fields sequentially including all the items. but the problem is if the company has 50 or more products to offer then it will be a mess in the flat file having 50 items in a row and then only have value for the one product we are offering to a particular opportunity.
My question can´t we somehow break flat files?? or have some solution for this??
many thanks
Pankaj -
Date format in flat file recon
Hi,
I am trying to do Flat file reconciliation but i am getting some error related to date format. I have tried format like 20 march 2009, 02-02-2010,20 Mar 2009,2010-01-01,2010/01/01
can any one please suggest me which format i need to use.
ThanksHi sunny,
I get the same error during GTC Flat file recon. "java.text.ParseException: Unparseable date: "2009/01/25"
my xl.defaultDateformat=yyyy/MM/dd hh:mm:ss z and source Date Format is given as yyyy/MM/dd(2009/01/25) and the date format in my flatfile is given as yyyy/MM/dd. But i still get this error.
I also tried with the following dates in flatfile
2009/Mar/25
2009/01/25
2009/March/25
Did I miss anything here!
Thanks -
Hierarchy using a flat file for a master data load.
Can anyone please tell me the steps involved in creating a hierarchy in BI 7.0. and loading the data using a flat file into the created hierarchy? I have seen some posts and weblogs but they were not helpful and i have been getting some errors which i dont know how to resolve.
Can someone please give a clear steps and procedure for this?
Thanks a lot in advance.
NaveenHi,
The flat file is generated in application server by executing an ABAP program in SE38.
This ABAP program contains the logic to generate hierarchy.
In our case we used a DSO to store employee & supervisors.
This program generated a flat file in tmp folder in application server
In our case, To load this flat file we created an Infosource on our master data using direct update using RSA1old Tcode
after Infosource is created right click on the InfoSource and click on Assign DataSource.
Give the Source System name
When you open this Info source you can select data source as YHIEROBJ_HIER and then activate the InfoSource.
create an Info Package to load the Hierarchy. Right click on the PC Files (Source System) and click on u201CCreate InfoPackage".
Under Extraction tab give the flat file name which is generated by the ABAP program in AL11.
Select the hierarchy which you want to load. Also, you can rename the Hierarchy after loading it. The update method is selected as u201CFull Updateu201D.
Logic for Generation of flat file & ABAP Program:
Flat file structure:
Node ID InfoObject NodeName Parent ID Date To Date From Language
u2022 u201CNode IDu201D indicates the unique number which defines the Node.
u2022 u201CInfoObject u201Cgives the name of the InfoObject which is assigned to this Node ID.
u2022 u201CNodeNameu201D is the name you specify to that Node.
u2022 u201CParent IDu201D is the Node ID to which the Current Node ID reports to.
u2022 u201CDate Tou201D and u201CDate Fromu201D are taken for time references (You can set them constant).
u2022 u201CLanguageu201C is set to English (E).
The program Logic can be :
Declare the hierarchy structure
Get the data from DSO into internal table
Read all the EMP values into NodeName Field of the table
Build lookup table for Parent Node ID
Fill Parent Node ID field
Append this data to work area & then to another internal table
You need to declare the selection parameter as SSFILE1
& use following code to write back the file
OPEN DATASET SSFILE1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
MESSAGE MSG.
IF SY-SUBRC NE 0.
MESSAGE E008(ZBW1) WITH MSG.
ENDIF
Populate the output from that internal table into final work area.
Transfer this final work area to the ssfile1 which is the desired output file.
and CLOSE DATASET SSFILE1.
When this program is executed, selection screen asks for the name of file
Enter the desired file name & execute
flat file would be generated in the Application server now.
To view the File, Go to Transaction AL11. Search the directory /tmp. Double click on this directory.
This opens the list of flat files under this directory. Double click on the file name.
Hope this helps.
Thanks,
Rashmi. -
How to prepare the Format of Flat file(Excel or Text file) for sales order
Hi All,
My requirement is to prepare the Flat File formats(Excel or Text file) for sales order Conversion using BAPI by COB.
Needed Sample Excel or Text flat file .
Thanks for all.
Regards,
Chowdary
Moderator message : Search for available information. Thread locked.
Your similiar question [Flat files formats|Flat files formats] has been already locked for similiar reason. Read forum rules before posting.
Edited by: Vinod Kumar on Jul 8, 2011 9:36 AMHi,
You can use something like this:
switch(cell.getCellType()) {
case Cell.CELL_TYPE_STRING:
System.out.println(cell.getRichStringCellValue().getString());
break;
case Cell.CELL_TYPE_NUMERIC:
if(DateUtil.isCellDateFormatted(cell)) {
System.out.println(cell.getDateCellValue());
else {
System.out.println(cell.getNumericCellValue());
break;
case Cell.CELL_TYPE_BOOLEAN:
System.out.println(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_FORMULA:
System.out.println(cell.getCellFormula());
break;
default:
System.out.println();
Hope it helps,
Daniel -
Data Load Error: When loading Hierarchy through a flat file
Hi Bw experts,
I am getting the error message: Info object is not available: Message RSAR210, when trying to load the Hierarchy through flat file upload with IDOC processing.The info object is active. I am getting this error message only for one hierarchy, other hierarchies for the same inof object are loaded successfully.Can some one help me in this?
Thanks in Advance.
Regards,
BalaHi Bala,
Can you please share the solution asap..
As we are also facing the same issue.
Your quick response will be appreciated a lot
Regards,
Sai
Maybe you are looking for
-
Wireless Printing issues with HP Deskjet 2540
Hello everyone, I am experiencing an issue with an HP Deskjet 2540 printer - it prints if I have connected it to a USB cable; however, it refuses to print if I try to print wirelessly. I had initially solved this problem when I went to System Prefer
-
OmniPortlet: getting "500 Internal Server Error" message on edit
hi, i've installed the jpdk and portalTools on oracle 9ias-rel.2 (portal 9.0.2.6). i can include omniportlets on my pages, but whenever i want to define/edit them i get the message "500 Internal Server Error" from listener (on the edit page). what ha
-
Hi All , How to find the print program and output types used by a particular t-code. Thanks in advance vinay
-
Why is my country code is incorrect and indeed it is correct in my billing payment info?
May I know why is my country code is incorrect and indeed it is correct in my billing payment info. I can't purchase anything from the AppStore.
-
Component configuration for POWL
Hi, Could any one please through some light on how to configure shadowing mode- component configuration for POWL. Thanks in advance VK