How to assign default values to fileds in the org. tab of an oppurtunity

hi Experts,
I created a new org data profile and assigned it to a transaction type.
The org. tab consists of
org. unit
sales Org.
Distribution Channel
Sales Office
Sales Group
out of which first four are mandatory.
Now I need to populate "10" in the distribution channel field irrespective of whoever logfs in.
At present a list of sales offices and distribution chaneel popups up for selection by the user.
In my business scenario, I don't want the distribution channel to be taken from there instead it should hold a default value "10".
Pls help me in this.
regards,
Arul jothi.A

Hi Arul,
You can implement BADI 'CRM_ORGMAN_BADI' to populate the distribution channel field by default.You are to code in the method 'CRM_ORGMAN_MERGE' . The code you will have to write for defaulting value will be something like this :
CODE :
method IF_EX_CRM_ORGMAN_BADI~CRM_ORGMAN_MERGE.
data : lv_guid type CRMT_OBJECT_GUID,
       lv_process_type type CRMT_PROCESS_TYPE.
finding the process type *****
lv_guid = is_orgman_wrk-REF_GUID.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
  EXPORTING
    IV_ORDERADM_H_GUID               = lv_guid
IMPORTING
   EV_PROCESS_TYPE                  = lv_process_type
EXCEPTIONS
   ADMIN_HEADER_NOT_FOUND           = 1
   OTHERS                           = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*********defaulting value if process type is opportunity(OPPT)
if lv_PROCESS_TYPE = 'OPPT'.
cs_orgman_badi-DIVISION = '10'.
endif.
endmethod.
Hope this solves your problem.
Regards,

Similar Messages

  • Amx:inputText how to assign default value

    How do I assign a default value to the amx:inputText field please?

    You assign it to it's value property.
    Timo

  • Select-options How to assign  Default value as "Not equal to something"

    My req. is to asssign default value for a select-option as <> "DS1" . I am able to give default value as DS1 But dont know how to give "<> DS1" . Please help me
    Thanking u in advance ..

    INITIALIZATION.
    s_lifnr-low = '0001'.
    s_lifnr-high = '0002'.
    s_LIFNR-sign = 'I'.
    s_lifnr-option = 'NE'.
    append s_lifnr.
    Regards,
    Subramanian V.
    P.S. - Raja, still mode = BSP ??? :-P
    Message was edited by: Subramanian Venkateswaran

  • How to retain default value of metadata during the Revision form?

    Hi,
    I have created a custom field which shows Document Status drop down having values like Draft, Received, Reviewed, Approved. Currently the selected Document status gets saved (e.g. Approved get saved when selected) and the same value (approved) is displayed as default during the next checkout and checkin.
    The user requirement is, during the next checkout-checkin (creating a new revision) everytime the document status should show as 'Draft' value by default. Please suggest how this can be acheived?
    Thanks,
    Sarang

    Hi,
    I have already set default value fo Document Status field as 'Draft'. But when I check in a new content by selecting Document Status as 'approved' or 'reviewed' value, then for the next check out check in I am getting the same value as default. As you have mentioned, I am trying to set the default value using global rule but was not succeed (might be rule is created wrongly). Please let me know if you have created such global rule or any example available with you.
    Thanks,
    Sarang

  • How to set default value and bg color of cross tab cell?

    Hi all
    Which way can I set default value and background color for a crosstab cell where there are no any data?
    I try to pass it in following way
    if isnull(CurrentFieldValue) then
    But is has no effect.

    Hi,
    If your field is numeric
    if currentfieldvalue =0 then cryellow else crnocolor
    if the field is numeric but you don't see the 0 check check if : Suppress if zero is ticked in the Number format tab.
    Regards

  • How to assign default values for a timestamp column in a table?

    Hi
    Thank you for reading my post
    how i can make a column in a table to be autofilled with current timestamp ?
    for example when i create a table i want its timestamp field to be autofilled with current time stamp whenever a record generated.
    Thanks

    TEST@db102 SQL> create table test(a number primary key, b timestamp default systimestamp);
    Table created.
    TEST@db102 SQL> insert into test(a) values(1);
    1 row created.
    TEST@db102 SQL> select * from test;
             A B
             1 03-SEP-06 05.56.34.995319 PM
    TEST@db102 SQL>                                                            

  • How to assign default values to "Start task process" SPD2013 action

    I am creating a task in SPD 2013 list workflow using the "Start a task process" action. I have the ContentTypeId field set as i need to have some specific fields to be displayed in the task form.
    Is there anyway to assign values to these fields?. My goal here is to fetch some values from the "currentItem" fields and display in the Task form during the approval. So that the Approvar don't need to go and see the actual list item.

    Hi,
    If you would like to display fields about current item in Task form, please click
    these user in Workflow, and
    Start a Task Process dialog pops out. Then click Open editor for body >
    Add or Change Look up, then you could retrieve field data.
    For clearly:
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • How to assigne multiple value in key of read table

    Hi gurus,
    I want read table xxxx with key field1 = ' xxx' or field1 = 'yyy'.
    how to assign multiple value as key for the same field while reading internal table.
    Regards
    sagar

    Hi ,
    You can loop the internal table like
    loop at  <table xxxx> where field1 = ' xxx' or field1 = 'yyy'
    or you can write two read statements to read the internal table in wrk area.
    read table   <table xxxx> with key field1 = ' xxx'.
    if sy-subrc <>0
    read table   <table xxxx> with key field1 = 'yyy'.
    if sy-subrc = 0
    endif.
    else.
    do your data processing.
    endif.
    Thans.

  • 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

  • How to set default value in OAMessageLovInputBean?

    Hi,
    How to set default value in OAMessageLovInputBean while loading the page?
    I have tried the following code but its not working.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String delToLoc = (String)pageContext.getSessionValue("deliverTOLoc");
    Number delToLocId = (Number)pageContext.getSessionValue("deliverToLocId");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject poHeadervo =
    (OAViewObject)am.findViewObject("PoHeaderMergeVO");
    PoHeaderMergeVORowImpl poHeaderVoRow =
    (PoHeaderMergeVORowImpl)poHeadervo.getCurrentRow();
    if (delToLoc != null && !"".equals(delToLoc)) {   
    // poHeaderVoRow.setShipToLocation(delToLoc);
    OAMessageLovInputBean msb = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("DefaultShipToLocation");
    msb.setValue(pageContext,delToLoc );
    Please suggest me how to resolve this issue.
    Thanks & Regards,
    Sunita

    Hi Cristoph,
                      We tried all the way but could not able assign characteristics value before saving the document. it means we can only see the assigned value using transaction CV02N. but our requirement is to check if the user fills any value into characteristics it should check with default value which we would like to assign whenever we create a new part of the document which we are not able to achieve.we tried a lot but could not succeed.
    Nay idea if we can achieve this....
    Regards
    Bhuwan Tiwari

  • How to make default values in selection field?

    hi,
          i have selection field date , using data element 'QENTST' using following code in view INIT Method. i get the input selection field when i test application.
    DATA: LT_RANGE_TABLE TYPE REF TO DATA.
    CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
      EXPORTING
        I_TYPENAME                     =     'QENTST'
      RECEIVING
        RT_RANGE_TABLE           =     LT_RANGE_TABLE.
    CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
      EXPORTING
        I_ID                                     = 'QENTST'
        IT_RESULT                         = LT_RANGE_TABLE
        I_OBLIGATORY                 = ABAP_TRUE.
    What i need now , to make default value in this selection field( low = sy-datum and high = sy-datum + 10 ) . I have checked , i found one method called... SET_RANGE_TABLE_OF_SEL_FIELD. Bt i m not able to understand how to assign values to input table parameter in this method?
    Thanks In Advance.
    Saurin Shah

    Hi,
    Refer this Article by Thomas on how to make default values in Select Options:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60474842-91ca-2b10-3390-d2fd30f335fd
    I hope it would solve your problem.

  • How to populate default values for BP (FPP1 is  tcode in ECC 6.0)

    Hello ,
    I am creating BP in ECC 6.0 using Fpp1 tcode.  How to populate default values when i hit create BP person.   any badi  triggers when we are creating BP in ECC.
    guide me.

    Hi Premanand,
    To default fields, you need to do the following steps :
    1. Create a Z module e.g. : Z_DEFAULT_FIELDS_DIALOG.
    2. Enter suppose you want to default fiels Name, title, country, write code as follows  :
    DATA : ls_busdefault LIKE busdefault.     
      ls_busdefault-title = '0002'.
      ls_busdefault-mc_name1 = 'TEST'.
      ls_busdefault-mc_name2 = 'Default'.
      ls_busdefault-country = 'IN'.
        CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
        EXPORTING
          i_busdefault = ls_busdefalut.
    3. Now got to transaction BUS7, select event ISDAT, click on Event--> function modules.
    4. Register your Z module Z_DEFAULT_FIELDS_DIALOG in this list, Save.
    This should solve your problem. Please note : You can only default those fields contained in structure BUSDEFAULT.
    Cheers,
    Rishu.

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to change default value in a table using ALTER TABLE

    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • How to set default value in matrix column

    Hi all,
    Does any one know how to set a default value in matrix column ?. I just want , when an event right click and add row. so i set a default value in a column field for example 'Test'. FYI the matrix is in the UDO.
    so my code will be like this
    If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
                        Try
                            Dim oColumn As SAPbouiCOM.EditTextColumn
                            Dim matrix As SAPbouiCOM.Matrix
                            matrix = oForm.Items.Item("Matrix").Specific
                           oColumn = mat.Columns.Item("Code").specific
                            oColumn.Value = "Test"
                        Catch ex As Exception
                            Debug.Print(ex.Message)
                            Debug.Print(ex.ToString)
                        End Try
                    End If
    I have run it and when i right click and add row it still can not set the default value in one of the matrx column.
    does any one know how to solve it. thanks in advance

    Hi Bodhi
    Sandeep is right you can set value using SetValue() function
    If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
                        Try
                            Dim matrix As SAPbouiCOM.Matrix= oForm.Items.Item("Matrix").Specific
                            oForm.DataSources.DBDataSources.Item("UDT").Clear()
                            matrix .AddRow()
                            matrix .FlushToDataSource()
                            With form.DataSources.DBDataSources.Item("UDT") 
                                    .SetValue("UDF", matrix .RowCount - 1, "Test")
                            End With
                            matrix .LoadFromDataSource()
                        Catch ex As Exception
                            Debug.Print(ex.Message)
                            Debug.Print(ex.ToString)
                        End Try
    End If

Maybe you are looking for

  • How do restore the podcasts, audiobooks, etc., in the itunes 12 sidebar? I can only see one at a time. grrr.

    I've updated to iTunes 12.0.1.26, and the sidebar library list has disappeared. It looks like all I can see is one item at a time in the list. Either Music OR Podcasts OR Audiobooks, but not all of them as a list. This is so frustrating. I don't want

  • Error code -50 hard drives won't eject

    I am using three G-drives, a 4TB RAID drive, and two 3-TB G-drives. On both my Macbook and iMac I am having problems ejecting them. I get the message "The disk wasn't ejected because one or more programs may be using it." even when all the programs o

  • Reinstalled itunes 10 64bit on pc running Windows 7 64 bit but nothing plays now.

    itunes 10 stopped playing tracks when I clicked on them. So have just reinstalled ver10 64 bit on pc running Win 7 64bit, rebooted computer but still won't play. Have recently updated Nvidia display drivers (64bit) but wouldn't think this would affec

  • I cannot get Firefox to open so I can browse.

    Firefox will no long open up to browse. It has been getting slower and slower and tonight it will not open at all. I tried to download it but it keeps telling me I have to close it first in order to install. Close what? It's not running. I tried to u

  • Value type Mapping Table

    Dear Gurus, In R/3 I have value types 1(Plan), 2(Plan:Splitting Among Activity Types) like up to 99 and 9A to 9D types available. These value types are showing in RPSCO table. But in BW only showing 10(Actual), 20(Plan), 30(Target), 50 (Budget), 70(V