How to built a hierarchy with flat file?

Hi Experts,
for a better representation of the report, i need to built a hierarchy with flat file.
The Data load is via Flat file.
Do you have some documentation about that?
Thanks
Cheers
Gilo

Hi Gilo,
   Check these docs...
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb">How to… Download a Hierarchy to a Flat File</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/content.htm">Uploading Hierarchies from Flat Files</a>
<a href="http://sapbwneelam.blogspot.com">More Docs...</a>
Hope it Helps
Srini

Similar Messages

  • How to load a sysdate with flat file

    How do I load a sysdate with a flat file
    I tried using a constant with a sysdate expression but it seems like OWB creates the ctl file with 'sysdate' as a text and not as a sysdate() function

    Ola Wernere,
    Two things to check:
    - is the data type of the constant a date?
    - did you enter 'sysdate' or just sysdate (without the ampersands)?
    Other thing that might help you is generate the intermediate result in the mapping. This will show you the results you'll expect to be loaded in the flat file...
    Good luck & regards
    Moscowic

  • Key Range with Flat File

    Hi people, Anybody has a example how it works Key range with Flat file ? Tks

    Hi All,  I have one scenario to read the source file . The file delimiter is '|' . The no of pipeline for each line is 17. So if a line containing more than 17 , send an error email. For this first i am printing tota pipeline in ecah line to afile called pipelinecount.txt . Then i will read this file and send each value to while loop /for loop , where it will get > 17 , it will exit the process and send an email.  But here in script i am getting error at while line. Could anyone help.   #! /bin/kshset -x SOURCE_DIR=/vp01/SrcFilessed 's/[^|]//g' /vp01/SrcFiles/Test.txt | awk '{ print length }'> /vp01/SrcFiles/pipelinecount.txtcd $SOURCE_DIRwhile line in `cat pipelinecount.txt`; do if [ $line -eq 17 ];thenecho "No issue in pipeline"exit 0;fiif [ $line -gt 17 ];thenecho "No of pipelines exceeded the expected. Please verify the source file." | mailx -s "WKFS Load: Failed" [email protected]

  • How to get field separator in flat file using GUI_DOWNLOAD function

    hi,
    how to get field separator in flat file using GUI_DOWNLOAD function.
                                    thanking you.

    Hi,
      Use WRITE_FIELD_SEPARATOR = 'X'.
      Check this sample code
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • Step by Step details on how to load data from a flat file

    hi can anyone explain how to load data from a flat file. Pls giv me step by step details. thnx

    hi sonam.
    it is very easy to load data from flat file. whn compared with other extrations methods...
    here r the step to load transation data from a flat file.......
    step:1 create a Flat File.
    step:2 log on to sap bw (t.code : rsa1 or rsa13).
    and observe the flat file source system icon. i.e pc icon.
    step:3 create required info objects.
    3.1: create infoarea
         (infoObjects Under Modeling > infoObjects (root node)-> context menu -
    > create infoarea).
    3.2:  create char /keyfig infoObject Catalog.(select infoArea ---.context menu --->create infoObject catalog).
    3.3:   create char.. infoObj and keyFig infoObjects accourding to ur requirement and activate them.
    step:4 create infoSource for transaction data and create transfer structure and maintain communication structure...
        4.1: first create a application component.(select InfoSources Under modeling-->infosources<root node>>context menu-->create  applic...component)
       4.2: create infoSource  for transation data(select appl..comp--.context menu-->create infosource)
    >select O flexible update and give info source name..
    >continue..
    4.4: *IMp* ASSIGN DATASOURCE..
      (EXPAND APPLIC ..COMP..>EXPAND YOUR INFOSOURCE>CONTEXT MENU>ASSIGN DATASOURCE.)
    >* DATASOURCE *
    >O SOURCE SYSTEM: <BROWSE AND CHOOSE YOUR FLAT FILE SOURCE SYSTEM>.(EX:PC ICON).
    >CONTINUE.
    4.5: DEFINE DATASOURCE/TRANSFER STRUCTURE  FOR IN FOSOURCE..
    > SELECT TRANSFER STRUCTURE TAB.
    >FILL THE INFOOBJECT FILLED WITH THE NECESSARY  INFOOBJ IN THE ORDER OR SEQUENCE OF FLAT FILE STRUCTURE.
    4.6: ASSIGN TRANSFER RULES.
    ---> NOW SELECT TRANSFER RULES TAB. AND SELECT PROPOSE TRANSFER RULES SPINDLE LIKE ICON.
    (IF DATA TARGET IS ODS -
    INCLUDE 0RECORDMODE IN COMMUNICATION STRUCTURE.)
    --->ACTIVATE...
    STEP:5  CREATE DATATARGET.(INFOCUBE/ODS OBJECT).
    5.1: CREATE INFO CUBE.
    -->SELECT YOUR INFOAREA>CONTEXT MENU>CREATE INFOCUBE.
    5.2: CREATE INFOCUBE STRUCTURE.
    ---> FILL THE STRUCTURE PANE WILL REQUIRE INFOOBJECTS...(SELECT INFOSOURCE ICON>FIND UR INFOSOURCE >DOUBLE CLICK > SELECT "YES" FOR INFOOBJECT ASSIGNMENT ).
    >MAINTAIN ATLEAST  ON TIME CHAR.......(EX; 0CALDAY).
    5.3:DEFINE AND ASSIGN DIMENSIONS FOR YOUR CHARACTERISTICS..
    >ACTIVATE..
    STEP:6 CREATE UPDATE RULES FOR INFOCUDE USING INFOSOURCE .
    >SELECT UR INFOCUBE >CONTEXT MENU> CREATE UPDATE RULES.
    > DATASOURCE
    > O INFOSOURCE : _________(U R INFOSOURCE). AND PRESS ENTER KEY.......
    >ACTIVATE.....UR UPDATE RULES....
    >>>>SEE THE DATA FLOW <<<<<<<<----
    STEP:7  SCHEDULE / LOAD DATA..
    7.1 CREATE INFOPACKAGE.
    --->SELECT INFOSOURCE UNDER MODELING> EXPAND UR APPLIC.. COMP..> EXPAND UR INFOSOURCE..> SELECT UR DATASOURCE ASSIGN MENT ICON....>CONTEXT MENU> CREAE INFOPACKAGE..
    >GIVE INFOPACKAGE DISCREPTION............_________
    >SELECT YOUR DATA SOURCE.-------> AND PRESS CONTINUE .....
    >SELECT EXTERNAL DATA TAB...
    > SELECT *CLIENT WORKSTATION oR APPLI SERVER  >GIVE FILE NAME > FILE TYPE> DATA SAPARATER>
    >SELECT PROCESSING TAB
    > PSA AND THEN INTO DATATARGETS....
    >DATATARGET TAB.
    >O SELECT DATA TARGETS
    [ ] UPDATE DATATARGET CHECK BOX.....
    --->UPDATE TAB.
    O FULL UPDATE...
    >SCHEDULE TAB..
    >SELECT O START DATA LOAD IMMEDIATELY...
    AND SELECT  "START" BUTTON........
    >>>>>>>>>>
    STEP:8 MONITOR DATA
    > CHECK DATA IN PSA
    CHECK DATA IN DATA TARGETS.....
    >>>>>>>>>>> <<<<<<<<<----
    I HOPE THIS LL HELP YOU.....

  • How to import a logo from flat file to SAP in SMARTFORM.

    how to import a logo from flat file to SAP in SMARTFORM. i need to know whether TIFF format is used and also the full steps.
    Thanks,

    Hi,
    You can not directly use a logo from a file into a Smart form. First you will have to upload it to SAP. This has to be done only once. Once it is imported into SAP then you can use it in smart form. To import a logo to SAP, goto SE78. Open the tree under GRAPHICS. Select the file type and click on the Import (first button on the toolbar, just before delete button). Select the logo file and give it some appropriate name along with description. Select appropriate type of the image and click Continue. Your logo will be uploaded into SAP from a file. Now in your smartform, Create a Graphic Node, give the name of the logo along with other properties. In this way you can import a logo from a flat file into SAP and consequently in a smart form.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • Upload hierarchy from flat file to BPC

    Hello SAP Guru,
    I have download customer / material  hierarchy in flat flie from BI/BW  and now I want to upload hierarchy from flat file to BPC
    Please can any one give me step by step method to load hierarchy from Flat file to SAP - BPC.
    Thanks in advance.
    With regards,
    Anand Kumar

    Hi Saida Reddy,
    why you resurrect a 5 years old thread? Surely he solved in the meanwhile his issue, see please dr Frankenstein.
    Regards
        Roberto

  • Load hierarchy through flat file

    I am trying to load a hierarchy through a flat file and followed the SDN blog mentioned below.
    Hierarchy Upload from Flat files
    However, I get this runtime error while loading.
    Runtime Error          ASSIGN_LENGTH_0
    Information on where terminated                                           
         The termination occurred in the ABAP program "SAPLRRSV" in            
          "RRSV_INT_CHA_VAL_SPLIT".                                            
         The main program was "RSABW_START_NEW ".                                                                               
    The termination occurred in line 42 of the source code of the (Include)
          program "LRRSVU10"                                                   
         of the source code of program "LRRSVU10" (when calling the editor 420).
                                                                                    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    12 *"     VALUE(E_CHAVL_EXT) TYPE  RSD_CHAVL_EXT                       
        13 *"     VALUE(E_T_DEP) TYPE  RRSV_T_DEP                              
        14 *"  EXCEPTIONS                                                      
        15 *"      UNKNOWN_CHANM                                               
        16 *"      UNKNOWN_INFOCUBE        
       17 *"----
       18                                                                    
       19   DATA: l_s_cob_pro  TYPE rsd_s_cob_pro.                           
       20   DATA: l_t_cob_pro_cmp TYPE rsd_t_cob_pro.                        
       21   DATA: l_subrc      LIKE sy-subrc.                                
       22   DATA: l_offset     TYPE i.                                       
       23   DATA: l_s_dep      TYPE rrsv_s_dep.                              
       24                                                                    
       25   FIELD-SYMBOLS: <chavl>.                                          
       26                                                                    
       27   IF i_very_internal = rs_c_true. "SB                              
       28     i_with_const = rs_c_true.     "SB                              
       29   ENDIF.                          "SB                              
       30                                                                    
       31   PERFORM cob_pro_cmp_get USING i_infocube i_chanm                 
       32                        CHANGING l_t_cob_pro_cmp                    
       33                                 l_subrc.                           
       34   IF NOT l_subrc IS INITIAL.                                       
       35     PERFORM raise USING rs_c_false l_subrc i_chanm space.          
       36   ENDIF.                                                           
       37                                                                    
       38   l_offset = 0.                                                    
       39                                                                    
       40   LOOP AT l_t_cob_pro_cmp INTO l_s_cob_pro.                        
       41     IF i_with_const = rs_c_true OR l_s_cob_pro-chaconst IS INITIAL.
    >>>>>       ASSIGN i_chavl_int+l_offset(l_s_cob_pro-intlen) TO <chavl>.  
       43       IF l_s_cob_pro-iobjnm = i_chanm.                             
       44         IF     <chavl> IS INITIAL                                  
       45             OR <chavl> EQ rsd_c_initial.                           
       46           IF i_very_internal = rs_c_true.

    Hi,
      This is Thilak. For loading Data To hierarchy from flat file u should follow the below steps.
    1. Create info objects as per ur hierarchy structure. i.e., ZH_CNO( for cno), ZH_SRGN (for region) .
    2. find the highest node level info object. i.e., ZH_CNO.
    3. go to that info object (highest node level info object) and select "with hierarchy" chk box.
    4. click on " MAINTAIN HIERARCHY" button and move the external characteristics info objects to rt. side pannel.i.e., ZH_SRGN.
    (Hint : other than first and last node level characteristics)
    5. Activate the info object.
    6. Create the info source (ZH_IS) of " DIrect Update Type".
    7. Assign Hierarchy Data source( ZH_CNO_HIER) to that info source.
    8. Schedule the info package to load the hierachy data from flat file.
    Note: If u have any doubts regarding flat file format and hierarchy structure plz call to +91 9600015640 or mail to thilak.oggn@gmail. bcz i am unable to draw that hier strtr ana table.
    Edited by: thilak. neelam on Oct 24, 2008 1:44 PM
    Edited by: thilak. neelam on Oct 24, 2008 1:52 PM

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

  • How to insert sysdate in a flat file

    Hi All,
    i have a interafce i extract data from oracle database and generate a flat file.
    In one of the columns i have to insert sysdate in the file.
    could someone help me how to add the sysdate in flat file.
    Thanks in advance
    Naveen

    Hi Naveen,
    Trying to contribute a little,
    Yes you can use sunopsis CURRENT_DATE function to get the sysdate.
    @ your interface
    1. In the definition, make sure your staging area different from target is checked and SUNOPSIS MEMEORY ENGINE is selected.
    2. In the diagram, for the column which you want date to be inserted just say CURRENT_DATE and make it to execute on STAGING.
    3. In the Flow, you have to see 3 boxes, in the first box select LKM SQL to SQL, in the second box make it as UNDEFINED, in the third box select IKM SQL To FIle Append and select the options accordingly.
    Makes sens?
    Thanks,
    G

  • How to test the RFC to Flat File scenario

    Hi,
    How to test the RFC to Flat File scenario
    regards,
    kiran

    Hi,
    After running the RFC it's going Dump.
    this is the error message i got.
    "Error analysis                                                                     
    An error occurred when executing a Remote Function Call.                     
    "CPI-C error CM_RESOURCE_FAILURE_NO_RETRY"                                                
    Status of connection.... "CODE=CM_RESOURCE_FAILURE_NO_RETRY -1 -1 SAPCODE=666
    CONV="                                                                      
    Internal error code.... "RFC_IO5"                                                           
    There is an error in the communication system. To clarify                    
    and resolve the error, contact your system administrator.                     "

  • How to map Idoc fields with external file

    Hi All,
    How to map Idoc fields with external file.
    I want to check the settings where Idoc fields are mapped with external file.
    Thanks in advance.
    Regards,
    Govind.

    If you have configured a fileport where on trigger of IDOC you are creating the file, you can look at the message type documentation and get the offset values for each field in each segment

  • Working with flat file as source in owb 10.2

    Hi,
    I am working with flat file as source . While validating the mapping i am getting the following error like
    " to specify a data file configure the mapping , add a node under ' Source data file', type in the file name
    and select the file location."
    Please give me the suggestion . It is very urgent.

    Hi Venkat,
    I tried the following stepts.
    1. in Design Center select your mapping and right click and select configure
    2. select sql loader data files and select create
    3. On right hand side data file Name : enter your source file name (ex : source.csv)
    4. click ok button.
    5. open mapping and validate.
    The mapping is validating. After validating I deployed the mapping. Up to this the mapping is working fine.
    But when I start the mapping, It has completed with errors.
    The error message is:
    Status
    Error Log
    RPE-01013: SQL Loader reported error condition, number 1.
    LRM-00112: multiple values not allowed for parameter 'control'
    Job Summary
    Updated : 2009-02-24 15:32:43.0 Job Final Status : Completed with errors Job Processed Count : 1 Job Error Count : 1 Job Warning Count : 0
    Please give me the suggestions.
    Thanks,
    Venkat

  • Plz send simple bdc  code with flat file which is executable

    plz send a simple code for upload bdc with flat file which is executable.

    plz send a simple code for upload bdc with flat file which is executable.

  • I've downloaded two adobe cs6 files to a new computer.  How do I activate photoshop with these files?

    I've downloaded two adobe cs6 files to a new computer.  How do I activate photoshop with these files?

    i said the 2nd file name you listed in message 6 was incorrect, not the file name in message 8.
    but if the file name message 8 is correct, both names in message 6 are incorrect.  or you just might have a typo for the first file name.
    in any case, make sure both file names are exactly the same but have different (a 7z and an exe) extensions, put both in the same directory and then click the exe.

Maybe you are looking for