Event for dropdown selection

Hi.
I am working on CRM 2007 icwebclient. My requirement is for BP creation either individual or organisation depending on ROLE select mandatory fields are changed.
If role 'Prospect' is selected then few fields are mandatory or if 'sold-to-party' is selected more fields are madatory..
Now which event is working behind this dropdown selection. where i have to write my code. How to set fields 'mandatory' at design time. soon reply would be appreciate.

Hello,
as this really seems to be a big Issue for people. Thought as developers you might explore my hints on your own.
For switching the configuration:
Implement the P-Getter for the attribute on the context node with the following code:
CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
      rv_value = 'my_event'.
  endcase
This will trigger a roundtrip. We do not need to handle the event.
In your view controller implementation class redefine the method DO_CONFIG_DETERMINATION:
METHOD do_config_determination.
* Switch configuration that is used based on field value.
  DATA:
    lv_value         TYPE              char2,
    lv_object_type      TYPE              bsp_dlc_object_type       VALUE '<DEFAULT>',
    lv_object_subtype   TYPE              BSP_DLC_OBJECT_SUB_TYPE   value '<DEFAULT>',
    lr_node        TYPE REF TO       if_bol_bo_property_access.
  CALL METHOD super->do_config_determination
    EXPORTING
      iv_first_time = abap_false.
  lr_node = typed_context->some_node->collection_wrapper->get_current( ).
  CHECK lr_node IS BOUND.
  lr_node->get_property_as_value(
    EXPORTING
      iv_attr_name = 'SOME_ATTRIBUTE'
    IMPORTING
      ev_result    = lv_value ).
  lv_object_type = 'MY_UI_OBJECT_TYPE'.
  CASE lv_value .
    WHEN 'SOME_VALUE1'.
      lv_object_subtype = 'JIMBOB'.
    WHEN 'SOME_VALUE2'.
      lv_object_subtype = 'BUBBA'.
  ENDCASE.
  me->set_config_keys( iv_object_type          = lv_object_type
                       iv_object_sub_type      = lv_object_subtype
                       iv_propagate_2_children = abap_true ).
ENDMETHOD.
Just paste the above coding into the method.
What it does:
1. Get the value you want to check from one of the context nodes.
2. Switch the UI Object type (Yes you have to define it in customizing)
3. Switch the UI Sub Object type on base of the field value. (Yes you have to define your own sub object type, this is done via a class that is assigned to your UI Object type in customizing)
For the other solution: As mentioned I have not tried it myself.
The variable on the view controller I am talking about is CONFIGURATION_DESCR of interface IF_BSP_DLC_CONFIGURATION. It has got a method GET_CONFIG_DATA that will give you the XML stream and a method SET_CONFIG_DATA. Putting the changed XML back.
If you had done a were used list for at least one of these methods you would have seen how SAP uses them.
One example: CL_BSP_WD_OVW_VIEWSET->DO_INIT_CONFIG() however this will not help you on your problem.
I know there is a method that will decode the XML stream in the single fields with their properties and there is also a counter part to it. I am afraid that many people will use it to bypass the configurations. This will make it very hard to debug the coding. Thus I will not name the class/method here!
For the sake of maintainability please stick to the first method.
I have seen people getting the XML and then hardcoding another part into it. Then someone changed the config and an error occurs. You try to find out why, but the original developer is no longer there and has not documented anything...
cheers Carsten

Similar Messages

  • Calendar...list function shows only events for date select instead of events from that date forward.

    Calendar list function shows only events for date selected....instead of events for date selected and events forward from that date.  Is there a setting change needed?  Help!

    Hi,
    Did you check that your universe object referring "Date of Completion" has Date data type?
    Can you also provide the BOE verson you are using?
    I remembered that the calendars were not displayed in XIR2 version.
    Didier

  • On change event for dropdown box

    Hello,
    we have created view using EEWB as assignmentment block with some fields as dropdown.
    I want to change the dropdown values from second dropdown depend upon the first dropdown value.
    there no event firing on chaging the values from first dropdown list.
    I checked all methods do_handle_event, do_prepare_output and all setter methods including the set/get_v_struct. but still no luck.
    does anybody having any idea,  how to raise the event on value change from the first dropdown list.
    thanks
    Tim

    Hello Tim,
    And in GET_V of the attribute serving as dropdown you defined an event?
    * Set the type of the field:  dropdown menu
       CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
          rv_value = 'select'.
      ENDCASE.
    Best Regards,
    Yevgen

  • ABAP Web Dynpro ALV: event for "tabel selection menu" needed

    Hi all,
    we need to react on the "table selection menue" control in our ALV grids. We found, that event "lead_select" is triggerd, if single lines are selected and if "delete selection" from the table selection menu is used.
    But if the "select all" item is used, the event is not triggered.
    Is there another event we can use? Does anybody know a sensible workaround for this problem?
    Thanks  and regards
    Joachim

    Hello Joachim,
    perhaps it's better to post your question in the WebDynpro ABAP forum:
    Web Dynpro ABAP
    Best regards
    Stephan

  • Event on Dropdown selection in Web Planning layout

    Hi,
    I have 2 Exit planning function which are written before Layout and After Save function.  Currently we have 3 dropdown menu which are selection criteria for org data by which we can get the concern Group data.   
    Here we are using a cycle that After Save function the Before Layout function will execute.
    But when we change or select any values in dropdown the Before Layotu function is executing by which the Currency conversion happening twice.
    I observed that suppose initially in my layout I can see 2 sales group like  
    Actual data in Cube is maintained in USD and layout we are converted to EUR
    Sales Group    Plan values
    A                    1000 eur
    B                     200 eur
    When I select A in drowdown
    A   700eur Instead fo 1000EUR the reason is It is not fetching the data from Cube it is using the data in Buffer.
    How can I fetch data from Cube ever time when I select any values in the group instead of buffer.
    Kindly help me
    Thanks
    Naveen

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    I think you would have to use an EXIT Funtion using SEM APIs that refresh SEM Buffer. This would release the locks. You can call this Function after first currency translation.
    <br><br>
    Hope it helps.<br>
    Cheers Abhijit</FONT><FONT FACE = "Verdana", Font Color = "Red">
    REMOVED
    </FONT>

  • UIPickerView: event for SelectionIndicator selected?

    I have a custom uipickerview and wanted to be able to capture the event if the user double taps the selectionindicator. I already use the event didSelectRow: but that isn't called when the selectionindicator is double tapped.
    I also tried capturing touchesBegan: but that only triggers if the taps are outside of the wheel/selection indicator region.
    Any assistance would be greatly appreciated.

    I tried a few things this evening to scope out your problem. I'm fairly sure there's no advantage to a UIPickerView subclass since, as you discovered, its subviews are handling touches in the region of the selection bar. There are nine subviews for a single-wheel picker, and many more for multiple wheels. UIPickerView doesn't like to add anyone else's subviews, so I soon gave up on that approach. I also tried adding a subclassed UIImageView to a row with pickerView:viewForRow:forComponent:reusingView:, but apparently the picker view is making a copy of the image instead of adding the object itself as a subview.
    The only way I was able to trap touches on the selection bar was to cover it with a subview that I added to the content view. This is great for catching your double click, but of course it breaks the swiping response over the bar. I.e. you can swipe above and below the bar, but not over it.
    To make a cover view work correctly I think we'd need to figure out where to forward the intercepted touch event messages. Two of the subviews have promising names (_UIPickerWheelView and _UIPickerViewSelectionBar, so I've already tried forwarding to them without any luck (though I'm not confident I handled those messages correctly; feel free to repeat that test). I think the best try would be to check all the subview frames and decide where to forward on that basis. That approach would also be general enough to provide some protection against picker view upgrades.
    Best I can do for ya tonight. Hope it helps!

  • Table event for cell selection

    Hi,
    I want to be able to find out which cell was selected by the user in a table.
    This is usually handled by the onLeadSelect event. However, this event is not fired if the user only changes the column in the same table row.
    Is there a way to become aware of the chosen cell (InputField, which does not have to be edited, just clicked).
    Thanks and regards,
    Kilian

    Exactly this is my question. Is there an "onFocus", "onClick" event or has somebody encountered the problem and solved it somehow?
    I want to display additional information (in another view) with respect to the chosen cell.

  • Dropdown Selection : Populate Tableview

    Hi all,
               We have a requirement, in which we have to make a component which is divided into 2 sections.
    Section 1: Tableview is populated based on user login
      (done)
    Section 2: Dropdown which has 2 values
                    i. My opportunities
    on selecting this, a tableview should be populated displaying all oppts which are owned by the log in user
                   ii. Reportee Names
    on selecting this, it displays all the people reporting to the login user, and on selecting any of them should again display opportunities of that user.
      If anyone has worked upon populating tableview in a component depending upon dropdown values, please help.
         Posting Example code would be of greater help.
    thanks in advance,
    Rohit
    Edited by: Rohit Khetarpal on Oct 17, 2008 8:08 AM

    Solved by triggering event on dropdown selection
       IF iv_property =  if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'DDLB_CLICK'.
       ENDIF.
    and handling in do handle event.

  • How to add selection event, change event and click event for dropdownlist for mobile applications

    Please someone help me in writng selection , click and change events for dropdownlist in flex for mobile applications . i have tried but i wasn't able to select the items in dropdown using my mouse or touch in my mobile . Please help me I am struck at this point and i am unable to get solution gfor this. Please................
    Some code for which i neederd help:
    <s:DropDownList id="ddlBranch" x="257" y="475" width="63%" height="80%"
                                    creationComplete="ddlBranch_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="BranchName"
                                    prompt="{ddlBranch.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getBranchResult.lastResult}"/>
                    </s:DropDownList>
    <s:DropDownList id="ddlZone" x="257" y="546" width="63%" height="80%"
                                    creationComplete="ddlZone_creationCompleteHandler(event)"
                                    fontFamily="Calibri" fontSize="24"
                                    labelField="ZoneName"
                                    prompt="{ddlZone.selectedItem}"
                                    requireSelection="true"
                                    selectionColor="#7ab342">
                        <s:AsyncListView list="{getZoneResult.lastResult}"/>
                    </s:DropDownList>
    I will get the list of Branches(first DDL) and Zones(Second DDL) from a webservice written in DOT(.)NET,  what i needded is touch events and selection events for both the dropdown lists and the data in the second DropDown List should bind based on the First Dropdown list item selected.
    Service call for binding data to DDL:
    protected function ddlBranch_creationCompleteHandler(event:FlexEvent):void
                    getBranchResult.token = loginService.getBranch();
                protected function ddlZone_creationCompleteHandler(event:FlexEvent):void
                    getZoneResult.token = loginService.getZone();
    Please help...
    Thank you.

    Therer are two ways you can assign an action to the "OnEnter"-event of your input field:
    1. in method cl_wd_input_field=>new_input_field you have the parameter:
    ON_ENTER
    You just have to assign your action name to this field and it will be called on the OnEnter-event of your InputField.
    e.g:
         lr_input_field = cl_wd_input_field=>new_input_field(
                                                 id = 'INP_MY_INPUT_FIELD'
                                                 on_enter = 'MYACTION'
    2. You can use the method SET_ON_ENTER.
    like:
         lr_input_field->set_on_enter( 'MYACTION' ).
    Just make sure, you have created and implemented this action and its handler.

  • Can i insert a dropdown selection box for a cell

    Hi,
    I have an exel spreadsheet that contains a dropdown selection box in one cell. allof the other formulae in the sheet work except the drop down. Is this possible in numbers on the ipad?
    Thanks

    Hi Paul,
    Apple vocabulary for this is pop-up menu. In the Mac version of Numbers, it's a cell format, so if it's supported in the iOS version, I suspect you'll find it in the same place as you'd find other ways to format a cell—number, percentage, text, etc.
    I've requested your question be transferred to the iWork for iOS community, where the iPad Numbers experts hang out, and where you'll get a more definitive answer.
    Regards,
    Barry

  • When i select an event for move to trash, it doesn't appear in the trash to be emptied. where is it?

    I have iMovie 10.0.4. When I select an event for 'move to trash' it doesn't appear in the trash to be emptied there. Where is it?

    Thanks for the reply, have checked and that seems to be the problem, I have plugged in my ipad and the missing app has appeared.

  • ALV: how to handle event for multi (lead) row selection ?

    Hi,
    I use editable ALV and configure it for multi (lead) selection. Works fine.
    But I could not find any event handler for reading the selected lines.
    There is only the Event handler ON_LEAD_SELECT: this works only for 1 line
    (the lead line). But I could not read multi lines. Who can help?
    Thanks in advance, Christian

    Hi Christian,
    did you try a custom button?
    Try a call
    node->GET_SELECTED_ELEMENTS
    I cant remember if ALV sends event when multi-selection is on for each row selection.
    ie as each row is selected, do you get control ?
    If so, then you should still be able to call node->GET_SELECTED_ELEMENTS .
    regards
    Phil.

  • Event  0110 for own selection specification

    Hi,
    As per the requirement
    I had to write logic for
    selection specifications to decide which open items should be used with
    which amount. The selection criteria are transferred in table T_SELTAB. If these criteria
    are specified, they will then be expanded to include table T_ZBTTAB, in which one partial
    amount is given for each selection specification. In this way, you can specify that, for
    a payment of 300.00, account 1001 will receive 200.00 and account 1002 will receive 100.00.
    Created a Function module added through customisation
    Providing fixed data to populate T_SELTAB(providing selection criteria in such a way that the given amount will be used to clear two account 250 AED each)   this is hard coded
    but when I execute still system does not consider the selection data given in T_SELTAB
    could you let me know the exact value that needs to be passed into  T_SELTAB.
    through which function module we need to pass this selection criteria.
    Thanks In adv

    Hi,
    Thanks for the reply.
    I have not implemented BTE. Instead using FQ Events(used in ISU FICA).
    I put a break point in my function module and it do gets triggered when you execute the tcode FP06
    As per FQ event documentation when I tranfer my own Selection criteria to table T_SELTAB for clearing respective document system does not clear documents based on my selection rather as per standard customisation.
    Kindly advice
    Thanks

  • Problem with onSelect event for DropdownbyIndex in the IView

    Hello ,
    I have an webdynpro for java application where I am using Dropdownby Index. I have associated onSelect event for the dropdown by index. When I launch the application in the standalone mode ( direct application launch) every thing works fine. The onSelect event for the dropdown is also working fine.
    I have made an Iview of the webdynpro application. Here on select of the dropdown box  I am getting a java script error "Access Denied". Please can you suggest me how do I correct this strange problem .
    I have developed the webdynpro application in NW640 SP15 .
    Thanks in advance for the help
    V Vinay

    Hi Vinay,
    Does the portal and the application inside of the iView run both on HTTP or HTTPs? Mixing them is not possible.
    Best regards,
    Thomas

  • Function code for dropdown on OO ALV Grid to trigger user_command

    Hi Experts,
    I know we can add a dropdown to a column of an OO ALV Grid, set values to the dropdown list and allow the user to select some these values.
    However , what I'm not sure is that if we can *assign a function code to the dropdown * which would then trigger the event user_command ( PAI ) of the ALV class so I can handle the changes to when a particular value is selected from a dropdown list, just like we do in normal dialogs.
    Now I know that I can register the 'Enter' event and handle the data changes in data_changed event, but that is something I want to avoid the user from doing as far as possible to make the report more user friendly.
    Awaiting your valuable inputs and would really appreciate your help.
    Thanks & regards,
    Advait

    Hi Advait,
    No problem. Yes, this functionality requires changing the focus to other cell.
    I think there is other solution. As the dropdown is kind of F4 activity try this way:
    data: it_f4 type lvc_t_f4,
            wa_f4 type lvc_s_f4.
            wa_f4-FIELDNAME = 'CONNID'.
            wa_f4-REGISTER = 'X'.
            wa_f4-GETBEFORE = 'X'.
            wa_f4-CHNGEAFTER = 'X'.
            append wa_f4 to it_f4.
    "register F4 event
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4  = it_f4.
    "Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
    "Definition
         methods:
         handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
                                  IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
    "Implementation
    METHOD handle_data_changed .
        DATA: ls_mod_cells TYPE lvc_s_modi.
        IF e_onf4_before = 'X'.
          MESSAGE 'Data changed before F4' TYPE 'I'.
        ENDIF.
        IF e_onf4 = 'X'.   "if event triggered by F4
          MESSAGE 'Data changed on F4' TYPE 'I'.
        ENDIF.
        IF e_onf4_after = 'X'.
          MESSAGE 'Data changed after F4' TYPE 'I'.
        ENDIF.
       "here you know which cell was modified
        LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
         "just example test case, here you can implement your code for modified cells
          IF ls_mod_cells-value >=5.
            CALL METHOD er_data_changed->add_protocol_entry
              EXPORTING
                i_msgid     = 'SABAPDOCU'
                i_msgty     = 'E'
                i_msgno     = '888'
                i_msgv1     = 'Only numbers below 5 are possibe'
                i_msgv2     = 'Please correct'
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id.
            CALL METHOD er_data_changed->modify_cell
              EXPORTING
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id
                i_value     = space.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    This approach works fine for picking value from input help. Never tried it for dropdown list. You have to try it out.
    Regards
    Marcin

Maybe you are looking for