SELECT-OPTIONS can u use it to read internal table ?????

Hello All,
   I am trying to read an internal table with the select-options statement. I am getting a syntax error so i am hoping i am just coding it incorrectly. Can someone tell me what is wrong here is the if statement :
if p_begdte in t_rpt-datab and
       p_enddte in t_rpt-datbi.
    else.
       exit.
    endif.
thanks scott

This is not working?
tables: a916.
* Beg valid date *
data text021(29).
selection-screen begin of line.
selection-screen comment 1(30) text-021 for field p_begdte.
selection-screen position 32.
select-options: p_begdte for a916-datab default '20041101' to
'99991231'.
selection-screen end of line.
* End valid date *
data text022(29).
selection-screen begin of line.
selection-screen comment 1(30) text-022 for field p_enddte.
selection-screen position 32.
select-options: p_enddte for a916-datbi default '20041101' to
'99991231'.
selection-screen end of line.
start-of-selection.
<b>Loop at t_rpt.
if t_rpt-datab in p_begdte
  and t_rpt-datbi in p_endte.
* do something
else.
exit.
endif
Endloop.</b>
Regards,
Rich Heilman

Similar Messages

  • Incorrect logical expression: Comparison / SELECT-OPTION can only be follow

    Hi,
    I'm new to ABAP, please help me with the below code. When i check the code i get the message "E:Incorrect logical expression: Comparison / SELECT-OPTION can only be followed by "AND", "OR" or ")".
    data: pphd(7) type p decimals 2,
              ppha(7) type p decimals 2,
              abs_pphd(7) type p decimals 2.
        if pphd >= 0.
          if pphd < 1.
            ppha = 0.
          elseif 1 <= pphd <= 4.
            ppha = '0.16'.
          elseif 4.01 <= pphd <= 8.
            ppha = '0.32'.
          elseif 8.01 <= pphd <= 12.
            ppha = '0.50'.
          elseif 12.01 <= pphd <= 16.
            ppha = '0.66'.
          elseif 16.01 <= pphd <= 20.
            ppha = '0.83'.
          elseif 20.01 <= pphd <= 24.
            ppha = '1.00'.
          elseif 24.01 <= pphd <= 28.
            ppha = '1.16'.
          elseif 28.01 <= pphd <= 32.
            ppha = '1.32'.
          elseif pphd >= 32.
            ppha = '1.50'.
          endif.
        else.
          abs_pphd = abs( pphd ).
          if abs_pphd < 1.
            abs_ppha = 0.
          elseif 1 <= abs_pphd <= 4.
            ppha = '-0.16'.
          elseif 4.01 <= abs_pphd <= 8.
            ppha = '-0.32'.
          elseif 8.01 <= abs_pphd <= 12.
            ppha = '-0.50'.
          elseif 12.01 <= abs_pphd <= 16.
            ppha = '-0.66'.
          elseif 16.01 <= abs_pphd <= 20.
            ppha = '-0.83'.
          elseif 20.01 <= abs_pphd <= 24.
            ppha = '-1.00'.
          elseif 24.01 <= abs_pphd <= 28.
            ppha = '-1.16'.
          elseif 28.01 <= abs_pphd <= 32.
            ppha = '-1.32'.
          elseif abs_pphd >= 32.
            ppha = '-1.50'.
          endif.
        endif.
    Thanks,
    AM

    Hi Raj,
    Thanks a lot for the reply. i modified the code as you suggested but i get the error "E:Incorrect logical expression: Only "... BETWEEN  AND ..." is expected."  Below is the modified code.
    data: pphd(7) type p decimals 2,
          ppha(7) type p decimals 2,
          abs_pphd(7) type p decimals 2.
    if pphd >= 0.
      if pphd < 1.
        ppha = 0.
      elseif pphd between 1 and 4.
      ppha = '0.16'.
      elseif pphd between 4.01 and 8.
        ppha = '0.32'.
      elseif pphd between 8.01 and 12.
        ppha = '0.50'.
      elseif pphd between 12.01 and 16.
        ppha = '0.66'.
      elseif pphd between 16.01 and 20.
        ppha = '0.83'.
      elseif pphd between 20.01 and 24.
        ppha = '1.00'.
      elseif pphd between 24.01 and 28.
        ppha = '1.16'.
      elseif pphd between 28.01 and 32.
        ppha = '1.32'.
      elseif pphd >= 32.
        ppha = '1.50'.
      endif.
    else.
      abs_pphd = abs( pphd ).
    if abs_pphd < 1.
        ppha = 0.
      elseif abs_pphd between 1 and 4.
        ppha = '-0.16'.
      elseif abs_pphd between 4.01 and 8.
        ppha = '-0.32'.
      elseif abs_pphd between 8.01 and 12.
        ppha = '-0.50'.
      elseif abs_pphd between 12.01 and 16.
        ppha = '-0.66'.
      elseif abs_pphd between 16.01 and 20.
        ppha = '-0.83'.
      elseif abs_pphd between 20.01 and 24.
        ppha = '-1.00'.
      elseif abs_pphd between 24.01 and 28.
        ppha = '-1.16'.
      elseif abs_pphd between 28.01 and 32.
        ppha = '-1.32'.
      elseif abs_pphd >= 32.
        ppha = '-1.50'.
      endif.
    endif.

  • Checking against Select-Options with "CP" using "IF value IN select_option"

    Dear experts,
    first of all: I'm sorry, if this question already should have been asked and answered!
    I tried quite a lot of search terms but didn't find anything helpful.
    We are using a statement like "IF value IN select_option" to perform comparisons after the Select-Options have been used in a SELECT statement. This logical expression fails (compared to the results of the DB-SELECT) whenever a select-option line contains the option CP (Contains Pattern). To be more specific: The case sensitivity of the LOW value doesn't seem to play a role any more. A variable with the value 'ABCD' would be positively checked against a select-option with OPTION 'CP' and LOW 'abc*', whereas this value wouldn't have been selected if the select-option had been used in a DB-SELECT.
    Does anybody know a workaround?
    Thanks in advance
    Andreas

    Dear Keshav,
    it's an own field in an own table, defined as CHAR of length 140 (lowercase allowed), reflecting to a line of remittance info of an account statement. A regular Select-Option for this field is provided in a report which works perfectly fine regarding the case sensitivity. For reasons I don't want to point out in detail we need to check a value in this field against the select-option without selecting it from the db again.
    Let's assume that a field remittance_info contains the value 'ABCD'.
    A line of the select-option table looks like this:
    select_option_table-SIGN = 'I'
    select_option_table-OPTION = 'CP'
    select_option_table-LOW = 'abc*'.
    Then an ABAP statement such as
    IF remittance_info IN select_option_table.
    * would be true !!!
    ENDIF.
    but wouldn't deliver a result in a SELECT such as
    SELECT * FROM my_table INTO TABLE my_internal_table WHERE remittance_info IN select_option_table.
    because of the differences in lower/upper case.
    regards
    Andreas

  • Can I use APEX directly read/sync with the Oracle Tables ?

    We have a Oracle Database to manage the design data.I am trying to setup a web-based front end using APEX to manage & monitor the parts ordering & logisitics.I want to drive the master data directly from the database without any export or data transfer ? Can I directly read or Link an Oracle tables from APEX application.
    Also,once this is setup,I am looking for setting up some data entry fields to enter Purchasing & Logistics information.Hope I can achieve this using APEX !
    Look forward for the appropriate response.
    Thanks,
    Sham

    Tony,
    Thanks & Appreciate your Quick response.
    Glad that I can use the existing Oracle db schema with APEX.I am not sure if there is any information as how I can connect or link my production schema to the APEX ! I was able to import .csv files & use XL data to create some test databases & play with APEX..but,I did try to go thru most of the instructions & guides to find how to use the production oracle tables,but,could not find anything particular...Please send me a link or material info.
    I suppose I can then use which ever attribute or table data that is required to build the queries ! I am planning to use the production data to build the ordering & logistics application using APEX.Assume I can create new fields & columns for parts that will be ordered & capture/record the purchasing information like Purchase order numbers/Supplier Info/Target Delivery dates etc...
    - Am on very tight schedules to get this application up & running ! Is there any support team or a technical support team that I can call upon if I need any help ?
    Thanks,
    Sham

  • I can not use the adobe reader version 10 with mozilla 4.01 - what to do

    i can not use the adobe reader version 10 with mozilla 4.01 - what to do

    Here, I finally have a solution.
    Gotta love Google.
    More helpful than Adobe so far.
    Note: Clicking on the link below will immediately open the download dialogue box.
    ftp://ftp.adobe.com/pub/adobe/reader/win/10.x/10.1.1/en_US/AdbeRdr1011_en_US.exe
    I used this download to install, and the Installer was flawless.
    Thanks everyone who contributed ideas and potential solutions.

  • Ho to read intern table in update rule?

    Hello experts,
    I have the following start routine:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BIC/AZD_ODS_C00.
    DATA: ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AZD_ODS_C00
          WITH HEADER LINE
          WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    DATA: gv_flag type c.
    $$ end of global - insert your declaration only before this line   -
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    SELECT * FROM  /BIC/AZD_ODS_C00 INTO TABLE ITEM_TABLE.
    SORT ITEM_TABLE BY /BIC/ZABOOKID ASCENDING.  
           LOOP AT ITEM_TABLE.
            AT NEW /BIC/ZABOOKID.
            GV_FLAG = 'X'.
            ENDAT.
           ENDLOOP.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    How can I read intern table ITEM_TABLE in a update rule?
    And will gv_flag be still available in update rule?
    thanx
    hiza
    Message was edited by:
            Hiza
    Message was edited by:
            Hiza

    Hi,
    I am just giving you a sample code which I had used
    just try to read this will help you
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CSZRINF001.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    break-point.loop at DATA_PACKAGE.if DATA_PACKAGE-/BIC/ZREMPID GE 5.delete DATA_PACKAGE.endif.endloop.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    Regards
    Rahul

  • Reading internal tables

    Hi all
    i am using internal table itab1,
    i want to add the similar contents of itab1 from itab2 into itab3
    how to do it?
    thanks
    raghvendra bhanap

    Hi,
    This is a documentation regarding reading internal tables.
    Hope this will be useful...
    When the size of the record or the number of records in the internal table is large, doing a linear search is time consuming. It is always a good practice to search a record by binary search (Always Sort the table before doing a binary search). The difference is felt especially in the production environment where the live data is usually huge. As of release 4.0 there are new types of internal tables like SORTED and HASHED which can be effectively used to further reduce the search time and processing time.
    e.g.     Do not use the following statement:-
    Select matnr from mara
    Into table i_mara
    Where matnr in s_matnr.
         Select matnr werks from marc
              Into table i_marc
              For all entries in i_mara
              Where matnr eq i_mara-matnr.
         Loop at I_mara.
              Read table i_marc with key matnr = I_mara-matnr.
         Endloop.
    Instead use the following statement:-
         Select matnr from mara
              Into table i_mara
              Where matnr in s_matnr.
                                       Select matnr werks from marc
                                            Into table i_marc
                                            For all entries in i_mara
                                           Where matnr eq i_mara-matnr.
                                       Sort I_marc by matnr.
                                       Loop at I_mara.
                                            Read table i_marc with key
    matnr = I_mara-matnr
    binary search.
                                       Endloop.
    It is a good practice to search records from internal tables using a binary search. But extreme caution needs to be applied as it may either increase the time or may cause run time termination if it is not sorted.
    Always the sort the internal table by the required keys before performing a binary search.                                                                               
    e.g.     Do not use the following statement:-
    Select matnr from mara
    Into table i_mara
    Where matnr in s_matnr.
         Select matnr werks from marc
              Into table i_marc
              For all entries in i_mara
              Where matnr eq i_mara-matnr.
         Loop at I_mara.
              Read table i_marc with key matnr = I_mara-matnr binary search.
         Endloop.
    Instead use the following statement:-
         Select matnr from mara
              Into table i_mara
              Where matnr in s_matnr.
                                       Select matnr werks from marc
                                            Into table i_marc
                                            For all entries in i_mara
                                           Where matnr eq i_mara-matnr.
                                       Sort I_marc by matnr.
                                       Loop at I_mara.
                                            Read table i_marc with key
    matnr = I_mara-matnr
    binary search.
                                       Endloop.
    It is a general practice to use           Read table <itab>…     This statement populates all the values of the structure in the workarea.
    The effect is many fold:-
    •     It increases the time to retrieve data from internal table
    •     There is large amount of unused data in work area
    •     It increases the processing time from work area later
    It is always a good practice to retrieve only the required fields. Always use the syntax      Read table <itab> transporting f1 f2  …  FN …          If just a check is being performed for existence of a record use      Read table <itab> transporting no fields …
    e.g.     Do not use the following statement:-
    data: i_vbak like vbak occurs 0 with header line.
    data: i_vbap like vbap occurs 0 with header line.
    Loop at i_vbak.
         read table i_vbap with key
    vbeln = i_vbak-vbeln binary search.
         If sy-subrc = 0 and i_vbap-posnr = ‘00010’.
         endif.
    Endloop.
    Instead use the following statement:-
    data: i_vbak like vbak occurs 0 with header line.
    data: i_vbap like vbap occurs 0 with header line.
    Loop at i_vbak.
                                  read table i_vbap transporting posnr with key
    vbeln = i_vbak-vbeln binary search.
                                  If sy-subrc = 0 and i_vbap-posnr = ‘00010’.
                                  endif.
    Endloop.
    There are many ways in which a select statement can be optimized. Effective use of primary and secondary indexes is one of them. Very little attention is paid especially to the secondary indexes. The following points should be noted before writing a select statement:-
    •     Always use the fields in the where clause in the same order as the keys in the database table
    •     Define the secondary indexes in the database for the fields which are most frequently used in the programs
    •     Always try to use the best possible secondary index in the where clause if it exists
    •     Do not have many secondary indexes defined for a table
    •     Use as many keys both primary and secondary as possible to optimize data retrieval
    As of release 4.5 it is now possible to define the secondary index in the where clause using %_HINT.
    e.g.     Do not use the following statement:-
         Assuming a secondary index is defined on the field vkorg in table vbak
         Select vbeln vkorg from vbak
              Into table i_vbak
              Where vbeln in s_vbeln.
         Loop at i_vbak.
              Case i_vbak-vkorg.
              When ‘IJI1’.
              When ‘IJI2’.
              Endcase.
         Endloop.
    Instead use the following statement:-
                                       Select vbeln vkorg from vbak
                                            Into table i_vbak
                                            Where vbeln in s_vbeln and
                                                 Vkorg in (‘IJI1’,’IJI2’).
                                       Loop at i_vbak.
                                            Case i_vbak-vkorg.
                                            When ‘IJI1’.
                                            When ‘IJI2’.
                                            Endcase.
                                       Endloop.

  • How to use aggregate function on internal table

    hi experts,
    I am beginner in abap.I want to use sum function on internal table.
    I have structure as follow:
    types: begin of ty_ftab,
           docno TYPE bkpf-belnr,
           comcode TYPE bkpf-bukrs,
           year TYPE bkpf-gjahr,
           line_itm type bsad-buzei,
           cust type bsad-kunnr,
           amt type bsad-dmbtr,
    end of ty_ftab.
    data: it_ftab type table of ty_ftab,
               wa_ftab type ty_ftab.
    i fetched data successfully into it_ftab from bkpf and bsad table and displyed into alv.
    now i want sum of amt using group by cust and want to display like
    cust        total_amt      
    in next screen...
    displying part is not important but how can i do sum of amt according to cust value? Is there in way to query on internal table?

    Hi,
    try this code,
    data : i_sort  TYPE TABLE OF slis_sortinfo_alv
      w_sort like LINE OF i_sort.
    sort it_ftab by cust.
    w_sort-subtot = 'X'.
    w_sort-fieldname = 'AMT'.
    w_sort-tabname = 'it_ftab'.
    APPEND w_sort to i_sort.
    In fieldcatalog :
    w_fcat-fieldname = 'AMT'.
    w_fcat-tabname  = 'it_ftab'.
    w_fcat-do_sum = 'X'.
    In REUSE_ALV_GRID_DISPLAY  FUNCTION MODULE  provide the it_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    *  EXPORTING
    *    I_INTERFACE_CHECK                = ' '
    *    I_BYPASSING_BUFFER                = ' '
    *    I_BUFFER_ACTIVE                  = ' '
    *    I_CALLBACK_PROGRAM                = ' '
    *    I_CALLBACK_PF_STATUS_SET          = ' '
    *    I_CALLBACK_USER_COMMAND          = ' '
    *    I_CALLBACK_TOP_OF_PAGE            = ' '
    *    I_CALLBACK_HTML_TOP_OF_PAGE      = ' '
    *    I_CALLBACK_HTML_END_OF_LIST      = ' '
    *    I_STRUCTURE_NAME                  =
    *    I_BACKGROUND_ID                  = ' '
    *    I_GRID_TITLE                      =
    *    I_GRID_SETTINGS                  =
    *    IS_LAYOUT                        =
    *    IT_FIELDCAT                      =
    *    IT_EXCLUDING                      =
    *    IT_SPECIAL_GROUPS                =
        IT_SORT                          =  i_sort
    *    IT_FILTER                        =
    *    IS_SEL_HIDE                      =
    *    I_DEFAULT                        = 'X'
    *    I_SAVE                            = ' '
    *    IS_VARIANT                        =
    *    IT_EVENTS                        =
    *    IT_EVENT_EXIT                    =
    *    IS_PRINT                          =
    *    IS_REPREP_ID                      =
    *    I_SCREEN_START_COLUMN            = 0
    *    I_SCREEN_START_LINE              = 0
    *    I_SCREEN_END_COLUMN              = 0
    *    I_SCREEN_END_LINE                = 0
    *    I_HTML_HEIGHT_TOP                = 0
    *    I_HTML_HEIGHT_END                = 0
    *    IT_ALV_GRAPHICS                  =
    *    IT_HYPERLINK                      =
    *    IT_ADD_FIELDCAT                  =
    *    IT_EXCEPT_QINFO                  =
    *    IR_SALV_FULLSCREEN_ADAPTER        =
    *  IMPORTING
    *    E_EXIT_CAUSED_BY_CALLER          =
    *    ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          =
    *  EXCEPTIONS
    *    PROGRAM_ERROR                    = 1
    *    OTHERS                            = 2
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.

  • Read internal table with key not equal to

    Hi,
    How can I read internal table with key not equal to some other field.
    Basically in read statement we can read only fields equal to others fields.

    Hi,
    Test the following Code you can Use Loop at for this But not Read Table
    DATA: BEGIN OF it_test OCCURS 10,
      f1(4),
      f2 TYPE i,
      f3(2),
      END OF it_test.
    DATA: it_test2 LIKE STANDARD TABLE OF it_test WITH HEADER LINE.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'B'.
    APPEND it_test TO it_test.
    it_test-f1 = '2000'.
    it_test-f2 = 10.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'B'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 10.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    it_test-f1 = '1000'.
    it_test-f2 = 40.
    it_test-f3 = 'A'.
    APPEND it_test TO it_test.
    LOOP AT it_test INTO it_test WHERE f3 NE 'A'.
      WRITE: / it_test-f1, it_test-f2, it_test-f3.
    ENDLOOP.
    Kind Regards,
    Faisal

  • Read internal table from report.

    Hi all.
    I want to know is it possible to read internal table from report without modifying the report. is there any function module by which we can run the report and read data from internal table?
    Thanks.

    hi
    hope it will help you.
    <REMOVED BY MODERATOR>
    Read table doesn't allow ne operator.
    It reads only one record...Either by index or key.
    READ TABLE MY_TAB INDEX 1.
    READ TABLE MY_TAB WITH KEY CODE = 'ATG'.
    these are the results for SY-SUBRC checks after read table
    SY-SUBRC = 0:
    An entry was read.
    SY-TABIX is set to the index of the entry.
    SY-SUBRC = 2:
    An entry was read.
    SY-TABIX is set to the index of the entry. This return code can only occur when you use the COMPARING addition. For further detauls, refer to the COMPARING section of the additions
    SY-SUBRC = 4:
    No entry was read.
    The value of SY-TABIX depends on the table type and whether the BINARY SEARCH addition was specified.
    If the table is a SORTED TABLE or a table sorted in ascending order of the type STANDARD TABLE with the BINARY SEARCH addition, SY-TABIX refers to the next-highest index.
    Otherwise, SY-TABIX is undefined.
    SY-SUBRC = 8:
    No entry was read.
    This return code only occurs with a SORTED TABLE or a STANDARD TABLE with the BINARY SEARCH addition. SY-TABIX is set to the number of all entries plus 1.
    Reading records with keys
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
    Reading lines with Index
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3730358411d1829f0000e829fbfe/content.htm
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:43 PM

  • How can i pass calculated value to internal table

    Hi
    i have to pass calculated value into internal table
    below field are coming from database view and i' m passing view data into iznew1
    fields of iznew1
                 LIFNR  LIKE EKKO-LIFNR,
                 EBELN  LIKE EKKO-EBELN,
                 VGABE  LIKE EKBE-VGABE,
                 EBELP  LIKE EKBE-EBELP,
                 BELNR  LIKE EKBE-BELNR,
                 MATNR  LIKE EKPO-MATNR,
                 TXZ01  LIKE EKPO-TXZ01,
            PS_PSP_PNR  LIKE EKKN-PS_PSP_PNR,
                 KOSTL  LIKE EKKN-KOSTL,
                 NAME1  LIKE LFA1-NAME1,
                 NAME2  LIKE LFA1-NAME2,
                 WERKS  LIKE EKPO-WERKS,
                 NETWR  LIKE EKPO-NETWR,
                 KNUMV  LIKE EKKO-KNUMV,
                 GJAHR  LIKE EKBE-GJAHR,
    and now i want to pass
    one field ED1  which i has calculated separatly and i want to pass this value into iznew1
    but error is coming that iznew1 is a table with out header line  has no component like ED1.
    so how can i pass calculated value to internal table iznew1,

    When you declare your internal table , make an addtion occurs 0
    eg . data : begin of iznew occurs 0 ,
                    fields ...
       add the field here ed1.
               end of iznew.
    now when you are calculating the value of ed1,
    you can pass the corresponding value of  ed1 and modify table iznew.
    eg
    loop at iznew.
    iznew-ed1 = ed1.
    modify iznew.
    endloop.

  • How To select maximum Value in a specifieid field in internal table.

    How To select maximum Value in a specifieid field in internal table?

    Step : 1
    Sort itab by <Field1> descending.
    Just sort the internal table by the field.
    STEP: 2
    Then read the table at index 1.
    Read table itab index 1.               
    ITAB-FIELD = MAX .                  " Max field will come in the first row of the internal table.
    Regards,
    Gurpreet

  • Populate SELECT-OPTIONS default value using CALL FUNCTION

    Hi Experts,
    I would like to populate SELECT-OPTIONS s_currm default with value in w_currm, however, it doesn't seem to work.  Can you please advise what the correct syntax is.
    Note that CALL FUNCTION 'GET_CURRENT_YEAR' is working correctly and populating w_currm (as I can use it in a SQL SELECT statement), however, it does not seem to work for SELECT-OPTIONS s_currm.
    Thank you for your time.
    Code snippet is as a follows:
    REPORT  Z_DOWNLOAD_BSIS_TEST.
    *Data Declaration
    DATA: w_currm TYPE BSIS-MONAT.
    *Define current fiscal month
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = 'X999'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm.   " Current Fiscal Month
    SELECT-OPTIONS s_currm FOR w_currm
                   DEFAULT w_currm. " The default value is NOT being populated (appears blank)

    Hi Venkat.O,
    Thank you for your clear response.  I have implemented your suggestion and it works, however, I now have a new problem. 
    Each time the report is executed or the "multiple selection" button is clicked the selection fields are populated once again with the default (low) values.
    For example, when report is first opened the s_curry field displays '2010'.  Clicking "multiple selection" results in another '2010' being populated.  After executing the report the selection screen is populated again with '2010' (so we now have '2010' listed 3 times in the s_curry field).
    How do I prevent the default values from repeating?
    REPORT  Z_DOWNLOAD_BSIS_TEST
    *Data Declaration
    DATA:  w_currm TYPE BSIS-MONAT,
           w_curry TYPE BSIS-GJAHR,
           w_prevm TYPE BSIS-MONAT,
           w_prevy TYPE BSIS-GJAHR.
    SELECTION-SCREEN BEGIN OF BLOCK b11 WITH FRAME TITLE text-001 .
    *Parameters to enter the path
    PARAMETERS: FILENAME(128) OBLIGATORY DEFAULT '/usr/sap/tmp/TEST.txt'
                             LOWER CASE.
    SELECT-OPTIONS: s_curry FOR w_curry,
                    s_currm FOR w_currm.
    SELECTION-SCREEN END OF BLOCK b11.
    AT SELECTION-SCREEN OUTPUT.
    *Define current/previous financial periods
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = 'X999'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
        s_curry-low = w_curry.
        s_curry-option = 'EQ'.
        s_curry-sign = 'I'.
        APPEND s_curry.
        CLEAR  s_curry.
        s_currm-low = w_currm.
        s_currm-option = 'EQ'.
        s_currm-sign = 'I'.
        APPEND s_currm.
        CLEAR  s_currm.

  • How can I use the Adobe reader if the PDF documents are in iBooks?

    The Adobe reader asks me to look for an "Open in" button but iBooks does not appear to have one. I like IBooks because it synchronises nicely with the computer, and I can read the PDFs but I cannot highlight, add comments or add bookmarks unless I use the Adobe reader.

    Use iTunes to save the PDF FROM iBooks, and to add them to Adobe Reader.
    Connect your iPad to your computer. Bring up iTunes on your computer.
    To save a PDF FROM iBooks, click on "Books" in the Library section on the left. Select the PDF you want to save and right-click and choose Show in Finder (Show in Explorer in Windows). Go up one level in your computer hierarchy and you'll see all the "Books" (PDFs and eBooks) in iBooks.  You can leave them here if you want to view the PDFs in iBooks in the future, or drag them to the Desktop.
    To move the PDF TO Adobe Reader:
    Return to iTunes. Click on the iPad on the left in Devices. Click on the Apps tab. Scroll down the the File Sharing section as shown below. Click on Adobe Reader. Click the Add button and select the PDFs you identified in the previous step. They'll be added to Adobe Reader

  • How do I create a PDF form for submission that can be used by Acrobat Reader only users?

    I am attempting to create a PDF document in Acrobat Pro with fields that can be submitted (via email) by users using only Acrobat Reader.
    I have tried changing the properties of the 'Submit' button, although I am not sure what I am doing wrong.
    Can anyone please help?
    C.

    I created a form using Adobe LiveCycle and added the submit via e-mail button. One change which I made was in the XML script I changed submission type to pdf, so that thepdf form itself would be e-mailed. This works fine if I use Adobe Pro 8, but when I tried the same using only Adobe Reader 7.0, it would not let me e-mail the form along with a message "This operation is not permitted".
    Any comments?
    Thanks

Maybe you are looking for