Mandatory dropdown in red colour

Hi all, I need to put a dropdown in a red marked colour if the user don't select anything on it.
I have try these method:
a)   wd_this->message_manager->report_attribute_error_message(
      message_text  = text
      element = wd_context_element
      attribute_name = attribute ).
b)     lo_view_controller = wd_this->wd_get_api( ).
    cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
    EXPORTING
    view_controller = lo_view_controller
    IMPORTING
    messages = msg_tab ).
But the dropdown in red is never been marked.
Am I forgetting something please?
Help please.

Just thought to update that I am using a DropDownByIndex for this coding:
Suppose I have a context node by name NODE_IDX & have 2 attributes under this KEY & VALUE. I have associated a supply function POPULATE_NODE with my context node to fill it with values as how shown below:
METHOD populate_node .
* data declaration
  DATA lt_node_idx TYPE wd_this->elements_node_idx.
  DATA ls_node_idx LIKE LINE OF lt_node_idx.
  DATA lv_str TYPE string.
*** If I ommit writing 3 lines below then the system will by default have the 1st value of my
*** dropdown as selected & so would assume that the user has already selected 1 value
*** Try running the component with and without these 3 lines & check the difference
ls_node_idx-key = ''.
ls_node_idx-value = ''.
APPEND ls_node_idx TO lt_node_idx.
  DO 10 TIMES.
    lv_str = sy-index.
    CONCATENATE 'TEXT'
                lv_str INTO lv_str SEPARATED BY space.
    ls_node_idx-key = sy-index.
    ls_node_idx-value = lv_str.
    APPEND ls_node_idx TO lt_node_idx.
    CLEAR ls_node_idx.
  ENDDO.
* bind all the elements
  node->bind_table( new_items            =  lt_node_idx
                    set_initial_elements = abap_true ).
ENDMETHOD.
I have bound the "texts" property of my DropDown to the attribute "Value" & I have changed the "state" property to "Required".
I also put the below coding within my WDDOAFTERACTION method to trigger error messages for any mandatory fields which the user hasn't filled out.
METHOD wddoafteraction .
  DATA: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,
        lo_view_controller TYPE REF TO if_wd_view_controller.
  DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
  lo_view_controller ?= wd_this->wd_get_api( ).
  lo_message_manager = lo_view_controller->get_message_manager( ).
  lo_view_controller = wd_this->wd_get_api( ).
  cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
    EXPORTING
      view_controller = lo_view_controller
      display_messages = abap_true
    IMPORTING
      messages = lt_msg ).
ENDMETHOD.
Regards,
Uday
Edited by: Uday Gubbala on Jun 9, 2009 11:39 AM

Similar Messages

  • Mandatory field is completely coloured

    Hi Friends,
    We have upgraded from 5.2 to 7.0. We have an Account Plan and it has various Mandatory fields marked with a star. Now the problem is for one of the mandatory field apart from the star we have a red colour covered for that particular field. Now we need to remove that red colour to that field. Kindly give your thoughts on the same.

    Hi Jaya Pal,
           The red borders will stay as long as the mandatory fields are empty. This behaviour is hardcoded as part of the input field rendering. If you absolutely must eliminate this behaviour, you can try modifying a CSS file. Open BSP application thtmlb_styles in SE80. Expand Mimes->sap_skins->default and edit thtmlb_stand.css. Look for a section like this and change it as you see fit.
    /* <thtmlb:inputfield> tag Mandatory field                            */
    .th-ip-sp-md .th-if,
    input.th-ip-sp-md {
        border-color:      red !important;
    Regards,
    Arun Prakash

  • UI Text field / value need to be display in red colour in web dynpro

    Hi Friends,
    i have a requirement in vendor master change,
    left side: old value with disable mode and right side : change values. ( elem type : input filed)
    like
    vend name_lbl: sapoldverson            sapnewecc6.0
    when the values is changes in right, it should in red colour after enter.         
    please suggest me.
    Thanks in advance
    hari

    Hi Friends,
    i have a requirement in vendor master change,
    left side: old value with disable mode and right side : change values. ( elem type : input filed)
    like
    vend name_lbl: sapoldverson            sapnewecc6.0
    when the values is changes in right, it should in red colour after enter.         
    please suggest me.
    Thanks in advance
    hari

  • Highlighting input field and  table cell column in red colour

    Hi,
           I have 4 input fields and a table in my screen. All the input fields are read only.
        I have a functionality where I have to highlight a input field with the red colour. In the sense, I have to put a thin Red border over the input field without thowing any errors or messages.
           Also, i have to highlight a particular cell in the table. i.e, i have to put Red colour border over the cell of the table for some rows only. Right now i have changed the background colour of the cell for required rows, but i need Red thin border rather than changing the entire background colour.
    Please guide me on achieving these functionalities..
    Thanks and Regards,
    -Shabir Rahim.

    Hi,
    The red thin lines border you are talking about comes from the framework during the exceptions. If this is the case then refer the following links, hope this will help you.
    [Re: Automatic message for inputfields with state=required]
    [Re: Validation of InputField]
    Well without exceptions, i dont think it will come.
    thanks & regards,
    Manoj
    Edited by: Manoj Kumar on Feb 7, 2008 12:09 PM

  • Traffic light showing the red colour in vl10g after all status completed

    Hi Team,
    My client facing one issue regarding the vl10g traffic light it show red colour after all document status is completed so please let me know I have to used which oss note / I have to debug the program(this is the standard T.code) or which way i have to used for resolved this issue so please replay argentely this great help to me and I am very thankful for corporation.
    Regrads,
    Ravi SAP SD

    RaviSAPSD wrote:
    it show's the error i.e. "No delivery-relevant items in order 0527087193, order type OR"
    With this in mind, I'd doubt the previous statement that the order status is 'completed'. Such orders wouldn't be picked up for the Delivery Due list. It is possible that either there is a line item that is not relevant to delivery yet it makes the order header status incomplete. Thus Delivery Due list picks up the order # based on the header status but when it checks the line items, there is nothing relevant for delivery.
    Check again the order statuses, not just on screen but in the tables VBUK/VBUP. Additionally, you can search for the notes yourself using the message ID/number (e.g. VL 001, which you should see, along with the long text, when you double-click on the message).

  • Regarding nodes shown in red colour in message mapping under test (tab)

    hi all.
    i just want to confrom one thing.
    i just created a file to rfc scenario and when i was tested and look in sxmb_moni its showing like the message was sucess but when i ltested in message mapping in design there were some nodes in sender Message type which were displayed in red colour.
    and when i look in runtime workbench the message is showing like system error.
    so can you guys tell me what could be the reason for this.
    waiting for your response.
    bye.
    regards.
    seeta ram.

    hi rinku .
    i think you havent understand my problem.
    here the message in moni was showing as succes but when i tested the same message which was in moni in message mapping (design) there were some nodes which were in red colour and these nodes are not populated to reciever message type  .but it was in sxmb_moni with all the nodes .
    what could be the reason for this.
    can u tell me fast and i case if u still havent understand the Q u can ask me.
    waiting for your response.
    bye.
    regards.
    seeta ram.

  • I recently upgraded to 0S 10.6.8 on mab pro and now have pink lines around the desktop borders. A horrible red colour appears in the background of the screen saver, and in parts of Safari and other applications including MS Office. please help

    I recently upgraded my Macbook Pro to SL OS 10.6.8 and now have pink lines around the desktop borders and some menus. There is also a horrible red colour that appears in the background of photobooth and parts of Safari. The screen saver looks like an alien life form with red in the background. There are odd translucent colours in the background of other applications including MS Office. It looks like a horrible psychedilic trip from the 60's. I ran the upgrade again but nothing changed. Can you help?

    Backup your files off the computer (not TimeMachine) and disconnect.
    Hold c boot off the 10.6 disk, under the Utilities menu > Disk Utiltiy > Repair Disk, and Repair Permissions
    (quit and stop if Disk Repair (only) issues a failure and notify us)
    Quit and install 10.6 again, reboot and Software Update again,  this time download it and then run it. Check Software Update until clear.
    c boot off the 10.6 disk and use Disk Utility >Repair Disk again (fixes a bug)
    Reboot and check any installed programs, some may not function who have installed kext files into OS X, those need to be reinstalled.
    You didn't mention if you upgraded from 10.5 or 10.6.7, the above steps are for fixing a 10.6 to 10.6.8
    If you upgraded from 10.5, you should erase the drive in Disk Utility first, then install 10.6 fresh, but then all your programs will have to be reinstalled or updated from original sources.
    Also the 10.6.3 upgrade disk has no free iLife, but you can install 10.5 fresh then upgrade to 10.6.3, then to 10.6.8 and then all new programs and that will give free iLife that came on the factory 10.5 disks.
    You also can use Pacifist to extract iLife from 10.5 disks.

  • Red colour cast

    Hi, I open an image in Photoshop CC and it has a red colour cast, open the same image in Photoshop CS6 and no colour cast. Image edited in Lightroom first. Both lightroom and Photoshop have the same colour space, image has the same colour profile. I work on a calibrated Ezio monitor, any help?

    Most likely a monitor profile issue, affecting CC but not CS6.
    If you use ColorNavigator, set it to v2 matrix profiles (called gamma in CN). V4 and/or LUT profiles can sometimes cause problems. LUT profiles are theoretically more accurate, but also heavier and more complex.
    There is no particular need to use the same color settings in Lightroom and Photoshop.

  • Requirements quantity in red colour........

    Hi friends,
    When I am creating requirements by demand management for 2-3 months , System is displaying all correct tranfered requirement quantity but 1st month quantity system is displaying in red colour.
    I think it will not create any problems but still I want to know it for my knowledge.
    can any one tell me why its coming and how to solve this ?
    Regards,
    Imran

    Dear,
    I'm not sure but i think you are getting the some warring message then quantity shows in red colour like "Date lies in the planning time fence " while saving the demand.
    Please check in MD62 and confirm it.
    Regrads,
    R.brahmankar

  • Dropdown  Mandatory field - Never Red

    Hi all,
    I need to put a dropdown in a red marked colour if the user don't select anything on it.  Stats of dropdown fields is required only.I am getting porper Element and attribute. But it never becomes read and able to show the message. Only the link between the message and UI element is missing and UI element never change to Red.
    I have try these method:
    wd_this->message_manager->report_attribute_error_message(
    message_text = text
    element = wd_context_element
    attribute_name = attribute ).
    Please help me if any one cross this situation.
    Thanks in Advance,
    Best Regards,
    Vijay

    hi Vijay,
       i think you are doing it slightly wrong.
    wd_this->message_manager->report_attribute_error_message(
                              message_text = text
                     element = wd_context_element
                     attribute_name = attribute ).
    here your
    text - is the message you want to disply.
    element - This has to be your node name
    attribute_name - is the name of attribute which has to be in codes.
    for eg.
    wd_this->message_manager->report_attribute_error_message(
                              message_text = 'please select atleast one value'
                     element = node_flight
                     attribute_name = 'FLDATE' ).
    hope you got my point.
    regards
    pankaj giri

  • JHeadstart 10.1.3: selection required error on mandatory dropdown list

    Situation:
    - JHeadstart 10.1.3 build 059
    - One JHeadstart Group containing three item regions
    - All items are in the item regions and the regions are stacked (generated as tabs)
    - In the first region (tab) a mandatory item generated as a dropdown list, using a dynamic domain
    When the page starts, the dropdown list displays the meaning value correctly and the list is populated with the correct values. There is no blank option in the list, which is also correct.
    If no changes are made to the list and we navigate to the second tab, an error occurs, displayed at the top of the page: status (which is the field name) - selection required.
    Under the status field a red message reads: A value must be entered. Even when we change the field's value to another list entry and navigate to the next tab, the error reappears. The error does not appear when we change the field back to a simple textImput item.
    Why does this error occur although the field has a correct value?
    Jean-Paul van der Meer and Toine van Beckhoven

    Steven,
    I do also have this problem. It occurs when the VO contains lookup attributes from another enitity.
    In the form I have an table with two stacked tabs as overflow. In the context part I do have 4 dropdownlist. Now when I change one of the lookup items (using a LOV group) and press the save button, the first two dropdownlists become empty and the message 'Selection required' is shown. After entering the values and saving again the other two dropdownlists become empty (no message is shown because those are optional). When I'm only changing other items (non lookup items) the form works fine. At first startup the mandatory dropdownlist do have a NULL-value.
    As temporary solution I moved all the dropdownlists to the stacked tabs and that also works fine. When three are moved and one remains in the context part, the problem still occurs.
    With kind regards,
    Martin Schaap

  • Swaps-st02 are in red colour

    R/s All,
    In my Production Server (ECC6DB2 v.9.1Win2k3x64 with 40 GB of physical memory) when i perform st02 the field definition,initial records,program,CUA,generic key,export/import,buffer shows value RED under the swap category. Current memory parameters values are as follows. Kindly help us to reslove the problme.
    ztta/roll_area -                                   6500000
    ztta/roll_first -                                    1
    ztta/short_area-                                 4000000
    rdisp/ROLL_SHM-                              32768
    rdisp/PG_SHM -                                  49152
    rdisp/PG_LOCAL -                              150
    em/initial_size_MB-                              16285
    em/blocksize_KB-                                4096
    em/address_space_MB-                     4096
    ztta/roll_extension -                             2000000000
    abap/heap_area_dia-                           2000000000
    abap/heap_area_nondia-                     0
    abap/heap_area_total-                         12881756160
    abap/heaplimit -                                     40000000
    regards,
    VM

    A red field in ST02 is NOT necessarily a problem. If you have performance problems and you can link them to buffer issues THEN it is a problem.
    The only productive systems i have seen so far with no red buffers at all were either not having much activity or the setup was wasting hundreds mb of memory. I recommend to consider the hit ratio as well. If for example your program buffer is above 99%, there is no need to further increase it.
    Cheers Michael

  • My iPad 2 screen is staying a red colour

    Hi.
    I tried slapping my iPad 2 4 times but it's still got a red screen.
    I turned it off and on twice but it got worse.
    If you have a solution, please reply.

    Your only solution is to have an Apple technician examine your iPad. Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support.

  • DVD Export Red Colour-Help?

    Hi. When I export a normal DVD Mpeg coding the Mpeg has this reddish colour to it, it's not super bad but it's slightly annoying as it has changed the colour grade a bit after the length I took spending on it.
    I want to be able to export a DVD and somehow turn off this setting (if it is a setting - couldn't find it myself in the settings)
    Thanks for any help, it will be greatly appreciate.
    Jomee
    (P.S. it's the latest version of Final Cut and Compressor)

    Most likely a monitor profile issue, affecting CC but not CS6.
    If you use ColorNavigator, set it to v2 matrix profiles (called gamma in CN). V4 and/or LUT profiles can sometimes cause problems. LUT profiles are theoretically more accurate, but also heavier and more complex.
    There is no particular need to use the same color settings in Lightroom and Photoshop.

  • Strange red colours after update from 10.7.4 to 10.8 (MBP 13 i7)

    I've installed clear ML, partially recover files from TM backup. Now I see something like this:
    ***, anybody knows?

    Update:
    After contacting the apple support who advised me to download the combo update direct from apple support page i tried to update again.
    Now i got the same result.

Maybe you are looking for

  • How to create site map in Dreamweaver CC

    Hi I have just built my first website and need to create a site map, any help greatly appreciated. Thanks

  • Trying to hide/show all series in legend with click on 'deselect' option.

    Hi Friends, I am trying to hide/show all series in legend with click on 'deselect' option. Please see the code below, let me what change i need to do: $(function () { $('#container').highcharts({ chart: { type: 'line', marginRight: 130, marginBottom:

  • Itouch is disabled - cannot get it to work or show up in itunes

    My daughters itouch is disabled. She forgot her password. I have a new laptop and all of our other itouchs and ipads are syncing fine. This one is not being recognized. How can I get it to show up in itunes so we can reset it? Is there another way ar

  • Creating BADI in ECC 6.0 version

    hi guys,          Can any one help me, 1. when iam creating a BADI in ECC 6.0 version after giving the badi name and description, i dont find the INTERFACE tab.    CAN ANY ONE GIVE ME THE STEPS TO CREATE BADI IN ECC 6.0 VERSIO. Thanks ahmed

  • How to resize data in JTable?

    Hi all, I wish to provide a resize button on an application which will resize the data in a table (in most cases just text) as well as the table containing it. Is it possible to directly resize the table or must I change the renderer to draw all of t