Loading of master data through flat files

Hi
can anybody tell how to load master data through flat files.As for as my knowledge we load characteristic and attributes values first and then we load text and then hierarchy.
is it right or is there any procedure to load all values at a time.
sai

Hi ,
condition1:The sequence of columns in the transfer structure must correspond to the sequence of columns in your flat file
chk this help.sap link
http://help.sap.com/saphelp_nw04s/helpdata/en/c8/e92637c2cbf357e10000009b38f936/frameset.htm
Hope this helps you!!!!!!!
cheers,
Swapna.G

Similar Messages

  • Loading hirarchy master data from flat file to BW

    hai,
    i am new to BW Environment, thanks in advance for the Forum.
    while loading hierarchy master data from the flat file to BW, i am getting an error as follow
    WITH AN OPEN SQL SELECT, THE OUT PUT AREA USED TO HOLD THE SELECTED RECORDS MUST BE ATLEAST AS WIDE AS THE DATABASE TABLE FROM WHICH RECORDS ARE BEING READ.
    IN THIS CASE , THE DATABASE TABLE IS 167 BYTES WIDE, BUT THE OUT PUT AREA IS ONLY 141 BYTES WIDE
    pl's any one can help how to solve this problem.
    Thanks in advance to the Forum.
    regards
    Reddy

    Hi,
    This is the procedure.
    1. Create m-data with or without attributes.
    2. Create infosource .
        a) with flexible update
             or
        b) with direct update
    3. Create transfer rules and assign tyhe names of m-data and attribute in "Transfer rules" tab and transfer them to communication structure.
    4. Create the flat-file with same stucture as communication structure.
    5. if chosen direct update then create infopackage and assign the name of flat-file and schedule it.
    6. if chosen flexible update the create update rule with assigning name of the infosource and the schedule it by creating infopackage.
    Hope this helps. If still have prob then let me know.
    Follow this link also.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    Assign points if helpful.
    Vinod.

  • Error while loading data through flat files

    Hi,
    I am laoding data through flat files
    I loaded the data in development & then transported it to Quality  system  for doing Integration testing & loaded the data in Quality  system  & data loading was successful
    But we do the regression testing in one more Quality system where the objects get transported from Quality  system ,here when I try to the load the data to any of the cube in this system  I am getting the following error
    Error 'The argument 'US' cannot be interpreted as a number' on assignment field /BIC/ZIFBCOCTR record 1 value US
    Generally we get this error when there is the data of one field is going to the other field
    But one thing I am unable to understand is it was working fine in the Quality system and all the objects got transported from Quality to Regression testing system
    Could any one help me out
    Thanks
    Maya

    Hi,
    Can you please cross check the file structure and the transfer structure.
    Cheers,
    Malli....

  • Data Source creation for Master Data from Flat File to BW

    Hi,
    I need to upload Master Data from Flat File. Can anybody tell step by step right from begining of creation of DataSource up to Loading into Master Data InfoObject.
    can any body have Document.
    Regards,
    Chakri.

    Hi,
    This is the procedure.
    1. Create m-data with or without attributes.
    2. Create infosource .
        a) with flexible update
             or
        b) with direct update
    3. Create transfer rules and assign tyhe names of m-data and attribute in "Transfer rules" tab and transfer them to communication structure.
    4. Create the flat-file with same stucture as communication structure.
    5. if chosen direct update then create infopackage and assign the name of flat-file and schedule it.
    6. if chosen flexible update the create update rule with assigning name of the infosource and the schedule it by creating infopackage.
    Hope this helps. If still have prob then let me know.
    Follow this link also.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    Assign points if helpful.
    Vinod.

  • Problem in data sources for transaction data through flat file

    Hello Friends,
    While creating the data sources for transaction data through flat file, I am getting the following error "Error 'The argument '1519,05' cannot be interpreted as anumber' while assigning character to application structure" Message no. RSDS016
    If any one come across this issue, please provide me the solution.
    Thanks in Advance.
    Regards
    Ravi

    Hallo,
    just for information.
    I had the same problem.
    Have changed the field type from CURR to DEC and have set external instead of internal.
    Then, the import with flatfile worked fine.
    Thank you.

  • Error while loading customer master data through Idoc (DEBMAS) from BODS

    Hi All,
    I am trying to load customer master data from BODS to SAP ECC through IDOC(DEBMAS). The jobs run successfully but IDOC is not getting posted. Please find the error below.
    I checked in TSKD table the entry 0 is present. Please help me to resolve this issue.
    Thanks & Regards,
    Balamurugan G

    Hi, did you referred this link : Error during customer master mass update through XD99

  • Loading of master data through input schedule

    Hi guys!
    Is any solution for loading/updating of master data through input schedule?

    Hi Maxim,
    In addition to all above, Input Schedules are used to enter and send data for whatever dimension members you have maintained in BI or BPC.
    The master data can be maintained in BI, then you need ot load data from BI and it will be reflected in BPC.
    If you want to make changes in master data in BPC, then you need to goto Admin, select whatever properties you want to display and then Maintain Dimension Members for the same.
    However, you can also import master data from BI using DM packages in BPC Excel.
    Hope this clarifies.
    Rgds,
    Poonam

  • Export Master data to flat file

    Hi All
    I am trying to export master data through the data manager package Export master data to file but am getting failed.
    Can you please tell me what i need to specify in our mapping section in transformation file, as of now i am validating blank transformation file.
    Regards
    Srikant

    Hi Vadim
    I tried but transformation validation is failed and when I check the rejected list its showing blank.
    Thanks
    Sriaknt

  • Error in load master data from flat file to infocube "No SID found for val"

    Hi gurus
    while i m loding data from ffile to infocube. getting error message "No SID found for value 'HOT ' of characteristic 0UNIT" for material name field .
    in flat file one fileld having lower carrecter so i have defined formula for upper case in transfer rule.
    after scheduleing message is "data was requested". but in monitor-> detail-> request, extraction status is green and transfer , processing ststus are red.
    overall status is red.

    It appears your transfer structure and source file are not mapped correctly. Make sure your source file is in the correct format. TRy the "preview" function to make sure.
    Also, is the file and your log on language the same? For instance is the file from a GErman user but you are logged in in English? You will see errors like that when you use ST (Stuck = Pieces) instead of PC (Peices in English)
    To test a bad mapping, hard code the Unit to something to make sure...(to PC for instance).
    Also, the error message you are getting is because of transfer structure, please re-activate it. IF it persists, try to skip the PSA and go straight to the data target.
    Message was edited by: Steve Wilson
    Message was edited by: Steve Wilson

  • Extract Master Data to Flat File

    Hello
    Do you know a easy way to extract master data into a flat file?   I've tried using maintain master data but my master table is too large to display this way.

    Dear Satya,
    1) You can simply write an ABAP to access the P table ( /BIC/PInfobobject )
    2) Using infospokes
    rsbo->ZDOWNLOAD->Create->Choose Data Source as Infopbject with attributes..
    and select your fields and selections and specify the flat file destination and thatsts it..
    regards,
    Hari
    Message was edited by: Hari Kiran Y

  • REg Upload of data through Flat file .....  .XLS or .TXT or .CSV

    Hi,
    I am trying to upload flat file data using the FM GUI_UPLOAD for .TXT file and
    FM TEXT_CONVERT_XLS_TO_SAP for .Xls and .csv files
    My internal table is as follows
    TYPES : BEGIN OF ty_f64,
                     field(255) type c,
                  END OF ty_f64.
    data : it_f64 type table of ty_f64.
    Example Flat file data is as follows
    H     20112008     DR     0001     20112008     INR
    L     01     61     1000          
    L     50     41000     1000          
    H     20112008     DR     0001     20112008     INR
    L     01     61     1000          
    L     50     41000     500          
    L     50     41000     400          
    L     50     41000     100          
    My problem is that only the first field i.e H or L is getting updated into my internal table but I want whole record to be the content in one row
    i.e in RUN TIME I see the internal table data as
    H
    L
    L
    H
    L
    L
    L
    regards
    Prasanth

    Check the below code
    REPORT  ZSRK_073                            .
    CLASS CL_ABAP_CHAR_UTILITIES DEFINITION LOAD.
    TYPES : BEGIN OF TY_F64,
                     FIELD(255) TYPE C,
                  END OF TY_F64.
    DATA : IT_F64 TYPE TABLE OF TY_F64,
           WA_F64 TYPE TY_F64.
    TYPES : BEGIN OF TY_HEADER,
           RECNO TYPE I,
           INDICATOR,
           BLDAT TYPE BLDAT,
           BLART TYPE BLART,
           BUKRS TYPE BUKRS,
           BUDAT TYPE BUDAT,
           WAERS TYPE WAERS,
           END OF TY_HEADER.
    TYPES : BEGIN OF TY_ITEM,
            RECNO TYPE I,
            INDICATOR,
            NEWBS TYPE NEWBS,
            NEWKO TYPE NEWKO,
            WRBTR(16), " TYPE WRBTR,
            END OF TY_ITEM.
    TYPES : BEGIN OF TY_TAB,
            F1,
            F2(10),
            F3(17),
            F4(17),
            F5(10),
            F6(5),
            END OF TY_TAB.
    DATA : IT_HEADER TYPE TABLE OF TY_HEADER ,
           IT_ITEM TYPE TABLE OF TY_ITEM,
           WA_HEADER TYPE TY_HEADER,
           WA_ITEM TYPE TY_ITEM,
           IT_TAB TYPE TABLE OF TY_TAB,
           WA_TAB TYPE TY_TAB.
    DATA : L_REC TYPE I,
           FLAG.
    CONSTANTS : C_HTAB TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    DATA : FNAME TYPE STRING VALUE 'C:\TTT1.xls',
           L_FILE LIKE RLGRAP-FILENAME.
    IF FNAME CS '.TXT'.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME = FNAME
          FILETYPE = 'ASC'
        TABLES
          DATA_TAB = IT_F64.
      PERFORM SPLIT_TEXT_TABLE TABLES IT_F64.
    ELSEIF FNAME CS '.XLS'.
      L_FILE = FNAME.
      PERFORM UPLOAD_XLSFILE TABLES IT_TAB
                             USING L_FILE.
      PERFORM SPLIT_XLS_TABLE TABLES IT_TAB.
    ELSEIF FNAME CS '.CSV' .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME = FNAME
          FILETYPE = 'ASC'
        TABLES
          DATA_TAB = IT_F64.
      PERFORM SPLIT_CSV_TABLE TABLES IT_F64.
    ENDIF.
    *&      Form  UPLOAD_XLSFILE
          text
    -->  p1        text
    <--  p2        text
    FORM UPLOAD_XLSFILE TABLES P_TABLE
                        USING P_FILE.
      DATA : L_INTERN TYPE KCDE_CELLS OCCURS 0 WITH HEADER LINE.
      DATA : L_INDEX TYPE I.
      DATA : L_START_COL TYPE I VALUE '1',
             L_START_ROW TYPE I VALUE '1',
             L_END_COL TYPE I VALUE '256',
             L_END_ROW TYPE I VALUE '65536'.
      FIELD-SYMBOLS : <FS>.
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          FILENAME                = P_FILE
          I_BEGIN_COL             = L_START_COL
          I_BEGIN_ROW             = L_START_ROW
          I_END_COL               = L_END_COL
          I_END_ROW               = L_END_ROW
        TABLES
          INTERN                  = L_INTERN
        EXCEPTIONS
          INCONSISTENT_PARAMETERS = 1
          UPLOAD_OLE              = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE : / 'File Error'.
        EXIT.
      ENDIF.
      IF L_INTERN[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE : / 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT L_INTERN BY ROW COL.
        LOOP AT L_INTERN.
          MOVE L_INTERN-COL TO L_INDEX.
          ASSIGN COMPONENT L_INDEX OF STRUCTURE P_TABLE TO <FS>.
          MOVE L_INTERN-VALUE TO <FS>.
          AT END OF ROW.
            APPEND P_TABLE.
            CLEAR P_TABLE.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " UPLOAD_XLSFILE
    *&      Form  SPLIT_TEXT_TABLE
          text
         -->P_IT_F64  text
    FORM SPLIT_TEXT_TABLE  TABLES   IT_F64 .
      LOOP AT IT_F64 INTO WA_F64.
        IF WA_F64+0(1) = 'H'.
          SPLIT WA_F64 AT C_HTAB INTO      WA_HEADER-INDICATOR
                                           WA_HEADER-BLDAT
                                           WA_HEADER-BLART
                                           WA_HEADER-BUKRS
                                           WA_HEADER-BUDAT
                                           WA_HEADER-WAERS.
          CLEAR FLAG.
          IF FLAG EQ SPACE.
            L_REC = L_REC + 1.
            WA_HEADER-RECNO = L_REC.
            FLAG = 'X'.
          ENDIF.
          APPEND WA_HEADER TO IT_HEADER.
          CLEAR WA_HEADER.
        ELSEIF WA_F64+0(1) = 'L'.
          SPLIT WA_F64 AT C_HTAB INTO    : WA_ITEM-INDICATOR
                                            WA_ITEM-NEWBS
                                            WA_ITEM-NEWKO
                                            WA_ITEM-WRBTR.
          IF FLAG EQ 'X'.
            WA_ITEM-RECNO = L_REC.
          ENDIF.
          APPEND WA_ITEM TO IT_ITEM.
          CLEAR WA_ITEM.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SPLIT_TEXT_TABLE
    *&      Form  SPLIT_xls_TABLE
          text
         -->P_IT_TAB  text
    FORM SPLIT_XLS_TABLE  TABLES   IT_TAB .
      LOOP AT IT_TAB INTO WA_TAB.
        IF WA_TAB-F1 = 'H'.
          WA_HEADER-INDICATOR = WA_TAB-F1.
          WA_HEADER-BLDAT = WA_TAB-F2.
          WA_HEADER-BLART = WA_TAB-F3.
          WA_HEADER-BUKRS = WA_TAB-F4.
          WA_HEADER-BUDAT = WA_TAB-F5.
          WA_HEADER-WAERS = WA_TAB-F6.
          CLEAR FLAG.
          IF FLAG EQ SPACE.
            L_REC = L_REC + 1.
            WA_HEADER-RECNO = L_REC.
            FLAG = 'X'.
          ENDIF.
          APPEND WA_HEADER TO IT_HEADER.
          CLEAR WA_HEADER.
        ELSEIF WA_TAB-F1 = 'L'.
          WA_ITEM-INDICATOR = WA_TAB-F1.
          WA_ITEM-NEWBS = WA_TAB-F2.
          WA_ITEM-NEWKO = WA_TAB-F3.
          WA_ITEM-WRBTR = WA_TAB-F4.
          IF FLAG EQ 'X'.
            WA_ITEM-RECNO = L_REC.
          ENDIF.
          APPEND WA_ITEM TO IT_ITEM.
          CLEAR WA_ITEM.
        ENDIF.
        CLEAR WA_TAB.
      ENDLOOP.
    ENDFORM.                    " SPLIT_xls_TABLE
    *&      Form  SPLIT_CSV_TABLE
          text
         -->P_IT_F64  text
    FORM SPLIT_CSV_TABLE  TABLES   IT_F64 .
      LOOP AT IT_F64 INTO WA_F64.
        IF WA_F64+0(1) = 'H'.
          SPLIT WA_F64 AT '|' INTO      WA_HEADER-INDICATOR
                                           WA_HEADER-BLDAT
                                           WA_HEADER-BLART
                                           WA_HEADER-BUKRS
                                           WA_HEADER-BUDAT
                                           WA_HEADER-WAERS.
          CLEAR FLAG.
          IF FLAG EQ SPACE.
            L_REC = L_REC + 1.
            WA_HEADER-RECNO = L_REC.
            FLAG = 'X'.
          ENDIF.
          APPEND WA_HEADER TO IT_HEADER.
          CLEAR WA_HEADER.
        ELSEIF WA_F64+0(1) = 'L'.
          SPLIT WA_F64 AT '|' INTO    : WA_ITEM-INDICATOR
                                            WA_ITEM-NEWBS
                                            WA_ITEM-NEWKO
                                            WA_ITEM-WRBTR.
          IF FLAG EQ 'X'.
            WA_ITEM-RECNO = L_REC.
          ENDIF.
          APPEND WA_ITEM TO IT_ITEM.
          CLEAR WA_ITEM.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SPLIT_CSV_TABLE

  • Problem while uploading master data through two files

    Hi all,
    When i try to upload master data of CUSTOMER with two files , Attribute and Text.
    Text gets uploaded perfectly.
    for Attribute, the data upload is done and psa i can see the exact data. But when i check the CUSTOMER object, i am not able to find the actually Attributs data. Instead those colmns are filed with 'E'.
    Can anybdy please explain me wheret the problem is.
    Thanks..

    Hi Sun,
    First check the data in PSA whether the records are fine or any discrepancy in them. Also check the properties of the COSTUMER object into which you are loading. The properties "type" or the "size" of the object may not be matching with the same in the file.
    Check them and try to load once again.
    Hope this helps u...
    Regards,
    Koundinya Karanam.
    Edited by: koundinya karanam on Jan 15, 2008 12:05 AM

  • ERROR -WHILE LOADING MATERIAL MASTER FROM A FLAT FILE

    HI GUYS ,
    I AM TRYING TO CREATE MATERIAL MASTER FROM A FROM FLAT FILE
    IAM GETTIGN AN ERROR MESSAGE
    'YOU HAVE NOT FULLY MAINTAINED THE DESCRIPTIONS'
    REQUIRE HELP ON THIS
    THANKS

    Hello Nishant
    All the inputs that are required to create a material in dialog (MM01) should be mandatory as well if you are going for LSMW or BAPI. Obviously your material requires a description (which will end up in MAKT). If you have this description in your flat file then there are additional (perhaps language-dependent) descriptions required.
    You could try to use BAPI_MATERIAL_SAVEDATA in your test environment to find out the minimum input that is required to create a material in R/3.
    You may also have a look at thread what are the parameters have to pass to bapi material creation?
    Regards
      Uwe

  • Material master upload through flat file using the BAPI_MATERIAL_SAVEDATA

    Hi Guys,
    I need to upload the material master using the BAPI, I need to update the all the views in the material master, Could any one can help please?
    I using EXCEL file is input file and suggest me the, excel file format, if could you suggest it would be very help to me.
    Thanks,
    Gourisankar.

    please go through this code
    *& Report  ZBAPI_MATERIAL_SAVEDATA
    *& AUTHOR
    *& PURPOSE : THIS REPORT USES BAPI MATERIAL SAVE DATA TO UPDATE AND CREATE
    *&           THE MATERIAL
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
          BASIC_VIEW(1),
          SALES_VIEW(1),
          PURCHASE_VIEW(1),
          STORAGE_VIEW(1),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
          MATL_GROUP1(1),
          BASE_UOM1(1),
          BASE_UOM_ISO1(1),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
          PLANT2(4),
          DEL_FLAG5(1),
          PUR_GROUP1(1),
          BASE_QTY1(1),
          PLANT3(4),
           STGE_LOC(4),
           MRP_IND(1),
          PLANT4(4),
          STGE_LOC1(4),
          MRP_IND1(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
          SALES_ORG1(4),
          DISTR_CHAN1(2),
          DEL_FLAG2(1),
          MIN_ORDER1(1),
           LANGU(2),
          MATL_DESC(40),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA.
    *decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *INTERNAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MATMAS.XLS' .
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    perform F_GET_DATA.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_MOVE_DATA .
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_EXCEL BY ROW COL.
    CLEAR IT_EXCEL.
    LOOP AT IT_EXCEL.
    MOVE IT_EXCEL-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE WA_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_EXCEL-VALUE TO <FS>.
    AT END OF ROW.
    APPEND WA_DATA TO IT_DATA.
    CLEAR WA_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " F_MOVE_DATA
    *&      Form  F_GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DATA .
    LOOP AT IT_DATA INTO WA_DATA.
    MOVE-CORRESPONDING WA_DATA  TO  BAPI_HEAD.
    BAPI_HEAD-BASIC_VIEW ='X'.
    BAPI_HEAD-SALES_VIEW ='X'.
    BAPI_HEAD-PURCHASE_VIEW ='X'.
    BAPI_HEAD-STORAGE_VIEW ='X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_CLIENTDATA.
    BAPI_CLIENTDATAX-MATL_GROUP = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM_ISO = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_PLANTDATA.
    BAPI_PLANTDATAX-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_PLANTDATAX-DEL_FLAG = 'X'.
    BAPI_PLANTDATAX-PUR_GROUP = 'X'.
    BAPI_PLANTDATAX-BASE_QTY = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_STORAGELOCATIONDATA.
    BAPI_STORAGELOCATIONDATA-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-PLANT = BAPI_STORAGELOCATIONDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-STGE_LOC = BAPI_STORAGELOCATIONDATA-STGE_LOC.
    BAPI_STORAGELOCATIONDATAX-MRP_IND = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_SALESDATA.
    BAPI_SALESDATAX-SALES_ORG = BAPI_SALESDATA-SALES_ORG.
    BAPI_SALESDATAX-DISTR_CHAN = BAPI_SALESDATA-DISTR_CHAN.
    BAPI_SALESDATAX-DEL_FLAG = BAPI_SALESDATA-DEL_FLAG.
    BAPI_SALESDATAX-MIN_ORDER = 'X'.
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = WA_DATA-LANGU.
    IT_MAKT-MATL_DESC = WA_DATA-MATL_DESC.
    APPEND IT_MAKT.
    CLEAR IT_RET.
    REFRESH IT_RET.
    PERFORM F_CALL_BAPI.
    READ TABLE IT_RET WITH KEY TYPE = 'S'.
    IF SY-SUBRC EQ 0.
    PERFORM F_BAPI_COMMIT.
    WRITE:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',WA_DATA-MATERIAL.
    ELSE.
    MESSAGE E000(ZHNC) WITH 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    ENDIF.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM F_CALL_BAPI .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = BAPI_HEAD
       CLIENTDATA                 =  BAPI_CLIENTDATA
       CLIENTDATAX                =  BAPI_CLIENTDATAX
       PLANTDATA                  =  BAPI_PLANTDATA
       PLANTDATAX                 =  BAPI_PLANTDATAX
       STORAGELOCATIONDATA        =  BAPI_STORAGELOCATIONDATA
       STORAGELOCATIONDATAX       =  BAPI_STORAGELOCATIONDATAX
       SALESDATA                  =  BAPI_SALESDATA
       SALESDATAX                 =  BAPI_SALESDATAX
    IMPORTING
       RETURN                     =  IT_RET
    TABLES
       MATERIALDESCRIPTION        = IT_MAKT
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    APPEND IT_RET.
    ENDFORM.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    FORM F_BAPI_COMMIT .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    ENDFORM.                    " F_BAPI_COMMIT

  • 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

Maybe you are looking for

  • Execute bsp application from abap program

    How can I do to execute a bsp application from abp program ? I have two parameter in enter : text and language. And i have one paramenter in exit : translated text. Thanks for you help.

  • SSL certificate error when installing

    Hi, We are getting error when installing the SSL certificate on our web dispatcher. Please see screenshot attached. Kindly assist us on this. Thank you! Regards, AJ

  • How to install firefox in Ubuntu

    I'm using Ubuntu 10.10 Netbook and I can't figure out how to install Firefox 4. It hasn't auto-installed from the tar.bz2 file. Thanks!!

  • Where to find out my outgoing SMTP server name?

    Hi: I am trying to setup email notification method on OEM Grid Control, but what's the value for my SMTP server and port number , How can I find out? I am using OUTLOOK . Thanks for all the help.

  • What does the "color picker" icon look like?????

    I am a complete novice with Photoshop. What does the Color Picker icon look like in Photoshop CS4 and where do I find it?  Is this also called the 'Color sampler tool"?