Hot spot for field based on field value

Hi,
Im using ALV list to display report. And I have enable hot spot for that field based on field value. For example, If the field has value " 0 " then hotspot should be enabled for that field. If the field has value " 1 " then it should be displayed as normal field without hotspot.
Can anyone tell me how to do this?
Thanks,
Amal

Hi Amal
Do this
In your final internal table
add a table type
gi_cellstyles TYPE lvc_t_styl
Then (while populating output)
FORM prepare_edit_output.
* say your field is 'field'
  DATA : lw_stylerow TYPE lvc_s_styl,
         li_styletab TYPE lvc_t_styl.
  IF gw_output-field = '0'.
    CLEAR lw_stylerow.
    lw_stylerow-fieldname = 'FIELD'.
    lw_stylerow-style     = cl_gui_alv_grid=>mc_style_hotspot.
    APPEND lw_stylerow TO li_styletab.
  ELSEIF gw_output-field = '1'.
    CLEAR lw_stylerow.
    lw_stylerow-fieldname = 'FIELD'.
    lw_stylerow-style     = cl_gui_alv_grid=>mc_style_hotspot_no.
    APPEND lw_stylerow TO li_styletab.
  ENDIF.
  INSERT LINES OF li_styletab INTO TABLE gw_output-gi_cellstyles.
ENDFORM.
In your layout building
    gw_layout-stylefname = 'GI_CELLSTYLES'.
Pushpraj

Similar Messages

  • Change value of another field based on the value of selectOneRadio

    Hello
    I need to display one of two city fields based on the value of a radio group. If the value of the radio group is "Yes", then display the non mandatory city field, if the value is "No", then display mandatory city field. Please can someone help me? The code is below
    <af:subform id="contactForm3" default="true">
                <af:panelForm binding="#{processScope.backing_regDetails.contactPanel3}">
                  <af:selectOneRadio binding="#{processScope.backing_regDetails.radio1}"
                                     labelAndAccessKey="#{MatrixResource['ContactDetails.inBoroughQuestion']}"
                                     layout="horizontal"
                                     valuePassThru="true"
                                     required="true"
                                     onchange="javascript.refresh;" >
                      <f:selectItems value="#{processScope.backing_regDetails.items}" />
                  </af:selectOneRadio>
                  <af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.SAO']}"
                                binding="#{processScope.backing_regDetails.houseNameText}"                           
                                maximumLength="240"/>
                  <af:inputText required="true"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                maximumLength="240"
                                label="#{MatrixCommon['Label.PAO']}"
                                binding="#{processScope.backing_regDetails.numberStreetText}"/>
                  <af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                maximumLength="240"
                                labelAndAccessKey="#{MatrixCommon['Label.District']}"
                                binding="#{processScope.backing_regDetails.districtText}"/>
                  <af:inputText maximumLength="60"
                                rendered="#{!backing_regDetails.radio1}"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
                                required="true"
                                binding="#{processScope.backing_regDetails.cityText}"/>
                 <af:inputText maximumLength="60"
                                rendered="#{backing_regDetails.radio1}"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
                                required="false"
                                binding="#{processScope.backing_regDetails.cityText}"/>
                  <af:inputText maximumLength="60"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.County']}"
                                binding="#{processScope.backing_regDetails.countyText}"/>
                  <af:inputText columns="7"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                labelAndAccessKey="#{MatrixCommon['Label.Postcode']}"
                                binding="#{processScope.backing_regDetails.postcodeText}"/>
                  <af:selectOneChoice onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                      binding="#{processScope.backing_regDetails.countrySelect}"
                                      value="#{processScope.backing_regDetails.enteredAddress.countryId}"
                                      labelAndAccessKey="#{MatrixCommon['Label.Country']}">
                      <f:selectItems value="#{backing_regComponents.countryChoiceList}"/>
                  </af:selectOneChoice>
                  <af:inputHidden value="#{processScope.backing_regDetails.enteredAddress.locationId}"
                                binding="#{processScope.backing_regDetails.locationIdHidden}"
                                id="locationId"/>
                  </af:panelForm>
                  </af:subform>Edited by: aademola on Nov 13, 2008 7:35 AM
    Edited by: aademola on Nov 13, 2008 7:42 AM

    Hi,
    you should be able to apply this example to your 10.1.3 project
    see 4.3.2 of http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF
    Frank

  • Deactivate the double click/ hot spot for a particular row in alv grid.

    Hello,
       As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
    Regards,
    Saroj

    where u define layout there is a field hotspot.like
    data: var.
    if con is true
    var = 'X'. (show hotspot)
    else.
    var = ' '. (deactive hotspot)
    elseif ws_fieldcat-fieldname = 'DMBTR'
                    AND ws_fieldcat-tabname = 'T_MTAB'.
          ws_fieldcat-do_sum = C_X.
          <b>ws_fieldcat-hotsopts = var.</b>
          MODIFY Wt_fieldcat FROM ws_fieldcat
                  TRANSPORTING   DO_SUM.
    It is helpful for u. if any problen send me ur coding i will change it.
    Regards
    Manish Kumar

  • Can i use my iPhone as a hot spot for my iPad 2

    Can I use my iphone as a hot spot for my ipad 2?

    Yes, so long as your iPhone has the personal hotspot service enabled.

  • My iPhone5 is my wifi hot spot for my mac mini computer and iPad. I live in a rural area. Will this be sufficient to run apple tv and air play?

    My iPhone5 is my wifi hot spot for my mac minim computer and iPad. I live in a rural area with no other options. Will this be sufficient to run Apple TV and air play?

    If you are intending using your hot spot to download movies for the Apple TV, you'll very quickly eat through your data allowance.

  • Can I use the samsung galaxy phone as a hot spot for the ipad

    can I use the samsung galaxy phone as a hot spot for the ipad

    If your Cell carrier supports it, you should have an option in your phone for "Portable Wifi Hotspot"  under Wifi and networks.
    Look in your Phone's manual for specifics.
    http://www.fusiondub.com/how-to-turn-your-samsung-galaxy-s3-into-a-wi-fi-hotspot -2/
    Once you set up the Hotspot, the iPad can connect to it like a regular Wifi network.

  • Phone as hot spot for tablet?

    I have a tablet that is wifi only.  Is there anyway to setup my Galaxty Note 3 as a hot spot for the tablet?  I don't really want to set up a full service for this as the tablet will need the hot spot only once or twice a moth.
    Thanks in advance... Bob

    iOS: Understanding Personal Hotspot
    http://support.apple.com/kb/HT4517
    Use Bluetooth to tether your iPhone, iPod touch, or iPad
    http://www.macworld.com/article/1159258/bluetooth_tethering.htmlhttp://www.macworld.com/article/1159258/bluetooth_tethering.html
    How to Connect an iPad to an iPhone Via Bluetooth Tethering
    http://techtips.salon.com/connect-ipad-iphone-via-bluetooth-tethering-25472.html
     Cheers, Tom

  • TS1398 I phone hot spot for I pad issues

    I am having trouble using my I phone as a hot spot for my I pad. The I phone network option often times does not appear. When it does Iand I select it I get the unable to connect message??

    Time Machine in itself, without an external drive may well be good for instances where you accidentally delete documents that you later require. However in the event of a hard drive failure, if Time Machine backup is kept on the same drive as the original items, it will not be much use to you.
    In my opinion, it is vitally important that you have an external drive for backup, whether you use Time Machine or a another backup solution is entirely up to you.
    My situation is slightly unusual, I have four hard drives in my computer and multiple arrays of hard drive enclosures with multiple hard drives within them (in total I have 40 TB of storage). As a result of this I tend to employ more than one backup procedure, I use Time Machine to backup some items and a utility called tri-backup to backup other items. I also keep two backups of everything.
    Time Machine is free, it's included with your operating system, I wonder if you mean time capsule.

  • Traveling to the Bahamas and Hot Spots for my iPhone

    Can I use my phone in Nassau, Bahamas?  And what charges/plans are there or will there possibly be?
    Also, can someone explain a hot spot for me and is it free?  I notice that I have to contact Verizon to get it set up, which makes me think it isn't free. I do have internet at my home.
    Thanks!

    Hello shellshell211
    Yes your device will work in the Bahamas! Have a great trip! Here's a link that will explain the charges when you use your device in the Bahamas: http://www.verizonwireless.com/b2c/tripplanner/tripplannercontroller
    The hotspot application allows you to use your iPhone 4 to connect up to five Wi-Fi enabled devices. It's great feature that uses your iPhone as an internet source for other devices. Here's a great link with the mobile hot spot application pricing: http://www.verizonwireless.com/b2c/plans/?page=mobileBroadband
    Please let me know if you need any further assistance
    Thank you
    JoeL_VZW
    Please follow us on twitter @vzwsupport

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • Required Fields based on field value

    I am using Acrobat 9.1 Std. This is what I am trying to accomplish I have four text fields that I want to make required based on the selection of a radio button group.
    I have two radio buttons on the form w/ the same name w/ the button value set to Yes for one and No for another. If the radio button w/ value Yes is selected I want to set the four text fields to required. If the radio button value is No the text fields should be optional.
    Ive found similar postings for what I am trying to accomplish; however, I havent had any success in getting it to function correctly.

    Some more information on what I have tried..For simplicity Im just trying to get one text field to work, then I can repeat the java code for the other text fields.
    In acrobat Standard 9.1 I go to Forms Add or Edit Fields from there I select the radio button group (contains two radio buttons) on the left column and select properties. Then on the radio button properties dialog box I select the Actions tab. Set the Trigger for Mouse Up and the Action for Run a JavaScript . I click the Add button and enter the following into the JavaScript editor:
    if (this.rawValue == "Yes") {
    TextField1.validate.nullTest = "error";
    xfa.layout.relayout();
    else {
    TextField1.validate.nullTest = "disabled";
    xfa.layout.relayout();
    I then close the JavaScript editor, save the form and re-open to test it. I select the radio button w/ value Yes and click the Submit button and the form goes on to submit. At this point I would expect it to error because I didnt fill in any value for TextField1.
    I also tried altering the field tag with the below java:
    if (this.rawValue == "Yes") {
    TextField1.mandatory = "error";
    xfa.layout.relayout();
    else {
    TextField1.mandatory = "disabled";
    xfa.layout.relayout();
    This also didnt work. Im not sure if I am using the correct tag or not or why I am unable to get the text field to become required for submission.
    Any help would be greatly appreciated.
    Thanks,

  • Changing fields based on database values

    Hi all,
    I have one form and two drop -down fields. The fields are Call Type and Sub Call Type and are on the SAME form. I pull data from the Call Type from the database. When the user selects a particular Call Type, I need to go back to the database and pull in values associated with that particular Call Type.
    This is the method, that I am using:-
    1) I first populate the Call Type drop down field by using a Server Side Method to fill in values for the Call Type and calling the database.
    2) I then call a method called as PopulateSubCallType by using the property On Change Invoke for the Call Type field.
    In this method I again call the database and based on the Call Type selected by the user, I pull in the associated Sub Call Types and store them in an array.
    3) I also call the same array to populate the Sub Call Types based on Call Types. But the drop down field for Sub Call Type is not auto-populated based on the values from the array. The array values although pulled up from the database are not shown on the form.
    Can you tell me a way to auto-populate the Sub Call Type from the database based on the Call Type selected by the user but on the SAME form.
    I AM NOT USING JSP's but ONLY ALBPM 6.0 PRESENTATIONS.

    refreshValidValues("someAttribute") is a method that comes with BPM Object presentations.
    This one line in this method will work because it causes the attribute (child in this case) to automatically invoke the method you created for retrieving the valid values of the children of the parent.
    Your server side method that dynamically returns valid values of the children based on the parent selected should be looking something like this:
    for each ...
    select * from child
    where parentOfChild = parentAttribute
    In this example the name of your parent attribute is "parentAttribute" column in the child database table that contains the parent's id is "parentOfChild".
    This causes the list of children to auto populate in the child combo dropdown automatically.
    To summarize - at runtime here is what happens:
    a) since the parent has a dynamic method that populates its valid values, as the presentation initializes the SQL for the valid values of the parent is run.
    b) the parent's combo dropdown is populated with a list of valid values of the parent
    c) the end user selects one of the parent's names from the combo dropdown
    d) this causes the method to fire that has only one line. This one line has the text "refreshValidValues("nameOfTheChildAttributeGoesHere")
    e) since the child has a dynamic method that populates its valid values, when the previous step caused this child attribute to refresh its valid values, the SQL in the method that dynamically retrieves the valid values of the child is run.
    f) the end user clicks the combo dropdown on the child's attribute and sees that the child valid values (based on the parent that was just selected) now appear.
    Dan

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • Export hot spots for GL CS2

    Hi, I've created a simple image with a hotspot but when I
    export as a jpeg I loose the hotspot. I've also tried to export
    jpeg + html and tried to paste the generated code in the sourcecode
    of my GL page but it's not working. What am I missing? I'm using FW
    CS3, GL CS2 and OS 10.4.11 all updated to latest versions.

    >wow! 100,000 shots...
    Really. It's nice to see someone has job security in this economy.
    >Everything I have read so far says to avoid using flash. The reasons given were: distraction (for the employees), uneven color (due to "hot spots") and time to recharge the flash between firing.
    Flash/strobe as far as I'm concerned, is going to be much more consistent color and exposure wise than tungsten. Flash tubes tend to stay much more constant over time and will certainly last much longer. And you won't have hot spots if you do as Ann says:
    >That means having at least two identical units positioned at equal distances on either side between the camera and the blue print and at a 45° angle from the print.
    Considering the enormity and apparent historic or other importance---and not knowing what sort of equipment you already have---I certainly wouldn't consider it imprudent to figure in an investment of a few hundred to (more likely) a few thousand dollars in order to make this happen as expeditiously as possible.
    And if you're going to be doing 100,000 shots straight down, either make sure you have a comfortable set-up and/or enroll in a yoga class, because that's gonna be tough on the back.
    >I still think someone is exaggerating or pulling my leg.
    Somehow, I think that as well. Otherwise, we'll see you when you surface in 3.42 years.

  • How to create a hot spot for a browser filled image?

    I have a background image created in Photoshop in the browser fill, scale to fill. 
    This is my landing page and would like to create a hot spot or "invisible" rectangle to link to another page in my site when clicked.
    I have this done and working, however, my problem is that when my browser size is enlarged or reduced, the spot where I want the hot spot to be changes in size and location.
    I want to create a hot spot that will keep its form around my logo no matter the screen size. 
    I have tried this with a no fill box and white stroke to see how it reacts with each fill property but cannot figure out how to create a box to be in a fixed position that will always match up
    with the browser fill image location and size.
    Thanks for your help.

    Hi
    Have you tried to pin the box on page so that it should be in fixed position ?
    Also if want the box to be on some specific position with page scroll, then you can try applying scroll effects which would scroll the box on page but within defined positions.
    Thanks,
    Sanjit

Maybe you are looking for