Regarding internal table read.

Hi,
i want to read internal table and compare the one variable existing with in from date and to date.
the psudo code is like this
READ TABLE L_TABEMPLOYEE INTO L_WAEMPLOYEE WITH KEY  EMPLOYEE = SOURCE_FIELDS_RULE-PERNR
ULTIMO BETWEEN L_WAEMPLOYEE-DATEFROM AND L_WAEMPLOYEE-DATETO.
but this statement gives error.
how to code for the same requirement.
regards,
swami.

Hi,
Recode like this.It will definitely work
LOOP AT L_TABEMPLOYEE INTO L_WAEMPLOYEE
                             WHERE EMPLOYEE = SOURCE_FIELDS_RULE-PERNR
                                          AND ULTIMO > L_WAEMPLOYEE-DATEFROM
                                          AND ULTIMO < L_WAEMPLOYEE-DATETO.
<Write what you want to do here >
ENDLOOP.
Please reward if useful
Thanks Arjun
Edited by: Arjun Puthuruthy on Mar 26, 2008 10:52 AM

Similar Messages

  • Regarding Internal table and access performance

    hey guys.
    In my report , Somehow i reduced the query performance time by selecting minimum key fields and moved the selected records to internal table.
    Now from this internal table i am restricting the loop
    as per my requirements using where statements.(believing that internal table retrieval is more faster than database acces(using query)).
    But still my performance goes down.
    Could you pls suggest me how to reduce the execution time
    in abap programming.
    I used below commands.
    Read using binary search.
    loop ...where statement.
    perform statements.
    collect staements.
    delete itab.(delete duplicates staements too)
    sort itab(sorting).
    For each above statements do we have any faster way to retrieval records.
    If i see my bottle neck at se30.it shows
    ABAP programming to 70 percent
    database access to 20 percent
    R3 system as 10percent.
    now how to reduce this abap process.
    could you pls reply.
    ambichan.
    ambichan.

    Hello Ambichan,
    It is difficult to suggest the improvements without looking at the actual code that you are running. However, I can give you some general information.
    1. READ using the BINARY SEARCH addition.
    This is indeed a good way of doing a READ. But have you made sure that the internal table is <i>sorted by the required fields</i> before you use this statement ?
    2. LOOP...WHERE statement.
    This is also a good way to avoid looping through unnecessary entries. But further improvement can certainly be achieved if you use FIELD-SYMBOLS.
    LOOP AT ITAB INTO <FIELD_SYMBOL_OF_THE_SAME_LINE-TYPE_AS_ITAB>.
    ENDLOOP.
    3. PERFORM statements.
    A perform statement can not be optimized. what matters is the code that you write inside the FORM (or a subroutine).
    4. COLLECT statements.
    I trust you have used the COLLECT statement to simplify the logic. Let that be as it is. The code is more readable and elegant.
    The COLLECT statement is somewhat performance intensive. It takes more time with a normal internal table (STANDARD). See if you can use an internal table of type  SORTED. Even better, you can use a HASHED internal table.
    5. DELETE itab.(delete duplicates staements too)
    If you are making sure that you are deleting several entries based on a condition, then this should be okay. You cannot avoid using the DELETE statement if your functionality requires you to do so.
    Also, before deleting the DUPLICATES, ensure that the internal table is sorted.
    6. SORT statement.
    It depends on how many entries there are in the internal table. If you are using most of the above points on the same internal table, then it is better that you define your internal table to be of type SORTED. That way, inserting entries will take a little more time (to ensure that the table is always sorted), but alll the other operations are going to be much faster.
    Get back to me if you need further assistance.
    Regards,
    <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>.

  • Internal table Read statement

    Hi,
    AM using Read statement to read internal table as below.
    Read itab into wa with key x = y.
    if sy-subrc eq 0.
    do some thing.
    endif.
    However the work area wa is not useful to me in my program. when am doing extended check it is issueing warning saying wa is not used. HOW TO CLOSE THIS WARNING.
    Regards,
    AAkash

    just before read statement do
    CLEAR WA.
    This should remove the error.
    Cheers
    VJ

  • Issue regarding internal tables

    Dear all,
    My issue is that , I need to enter data into a single internal table by fetching data from two sap tables using two different selct quries. I should not use joins or for all entries. And display the internal table data in the list.
    Problem am facing is only one select query is geeting fetched and the other table data in not in the list.
    Pleas provide the possible solutions.
    Thanks & Regards,
    Madhavi.M

    DATA: BEGIN OF itab1 OCCURS 0,
          qmnum LIKE qmel-qmnum,
          qmtxt LIKE qmel-qmtxt,
          indtx LIKE qmel-indtx,
          qmdat LIKE qmel-qmdat,
          ltrmn LIKE qmel-ltrmn,
          priok LIKE qmel-priok,
          aufnr LIKE qmel-aufnr,
          bezdt LIKE qmel-bezdt,
          qmnam LIKE qmel-qmnam,
          qmart LIKE qmel-qmart,
          END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
          qmnum LIKE qmih-qmnum,
          btpln LIKE qmih-btpln,
          ingrp LIKE qmih-ingrp,
          END OF itab2.
    DATA : itab3 TYPE TABLE OF z_notif WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS : notnum FOR qmel-qmnum OBLIGATORY,
                     notype FOR qmel-qmart,
                     floc FOR qmih-btpln,
                     name FOR qmel-qmnam.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    To fetch the values in the internal table ****************
    from ztable corresponding to the entries made *************
    by the user in the selection screen ******************
    SELECT qmnum qmtxt indtx qmdat ltrmn priok aufnr bezdt qmnam qmart INTO
    TABLE itab1 FROM qmel WHERE qmnum IN notnum
    AND qmart IN notype AND qmnam IN name.
    SELECT qmnum btpln ingrp INTO TABLE itab2 FROM qmih FOR ALL ENTRIES IN
    itab1 WHERE qmnum = itab1-qmnum AND btpln IN floc.
    To move the contents of ITAB1 to ITAB3 ***************
        LOOP AT itab1.
          itab3-qmnum = itab1-qmnum.
          itab3-qmtxt = itab1-qmtxt.
          itab3-indtx = itab1-indtx.
          itab3-qmdat = itab1-qmdat.
          itab3-ltrmn = itab1-ltrmn.
          itab3-priok = itab1-priok.
          itab3-aufnr = itab1-aufnr.
          itab3-bezdt = itab1-bezdt.
          itab3-qmnam = itab1-qmnam.
          itab3-qmart = itab1-qmart.
          READ TABLE itab2 WITH KEY qmnum = itab1-qmnum.
    To move the contents of ITAB2 to ITAB3 ***************
          itab3-btpln = itab2-btpln.
          itab3-ingrp = itab2-ingrp.
          APPEND itab3.
        ENDLOOP.
    have a look at this example this may help you.....
    reward if helpful.....

  • Internal table reading

    Hi Guys,
    I have one internal table, I need to loop the table and READ the same table with in the loop.
    My requirement is like this:
    In the internal table KUNNR VKORG and VTWEG, if three fields values are same for more then one record, i need to append  those records into  another internal table.
    Could any one help me.
    Thanks,
    Gourisankar

    Hi,
    Loop at itab1 into wa_tab1.
      Read table itab1 into wa_tab2 with key kunnr = wa_tab1-kunnr
                                                              vkorg  = wa_tab1-vkorg
                                                              vtweg  = wa_tab1-vtweg
                                                              field4 NE  wa_tab1-field4 .
    If sy-subrc = 0.
      Append wa_tab2 to itab2.
    endif.
    Endloop.
    Important:    Here field4 should be a unique key in ur internal table.
    Regards,
    Prem

  • This is Regarding internal tables

    Hi to all,
    I have 3 internal tables like this.
    it_itab1       It_itab2        it_final
      !--f1            !-f3           !---f1
      !--f2            !-f4           !---f2
                                           !---f3
                                           !---f4
    the fields are like this.now i want to move the data from first two internal tables to final internal table.
    how to do this.
    thanks and regards,
    s

    create ur final internal table with the same data element as the fields of 1 and 2 itabs
    and say move- corresponding  to it_final..

  • This is regarding internal table

    Hi to all,
    types : begin of it_itab,
            name type ztab-name,
            tval like ztab-tval,
            fval like ztab-fval,
            end ofit_itab,
            it_jtab type standard  table of it_itab.
    What is the meaning of this it_jtab type standard table of it_itab.
    what it specifies exactly.
    Thanks and regards,
    s

    Hi,
    types : begin of it_itab,
    name type ztab-name,
    tval like ztab-tval,
    fval like ztab-fval,
    end ofit_itab,
    Types defines the standard strcuture which you can use any where in the report.
    <b>it_jtab type standard table of it_itab.</b>
    As strcuture doesnot contain morethan one data, we declaring the internal using the strcuture which defined.<b> The above statement is used to create a  internal table without header line and the internal table type is of standard.</b>
    Thanks,
    Sriram Ponna.

  • Regarding Internal Table Field Validation [Modification]

    Hi All,
    I have a small issue with formatting of a field.
    The Field is POTX1 - it would get the value as 'New MT-EPPE0097-COMP02',
    Means i have one internal table field as i_error-POTX1 in that some times we get value as 'New MT-EPPE0097-COMP02'.
    Whenever i get 'New' literal in that internal table field i have to remove that literal from that internal table field. And Left Justify the remaining part of the field.
    Ex:  'New MT-EPPE0097-COMP02'
         should become 'MT-EPPE0097-COMP02'.
    For this first i have to find wether 'New' Literal exists in the Internal table field or not then i have to remove it.
    Can anybody tell me how can i solve this issue.
    Thanks in advance.
    Thanks & Regards,
    Rayeezuddin.

    Hi,
    Take a look :
    loop at i_error.
      if i_error-potx1(3) = 'New'
        w_potx1 = i_error-potx1.
        i_error-potx1 = w_potx1+3(37).
        MODIFY i_error.
      endif.
    ENDLOOP.
    Regards,
    Erwan.
    Message was edited by: Erwan LE BRUN

  • Regarding Internal Table Manipulation

    Hi All,
    I have a issue when working against Internal Table inside a function module.
    Issue is:
    My I.Table declaration is as below:
    <b>DATA: BEGIN OF i_vbfa_tab OCCURS 0.
              INCLUDE STRUCTURE vbfa.
    DATA: END   OF i_vbfa_tab.</b>
    Then in code i had written following logic:
      SELECT VBELV
             VBELN
             VBTYP_N
             VBTYP_V
             FROM VBFA
             INTO ( V_VBELV, V_VBELN, V_VBTYP_N, V_VBTYP_V )
             WHERE VBELN   = V_SO_ORDER2 AND
                   VBTYP_N = 'G'         AND
                   STUFE   = '00'.
      IF SY-SUBRC EQ 0.
        I_VBFA_TAB–VBELN   = V_VBELN.        
        I_VBFA_TAB–VBELV   = V_VBELV.        
        I_VBFA_TAB–VBTYP_N = V_VBTYP_N.      
        I_VBFA_TAB–VBTYP_V = V_VBTYP_V.      
        APPEND I_VBFA_TAB.
        CLEAR I_VBFA_TAB.
      ENDIF.
    Then when i am checking for <b>F2[Syntax]</b> it is giving error as <b>'The Field I_VBFA_TAB-VBELN is unknown'</b>. This is the case with all 4 assignment statements.
    Can anybody tell me what is the issue over here.
    What can i do to assign those values to internal table and append. I had tried with <b>MOVE</b> that is also giving same error.
    Can anybody solve my issue.
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    If you are doing something like:
    call function 'Z_FUNC'
      tables i_vbfa_tab = vbfa_tab.
    and in the FM:
    function z_func
    *"  TABLES
    *"      i_vbfa_tab STRUCTURE  vbfa OPTIONAL
    perform get_vbfa.
    and then in an include
    form get_vbfa
    SELECT VBELV
    VBELN
    VBTYP_N
    VBTYP_V
    FROM VBFA
    INTO ( V_VBELV, V_VBELN, V_VBTYP_N, V_VBTYP_V )
    WHERE VBELN = V_SO_ORDER2 AND
    VBTYP_N = 'G' AND
    STUFE = '00'.
    I think you'll get the syntax arror you describe. Try:
    call function 'Z_FUNC'
      tables i_vbfa_tab = vbfa_tab.
    and in the FM:
    function z_func
    *"  TABLES
    *"      i_vbfa_tab STRUCTURE  vbfa OPTIONAL
    perform get_vbfa
    <b>  tables i_vbfa_tab.</b>
    and then in the include
    form get_vbfa
    <b>  tables i_vbfa structure vbfa.</b>
    data: v_vbelv   like vbfa-vbelv,
          v_vbeln   like vbfa-vbeln,
          v_VBTYP_N like vbfa-VBTYP_N,
          v_VBTYP_v like vbfa-VBTYP_v,
    SELECT VBELV
    VBELN
    VBTYP_N
    VBTYP_V
    FROM VBFA
    INTO ( V_VBELV, V_VBELN, V_VBTYP_N, V_VBTYP_V )
    WHERE VBELN = V_SO_ORDER2 AND
    VBTYP_N = 'G' AND
    STUFE = '00'.
    IF SY-SUBRC EQ 0.
    I_VBFA_TAB–VBELN = V_VBELN.
    I_VBFA_TAB–VBELV = V_VBELV.
    I_VBFA_TAB–VBTYP_N = V_VBTYP_N.
    I_VBFA_TAB–VBTYP_V = V_VBTYP_V.
    APPEND I_VBFA_TAB.
    CLEAR I_VBFA_TAB.
    ENDIF.
    I didn't test this, so if you use it, test it thoroughly.
    Rob

  • Pls provide information regarding internal tables

    hi
    i would like to know can we create relationship between two internal tables.
    like foriegn key relationship . if yes pls tell me how .

    hi...
    there is  actual relationship that can b created for 2 internal tables using foreign keys,but by using " for all entries" in select statements.
    syntax: for all entries.
    TYPES: BEGIN OF ftab_type,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
           END OF ftab_type.
    DATA:  ftab TYPE STANDARD TABLE OF ftab_type WITH
                     NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
           free TYPE I,
           wa_sflight TYPE sflight.
    Suppose FTAB is filled as follows:
    CARRID  CONNID
    LH      2415
    SQ      0026
    LH      0400
    SELECT * FROM sflight INTO wa_sflight
        FOR ALL ENTRIES IN ftab
        WHERE CARRID = ftab-carrid AND
              CONNID = ftab-connid AND
              fldate = '20010228'.
      free = wa_sflight-seatsocc - wa_sflight-seatsmax.
      WRITE: / wa_sflight-carrid, wa_sflight-connid, free.
    ENDSELECT.
    try it out.
    reward if useful.

  • Regarding internal table

    Hi ,
         i have an internal table
    DATA: BEGIN OF tbl_infile OCCURS 0,
             Aufnr(12) type c,
             budat(8) TYPE c,
             tubes(13) type c,
             srap(13) type c,
             batches(13) type c,
             runmin(13) type c,
             stopmin(13) type c,
          END OF tbl_infile.
    here the date from file comes into internal table as 140409 i want to change this to 14.04.2009 and place back into internal table how to change the internal table ?
    Thanks in advance

    Hi,
    This is very simple:
    1.Change the lenght of the budat from 8 to 10
    2.either use the FM 'CONVERT_DATE_TO_EXTERNAL' to convert the date or
    use the below snippet
    3.Declare 3 local variable of type c each of lenght 2
    data:var1(2) tyep c,
    var2(2) tyep c,
    var3(2) tyep c,
    4.extract the dd,mm and yy using the offset from the budat
    var1 = budat+0(2).
    var2 = budat+2(2).
    var3 = budat+4(2).
    5.finally concatenate the above 3 variable into budat of internal table.
    concatenate var1 '.' var2 '.' var3 into budat.
    Hope this might solve your problem.
    Pooja
    Edited by: Pooja Gupta on Mar 13, 2009 4:46 AM

  • Regarding Internal table logic

    Hi,
    I have my internal table as follows:
    DATA: BEGIN OF I_DATA OCCURS 0,
            prgname TYPE SYST-REPID,
            matnr   TYPE mara-matnr,
            berid   TYPE mdma-berid,
          END OF I_DATA.
    Data that fills into can be as follows:
    Ex:
    PROGRAM1,1000,MRP1
    PROGRAM1,1000,MRP1
    PROGRAM1,2000,MRP1
    PROGRAM2,1000,MRP1
    PROGRAM2,1000,MRP1
    PROGRAM2,2000,MRP1
    PROGRAM3,1000,MRP1
    PROGRAM3,1000,MRP1
    PROGRAM3,2000,MRP1
    It can any order in above way.
    Then i will sort the above data as follows:
    SORT I_DATA BY prgname matnr berid.
    Now here my issue is:
    DATA: t_objtxt     LIKE solisti1   OCCURS 0  WITH HEADER LINE.
    I need to push the above internal table data into T_OBJTXT internal table as follows:
    It should first Display program Name as Program Name: Program3, Then column heading MATNR, BERID below it and data of that program[1st] below them till all the 1st program's data finished. Whenever MATNR value changes in this program list i need to print an ***** like line. TO indicate all the materials printed.
    When 2nd program comes again i have to write Program Name: Program2, Then column heading MATNR, BERID below it and data of that program[1st] below them till all the 1st program's data finished. Whenever MATNR value changes in this program list i need to print an ***** like line. TO indicate all the materials printed.
    When 3nd program comes again i have to write Program Name: Program3, Then column heading MATNR, BERID below it and data of that program[1st] below them till all the 1st program's data finished. Whenever MATNR value changes in this program list i need to print an ***** like line. TO indicate all the materials printed.
    Etc. Same process we need to follow.
    The final out put should be as below:
    PROGRAM NAME : PROGRAM1
    MATNR, BERID
    1000,MRP!
    1000,MRP1
    2000,MRP1
    PROGRAM NAME : PROGRAM2
    MATNR, BERID
    1000,MRP!
    1000,MRP1
    2000,MRP1
    PROGRAM NAME : PROGRAM3
    MATNR, BERID
    1000,MRP!
    1000,MRP1
    2000,MRP1
    Like wise o/p need to be send to I_OBJTXT and to email.
    <b>The logic i have written is as follows:</b>
      LOOP AT I__DATA.
        AT NEW PRGNAME.
          MOVE '*****************************************' TO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
          CONCATENATE t_objtxt-line 'PROGRAM NAME : '
                      I_DATA-PRGNAME
                      INTO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
          MOVE '*****************************************' TO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
          CONCATENATE TEXT-024 " Material
                      TEXT-025              " MRP
                      INTO t_objtxt-line
                      SEPARATED BY C_COMMA.
          APPEND t_objtxt.
          CLEAR t_objtxt.
          MOVE '-----------------------------------------' TO t_objtxt-line.
          CONCATENATE t_objtxt-line '------------------' INTO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
        ENDAT.
    *    MOVE '' TO t_objtxt-line.
    *    APPEND t_objtxt.
    *    CLEAR t_objtxt.
        CONCATENATE I_DATA-MATNR
                    I_DATA-BERID
                    INTO t_objtxt-line
                    SEPARATED BY C_COMMA.
        APPEND t_objtxt.
        CLEAR t_objtxt.
        AT END OF MATNR.
          MOVE '' TO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
          MOVE '*****************************************' TO t_objtxt-line.
          CONCATENATE t_objtxt-line '******************' INTO t_objtxt-line.
          CONCATENATE t_objtxt-line '******************' INTO t_objtxt-line.
          APPEND t_objtxt.
          CLEAR t_objtxt.
        ENDAT.
      ENDLOOP.
    The above logic is not working correctly.
    Can anybody give me correct logic for the same.
    Thanks in advance.
    Thanks,
    Deep.

    Can you paste the total code.
    santhosh

  • Read info about files in specific folder into internal table

    Hi Experts
    I need to have last modified date and filename information read into an internal table. I need to read in the information of all files in a specific (UNIX) folder (I do not know the name of the single files).
    I really hope someone can help.
    Thanks a lot
    Kind regards,
    Torben

    Hi Guys
    Thanks a lot for you input.
    I managed to get my program to works as follows:
    REPORT  ZDELETE_ARCHIVING_FILES.
    *Step 1: Get the list of files in the directory into internal table :
    DATA: DLIST    LIKE EPSFILI OCCURS 0 WITH HEADER LINE,
          DPATH    LIKE EPSF-EPSDIRNAM,
          MDATE    LIKE SY-DATUM,
          MTIME    LIKE SY-UZEIT.
    DATA: BEGIN OF FATTR OCCURS 0,
              FILE_NAME  LIKE EPSF-EPSFILNAM,
              FILE_SIZE  LIKE EPSF-EPSFILSIZ,
              FILE_OWNER LIKE EPSF-EPSFILOWN,
              FILE_MODE  LIKE EPSF-EPSFILMOD,
              FILE_TYPE  LIKE EPSF-EPSFILTYP,
              FILE_MTIME(12),
          END OF FATTR.
    DATA: P_PATH(50) TYPE C.
    CONCATENATE '/ARCHIVE/' sy-sysid '/archive' INTO P_PATH.
    *        WRITE: / P_PATH.
    DPATH = P_PATH.
    *Get files in folder - read into internal table DLIST
    *if filenames are longer than 40 characters
    *then use FM SUBST_GET_FILE_LIST.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
         EXPORTING
              DIR_NAME               = DPATH
         TABLES
              DIR_LIST               = DLIST
         EXCEPTIONS
              INVALID_EPS_SUBDIR     = 1
              SAPGPARAM_FAILED       = 2
              BUILD_DIRECTORY_FAILED = 3
              NO_AUTHORIZATION       = 4
              READ_DIRECTORY_FAILED  = 5
              TOO_MANY_READ_ERRORS   = 6
              EMPTY_DIRECTORY_LIST   = 7
              OTHERS                 = 8.
    IF SY-SUBRC EQ 0.
    *Step 2: Read the file attributes into an internal table
    *Read info about the files (attributes) into the internal table FATTR
    *as we need info about the last time it was changed (MTIME)
      LOOP AT DLIST.
        CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
             EXPORTING
                  FILE_NAME              = DLIST-NAME
                  DIR_NAME               = DPATH
             IMPORTING
                  FILE_SIZE              = FATTR-FILE_SIZE
                  FILE_OWNER             = FATTR-FILE_OWNER
                  FILE_MODE              = FATTR-FILE_MODE
                  FILE_TYPE              = FATTR-FILE_TYPE
                  FILE_MTIME             = FATTR-FILE_MTIME
             EXCEPTIONS
                  READ_DIRECTORY_FAILED  = 1
                  READ_ATTRIBUTES_FAILED = 2
                  OTHERS                 = 3.
        IF SY-SUBRC EQ 0.
          FATTR-FILE_NAME = DLIST-NAME.
          APPEND FATTR.
        ENDIF.
      ENDLOOP.
      SORT FATTR BY FILE_NAME.
      DATA: time(10), date LIKE sy-datum.
      DATA: months TYPE i.
      DATA: e_file TYPE string.
      LOOP AT FATTR.
      CLEAR: time, months, e_file.
        IF FATTR-FILE_NAME(10) = 'archive_BW'.
    *Convert the unix time into readable time
          PERFORM p6_to_date_time_tz(rstr0400) USING FATTR-FILE_MTIME
                                                     time
                                                     date.
    *Calculate the number of months between date (MTIME) and current day
    *ex 31.03.2009 - 01.04.2009 = 1 month
    *ex 01.02.2009 - 01.04.2009 = 2 month
        CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
          EXPORTING
            i_datum_von = date
            i_datum_bis = sy-datum
          IMPORTING
            e_monate = months.
            CONCATENATE DPATH '/' FATTR-FILE_NAME INTO e_file.
    *        WRITE: / FATTR-FILE_NAME,
    *                 FATTR-FILE_SIZE,
    *                 date,
    *                 time,
    *                 sy-datum,
    *                 months,
    *                 e_file.
    *Step 3: Delete files where months > 1
          IF months > 1.
            OPEN dataset e_file for output in text mode encoding default.
            DELETE dataset e_file.
            CLOSE dataset e_file.
          ENDIF. "months > 1
        ENDIF.
      ENDLOOP.
    ENDIF.

  • Performance Issue When Read from Internal Table

    In my form, I have 6 windows which contain all the header information, which are kept in my gt_header internal table. Since all windows required data from the same internal table, reading the internal table at Initialization for once or, creating the LOOP at each window, which one will be a better choice in terms of performance?

    Hi,
    you cannot create 6 windows under loop.You can only have loop under a window only.
    So create a big window which covers whole area of 6 windows.Create templete under that and write only one loo with text in all those boxes of that templete.
    Regards,
    Rock.

  • Using internal tables in BI 7 Start routines

    Hi All
    I tried searching for using internal tables in a start routine in BI 7 could not find the right pointers.
    This is what I am trying to do is the following:
    In a DSO ZSD_O01  I have a sales order and sales order item number and this DSO also contains the Contract number and the contract Item number.
    The DSO structure is as follows:
    /BIC/AZSD_O0100
    DOC_NUMBER
    ITEM
    CONTRACT
    CITEMNUM
    I want to read the data in this DSO into a internal table. But the key fields in this DSO is DOC_NUMBER and ITEM so I want to read this data into a internal table only for the first data package into the internal table. Thereafter I want to lookup into the internal table given the doc_number and ITEM to find the CONTRACT and CITEMNUM.
    Can any of you kindly show me how to :
    - Read data from a DSO into a internal table
    - Read the internal table for the first data package
    - How do I make the access in the internal table fast when my lookup in the internal table is not on the
      DSO key columns but on a different key column
    Appreciate your help
    Thanks
    Karen

    Hi Karen ,
    It will be helpful if you tell your requirement  as the approach you suggested is not looks convincing .May be their is some easy way and we can suggest you better approach
    -how to check for source_package = 1
    You need to hard code it .
    We decide package size at DTP level so you can declare a global variable .let say you have 50000 size of your  package then use global variable as counter and read only when record_count is <= 50000 .
    -how to declare the internal table so the values in it exists between different data packages
    Declare a global table and select data into it .A global table retain data across  the packages .
    - The key on which I need to lookup in the internal table is not the key fields as in the DSO
    Its ok .Let say you are doing lookup on A B and C field of DSO1 and the values may duplicate  in your source .then you just need to read the internal table having data from DSO2  with key field  A B C .
    Better if you set them as semantic keys at DTP level so that all  duplicate entries of A B  C will appear in same package .
    global Declarations
    In your start routine you will have this following code :
      TYPES:
          tyt_SC_1        TYPE STANDARD TABLE OF tys_SC_1
                            WITH NON-UNIQUE DEFAULT KEY.
    $$ begin of global - insert your declaration only below this line  -
    ...   insert your code here
    $$ end of global - insert your declaration only before this line   -
    One question
    Why you want to populate values for 1 source package only not for all ?This will be helpful to understand your requirement and may be we can fulfill it in some other manner .
    Regards,
    Jaya Tiwari

Maybe you are looking for

  • Printing by Bonjour to HP Color LaserJet 3550n

    I have several Mac users who want to print to the networked CLJ3550n provided by their department. Although the CLJ3550n has a static IP number as do the Mac's, it seems to be accessible only by Bonjour. Once a Bonjour printer for it has been created

  • Problem in UPDATE with EXTRACTVALUE : ORA-00600

    Hi all, I have some trouble with this update query : UPDATE enveloppe_message    SET ems_date_modification = SYSDATE,        ems_login_modification = 'pipo',        ems_dn_emet = EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/Sender/DN', 'xmlns="urn

  • Mountain Lion mirroring - screen resolution problems

    I've just upgraded to Mountain Lion and am no longer able to set the screen resolutions on the iMac monitor and my Sony LCD 46" to mirror properly. Previously it worked very well by selecting the highest resolution for both the iMac and the TV - but

  • Can I Export My Mail Accounts?

    How can I export my Mail accounts so that I can easily Import them back into a new user account? (Complete with all of the proper email details like smtp stuff.) Thanks

  • Return proesss through sales order qty

    Hi all My client has requirement in return it could process through reference to sales order but but problem is system capture only sales order quantity not more than that sales order quantity how to configure this in sap thanks and regards rajesh