Validating 'Initial Values' checkbox in the table

hi all
i have a requirement
i need to put a condition based on the 'Initial values' checkbox of the table.
eg: let us say I have a table KNA1
and i have fields KUNNR, LAND1 and NAME1 in my table
if 'Initial values' checkbox for KUNNR is checked i need to put my condition
and if 'Initial values' checkbox for LAND1 is checked i need to put another condition
and if 'Initial values' checkbox of NAME1 field is checked i need to put some other condition.
in the similar way as per my requirement i need to put conditions for almost all the fields available in the table.
can any one tell me how to write the above logic.

Hi vamsi,
1. one way is
2. First take all records with all field values, in one ITAB.
3. Then.
4.
data : tabix like sy-tabix.
data : delflag type c.
   LOOP AT ITAB.
  <b> tabix = sy-tabix.
   clear delflag.</b>
   if not condit1.
  delflag = 'X'.
  endif.
if not condit2.
  delflag = 'X'.
  endif.
..... other if conditions.
<b>   if delflag = 'X'.
   delete itab index tabix.
  endif.</b>
  ENDLOOP.
4
regards,
amit m.

Similar Messages

  • What is the purpose of the Initial Value checkbox in SE11?

    Hi,
    When we create database tables using SE11, there is a Initial Value checkbox for the fields that we create. How do we make use of this checkbox?
    For example, after checking the Initial Value checkbox, how do I go about entering the intial value? There isn't a input field for me to do it. Thanks.

    "Initial values" Flag  ---> Indicator that NOT NULL is forced for this field
    Select the flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    Hope this helps.
    Thanks,
    Balaji

  • Dashboard Prompt using values not from the table

    Hi,
    I have a requirement from the client to design a dashboard report like the following.
    Dashboard prompt will have 4 filters, three filters come from the table, but the fourth filter will have 3 values not from the table. The fourth filter will have values like "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales". I have three different Table reports designed for each of the fourth filter choices. But how do I implement it, both in the dashboard prompt as well as navigating to the rite report based on the selection.
    Is my approach correct.
    Thanks for your time and help.

    The fourth prompt where you have "Report with Sales Amount", "Report with Purchase Amount", "Report with both Purchase and Sales" you pull a dummy column into the prompt and write a sql in show.
    would be something like
    SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Sales Amount' end FROM Sales UNION SELECT Case when 1=0 then "Dimension- Customer"."Cust Name" else 'Report with Purchase Amount' end FROM Sales
    and in the prompt set a presentation variable say var_criteria
    Now create report2 for with a some randomn column and another column will have the values that you want to display for example 'Report with Sales Amount'
    Create a filter on the 2nd column and reference the presentation variable var_criteria and default it to 'Report with Sales Amount'
    On the dashboard page in the section place the report and enable guided navigatoin by selecting report 2.
    Please let me know if you have any questions.
    thanks,
    deep

  • How to retrieve data from domain(Value Range)  of the table

    hi
    how to retrieve data from domain(Value Range)  of the table
    thanks

    Hello,
    You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 24, 2009 10:08 AM

  • What is the use of initial value in a database table?

    Hi can anyone help me in knowing what is the use of initial value which is present besides primary key while creating a table?

    Initial Value:
    Indicator that NOT NULL is forced for this field
    Use
    Select this flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    hope it helps,
    Saipriya

  • Load  and save multi value checkbox value  dynamically to the table

    How to retrieve data for multi value checkbox ?

    See this example for handling of any multiselection item in APEX:
    https://apex.oracle.com/pls/apex/f?p=31517:84
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Adding the values fed in the table

    Hi
    i want to add the values of one column in the table that are given by the user. I  set the "calculated" property of the corresponding context element in the controller as true and then writing the code for it. But when i run my application, then even if i give valid data in the corresponding column, it still shows the message errors i have set for the validations and clears the field.
    is there any way in which this can be calculated without setting the "calculated" property as true?
    If yes, then how to access the values of the column?
    Thanks & regards,
    Anupreet

    Hi,
    Without using the Calculated property you can proceed the following way suppose you have a Node A with attribute a,b,c.
    then you can get each of these values using
    wdContext.current<name of node>element().get<attribute>();
    The above code gives the value for currently selected row.
    Similarly you can get all attributes and perform the required operations.
    To get  values for particular row you can use
    wdContext.node<name of node>().get<name of node>ElementAt(i).get<attribute name>();
    Here i is the index of the particular row.
    Hope this helps.
    Revert back for further clarification.
    Regards,
    Leena

  • Use of initial values check box in tables

    Hi,
    what is of use of initial values check box(after the primary key check box)  in tables.
    Regards,
    Suresh

    The flag indicates whether field inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field. I.e. type n(2) is '00'.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.

  • Set initial value in a DD table

    Hi,
    I want set initial/default  value in a column when create a table by Tcode se11.
    please help me.
    thanks.

    Hi,
    You can do this using the Events in table maintenance generator,
    When you save an entry in table using SM30 or any other transaction, the default values get saved in the table along with the other entries...for instance you can disable the fields for input on SM30 for the fields where you want to default values...so that user cant enter values in table entries creation.
    To access events: SE11->Table maintenance generator->
    On the table maintenance screen->Menu->Details->Modifications->Events.
    Events: 01- Before save(Do F4 help for more events available)
    Routine: <give form name where you add code to default value on screen field>
    For more information on events you can search SDN
    Hope this helps you
    Regards
    Shiva

  • Initializing values in an internal table

    hi
    how to initialize values in a internal table
    according to my requirement i need to initialize (both character and currency) values present in the internal table based on certain conditions
    vamsi

    hi
    As i understood you want to clear only selected fileds not the complet record..
    create a Field symobl the loop at the table.. inside the loop check the condtion the just clear the filed.
    example: you have itab type mara.
    then
    FIELD-SYMOBOLS <FS_WA_ITAB> TYPE MARA.
    LOOP AT ITAB ASSIGNING <FS_WA_ITAB>.
    IF X = XXX (YOUR CONDITION)
    CLEAR: <FS_WA_ITAB>-FIELD2,
                 <FS_WA_ITAB>-FIELD3. (If u want to clear only filed2 and field3)
    clear <FS_WA_ITAB>. (if you want to cleatr the complete record)
    ENDIF.
    ENDLOOP.
    Why iam suggestin the filed-symobol is.. it is direcltly work on internal table body so u no need to update the table agian
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Checkbox in the table

    Hi
    I created table....under that
    travelrefno,ticketno,.....,  ,.......,..........,......,.........Select......>>>>>.Under "select" checkbox has to displayed in the table. For that i written code like this.But its showing error.Please anyone help me to sort out this.Where i need to change the code..
    for (int i = 0; i < EMP.length; i++)
                      IPrivateEtrecTravelView.ITravelAgents2Element element = wdContext. createTravelAgents2Element();
                    element.setTravelRefNo(EMP<i>[0]);
                    element.setTicketNo(EMP<i>[1]);
                          element.setNameofPassenger(EMP<i>[2]);
                      element.setFlight(EMP<i>[3]);
                      element.setTicketDate(EMP<i>[4]);
                   element.setClass(EMP<i>[5]);
      element.setTotalAmount(EMP<i>[6]);
                   element.setCancelCharges(EMP<i>[7]);
                   element.setExpenseStatus(EMP<i>[8]);
                   element.setTicketStatus(EMP<i>[9]);
                   element.setSelect(new Boolean(EMP<i>[10]));
                   wdContext.nodeTravelAgents2().addElement(element);
    In the context i given select of type "Boolean"""''

    Hi,
    you change the code in for loop condition.
    u put *i<=EMP.length*;
    for (int i = 0; i <= EMP.length; i++)
    IPrivateEtrecTravelView.ITravelAgents2Element element = wdContext. createTravelAgents2Element();
    element.setTravelRefNo(EMP[0]);
    element.setTicketNo(EMP[1]);
    element.setNameofPassenger(EMP[2]);
    element.setFlight(EMP[3]);
    element.setTicketDate(EMP[4]);
    element.setClass(EMP[5]);
    element.setTotalAmount(EMP[6]);
    element.setCancelCharges(EMP[7]);
    element.setExpenseStatus(EMP[8]);
    element.setTicketStatus(EMP[9]);
    element.setSelect(new Boolean(EMP10));
    wdContext.nodeTravelAgents2().addElement(element);
    In the context i given select of type "Boolean"""''
    Regards,
    Sunaina Reddy T

  • How can we delete value fields from the Table T237A?

    Dear All,
    We need to delete some value fields in CO-PA. We got a message that these value fileds are being used in the Table T237A.
    This table is related to key figure scheme.
    We have deleted in t.c. sm31 in the table/view  V_RS_T237A elements which were assigned to value fields to be deleted.
    But we still have a message value fields are being used. And after some searches we found out they are still being used in the table T237A.
    COuld you please, help us?
    Thank you in advance!
    Best regards,
    Kamila.

    Change the Table Control attributes such that user can only select a single record(row).
    <u>Tip to delete a selected record</u>
    1) write a module 'Mark' in the PAI as below
    PROCESS AFTER INPUT.
    MODULE cancel AT EXIT-COMMAND.
    LOOP WITH CONTROL table_view.
    MODULE read_table_control.
    FIELD flag MODULE mark ON INPUT.
    ENDLOOP.
    MODULE user_command_0100.
    2) Module Mark is below.
    MODULE mark INPUT.
    CHECK flag = 'X'.
    x = table_view-top_line + sy-stepl - 1.
    Delete itab INDEX x.
    ENDMODULE. " mark INPUT
    Table_view is the TableControl Name.
    'flag' is of type char(1) available in the Internal table which was assigned to the select option in the table control.
    <u>award if uesful</u>
    Regards,
    Sudheer

  • To find particular value in all the tables in the db

    Hi All
    I need to find out all the tables, corresponding column name by querying a particular string that appears in any of the columns in the any of the tables in the db.
    Please help me of this.
    Thanks

    Oh dear you want to look for a particular data in all the tables in the database and say this data is available in these tables in these columns. Oh boy thats going to cost you a lot. why do you want to do that. can you share with us why you want to do that.
    Thanks,
    Karthick.

  • I need more than 255 charater value return from the table control screen.

    Hi guys,
    I used this function module to get the dynamic table control value changes, but it export me back only 255 character value.
    because the 'DYNPFIELDS' internal table structure hold only 255 character. kindly help me in this reg to get more than 255 character length.
    or any other solution.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME     = '/A1SSPC/USR_RALG_FILL'
          DYNUMB     = '1000'
        TABLES
          DYNPFIELDS = TBDYNPFIELDS.
    kindly provide me if you have any solution.
    reg,
    hari

    Hi,
    Try using the Text Editor for more info go throught the Control Examples
    Utilities--> Examples -->  Control Examples in SE38
    Regards
    Ramchander Rao.K

  • Without using Tcode SE11, How can we enter the values in to the table???

    Hi,
        Friends give me answer to this.

    hi RAVICHAND,
    you can maintain table through a view via transaction code <b>SM30</b> or <b>SM31</b>.
    or you can insert data into dbtable via a program using statement....
    <b>INSERT <database table name>. </b>
    <b>Reward points if answer was helpful,</b>
    regards,
    Tejas

Maybe you are looking for