ALV  List  in the same Column for the row  CELL  i need button or value

Hi,
In my ALV list  for the same column I need Button or  Value for the different rows (CELL) depending upon my condition.
as well as I have to make  read only of 3 rd column CELL based on my first column dropdown value CELL for this Row Only.
Depends upon the value in  column 1 /  row 2   I have to  read only  the CELL of   column 5 / row 2   ie for the same row.
Depends upon the value in Column 1/ row 3    I have to   EDITABLE  or   Button   the CELL  of column 5 / row 3 ie for the same row
How to do the logic for this.
I tried and got it for the entire column only.
But my requirement is for the sepecific cell in the column.
Kindly help to proceed further.
Thanks in advance.
Dav

Here is how you can make a particular cell in the row read-only based on certain conditions.
In my example I am displaying the flight details in an ALV. Here I am checking the airline id and if it is "AA' I am making the cell in the column airline id as readonly. In my example I am putting a check and readonly on the same column. However you can do this for different columns as well.
In order to achieve this you need to add a new context attribute 'READONLY' of type abap_bool to the context node which is bound to data node of ALV.
The method where I populate the node has the following code to populate the data.
  data: lr_input_node type ref to if_wd_context_node,
        lr_flight_node type ref to if_wd_context_node,
        lv_cityfrom   type s_from_cit,
        lv_cityto     type s_to_city,
        ls_from       type bapisfldst,
        ls_to         type bapisfldst,
        lt_flights    type table of bapisfldat,
        ls_flights    type bapisfldat.
  data: lt_final type if_mainview=>elements_node_flighttab,
        ls_final type if_mainview=>element_node_flighttab.
* Instantiate the variable lr_input_note to the node NODE_FLIGHT
  lr_input_node  = wd_context->get_child_node( name = 'NODE_FLIGHT' ).
* Instantiate the variable lr_flight_note to the node NODE_FLIGHTTAB
  lr_flight_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' )
* Get the attributes CityFrom und CityTo
  lr_input_node->get_attribute( exporting name = 'CITYFROM'
                                importing value = lv_cityfrom ).
  lr_input_node->get_attribute( exporting name = 'CITYTO'
                                importing value = lv_cityto ).
* Fill the stuctures ls_from and ls_to
  ls_from-city = lv_cityfrom.
  ls_to-city   = lv_cityto.
* Call the function BAPI_FLIGHT_GETLIST
  call function 'BAPI_FLIGHT_GETLIST'
   exporting
     destination_from       = ls_from
     destination_to         = ls_to
   tables
     flight_list            = lt_flights.
Now I am going to check if the airline id is 'AA' and based on that I will fill the readonly context attribute.
loop at lt_flights into ls_flights.
    MOVE-CORRESPONDING ls_flights to ls_final.
    if ls_flights-airlineid = 'AA'.
      ls_final-readonly = abap_true.
    else.
      ls_final-readonly = abap_false.
    endif.
    append ls_final to  lt_final.
  endloop.
Finally bind the data to the context node.
* Bind the data to the node NODE_FLIGHTTAB
  lr_flight_node->bind_elements( lt_final ).
Now you need to do the ALV configuration settings.
* create an instance of ALV component
  DATA:
    lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
  lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
  IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
    lr_salv_wd_table_usage->create_component( ).
  ENDIF.
* get ALV component
  DATA:
    lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
  wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
  CALL METHOD wd_this->alv_config_table->if_salv_wd_table_settings~set_read_only
    EXPORTING
      VALUE  = ABAP_FALSE
* set visible row count
  DATA:
    lr_table_settings TYPE REF TO if_salv_wd_table_settings.
  lr_table_settings ?= wd_this->alv_config_table.
  lr_table_settings->set_visible_row_count( '10' ).
  DATA:
    lr_column_settings TYPE REF TO if_salv_wd_column_settings,
    lr_column          TYPE REF TO cl_salv_wd_column.
  lr_column_settings ?= wd_this->alv_config_table.
  DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
  lr_column = lr_column_settings->get_column( 'AIRLINEID' ).
  CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'AIRLINEID'.
  lr_column->set_cell_editor( lr_input_field ).
  lr_input_field->set_read_only_fieldname( value = 'READONLY' ).
  CALL METHOD lr_column_settings->delete_column
    EXPORTING
      id     = 'READONLY'

Similar Messages

  • How can I give different Editors in the same column for the jTable?

    I am having a JTable with 2 columns and 10 rows. In the 2nd column, for the first 2 rows
    I need to show JCheckBox, for nect 2 JComboBox and for remaining JTextField as the editor.
    How can I do this. Thanks in Advance.

    Remember, the parent class of a cell renderer does NOT have to be a Component itself. Most do simply because the end result of the getCellRenderer call is the component itself.
    Create 3 cell renderers, one based off of the checkbox, one based off the combobox, one based off of Object. The Object based one will hold instances of the other two renderers and will be the actual renderer supplied to the JTable. When called, based on the row, it will forward the call to the to the appropriate renderer and return the result of the call.
    Technically, the internal components do not NEED to be renderers themselves, but doing so makes it a lot easier to test them independently of the combined renderer.

  • Can we create two dashboard prompts for the same column in the samepage

    hi ,
    can we create two dashboard prompts for the same column on the same page,
    I have a date column and I am trying to create 2 dashboard prompts on the same page one as from date and the other one as to date.Is this possible to create.When I am trying to create it is giving me error like cannot use same column for creating the prompt
    Any suggestions or ideas

    863997 wrote:
    hi ,
    can we create two dashboard prompts for the same column on the same page,
    I have a date column and I am trying to create 2 dashboard prompts on the same page one as from date and the other one as to date.Is this possible to create.When I am trying to create it is giving me error like cannot use same column for creating the prompt
    Any suggestions or ideasYou are correct. You cannot build two prompts on the same column. Use this link for instructions on how to build a "between prompt" because of this fact:
    http://oraclebizint.wordpress.com/2008/02/26/oracle-bi-ee-101332-between-prompts-for-date-columns-using-presentation-variables/

  • How can I download a purchased ringtone so that it appears in the sounds column for the alarm clock sound

    How can I download a purchased ringtone so that it appears in the sounds column for the alarm clock sound

    Welcome to the Apple Community Elizabeth.
    You should be able to access any book you have purchased from iTunes anywhere.
    Do you have settings > iBooks > Show all purchases turned on.

  • HT4245 can somebody tell me what to do with my iMessage in Ipad 2? before i can send message tru iMessage from my contacts who is having the same applications, for the existing one, i can send message but if i want to send message from a new contact, not

    can somebody tell me what to do with my iMessage in Ipad 2? before i can send message tru iMessage from my contacts who is having the same applications, for the existing one, i can send message but if i want to send message from a new contact, its not working....

    Please Rephrase your query.

  • Can I customize the standard columns for the search results (list view) specifically?

    When searching for emails I would like to adjust the columns in the search results list view, e.g. add the sender's address. This I would like to save as standard columns specifically for the search results list view, since in other contexts I do not need it. However, I can only set standard columns for existing folders, not for the context of "search results".

    re :When searching for emails
    what method are you using?
    Are you talking about 'Quick filter' or 'Global Search' or via 'Edit' > 'Find' > 'Search Messages' ?
    '''If you used the Global Search:'''
    Typed in a word: eg: Birthday and selected 'Messages mentioning birthday'
    Then a search is returned in a new tab.
    You click on 'open email as list' - to open in a new tab.
    Is this the search results list view that you are refering to?
    the default columns should be:
    From, Subject, Date, Location
    If you only want to see eg: From and Date
    click on the icon 'select columns to display' located to far right of header column name.
    deselect Subject and Location
    next time you run a global search then only those columns appear in the 'open email as list' view.
    '''If via 'Edit' > 'Find' > 'Search Messages' ?'''
    enter search parameters and click on 'Search'
    Is this the search results list view that you are refering to?
    the default columns should be:
    From, Subject, Date, Location
    Subject and Location cannot be edited.
    Other column headers can be selected in the same way using the far right 'Select columns to display' icon.
    Any column headers you select will not be remembered if you close and later peform another search.
    If you click on 'Save as Search folder'
    This will create a folder in your Folder Pane and you can select column(s) you wish to display.
    Any Column headers you choose to display are selected for that saved search folder.
    The column headers only change if you select to reset defaults on that folder or from another folder you select to apply to other folders for either the search folder or all folders in the account.
    '''If using Quick Filter:'''
    The QuickFilter type of search is done on the folder that is selected.
    You are still in the same folder, it has simply ''filtered'' what it is displaying, so it will obviously still display the same column headers.

  • If I bought Pages for my Mac, I have to buy the same application for the ipad

    I bought the application Pages for my iMac, I have to buy the same application for y Ipad also?

    Yes, the Mac Pages app is different than the iOS Pages app.
    Once you purchase Pages for iPad you can then use it on all your iOS devices (iPhone, iPod) but not on your Mac and vice versa.

  • Add Suppporting Details for more than one periods at the same time for the same Account in Planning.

    As we know, in planning form, we can add supporting details to one cell for the level 0 members intersections.
    But can we do that as below:
    add supporting details for more than one cells at the same time?
    I tried to do that in workspace and smartview, neither is working.(my workspace version 11.1.2.2.300.20)
    I wonder if i am not with the right version, because i don't know how to get the below.
    Can any one explain?
    Thank you.

    Hi,
    I have tried in Smartview for a simple form where my period dimension was in columns and accounts in rows.
    You need to select multiple period and select supporting details, it will show those selected period for which you can add the supporting details.
    You can add these details and then submit the data in the form.
    Regards,
    Sourabh

  • How to force SQL*Loader to assign the same SYSDATE for all rows?

    I want to use SQL*Loader to load some rows and a "SYSDATE" generated column, but making sure this date is THE SAME for all rows. I have seen that if I load HUNDREDS of rows there is a little difference between them (in terms of seconds). I guess it is "the moment each row entered the DB", but I need the same value for all rows (preferably, "the moment SQL*Loader was launched"). Is there any way to achieve this?
    Thank you very much.

    Hello user2393320.
    Given some thought, using a date value to identify all records from a single load isn't very wise.
    Are you able to create a procedure on the database that could be executed during SQL*Loader's execution? If so, you could develop the procedure to take in the record number of the row being loaded as an input parameter and output this unique date value for all rows loaded. The procedure would need to store the date value in a table when the first row is being loaded and return the stored date value as its output. This obviously assumes that only one sqlldr session is running at any time.
    I highly recommend using a numeric sequence in the control file instead of a date to identify each file load:
    , file_load_seq SEQUENCE(MAX, 1)
    Another approach would be to load the record number being loaded in addition to the sysdate:
    , record_number RECNUM
    Hope this helps,
    Luke

  • Random Number being changed to the same number for all rows

    hello all,
    first of all I want to mention that this problem start happening after 2.14 instalation of Power Query.
    I'm creating new column in my query and setting all values to random numbers. The problem is that next step (doesn't matter what it do itself) somehow changes all those random numbers to the same random number for all lines.
    here's code sample:
    InsertedCustom = Table.AddColumn(RemovedColumns3, "Random Number", each Number.Random()),
        InsertedCustom2 = Table.AddColumn(InsertedCustom, "Analyst Full Name", each [Analyst First Name]&" "&[Analyst Last Name]),
    when I'm checking step by step, InsertedCustom  creates new column and all values are being set randomly for all lines BUT when going to the next step (InsertedCustom2) all values in the column "Random Number" are being changed to the
    same number (no matter that InsertedCustom2 itself should not be doing anything to column named "Random Number") . I even tried moving InsertedCustom step to the bottom of my code but it didn't help and still facing this issue.
    p.s. updated my PQ to 2.15 - didn't help

    This is a known issue. Power Query assumes that functions are idempotent (given the same arguments, they produce the same result), which isn't true for Number.Random. Our optimization pipeline is turning Number.Random() into a constant in the scenario you
    encountered, which results in all rows having the same value.
    There's been some discussion of how to fix this, but that won't help you in the near term. Can you describe a bit more about your scenario and what you're trying to accomplish? Perhaps we can help you find a workaround.
    Ehren

  • Getting the same columns from the table twice

    Hi,
    I have a question.I am trying to join two tables whose structures and te data are as follows.
    portAssoc
    MOId     AssociatedMOId     AssociatedClass     
    2     1     CrossConnect     
    1     1     CrossConnect     
    7     3     CrossConnect     
    6     3     CrossConnect     
    crossConnect
    MOClass     MOId     MOName     MOParentClass     MOParentId
    CrossConnect     1     pvc2     Port     1     
    CrossConnect     3     pvc5     Port     1     active
    Port
    MOClass     MOId     MOName     MOParentClass     MOParentId     portIndex
    Port     1     vcl5     Card     2     10
    Port     2     vcl4     Card     2 20
    Port     6     vcl8     Card     2 30
    Port     7     vcl9     Card     2 40
    I would like to get the output as follows.
    MOId networkInterfaceMOId networkPort lineInterfaceMOId linePort
    Here the MOId is the MOId of the crossConnect.This is equal to the AssociatedMOId of the portAssoc table.The networkIntefaceMOId is the MOId of the portAssoc which is equal to the MOId of the port.The networkPort is the portIndex in the port table and this is the same for lineInterfaceMOId and linePort.i.e, I have to be able to get the moid of tha associated class and the moid and some values of the port which are asociated.Can any one please tell me how to do this.
    your help would be greatly appriciated.
    Thanks and Regards,
    Bhagya

    Try this:
    select c.MOld, a.MOld as 'networkInterfaceMOld', p.portIndex as 'networkPort', 'lineInterfaceMOld', 'linePort'
    from crossConnect c, portAssoc a, Port p
    where c.MOid = a.AssociatedMOid
    and a.MOid = p.MOid
    I'm not quite sure what you mean by "...and this is the same for lineInterfaceMOId and linePort"
    but if they are a column in one of your tables, just add it in based on the model above.
    hth
    Chris
    www.MyDBA2000.com
    Hi,
    I have a question.I am trying to join two tables whose structures and te data are as follows.
    portAssoc
    MOId AssociatedMOId AssociatedClass
    2 1 CrossConnect
    1 1 CrossConnect
    7 3 CrossConnect
    6 3 CrossConnect
    crossConnect
    MOClass MOId MOName MOParentClass MOParentId
    CrossConnect 1 pvc2 Port 1
    CrossConnect 3 pvc5 Port 1 active
    Port
    MOClass MOId MOName MOParentClass MOParentId portIndex
    Port 1 vcl5 Card 2 10
    Port 2 vcl4 Card 2 20
    Port 6 vcl8 Card 2 30
    Port 7 vcl9 Card 2 40
    I would like to get the output as follows.
    MOId networkInterfaceMOId networkPort lineInterfaceMOId linePort
    Here the MOId is the MOId of the crossConnect.This is equal to the AssociatedMOId of the portAssoc table.The networkIntefaceMOId is the MOId of the portAssoc which is equal to the MOId of the port.The networkPort is the portIndex in the port table and this is the same for lineInterfaceMOId and linePort.i.e, I have to be able to get the moid of tha associated class and the moid and some values of the port which are asociated.Can any one please tell me how to do this.
    your help would be greatly appriciated.
    Thanks and Regards,
    Bhagya

  • Migrating to Sharepoint 2013 from 2010 - Can you use the same URL for the Web Application without affecting the 2010 environment?

    Hi,
    I am currently trying to migrate our SharePoint 2010 environment to SharePoint 2013. The first thing I'm doing is creating a 2013 development environment to verify that this migration goes smoothly. I'm also doing this so that we will have a testing environment
    after the upgrade to 2013 is complete. 
    So here is my question: I have a 3 tier farm including; 1 app server, 1 wfe, and 1 sql server. I have made a copy of our SharePoint 2010 database and installed that on our sql server 2012 sever (This new environment is on 3 completely separate servers from
    our 2010 environment). I have also installed the prereqs and configured SharePoint 2013 on the App server and wfe servers, as well as configuring the necessary service applications (I have created a completely new 2013 database where I will migrate my 2010
    database content when I'm ready).
    I am now at the point where I need to create a new web application on the 2013 app server, where I will be migrating the copied 2010 database.  (Also note that we have a 2010 development site called https://[email protected])
    When I go to create a new web application in our 2013 dev environment, can I use the same url (https://[email protected]) to create this web app, or will this screw up our current 2010 dev environment?
    I'm new to SharePoint migrations, so I apologize if this is a stupid question.
    Thanks in advance for any insight you can share on this!
    Boe Barlage

    So, what you are recommending is that before I create a web application in my new 2013 environment, I need go into my hosts file on my 2013 app server and alter it to point to my 2013 wfe.
    Then after I do that, then I can create my new web application on my 2013 app server with the same url as my 2010 testing environment
    (https://[email protected]). 
    Then after that I should be able to access my new sharepoint 2013 environment at the same URL (https://[email protected])?
    I must be missing something.
    In your first reply, you told me to alter the host file on my 2010 app server and point it to my 2010
    wfe (I guess I thought it probably already is). You also told me to alter the host file on my 2013 app server and point it to my 2013 wfe. 
    so I am confused on after I do this, what url would I access my 2010 test environment, and what url would
    I access my 2013 test environment?
    I am fine with having my test environment as a different URL until I am totally ready to roll everything over and kill the 2010 site. But I want to make sure that when I migrate my database, none of the site links are broken.
    I also want to make sure that if I proceed this way, I want to be sure that I will be able to modify the URL to what my 2010 environment is (without a lot of headaches) when I am ready to kill the 2010 site.
    Thanks again for your help, it's much appreciated!
    Boe Barlage

  • Do you need a separate telephone number for an IPad or can it link to the same number for the IPhone?

    Do you need a separate number for an IPad or can it link to the same number you use for your IPhone?

    If it is an iPad with WiFi + Cellular, it has a mobile number attached to it. However, that number has no practical use for the end user as you can't use it to make calls or send texts. It's mostly a way of connecting the device to the cellular network. Additionally, cellular numbers are only attached to one device at a time.
    If what you're really asking is can you share a plan with your cell phone, well that depends on your carrier. Give them a call.
    Best of luck.

  • How configure the auditory columns  for the user in Session?

    I want to have my page of login to enter the application.
    After validating to the login/password according to user table
    create table usuario(
    id number not null,
    login varchar2(15) not null,
    pasword varchar2(15) not null,
    );..., set to user in HttpSession
    I wish to configure in mys entities(bc4j) the audit columns (userCreation/userModification) similar to dateCreation and dateModification...For example for the following table
    crate table Cliente(
    id not null,
    name varchar2(20),
    userCreation varchar(15) not null,
    userModification varchar(15),
    dateCreation date not null,
    dateModification date
    ...For the date columns I configure as history columns in the edition of the entity objects and works correctly...
    thanks

    Rigoberto
    Take a look at this topic and see if it helps:
    Re: User Authentication: prepareSession() vs. jbo.sessioncookie.JHS_USER
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Picture and text in the same box for the calender?

    Is it possible to put a small picture in the box (for say May 4) and also get a short text line in the same box?
    When I'm doing it now, the picture takes up the whole box and the text goes underneath.
    Thanks

    Unfortunately that's how it works. If you have a 3rd party editor you could add the text to the picture before adding it to the calendar. Put in a feature request at http://www.apple.com/feedback/iphoto.html.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

Maybe you are looking for