Assigning a default value to a field

Hello Everyone,
       Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.

Like this
DATA: BEGIN OF itab OCCURS 0,
        field1 TYPE c VALUE 'X'
        field2 TYPE c,
      END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM

Similar Messages

  • Not allows to assign default value to input field using values in datastore

    Hi Masters,
    Consider that I have one input field in a form. I should assign default value to it. I should assign to it, the value which i have stored in a datastore. When i run the application, if i give default value as 123 ,then it is working fine i.e., it is showing 123 in the textfield in form , but if i give the default value as STORE@ProductId, then it is not displaying that value in the form.
    Please help me out.
    Thanks & Regards,
    Kaushik Sreeram

    Hi,
    i faced this problem and here's what i concluded:
    There's no way you can set default value for input field dynamicly, since the default value of input control is caculated only once (i think on initializing of the iView). The input control and the data store are initialized at the same time, STORE@productID is empty that time...
    If you don't need to recieve value through the input field you're trying to initialize, but just to display the value from the store - I suggest you try using another control - Expression Box. It's value is calculated continiously, just like the Label's, and you can refere to it later.
    Regards,
    Yulia

  • How to assign a default value when there is no prompted value

    Dear all,
    I create a filter and it's value is relate to a prompt.If the prompt is not fill I found that all record is selected.
    How did I assign a default value so that when I didn't fill some value in to the prompt and still can get the result by
    the default value I set?
    Thanks a lot!

    Are you using dates for between or some character column?
    Post your example.
    Instead of between use to is equal prompts, so u will have then 2 fields one for date from a nd one for date to. Everything is the same as I wrote just repeat steps...
    You must put 2 separate fields if you are using date between and you want to have default variable for both.
    Column formula for the first calendar date prompt:
    case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end
    and for the second:
    case when 1=2 then TIMES.TIME_ID else cast ('1.1.2900' as date) end
    Now you set up default repository variable for both prompts.
    Presentation variable you put in the set presentation variable on each prompt:
    p_date_from
    p_date_to
    And in Answers filter will be like this:
    *TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char")} and @{p_date_to}{VALUEOF("rv_test_date_to_char")}*
    or you can put a different default variables
    *TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char_from")} and @{p_date_to}{VALUEOF("rv_test_date_to_char_to")}*
    I posted similar in my blog:
    Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE
    http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html
    Regards,
    Goran O
    http://108obiee.blogspot.com
    Edited by: Goran O on 2009.04.23 03:37

  • How to assign the default value to search parameter

    Hi Experts,
    I am using search view , In this I have 5 parameter lets say Transaction Type, Partner No. etc... Now I want to assign a default value to transaction type ( lets say TA) . User should be able to see this default value in the transaction type field before pressing search button.
    How can I do it?
    My second problem is: I have configured this search view using configuration tool but I want to assign only one value to transaction type (i.e. user should not be able to add new row in the search criteria for the transaction type by using + sign)  but in rest 4 fields he can add new row and search based on that.
    Note: I am using only "Is" criteria .
    Any pointer will be helpful for me
    Thanks and regards,
    Sandeep

    Hi Sandeep,
    For the default search values, here is a solution. You have to redefine the method GET_VALUE1 of the context node
    For example if it is the BP search (component BP_HEAD_SEARCH) context node is your enhanced class: ZL_BP_HEAD__MAINSEARCH_CN00
    METHOD get_value1.
      CALL METHOD super->get_value1
        EXPORTING
          attribute_path = attribute_path
          iterator       = iterator
        RECEIVING
          value          = value.
      TRY.
    *     Delegate operation to selection parameter
          DATA: current TYPE REF TO if_bol_bo_property_access.
          IF iterator IS BOUND.
            current = iterator->get_current( ).
          ELSE.
            current = me->parameter_collection->get_current( ).
          ENDIF.
          IF current->get_property_as_string( iv_attr_name = 'ATTR_NAME' ) EQ 'XXX'.
            IF value IS INITIAL.
              value = 'Your default value'.
            ENDIF.
          ENDIF.
        CATCH cx_root.
      ENDTRY.
    ENDMETHOD.
    where XXX is the name of the field.
    Default value will then appear in your search field, but you are still able to modify it if you want...
    Regards,
    Fabian

  • Assigning a default value to a user property

    Hi everyone,
    do you know how can I assign a default value to a user property? It would be great if I should be able to assign it from the administration without writing any code (like profile web services...).
    Thank you!
    Alberto Marchiaro

    Hi Alberto,
    I don't think you can currently do this. In other words you can't set a default value for some object property and have it subbed in when no better value is available.
    You can however create a default profile, and set values for the object properties assigned to users (You do this by going to the "Default Profiles" manager). You can then edit the "Default Profile" that is already there (or create a new one), and edit the "Properties and Names". Set the value field to whatever you'd like to be copied by default.
    Once done, all new users that are created via a User Synchronization job will have this default profile. The changes will not apply to users that were previously created. If you created a new Default Profile in the Default Profiles Manager, then you need to goto the Authentication Source that you are doing your sync's from and pick which profile you'd like to use for All Groups. You can also create custom Default Profiles for various groups.
    Hope this helps,
    Akash

  • How to set default value to input field dynamically

    Hello Experts,
    I am using adobe forms inside Webdynpro Java.
    Adobe form is having few input fields where at run time i want to assign default value to those fields.
    How can i do it ?
    Thanks in advance,
    Vinay
    Edited by: VINAY on Feb 24, 2011 6:39 AM

    Hi Mate,
    Just set the value to the webdynpro context fields on view init.
    if its like that will override the values entered by use on the form.
    just check if the default value is equall to the field value if yes leave it, if not dont touch that field.
    does this make sense...?
    Cheers,
    Sai

  • Is it possible to assign a DEFAULT VALUE to [%1]?

    Dear All,
    Let's suppose I write a code like this:
    SELECT T0.Ref1 AS 'Doc Num'
    FROM JDT1 T0
    WHERE T0.RefDate = [%1]
    When I run this query, it gives the foll. dialog box asking me to enter the Posting Date.
    Query Selection Criteria
    Posting Date       Equal     .........
    OK   Cancel
    Is it possible to make SQL assign a DEFAULT VALUE (say '31-12-10') to [%1] so that:
         If I do not type in any date and press OK, SQL will accept the default of '31-12-10' and
         If I do type in a date, say '24-07-11', and press OK, SQL will overwrite the default and use this date instead?
    I use SAP B1 8.8.
    Thanks
    LEON LAI
    Why I need this?
    This is my previous thread reduced to its minimum essentials.
    Is it possible to combine 2 different reports in a single Query?

    Hi Floyola,
    Thanks for your reply.
    Your code works only if I input a date e.g 31.07.11 (31 July 2011):
    Query Selection Criteria
    Posting Date         31.07.11
    OK   Cancel
    It does not work when I leave the Posting Date field blank. It gives this error msg:
    System Message
    No data was found as a result of the selection criteria
    OK
    Maybe as a newbie I am expecting too much from SQL.
    If it is too much a worry, please forget it. I have alternative solutions, for example: Instead of leaving the field blank, I can type in the fictitious date 31.12.10.
    I will leave this thread open for 1 or 2 days, then close it.
    Best Regards,
    Leon Lai

  • How to assign a default value to a SelectOneChoice

    Hi,
    I'm working with ADF 11g: WebLogic 10.3 and JDeveloper 11.1.1.3.0.
    I wonder how to assign a default value to a SelectOneChoice.
    In a ViewObject I have a field defined as Combo Box. Then drawing the combo in my jspx page:
    +<af:selectOneChoice value="#{bindings.Circularidad.inputValue}"+
    +label="#{bindings.Circularidad.label}:"+
    +required="#{bindings.Circularidad.hints.mandatory}"+
    +shortDesc="#{bindings.Circularidad.hints.tooltip}"+
    +id="soc2">+
    +<f:selectItems value="#{bindings.Circularidad.items}"+
    +id="si2"/>+
    +</af:selectOneChoice>+
    Can anyone help me?
    Thanks.

    Assume u have an LOV relation associated with VO attribute.
    1. Go to Edit List of Values window
    2. Click UI Hints tab
    3. Check Include no selection item check box.
    4. Select Labeled Item ( First of the list) entry form right combo box.
    5. Give ur default value in right text box.
    Regards,
    Dinil Mithra

  • Want to affix a default value to a field in PO creation

    Hi all,
    I want to set the default value for the field 'Account assignment category ' when a certain type of Purchase order is created in all the screens pertaining to Purchase order.
    Please suggest
    regards
    kanishak

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • Default value in dropdown field for FPM form in HCM Processes and forms

    Hi Experts,
    I am developing HCM Processes and forms using FPM forms and I had a dropdown list contains ten values. So, every time while opening the form first time, my dropdown field should be defaulted with fifth value from the list. How can we achieve this in dropdown field related to FPM Form.
    Please guide me.
    Regards,
    Nayani.

    You would have to assign the default value to one your custom generic services.
    Regards.
    PS: There are posts which talk about generic services , make yourself comfortable with the concept of generic services.

  • Need to set default values for the fields plant and location in ME21N

    Hi All,
    i need to set default values for the fields plant and location in ME21N tcode.
    In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
    How to resolve this?
    Thanks in Advance

    hi .
    i needed to set default strorage location and plant in personal setting  in me21n.
    i solve it with this way.
    go to program SAPLMEPERS in se38.
    create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
    in this module write:
    if MEPOITEM_PROP-WERKS is INITIAL and  MEPOITEM_PROP-LGORT is INITIAL.
    MEPOITEM_PROP-WERKS = '1000'.
    MEPOITEM_PROP-LGORT = '0032'.
    endif.
    this is the solution.
    best regards.
    maryam

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • How to assign a default value to a column ?

    Hi
    In the Object browser is it possible to modifiy a column in order to assign a defalut value to the column ?
    I have a table FICHE in which I want to assign a default value 0 to a column which type is NUMBER.
    Thank you for your kind answers.
    Christian.

    Hi Christian
    For one reason or the other you can't do that using 'Create Column' or 'Modify Column'. You can only do that by issuing a SQL command : alter table fiche modify column( <column name> default 0)
    HTH
    Roel

  • A question about assigning a default value

    Hi guys, I have a question about assigning a default value to a Numeric Decision CO. This Co needs 2 parameters to compare with each other. I wanna assign para1 during runtime and para2 during design time, but I have no idea how to assign a default value to para2 during design time. Can anyone help me solve this question? Thx a lot.
    BTW I`m searching an article about Time-off example`s "details". I have read several articles about time-off example, but those are not detailed enough. I wanna know about all details of COs. Can anyone forward such article to me, plz.  Thx again.^^

    Hi,
    You can assign a default value to the parameter of a callable object.
    First attach your CO to an Action.At the action level you can assign default values to the CO Parameters.
    Select the action in the design time.
    Select the parameters tab for that action.
    Select the required paramter. At the top, you can find Default value tab, with that you can assign default value.
    I think you can achieve your requirements with Business logic CO better.
    [Business Logic CO|http://help.sap.com/saphelp_nwce10/helpdata/en/44/3d3936c5c14a8fe10000000a1553f6/content.htm]
    Thanks

  • Is it possible to assign a default value to an out parameter??

    Is it possible to assign a default value to an out parameter??
    Thanks in advance.

    pradeep.vupala wrote:
    I think ur looking for an IN OUT parameter?That won't help.
    A quick test is easy to check what happens :
    SQL> create or replace procedure myproc(p_out out number default 1)
      2  as
      3  begin
      4  null;
      5  end;
      6  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE MYPROC:
    LINE/COL ERROR
    1/18     PLS-00230: OUT and IN OUT formal parameters may not have default expressions
    SQL> create or replace procedure myproc(p_out in out number default 1)
      2  as
      3  begin
      4  null;
      5  end;
      6  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE MYPROC:
    LINE/COL ERROR
    1/18     PLS-00230: OUT and IN OUT formal parameters may not have default expressions
    SQL>

Maybe you are looking for

  • Creating data server for JMS Queues in ODI

    hi, I am trying to create data server for JMS Queues in ODI. I am getting following error: java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot find the Connection Factory (jms/QueueConn

  • Compare is not working properly

    Hi All, I have 2 results table in my page 1 table1 and other is table2.In the table1 table, compare works as I would expect.  I select a couple of records, click on  'Compare' from the Actions list.  A popup with the selected records are displayed. 

  • Ise-patchbundle-1.1.1.268-1-60802.i386.tar.gz

    Hi all, I installed ise-1.1.1.268.i386.iso on a scratch to the new NAC 3315. As i check cisco download mentioned it need to patch following files : ise-patchbundle-1.1.1.268-1-60802.i386.tar.gz But once try to patch it show like attachment message, i

  • Having issues deploying Windows updates

    System Center 2012 Config Manager  - 5.0.7804.1000 running on Win Server 2008 R2 SP1 Approx 75 servers (Mix of Server 2003, 08 and 12) and 60 workstations (All Win 7 x64) I took over managing my companys SCCM 2012 a few months ago.  I have System Cen

  • Problem to start iMac after 10.4.11 update please help

    Hi Everyone My iMac suddenly unprovoked not working after I downloaded the latest OS X 10.4.11 update from apple.com. After downloaded successfully, I double clicked the file to update, but nothing happened, the computer seemed not respond anything,