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

Similar Messages

  • Query to set initial values

    Hi all,
    Is it possible to use queries to set initial values or change existing values?  For example, we are adding in a new sales employee that will be our sales rep for customers in a certain area.  Would it be possible to run a query that would set the Sales Employee field in the BP Master Data as this new sales rep if the customer is in that area?  If yes, what is the general process for using queries to set values in this manner (we have other things we would like to use this for as well, if its possible)?
    Thanks for the help

    Hi Todd,
    The best way to tackle this is probably to use a query to extract the business partners you wish to update and then use the Data Transfer Workbench to update the Business Partners in question.
    You could also add a Formatted Search to the Business Partner screen so all new Business Partners default to the correct Sales Person based upon territory/address or whatever criteria you like.
    Cheers,
    Sean

  • 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.

  • 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

  • Problem setting initial value for LOV

    Hello, everyone. This seems like it should be simple, but it's giving me lots of problems. I am trying to create my first LOV. I have a messageLovInput item called PFedFilingStatus. From the Property Inspector, I can set an Initial Value of "02", which displays when I run the page, and lets me change it and validate it using the associated LOV.
    What I would rather do is set the initial value programmatically, but here are my problems:
    If I set the value like this:
    OAMessageLovInputBean lovText = (OAMessageLovInputBean)pageLayout.findIndexedChildRecursive("PFedFilingStatus");
    lovText.setText("02");
    then the field displays properly at run time, but can't be changed. The LOV runs, but any value I select flips back to "02"
    If I set the value like this:
    lovText.setDefaultValue("02");
    then nothing seems to happen at run time. The value is not displayed at all.
    Can anyone tell me what I am doing wrong? Thanks for your help.
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Yes, that helps a bunch. Now can you tell me where that is set?
    Thanks so much.
    --Dave                                                                                                                                                                                       

  • Setting initial values on structures

    I have written a middle-ware wrapper which allows me to call a SAP RFC from SQL Server stored procedures.  I am upgrading it from the DCOM to the .Net connector so I can run it on Windows 2003 Server.
    When I set a string value (SAP C type) to initial I get the error "Object reference not set to an instance of an object." raised in the proxy object.  This error does not happen for non-initial values, and also does not happen on my development workstation.  It happens if I set the string to "" or to " ". It occurs on two servers - Windows 2000 and Windows 2003.
    I can't figure out how to debug this, and can't find anything in this forum or on SAP Notes.  Has anyone else found this error?

    A clear head in the morning makes all the difference. There was no problem with the .Net Connector.
    The problem lay with SQL Server's sp_OAMethod procedure, or possibly in the .Net component's CCW.  If you pass an empty string in as an argument, your component gets a Nothing.  I therefore fixed it in the component with:
       If Value Is Nothing Then Value = ""
    Thanks,
    Derek

  • How to set initial column widths for a table

    What I'd like to do is to control the initial column widths for a table.
    I'm building the table by using a class which extends AbstractTableModel. This class takes care of setting the headers and reading the data for the table.
    If I do the following:
    VarTableModel vtm = new VarTableModel(vi);
    JTable jt = new JTable(vtm);
    JScrollPane jsp = new JScrollPane(jt);
    frame.getContentPane().add(jsp);
    frame.setVisible(true);
    I will see a table in my window. The widths of the columns are equal and are a function of the horizontal dimension of the window.
    I have tried to set the width of a column by doing the following:
    TableColumn aColumn;
    aColumn = jt.getColumn(vtm.getColumnName(0));
    aColumn.setWidth(40);
    But this has no effect on what gets displayed. I can force the widths that I want by using 'setMaxWidth' but this has the unfortunate side effect of not allowing the user to make the column wider if they want.
    What I'd like is a way to specify the widths of the columns when initially displayed and then let the user adjust to their liking.
    I'm sure that there is a way to do this, but I don't seem to understand where to intervene in the process to produce the effect that I want.
    Any help or suggestions will be greatly appreciated!

    Table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    add this line and try ur codeThanks for the suggestion! Unfortunately, it doesn't seem to do the trick. Here is an abbreviated segment of my code:
    vtm = new VarTableModel(vi);
    JTable jt = new JTable(vtm);
    // we want a horizontal scrollbar, so turn resizing off
    // and we want to control column widths
    jt.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    aColumn = jt.getColumn(vtm.getColumnName(0));
    aColumn.setWidth(40);
    . // same kind of thing for each column
    aColumn = jt.getColumn(vtm.getColumnName(4));
    aColumn.setWidth(400);
    JScrollPane jsp = new JScrollPane(jt);
    frame.getContentPane().add(jsp);
    frame.setVisible(true);
    If I do the above, the table gets displayed with each of the five columns the exact same width. So, the sizing of the columns is happening somewhere else despite turning auto resizing off.
    Where is that occurring and how can I intervene so that I can control the widths of the columns on initial display and still allow the user to adjust the widths if they so choose?

  • 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.

  • Setting Initial Values in Sharpening Panel

    I have found that one of the reasons that LR3 Process 2010 sharpening seems to be a problem is that the initial values in the Sharpening panel in Develop has a setting of 50 for Detail. Aside from the fact that the Detail adjustment isn't even available in LR2, I have found that a setting of 50 almost always gives a "crinkle" effect (for want of a better term) clearly visible at 100%.  This can usually be correct by lowering the Detail value, often to 0.
    Is there a way to preset the Sharpening values (currently Level 0, Radius 1.0, Detail 50, and Mask 0 -- at least as I'm seeing it) to my own preferred settings?  Seems to me it may be related to camera-specific presets, but I can't find anything (yet).  For example, I'd like mine set to 25,1.0,0,0.  Or, am I completely missing something here?
    dds

    Default settings are set by camera model, so you can have as many different default settings as you want.  Additionally, the dialog box that appears when you set camera raw defaults has a button to enable you to restore the Adobe Camera Raw defaults.
    Visual360photography wrote:
    Hey, I have three cameras and when I click set default, it shows what camera the picture was taken. So my question is what happen to the other two cameras that I have. Especially when it say that this action is not undoable.
    Thanks.

  • Set initial value based on query

    Is it possible to set the initial value of a field based on a query. Kindly advice.
    Regards,
    Careen

    Hi,
    Yes. You can create a VO for your query and map that to the field on your page. Then execute the VO in PR method.
    Or if the field is not based on VO, you can execute your query in PR method using PreparedStatement. Then get the handle of the field and set its value to the value returned in resultSet of the query.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Vl31n set initial values

    Hello,
    I donu2019t have very much experience in abap, so I will ask you to help me. I need to fill the the purchase order and the vendor field from vl31n transaction - initial screen with some values. Can you suggest me an user-exit, a badi or something else to solve my problem? I mention that I never worked with badi or user-exits, so I will appreciate any details about this and how is used..
    Thanksu2019

    I assume you want to call the transaction from within another abap program and populate the entry fields on the selection screen ?
    Generally for any transaciton, if you place the cursor in the input field and press F1 you will get the help. From here if you select the technical help you will see information about the field.
    On here there is a parameter id field, showing BES for Purchase order number and LIF for Vendor.
    You can then use SET PARAMETER ID to set the values for these two IDs and they will appear when the transaction is then called.

  • IDOC CLFMAS set initial values

    Hi,
    I am using IDOC CLFMAS02 to update values in material classification. I do not have problems with modify a normal value. But I want to set a date classification value to initial. If I inform with ' ' the value is showed as '00.00.0000', but I need that this value become initial.
    I am trying to use field MSGFN = 003 (delete) on segment E1AUSPM but it does not running.
    The FM that we use to input idoc is IDOC_INPUT_CLFMAS.
    Any suggestion. Thanks¡¡¡¡

    Yes I try to remove date characteristic from E1AUSPM.
    Also I try to set blank value.
    Also I try with MSGFN value = 003.
    I think that your code is only to delete values from multiple-values characteristics.
    TEST 1 ( set blank)
    Current Material characteristic value: 01.01.2011
    Objective Material characteristic value: Blank
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     004Z_CHARACTERISTIC
        E1DATEM                     004
    Result Material characteristic value: 00.00.0000
    TEST 2 (MSGFN 003)
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                        01.01.2011
        E1DATEM                     004
    OR
    E1OCLFM                     004MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     004ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                         
        E1DATEM                     004
    OR
    E1OCLFM                     003MARA      00000XXXXXXXXXXXXX                           001OMARA
        E1KSSKM                     003ZCLAS                                 1
        E1AUSPM                     003Z_CHARACTERISTIC                         01.01.2011
        E1DATEM                     003
    OR others...
    The problem is that characteristic must be defined to DATE format and when I set blank value, inside code is converting to 00.00.0000

  • Set initial value using SQL

    Hi,
    How do I set the 'initial value' property of a default value using an SQL statement?
    Any help appreciated,
    Rob

    Hi Kevin,
    you are right. It is sometimes confusing for the users, but it is - as you said - like setting the initial value, of course you can do some more complexity there.
    One big problem is. If you want to set the initial values in a detail record of a master-detail relatioship depending on the master-record, you CAN'T use it. If you change the master record to a record which doesn't have a detail, the WHEN-CREATE-RECORD trigger fires before the master-record really changes. That means, the detail will be initialized with data from the old master-record (the one you were in, before changing the master record). Stupid thing.
    I never tried the WHEN-DATABASE-RECORD trigger, I even don't know how it works. I think I have to check what it is doing.
    Regards,
    Torsten

  • How to set coumn value for an ADF Table?

    Hi,
    I am currently using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I have an ADF table in which I have a column created using View Object as Select one choice. I want to set the value(first time as selected one) in it which is coming from my second View Object. Can anyone please provide me sample code for the same?
    Thanks,
    Vik

    Hi,
    I have no idea what you are asking for. Did you try model driven List-of-Values defined for the attribute you want to update using a select one choice ? See this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/dec2010-otn-harvest-199274.pdf and look for how to create dependent list of values. Just follow the first part of it that explains how to create model driven LOV
    Frank

  • How set the values programatically in custom tables ?

    Hi Guru's,
    Please help me where i did mistake....
    My scenario is i have 4 columns that 4 columns are look up based on row i need save the "XX_hr_Vacancies_CompTab"
    4 columns look like....
    column1(15 questions ) column2(message choice) column3(message choice) column4(free text)
    (1-15)question manually select (1-10) manually select (1-10) comments
    this vo purpose i am using this query
    SELECT ROWNUM,
    xhv.VACANCY_ID
    , xhv.RFP_NO
    , hl.lookup_code
    , hl.meaning
    , XJCT.BUHR_RATING
    , XJCT.COMBEN_RATING
    , XJCT.RATIONALE
    FROM hr_lookups hl ,
    xx_hr_vacancies xhv,
    XX_JOBEVAL_COMP_TAB XJCT
    WHERE lookup_type = 'XX_JE_QUESTIONAIRE'
    AND xhv.RFP_NO = 'IRC616'
    AND XJCT.VACANCY_ID(+) = XHV.VACANCY_ID
    ORDER BY ROWNUM
    I am using sample code is for one column inserting.....please help where i am doing mistake.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createjobVacancy1");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vacncyVO = (OAViewObject)am.findViewObject("XXTableLookupVO1");
    int fetchedrowcount = vacncyVO.getRowCount();
    RowSetIterator multiIter;
    multiIter = vacncyVO.createRowSetIterator("VacancyId");//Attribite of the select box
    multiIter.setRangeStart(0);
    multiIter.setRangeSize(fetchedrowcount);
    System.out.println("no before for loop condition rows"+fetchedrowcount);
    for(int i=0;i<fetchedrowcount;i++)
    am.invokeMethod("createjobVacancy1");
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    Object vacancy = vacncyVO.getRowAtRangeIndex(i).getAttribute("VacancyId"); */*63 Line code is this one*/*
    System.out.println("vacancy number is in table region current row is "+vacancy);
    System.out.println("no or rows"+fetchedrowcount);
    if(vacancy != null && !"".equals("vacancy"))
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancy);
    System.out.println("set create vacancy number is in table region current row is "+vacancy);
    }else{
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",null);
    am.invokeMethod("apply1");
    System.out.println("out of for loop :"+fetchedrowcount);
    Sop:
    13/01/10 06:55:28 no before for loop condition rows15
    13/01/10 06:55:29 Header is =725
    13/01/10 06:55:30 vacancy number is in table region current row is 616
    13/01/10 06:55:30 no or rows15
    13/01/10 06:55:30 set create vacancy number is in table region current row is 616
    13/01/10 06:55:30 Header is =726
    Error:
    ## Detail 0 ##
    java.lang.NullPointerException
    at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:63)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
    Regards,
    Srinivas

    Thanks Keerthi,
    i am getting values but i unable to set the values, once i am setting values i am facing null pointer exception ..
    java.lang.NullPointerException
         at xxsup.oracle.apps.per.jobevaluation.webui.MainCO.processFormRequest(MainCO.java:86)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
    i am using below coding in PFR
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Save") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject oaviewobject =(OAViewObject)am.findViewObject("XXTableLookupVO1");
    if(oaviewobject!=null)
    pageContext.writeDiagnostics(this,"View Object is exists",OAFwkConstants.STATEMENT);
    int rowcountValue = oaviewobject.getRowCount();
    pageContext.writeDiagnostics(this,"Row returned by the View Object"+rowcountValue,OAFwkConstants.STATEMENT);
    System.out.println("before for loop geting values = "+rowcountValue);
    Row rowAdv= oaviewobject.first();
    RowSetIterator iterator = oaviewobject.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(oaviewobject.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    pageContext.writeDiagnostics(this,"Inside For loop ",OAFwkConstants.STATEMENT);
    rowAdv =iterator.getRowAtRangeIndex(i);
    if(rowAdv != null)
    pageContext.writeDiagnostics(this,"flag not null",OAFwkConstants.STATEMENT);
    pageContext.writeDiagnostics(this,"Flag Value Checked as Y",OAFwkConstants.STATEMENT);
    OAViewObject vacncyVO1 =
    (OAViewObject)am.findViewObject("XX_hr_Vacancies_CompTab_EOVO1");
    if(rowAdv.getAttribute("VacancyId")!=null)
    Object vacancyname = rowAdv.getAttribute("VacancyId").toString();
    vacncyVO1.getCurrentRow().setAttribute("VacancyId",vacancyname); This is the 86 line
    System.out.println("Vacancy ID IS = "+vacancyname);
    System.out.println("Vacancy ID IS = "+rowAdv);
    am.invokeMethod("apply1");
    // System.out.println("out of for loop :"+iterator);
    please help me where i am doing mistake...
    Regards,
    Srinivas

Maybe you are looking for

  • Creating an instance of a class from within another class

    I am trying to create an instance of MCQ in the T class but I am getting this error: File: E:\JAVA PROGRAMS\assignment 1\T.java [line: 15] Error: cannot find symbol symbol : class MCQ location: class T here are the two classes: // class T import java

  • Using an "iTunes Server" on a NAS drive for several users

    Like many others I'm trying to make a single drive containing my iTunes media serve different iTunes users round the house. Will the following work? Comments welcomed. Currently my iTunes Media Folder and media live on my main PC. About 130Gb in tota

  • Weird 45 degree light light gray lines

    i have buyed my new black macbook 7 days ago and there is a big problem on the display, it's all full of weird 45 degree light light gray lines, i saw other macbook too and they haven't this problem or the problem is sooooooo light, but on my macbook

  • InDesign CS6 quits unexpectedly

    I can't open InDesign today, it quits unexpectedly every time. Yesterday I did some updating of my OS system, might that be the reason?

  • Extracting Year from the date field

    Hi, I want to extract year from the date field... I've tried following code but got the error SELECT to_char(a.A_EXPIRY_DATE,'yyyy') as EXP_YEAR from Table_A a Please advice Thanks in advance