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

Similar Messages

  • 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

  • Can I assign a default value to a parameter like C++ ?

    My question is whether I can assign a default value to a parameter in Java? Let's say : public void myMethod(int p1, int p2=3){...} Is this syntax acceptable ?
    Regards,
    WenBin

    I don't think so (the easiest way to find out is to try), but if you want something like that, most people do it like so:
    private static final int DEFAULT_P2 = 3;
    public void myMethod(int p1)
        myMethod(p1, DEFAULT_P2);
    public void myMethod(int p1, int p2){...}Hope this helps,
    Radish21

  • 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

  • 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

  • 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

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

  • 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

  • Assign a default value to a pseudo column

    I'd like to assign a default value of 0 to the pseudo column ORA_ROWSCN to get round a problem implementing OCC using Hibernate.
    Does anyone know if this is possible?
    Thanks.

    ORA_ROWSCN column is used for keep the latest SCN. This would not be possible.
    Cheers

  • How to Assign a default value and Increement in my Target table ........?

    Hi,
    In my target table I want to Increment a value and store it in the table ........
    the increement shud start frm ...........5001,5002,5003..................etc
    How can I achieve this...........?
    I created an numeric Variable and in assigned the default as 5000 nad action as Historize.........
    In the target Datastore ......I assigned VAR+1.......
    but in the Target column I got 5001 for all the columns........
    Which way is the best way to deal with the Variables.......
    Thanks
    AK
    Message was edited by:
    AK2008

    Hi Gurusank and Micropole,
    Thanks for reply and info.....
    I am trying out one of the solutions first........
    Gurusank,
    I have created a sequence........whether I need to mention the schema and table name ,column.........also ( I gave all the information) and Increement column =1 and saved it .......
    Then I follwed the procedure as u have mentioned .....
    And in the Target field also I gave the same the same.......for tat column I gave choose (target for execution).
    And I directly ran the interface ..........
    I got the folowing Error:
    287 : 42000 : java.sql.SQLException: ORA-02287: sequence number not allowed here
    java.sql.SQLException: ORA-02287: sequence number not allowed here
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:534)
    Could u plz let me know where I am doing the mistake
    Thanks
    AK

  • How to assign a default value on a Tabular Report?

    version 3.2.1
    I have a column in a Tabular Report (SQL Query (updateable report) ) that I would like to default to a value every time that the Add Rows button is clicked. This column needs to have the same value for every row.
    How do I set a default value on the column?
    Thanks,
    Joe

    I've run into the same problem. The 'Default' value isn't even appearing in the form, let alone getting stored.
    I'm not 100% certain (I'm still new to Apex too), but I think that the 'Default Type' and 'Default' value fields of the 'Tabular Form Element' might only apply to new records, ie when using the Tabular Form to create new records.
    In my case, I'm displaying existing records and I've been trying to enter a default new value for a particular field, ie change the value in the field for existing records from null to today's date. I couldn't get it to work and the more I think about it the more I realise that it is probably not the right way to do it.
    One alternative would be to put the SYSDATE into the source SQL (noting that changing an existing tabular form definition would cause an error, so I would have to create a new tabular form). But another (and I think preferable for me) option is to create a trigger that will put the SYSDATE into the field as each record is updated.
    Regards,
    Peter

  • How to assign a default value to a query variable

    If I create a query, and it contains a variable that I want the user to input, can I also assign a default to that variable which the user will see when they run the query? If they make no selection it would use the default instead of the user input?
    Thanks

    Hello Peter - One way might be by using the "CASE" function inside the SQL.
    It might be good for you to post your curent SQL here in the forum and a bit more explanation of what you are looking for.  That way folks can review and provide suggestions on how to accomplish on how it can be done...
    Zal

  • Simple question about disabling Swing default Locale

    Hi.
    I am trying to disable the Japanese messages that appear in JDialogs. I am using a Japanese version of WinXP.
    How do I do this? It would be good to do it programmatically and be totally platform and locale independent. I am trying to set messages to English.
    I tryed resetting the default locale, which seemed to change the default, but made absolutely no difference to my program.
    Many thanks in advance.

    This code seems to change the keyboard itself to be US. That sounds pretty drastic. Would if affect other applications?
    Perhaps you could explain a bit more about how JDialog knows what language to display its dialogs in. Why doesn't it work to change the locale of individual swing components?

Maybe you are looking for