Changing color of a field after changing the data using OOPS ALV.

Hi Experts,
I have displayed three fields (price, no. of products and total amount) in my ALV grid using OOPS.
Then am changing the data in either price or no. of products fields. When I click ENTER key the value in total amount changes correspondingly. Am able to achieve till this point.
Now I have to change the color of the three fields( price, products and total amount) of the affected row alone and not the entire set of rows in the output grid.
Please provide suggestions.
Thanks in advance.

Hi,
You have to use Layout and Output data in your OO ALV. The below code is using FM you can replicate it in OO ALV
types: begin of t_data,
         flg(3) type c,
         sty    type lvc_t_styl,
         col    type lvc_t_scol,
       end of t_data,
       t_tdata type table of t_data.
constants: c_red type i value '255',
          c_g   type i value '1'.
DATA: i_fcat type LVC_T_FCAT,
      s_fcat type lvc_s_fcat,
      s_lay  type lvc_s_layo,
      s_sty  type lvc_s_styl,
      s_col  type lvc_s_scol,
      i_data type t_tdata,
      s_data type t_data.
s_lay-stylefname = 'STY'.
s_lay-CTAB_FNAME = 'COL'.
s_fcat-FIELDNAME = 'FLG'.
APPEND s_fcat to i_fcat.
CLEAR: s_data.
s_data-flg = 'Yes'.
s_sty-FIELDNAME = 'FLG'.
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
insert s_sty into TABLE s_data-sty.
s_col-fname = 'FLG'.
s_col-color-col = 6.
s_col-color-inv = 1.
insert s_col into table s_data-col.
APPEND s_data to i_data.
CLEAR: s_data.
s_data-flg = 'No'.
s_sty-FIELDNAME = 'FLG'.
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
insert s_sty into TABLE s_data-sty.
APPEND s_data to i_data.
CLEAR: s_data.
s_data-flg = 'No'.
s_sty-FIELDNAME = 'FLG'.
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
s_col-fname = 'FLG'.
s_col-color-col = 6.
insert s_col into table s_data-col.
insert s_sty into TABLE s_data-sty.
APPEND s_data to i_data.
CLEAR: s_data.
s_data-flg = 'Yes'.
s_sty-FIELDNAME = 'FLG'.
s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
insert s_sty into TABLE s_data-sty.
APPEND s_data to i_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
   IS_LAYOUT_LVC                     = s_lay
   IT_FIELDCAT_LVC                   = i_fcat
  TABLES
    T_OUTTAB                          = i_data
EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
IF SY-SUBRC <> 0.
ENDIF.
Thanks,
Kiruba

Similar Messages

  • My ipod touch's screen is changing colors and will not respond to the buttons

    my sisters ipod touch is a 4th gen and the screen recently started changing colors, it does not respond to the buttons and will not turn off. should i wait for the battery to die then charge it. she said it started happening when she was charging it. could it be the charging cable? i do not know what OS it has.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • How to change colors of individual column bar in the same data series

    in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.

    Hi Kiran,
    no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
    Regards,
    Govindu

  • After adjusting  the date to 2011, the date changes to 1609!!  And goes back in time each time I try it.

    After adjusting the date to 2011, iphoto changes it to 1780 and when I try again it goes back farther and farther..it is now 1609!

    Try going forward in small increments - 30 years or so
    LN

  • In va02 tocde after entering the data only storage location field is not saving.why?

    Hai
    in va02 tcode after entering the data only storage location field is not saving. why?

    Hi Purnaiah,
    Are you using any user exit for this or not?
    Check for the below exit, this may be the place where you can implement your code for saving the value.
    SAP MV45AFZZ calling the user exit with a form USEREXIT_SAVE_DOCUMENT
    Regards,
    Rafi

  • How to insert a new field without refreshing the data

    Hi,
    I have data of 3 years in a cube. I have to enhance a new field in that cube and i want the data will come from now onwards. I dont wanna have the data for the past 3 years.
    Can anyone tell me how i can load the data of that field into the cube without refreshing the cube as cube has too much data.
    Roma

    Hi Roma,
    It depend up on whether you are adding Cgharacteristic or Key figure. If you are adding key figure then no need to worry.
    Just create the new keyfigure, add this in all your data flow and activate all the objects and assign proper transformation.
    from next load you will get data for this field.
    If you are addign data the this is a bit difficult than key figure. addign characteristic is nothing but you are making changes to your cube dimensions.
    when you are changing your cube dimensions, you should delete the data before you transport the objects.
    You can try once to transport the objects with out deleting data. If it fails then you have to delete the data from Cube.
    Regards,
    Venkatesh.

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • Table Maintenance Events - "Event 02 After Saving the Data in the Database"

    Hi,
    Can we identify the record marked for deletion in the "Event 02 After Saving the Data in the Database" ?
    Thanks & Regards,
    Esha Raj

    Look at online documentation :
    - [Event 02: After Saving the Data in the Database|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . - [Internal Table TOTAL|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . - [Field Symbols <ACTION> and <ACTION_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . . - [Constants for Field Symbols <ACTION>, <ACTION_TEXT>, <XACT> and <XACT_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    Regards,
    Raymond

  • If the connecting fields are missing the data from knvh should be u00BBnullu00AB

    Could you help me I would like to have all fields from kna1 (if the connecting fields are missing the data from knvh should be »null«)in following code
    select * from kna1 .
    select * from knvh where kunnr = kna1-kunnr and vkorg = '0200'.
      itab-mandt = kna1-mandt.
      itab-stceg = kna1-stceg.
          itab-hkunnr = knvh-hkunnr.
          itab-datab = knvh-datab.
          itab-datbi = knvh-datbi.
        append itab. clear itab.
      endselect.
    endselect.

    HI,
      use the following code
    select * from kna1 into table it_kna1.
    if sy-subrc = 0.
    select * from knvh into table it_knvh
    for all entries in IT_kna1
    where kunnr = it_kna1-kunnr
       and vkorg = '0200'.
    if sy-subrc = 0.
    loop at it_kna1 into wa_kna1.
    itab-mandt = wa_kna1-mandt.
    itab-stceg = wa_kna1-stceg.
    loop at it_knvh into wa_knvh where kunnr = wa_kna1-kunnr.
    itab-hkunnr = wa_knvh-hkunnr.
    itab-datab = wa_knvh-datab.
    itab-datbi = wa_knvh-datbi.
    append itab.
    clear itab.
    endloop.
    endloop.endif.
    endif.
    I hope this solves your problem
    Regards,
    Vara

  • After loading the internet using Firefox AND then selecting NEWS and a delay the Error "The MSN toolbar has encountered an error. etc" occurs. Also, when browsing some searches are "REDIRECTED"!

    After loading the internet using Firefox AND then selecting NEWS and a delay the Error "The MSN toolbar has encountered an error. etc" occurs. Also, when browsing some searches are "REDIRECTED"!
    == This happened ==
    Every time Firefox opened
    == Hard to say but have been trying to diagnose for at least a week.

    Original message wouldnt post with attachments - trying again....
    Attachments:
    secondclickheredialog.jpg ‏40 KB
    FirstDialog.jpg ‏19 KB
    Firstclickheredialog.jpg ‏16 KB

  • Please, can you confirm that after erase the phone using the find my iphone all my personal data will be unavailable? Someone stole my iphone 6  on the street

    Please, can you confirm that after erase the phone using the find my iphone option,  all my personal data will be completely unavailable? Someone stole my iphone 6 +  on the street. I have already received a mail from apple confirming that is erased. Can I trust on this message? It really works? my 3G connection was working properly.
    Thank you very much

    Hey Joangil,
    Yes! If you have received an email from Apple stating and confirming that it is erased then you should trust this message. It would have all been removed.
    Sorry to hear that your iPhone has been stolen,
    Zach

  • Getting Error while accessing the data using odata service

    Hi All,
    Iam new to SAP FIORI. 
    Iam getting the below error while accessing the data using odata service.
    "Failed to load resource: the server responded with a status of 404 (Not found)"
    "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "
    i have tried all the solutions like changing the url pattern "proxy/htttp".
    and disabled - security in chrome (Chrome is Updated version).
    i tried with IE still got the same problem.
    And installed all the required software in eclipse
    While installing GWPA plugin i got the following error.
    let me know if any one have idea.
    Thanks in advance.

    > Do you want to add and/or update the data in the already existing tables or do you want to replace the content completely?
    >
    > so in that way :
    > bot the options are fine what ever take less time.
    Sorry mate, but YOU have to know what you want here.
    I gave you an easy to follow set of steps.
    As you don't seam to mind the outcome, just might just use them...
    > I wanted to know weathe i can use the  loadercli for thie export import or not? if yes then is there any new steps to do before i do the export import?
    We had this discussion before...
    >
    > For that the easiest option would be just to drop the tables of SAPR3 and run the import again.
    >
    > For ease of use you could also just do:
    > - logon as superdba
    > - drop user SAPR3
    > - create user SAPR3 password SOMEPW not exclusive dba
    >
    > After these steps you can easily pump the data into the database again.
    >
    > So here in th above given steps , i am creating a new SAPR3 user and why it is not exclusive dba ?
    >  i already have that user SAPR3 can i use the same.
    Yes, you do have the SAPR3 user.
    But you don't seem to like to read documentation or learn about how the tools work or anything like that.
    Therefore I gave you s simple way to reach your goal.
    Of course it's possible to reuse the user.
    But then you would have to deal with already existing tables, already existing data etc.
    You don't seem to be able to do that. So, the easy steps might be better suited for your needs.
    regards,
    Lars

  • Getting error while importing the data using loadercli

    Hello,
    I want to copy the data using export/ import  via (loadercli).
    scenario:
    1) I have 2 server and i want to export data from old server and import in to new MAXDB server using loadercli.
    I have done this once and it went fine , but now I want to do the export import again so i will have te latest data on the new server.
    when i tried to do that it gives error that the table already exist . Can i use loadercli to import hte data again ?
    can any one help me in this ?
    Regards,
    Bhavesh

    > Do you want to add and/or update the data in the already existing tables or do you want to replace the content completely?
    >
    > so in that way :
    > bot the options are fine what ever take less time.
    Sorry mate, but YOU have to know what you want here.
    I gave you an easy to follow set of steps.
    As you don't seam to mind the outcome, just might just use them...
    > I wanted to know weathe i can use the  loadercli for thie export import or not? if yes then is there any new steps to do before i do the export import?
    We had this discussion before...
    >
    > For that the easiest option would be just to drop the tables of SAPR3 and run the import again.
    >
    > For ease of use you could also just do:
    > - logon as superdba
    > - drop user SAPR3
    > - create user SAPR3 password SOMEPW not exclusive dba
    >
    > After these steps you can easily pump the data into the database again.
    >
    > So here in th above given steps , i am creating a new SAPR3 user and why it is not exclusive dba ?
    >  i already have that user SAPR3 can i use the same.
    Yes, you do have the SAPR3 user.
    But you don't seem to like to read documentation or learn about how the tools work or anything like that.
    Therefore I gave you s simple way to reach your goal.
    Of course it's possible to reuse the user.
    But then you would have to deal with already existing tables, already existing data etc.
    You don't seem to be able to do that. So, the easy steps might be better suited for your needs.
    regards,
    Lars

  • Deleting master data after loading transactional data using flat file

    Dear All,
    I have loaded transaction data  into an infocube using a flat file . While loading DTP i have checked the  option "load  transactional data with out master data exists" . So transactional data is loaded even if no master data is there in BW.
    While loading the flat file, I made a mistake for DIVISION Characteristic  where original master data value is '04000' , but i loaded the transactional data with value '4000' .Then i later realized after seeing the data from the infocube and deleted the request. then i reloaded data with value '04000'. Till now every thing is fine.
    But when I see the master data for DIVISION , i can see a new entry  with value '4000'.
    My question is how to delete the entry value '4000' from DIVISION. I tried deleting manually this entry from 'maintaining masterdata' , but it is not allowing me to do so .
    I have also checked if any transactional data exists for that value '4000' , as i said earlier I have deleted the transactional data with that values. even tried to delete the entries from the master data table, but i donot see a option to delete entries there.
    Please suggest me on this.
    Regards,
    Veera

    Hi,
    Goto RSA1 right click on the Info object and select Delete Master data. This will delete the master data unused existing in the table.
    If this master data is not used any where else just delete the master data completely with SID option.
    If even this doesnt work you can delete the complete table entire in SE14. But this will wipe out the entire table. Be sure if you wanna do this.
    Hope this helps
    Akhan.

Maybe you are looking for

  • Installed Windows 8.1 with Bootcamp but cant use my monitor through VGA-MiniDisplayPort

    I used Bootcamp to install Windows 8.1, but when I tried to use my monitor, that worked on the Windows 8.1 preview, no longer works. It's a VGA-MiniDisplayPort. I'm not willing to spend extra money until I need to.

  • Message Handling in Java?

    Hi, All Friends: Has Java afford some message processing capabilities like CORBA or MPI? I want to use Java to send some types of messages and process them. Now I have to use sockets to do them by hand. Thank u very much!

  • My PC is still under warranty

    I'm sick of this bull crap. My PC is still under warranty. You have all my info so send me a box and you'll get this hunk of **bleep** back! I'll never buy another HP. Your support sucks. Even if you get someone you can't understand a frigging word t

  • Can i remove the ios 8 upgrade from  my device

    Is there a way to remove IOS 8 from your iPhone/iPad device?

  • Book Printing Quality

    I just finished a photo book in Aperture and thinking of getting it printed through Apple (Kodak). Before sending, I would like to get some input on the book quality. Is it professional quality or .... ? ? ? Any comments will help me make a decision