How to split data from month to week 4/4/5?

Hello,
Is there any R/3 function based on 4/4/5 calendar that determines the number of weeks of the month?
At the end, I'd like to split monthly data into weekly basis.
Thanks

Hi Eric,
I don't have a system handy to check but there are two function for FIRST_DAY_OF_PERIOD and LAST_DAY_OF_PERIOD. Get those days and simply do ( DAYLAST - DAYFIRST ) / 7.
Regards,
Marc
SAP NetWeaver RIG

Similar Messages

  • How to extract data from monthly tables for annual balance chart?

    Hello Again!
    I am wanting to decide whether to enter all of my transactions into one table for the whole year or separate tables for each month. If I was to use one table for the whole year it would probably have in the region of 1000 entries, and as I understand it, Numbers doesn't work so well with such large tables. Also, as I will be mostly using Numbers on my iPad, where it runs slower, this may well slow things down considerably. Another reason for using Monthly Tables is that it would be easier to search.
    Having said this, I am using the following method to construct balance charts for my accounts which seems to depend on having just one table for all transactions for the year. Here is a sample of the transactions table:
    which updates the balance for each account after each new transaction is entered.
    Then I use the following table for creating the balance charts:
    It uses the following formula to return the balance at the end of each week for each account (this is the formula for Account 1) which then is displayed in the chart.
    =LOOKUP(A2,$Week Number,All Transactions :: Account 1)
    If I was to use the Monthly Tables method it is not obvious to me how I would create the Weekly Balance Table, given that I would need to draw data from 12 different tables, and that some of these Tables would contain the same Week Number (for weeks that overlap months).
    I would be grateful for any advice on achieving the result I am looking for by the most efficient method.
    Thanks
    Nick
    P.S. Hopefully this is the last question for a while!

    I wasn't urging you to keep an annual table but to spit it on an easier to rule basis.
    Split it in chuncks of exactly 35 days starting from the first one of the 'year' in operation
    Doing that everything will be easier
    the index of a day will be calculated by
    =DATEDIF(B,D,"D")+1
    The index of the 'custom_week' will be calculated by :
    =1INT((DATEDIF(B,D,"D")1)/7)
    So, it would be easy to gather datas from a given 'custom_week'.
    Yvan KOENIG (VALLAURIS, France) jeudi 5 août 2010 10:22:25

  • How to SPLIT data from Uploaded :AZT file at ";"

    Dear All Experts,
    I need to upload an :AZT file and then SPLIT the data of .AZT fiel at ";" into various fields into an internal table "itab" and then I need to save/update these data of internal table "itab" to database table "ZLT_AZT" . But I am facing some problems in the output. So please follow the following to understand my problem and please suggest me as how to SPLIT the data correctly at each ";".
    1) The code that I wrote in se38.
    2) The attachement; Projekt ABAP AZT file upload doubt5.jpg;  the screen shot of the output that i am getting in internal table "itab" during debugging after my code is executed in se38
    PROBLEM: I am unable to SPLIT the data at ";".
    3) The attachement; Projekt ABAP AZT fiel upload doubt4.jpg: the screen shot of the data populated in database table "ZLT_AZT" in se11.
    PROBLEM:              i) I am not able to see all the columns. I am only able to see the 8 if  9 columns. I did go to Sellting--> Format List-->Choose Fields and                                                 selected all the fields but it didn't worked. Also I went to Settings-->User Parameters-->Databrowser and here  I tried to  change the width of                                          output list but still it didn't work.
    1) So the  code in se38 is:
    DATA  itab  TYPE STANDARD TABLE OF zlt_azt.
    DATA  wa_tab TYPE zlt_azt.
    DATA: file_str1 type string.
    Parameters: p_file1 type localfile.
    At selection-screen on value-request for p_file1.
                                           CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
                                            EXPORTING
                                               STATIC              = 'X'
                                             CHANGING
                                               file_name           = p_file1.
    Start-of-Selection.
      file_str1 = P_file1.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
      tables
        data_tab                      = itab
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT itab  INTO wa_tab.
        SPLIT wa_tab AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab- D1  wa_tab-STD  wa_tab-BES.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    MODIFY zlt_azt FROM TABLE itab.
    Looking forward to your valuable feedback to my new problems.
    Best regards
    Chandan Kumar

    Hi Chandan,
    I am sorry for typing wrong at a place - Now try the corrected one
    data  it_string   type stringtab.
    data lv_string    type string.
    DATA  itab  TYPE STANDARD TABLE OF zlt_azt.
    DATA  wa_tab TYPE zlt_azt.
    DATA: file_str1 type string.
    Parameters: p_file1 type localfile.
    At selection-screen on value-request for p_file1.
                                           CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
                                            EXPORTING
                                               STATIC              = 'X'
                                             CHANGING
                                               file_name           = p_file1.
    Start-of-Selection.
      file_str1 = P_file1.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.   " <<<<< previously I wrote loop at itab>>>
    clear wa_tab.
    SPLIT lv_string AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab- D1  wa_tab-STD  wa_tab-BES.
    append wa_tab to itab.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    MODIFY zlt_azt FROM TABLE itab.
    Regards,
    Rachna

  • How to split dates on month wise...

    i need output like this.
    if i select fromdate as 15-SEP-10 and Todate as 25-NOV-10 in where condition then
    output should be like this.
    FROMDATE TODATE
    *15-SEP-10* 30-SEP-10
    01-OCT-10 31-OCT-10
    01-NOV-10 *25-NOV-10*
    How do i do it.

    Hi,
    Similar to Dombrooks' solution:
    DEFINE     start_date     = "DATE '2010-09-15'"
    DEFINE     end_date     = "DATE '2010-11-25'"
    SELECT     GREATEST (&start_date, ADD_MONTHS ( TRUNC (&start_date, 'MONTH')
                                       , LEVEL - 1
               )          AS fromdate
    ,     LEAST    (&end_date,   ADD_MONTHS ( TRUNC (&start_date, 'MONTH')
                                       , LEVEL
                               ) - 1
               )          AS todate
    FROM    dual
    CONNECT BY     LEVEL <= 1 + MONTHS_BETWEEN ( TRUNC (&end_date,   'MONTH')
                                            , TRUNC (&start_date, 'MONTH')
    ;Simpler, but, depending on your requirements, less efficient:
    SELECT         MIN (&start_date + LEVEL - 1)     AS fromdate
    ,         MAX (&start_date + LEVEL - 1)     AS todate
    FROM         dual
    CONNECT     BY  LEVEL <= 1 + &end_date
                         - &start_date
    GROUP BY    TRUNC ( &start_date + LEVEL - 1
                          , 'MONTH'
    ORDER BY    fromdate
    ;

  • Split Data from Month to Days in the Bex Report

    Hi Gurus,
    I have a Actual and Plan data. Actual data is on daily basis and Plan data is in monthly basis.....
    Requirement is : User will be entered Calendar Day ( any day of the month for example : 06/18/2010)  to bring Month to date on both Actual and Plan data. Like for example if user enters the date 18th June 2010. Then I need to pull from the beginning of the month to date up to that selection day( in our case 18 days).
    Actual : I don't have issue getting the Month to date and Year to date because I have data on daily basis.
    Plan : As I said data is on monthly basis. I want to break this data up to the day selected ( from 1st of the June month to 18th as given in example) by user. Like if you have amount is $5000 then my logic will be
    CKF  =  (5000 * 18) / total number days in the month
    Please provide help on this how to bring the data for Plan...
    Thanks
    Ganesh Reddy.

    ganesh,
    in your data model convert date field to calander period and calander year .
    once that is done
    create restricted key figures
    1) month to date
    2) year to date
    month to date - key figure is restricted to custom variable ( which populates calander period based on the date user enter)
    year to date - key figure is restricted to custom variable (which populates calander year based on the date user enter )
    hope you got it .
    Thanks,
    pk.

  • How to split data from PSA !!

    Experts !
    I  have a data in PSA, its a big table. now my requirement is from PSA's first column ( usually in transformation we assign one column to one infoobject ) say for ex. in my first coumn of PSA i have data like this..."123 XYZ"
    now, i have to assign 123 to one info object and XYX to another.
    so, i guess my first part is working bcoz when it writes from PSA to targe field ( length is 3) so it only stores first 3 digits.
    but how do i get last 3 char. to another target field ?
    i guess its kind of combersome..let me explain differently....
    In transformation, i want to do something like this ....
    PSA's First Column -
    >   "123 xyz" -
    > (Target Field) <----
         Insert "123" Here
    ( Target Field ) XYZ  <----
       Insert "XYZ" Here
    Thnax

    ok great...
    can you help me out with the rule ?
    i have never writtne done ABAP b4.
    if its easy wot write u can do sudo coding, i will really appreciated.
    I have tried using formula, but looks like its not working
    thanx

  • How to store data from Host.vi in cRIO-9074

    TejasKumar Patel
    I implemented a advance Measurement and Control system using cRIO-9074
    with c-Series I/O cards( NI 9217, 9411, 9264)
    I have some questions about it,
    (1)- Data rate from FPGA targate to host vi is too low. how can I increase
    it, when I run my host VI, sometimes all temperature sensor update at
    same time and sometimes one by one, can you please give me some hint, how
    can I correct it, I used two FIFOs for NI-9411 digital pulses, I put all
    Digital input and all analog output and input in a seperate while loop in
    FPGA targate VI.
    (2)- I have to write that data to analyse for further result. I tried all
    possible way to write data including wite to spreadsheet.vi, write to
    text.vi, Data storage.vi, Write to measurement.vi. All this VI work
    efficientlywhen it run individualy, But when I connect this VI to
    writedata from FPGA host VI. than it always give empty file.
    I saw your post in NI discussion forum about how to write data from
    Host.vi, But still I am confuse that how can I creat a protocol between
    host VI and Fpga target vi. to write the data in a file. I have nearabout
    38 channel to write data.
    (3)- I have to measure time difference between two digital pulses, to find
    a flow rate. I am using counter for it with risisng edge shot.vi, but when
    i get a timestemp when there is risisng edge for the second rising edge
    how can I get timestemp. Its like i have to measure time between two
    pulses, I triend waveform measurement.vi to find cycle period. but it not
    worked. any other was to measure it.
    I am stuck in this question since from last one month. I already followed
    NI-discussion forum solution but it doesnt work. I think the way I applied
    is may be wrong. 
    Looking forward to hear from you soon.
    Plese send an additional email copy to [email protected]
    Thank you and Best Regards, 

    Thanks Joseph for your support,
    1-      If I count the ticks between the pulses it always seems different ….because this method I already tried, but it does not work,  like some times it shows 9099 tick and at the second pulse it shows like some more or less ticks not the same ticks every time. To complete my project, the biggest problem is the data storage.
    2-      As you gives the solution in NI forum, “low level file I/O Vis such as Write to text file” FPGA target not support this VI. And mainly I want to write data from HOST.vi, because I am process those data …and I need to store it. For to figure out my result.
    3-      If I use “Write to text file. VI (Sub-VI ) to FPGA.vi, it not support because it support string data and I have FIXpoint data. And can you explain me what is low level file IO, and how can I use in fpga.vi??
    4-      Yes, for my project time stamp it really necessary, for data analysis.
    5-      I need the time stamp to find out what was the system response at the time.  As our project based on weather temperature, I need time stamp.
    Waiting for your reply,
    Thanks and Regards,
    Patel

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi,
    I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
    I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
    Thanks

    Tou need to do a couple of things
    1. On the Essbase server, set up an odbc system connection to your MySQL database
    2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
    The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it

  • How to Convert Date to Month in Database which is pointing to EBS, Not DWH.

    Hi Friends,
    We are planning to create reports in OBIEE and the Source is EBS. That means, we don’t want to depends on Datawarehouse and Informatica and OBIApps. We just create some reports and they are pointing to EBS database.
    For testing purpose, we have taken one HR Report and it containsthe below columns:
    Month (Dim)
    Revenue Per Employee Headcount (Fact)
    Average Cost per Active Workforce Headcount (Fact)
    In my little investigation, we found that Revenue column is coming from EBS: GL_BALANCES. And we configured W_Day_D base table in DAC as there is no Month column in EBS (Not sure).
    *** Coming to my problem, how can I call Month column in my database pointed to EBS. How to convert Date to Month in my database.
    I could be wrong but anyone please look into this issue.. How can I create columns for that exact OBI report in EBS database instead of DwH.
    Thanks in Advance..
    Raghu Nagadasari

    Hi Veeresh,
    You are right. Here, no need of using W_DAY_D table, but, we need all the stuff from the table and to explain my problem i have taken that table as an example. Now, we ran scripts for W_MONTH_D and W_DAY_D tables with EBS columns. So, we are getting data for the tables. In the same manner we have to create scripts for the below tables.
    W_GL_ACCOUNT_D
    W_GL_OTHER_F
    W_STATUS_D
    W_MCAL_DAY_D
    W_EMPLOYMENT_STAT_CAT_D
    W_WRKFC_BAL_A
    W_DAY_D (Completed)
    W_MONTH_D (Completed)
    But, we are not aware of EBS Tables and their columns much. So, we are back tracing from RpD --> DAC --> Info --> EBS for each and every column and its taking much time.
    So, if anyone of you facing the same issue, please share the EBS tables for the corresponding OBI tables, which are mentioned above.

  • How to select data from cluster table

    hi experts,
                   I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
    how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
    please advice.
    mani

    Hi Manikandan,
    The following code may be helpful to understand how to select the data from cluster table.
    Types: Begin of ty_kna1,
    Kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_kna1,
    begin of ty_bseg,
    belnr type bseg-belnr,
    kunnr type bseg-kunnr,
    end of ty_bseg,
    begin of ty_final,
    belnr type bseg-belnr,
    kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_final.
    Data: it_kna1 type table of ty_kna1,
    wa_kna1 type ty_kna1,
    it_bseg type table of ty_bseg,
    wa_bseg type ty_bseg,
    it_final type table of ty_final,
    wa_final type ty_final.
    Select kunnr adrnr from kna1 into table it_kna1 where....
    if sy-subrc = 0.
    select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
    endif.
    sort it_kna1 by kunnr.
    Loop at it_bseg into wa_bseg.
    move wa_bseg-belnr to wa_final-belnr.
    read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
    if sy-subrc = 0.
    move: wa_kna1-kunnr to wa_final-kunnr,
    wa_kna1-belnr to wa_final-belnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    Loop at it_final into wa_final.
    write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
    endloop.
    Reward if useful.
    Thankyou,
    Regards.

  • HOW TO FILTER DATA FROM MICROSOFT ACCESS

    HOW TO FILTER DATA FROM MICROSOFT ACCESS BASED ON DATE AND TIME AND GIVE THE RESULT TO A TABLE ?
    I need some example files , can anybody please help me ?
    Solved!
    Go to Solution.

    Just be sure to get examples specific to the Jet DBMS. It is rather "idiosyncratic" when dealing with time and date values.
    One question: the timestamp is being saved in a datetime field, right?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to add date with month after convert number to month?

    How to add date with month after convert number to month?
    Month Date Result
    24 21/11/09 24*(21/11/09)
    I want to add both the column and result should be 21/11/11
    Thanks
    Nihar

    Hmm,
    Because, you are using YYYY for '09'.
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/2009
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(TO
    10/01/0009Or with Add_months
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/0012
    SQL> ed
    Wrote file afiedt.buf
      1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
    SQL> /
    TO_CHAR(AD
    10/01/2012-Arun

  • How to upload data from excel to form using webutil

    Hi,
    In the sample provided by Oracle
    http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
    Note 247606.1 How to Copy Records From a Form Into Excel
    It shown the methods of how to copy data from form to excel but is there any sample to provide the step on how to read the cell from excel into Form in 10g.

    declare
    args client_ole2.list_type;
    application client_ole2.obj_type;
    vworkbooks client_ole2.obj_type;
    vdoc     client_ole2.obj_type;
    vworksheet     client_ole2.obj_type;
    vrange               client_ole2.obj_type;
    begin
    -- create app object
    application := client_ole2.create_obj('Excel.Application');
    client_OLE2.SET_PROPERTY(application, 'Visible','True');
    -- get workbooks object
    vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
    -- and open a file
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
    vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- get a worksheet object
    -- for this to work you need to know the sheet name or its index
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 1); <-- name or index
    vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);          
    client_ole2.destroy_arglist(args);
    -- get a range object which in this case is just a cell
    -- for this to work you need to know the cell coordinates
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'B6');          
    vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
    client_ole2.destroy_arglist(args);
    -- and here you get the value
    message(client_ole2.get_char_property(vrange,'Value'));
    -- release objects          
    client_ole2.release_obj(vrange);
    client_ole2.release_obj(vworksheet);
    client_ole2.release_obj(vdoc);
    client_ole2.release_obj(vworkbooks);
    client_ole2.release_obj(application);
    end;

  • HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE

    HI,
    HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE?  & WITH EXAMPLE.

    hi,
    chk this, put the data into an excel file.
    fields inside it are name and age.
    sample excel sheet.
    coloumn 1 is name and column 2 is age
    name age
    A     8
    C     13
    D     55
    DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    data : record like db_name_age occurs 0 with header line.
    DATA : v_start_col TYPE i VALUE '1', "starting col
           v_start_row TYPE i VALUE '1', " starting row
           v_end_col   TYPE i VALUE '2', " total columns
           v_end_row   TYPE i VALUE '10'. "total no of record
    FORM f_upload .
      CLEAR : int_excel, int_excel[].
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = wf_filename
          i_begin_col             = v_start_col
          i_begin_row             = v_start_row
          i_end_col               = v_end_col
          i_end_row               = v_end_row
        TABLES
          intern                  = int_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    *Message is 'Unable to upload data from  '  wf_filename.
        MESSAGE e169(zm050) WITH wf_filename.
      ELSE.
        SORT int_excel BY row col.
        REFRESH : record.
        CLEAR   : record.
        LOOP AT int_excel.
          CASE int_excel-col. "go thru each column.
            WHEN 1.
              record-name  = int_excel-value.
            WHEN 2.
              record-age = int_excel-value.     
          ENDCASE.
          AT END OF row.
            APPEND record.
            CLEAR record.
          ENDAT.
        ENDLOOP.
    *inserting into table
    modfiy db_name_age from table record.
      ENDIF.
    <i><b>ANOTHER EXAMPLE</b></i>
    TYPE-POOLS truxs.
    types: begin of t_tab,
    col1(5) type c,
    col2(5) type c,
    col3(5) type c,
    end of t_tab.
    data : itab type standard table of t_tab,
           wa type t_tab.
    data it_type type truxs_t_text_data.
    parameter p_file type rlgrap-filename.
    data ttab type tabname.
    at selection-screen on value-request for p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = 'P_FILE'
    IMPORTING
    FILE_NAME = p_file
    start-of-selection.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
    I_FIELD_SEPERATOR =
    I_LINE_HEADER = 'X'
    i_tab_raw_data = it_type
    i_filename = p_file
    tables
    i_tab_converted_data = itab[]
    EXCEPTIONS
    CONVERSION_FAILED = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    end-of-selection.
    loop at itab into wa.
    write : wa-col1,
            wa-col2,
            wa-col3.
    endloop.
    rgds,
    anver
    <i>if hlped pls mark points</i>

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    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 = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

Maybe you are looking for

  • What is happening in Database?

    Hi All,               I am new to SAP BW. Technically I am very much confused about the Info Object , Info Cube, Info Provider, PSA, DSO. I want to know Physically what is happening in the database after creation of above things. Kindly let me know s

  • The Flash Help Search doesn't work

    Do I need to reinstall my flash ? I installed flash 8 professional on my machine about a month ago. i have just noticed that the search button in the help section doesn't do anything. what should i do? All the help content is there but the only way i

  • PA30, attaching documents through the employee personal master data

    Hi, We want to add documents to a pernr in PA30 via Extra -> assign original. We configured the archive link but it asks for "Bar Code Entry" when we want to add an document. In http://help.sap.com/saphelp_erp60_sp/helpdata/en/d7/e2270b408e11d1896b00

  • LMS 3.2 CS Discovery finding "0" devices

    All of a sudden, after my "friendly" Windows server admin re-booted my LMS 3.2 box (without stopping the daemon!), my Discovery jobs are returning zero devices discovered. Prior to this, I was discovering 135 devices; which is correct for our environ

  • How to connect 10g database through Enterprise manager???

    Hi All, I want to connect the database through Enterprise manager. My database is on 10g. Version is 10.1 Please tell me the procedure to connect the database through E.M. Thanks and Regards, Prathamesh.