How to make a single row as editable in a table view?

Hello Friends,
As per the requirement,i have created a new table view with table row level actions. But I am able to achieve the delete functionality. But for edit action, if i lock the corresponding entity also it is not becoming as edit.
Let me know any ideas to achieve this??
Thanks in Advance.
Regards,
Ravi

Hi Raviteja,
In your row level buttons if you want to edit a row you have to fallow this steps..
1) get the selected record by using index.
2) get the action mean which action you want to perform ( edit or delete like).
3) lock the current entity.
4) get the custom or comp controller instance based on get the current record.
5) edit the row..
sample code for this..
DATA:
     lv_index          TYPE int4,
     lr_current        TYPE REF TO if_bol_bo_property_access,
     lr_entity         TYPE REF TO cl_crm_bol_entity,
     lv_event          TYPE string,
     lv_dummy          TYPE string,
     lr_core           TYPE REF TO cl_crm_bol_core,
     lv_one_click_lock TYPE sysubrc,
     lr_col            TYPE REF TO if_bol_bo_col,
     lr_coco           TYPE REF TO component ctrl class name (impl class),
     lr_cuco           TYPE REF TO custom cntrl class name ( impl.)
   CALL METHOD cl_thtmlb_util=>get_event_info
     EXPORTING
       iv_event = htmlb_event_ex
     IMPORTING
       ev_index = lv_index.
   CHECK lv_index IS NOT INITIAL.
* Get the current entity
   lr_entity ?= me->typed_context->urcnode->collection_wrapper->find( iv_index = lv_index ).
   CHECK lr_entity IS BOUND.
* Get the action clicked on
   SPLIT htmlb_event_ex->event_defined AT '.' INTO lv_event lv_dummy.
* Try to lock the current entity
   lv_one_click_lock = cl_crm_uiu_bt_tools=>set_one_click_lock( me->typed_context->cnode->collection_wrapper ).
   CASE lv_event.
*   Edit the current Partner
     WHEN 'EDIT'.
       IF lv_one_click_lock <> 2 AND lr_entity->is_send_active( ) = abap_true.
         lr_coco ?= me->comp_controller.
         CHECK lr_coco IS BOUND.
         lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
*       if entity is not yet there: add it to component controller collection
         IF lr_current IS NOT BOUND .
           lr_coco->typed_context->cnode->collection_wrapper->add( lr_entity ).
           lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
         ENDIF.
         CHECK lr_current IS BOUND.
         lr_cuco ?= me->get_custom_controller( 'compname/cnameCuCo' ). "#EC NOTEXT
         lr_cuco->typed_context->cnode->on_new_focus( lr_current ).
         me->set_editable( ).
       ENDIF.
if this is not work then go through this link..
OCA edit button problem
Thanks & Regards,
Srinivask

Similar Messages

  • How to make a new row as selected in adf table

    Hi,
    I am adding a new row to my table as below.
    DCBindingContainer bindingContainer =
    (DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
    DCIteratorBinding iter = bindingContainer.findIteratorBinding("IfwSystemBrandView1Iterator");
    ViewObject vo = iter.getViewObject();
    row = vo.createRow();
    row.setNewRowState(Row.STATUS_INITIALIZED);
    vo.insertRow(row);
    This code is adding a new row at the end of the table.
    I want this new row to be selected after it gets added.
    How to achieve this??
    Thanks,
    Praveen

    You should mention your JDev version!!!!
    in 11g you can archive this like
    BindingContext bctx = BindingContext.getCurrentInstance();
    BindingContainer bindings = bctx.getCurrentBindingEntry()
    DCIteratorBinding dcIterator =
    (DCIteratorBinding) bindings.get("IteratorBindingName");
    Row rw = dcIteratorBinding.getRowSetIterator().createRow();
    rw.setNewRowState(Row.STATUS_INITIALIZED);
    //insert row to iterator
    dcIteratorBinding.getRowSetIterator().insertRow(rw);
    //make new row the current
    dcIteratorBinding.setCurrentRowWithKey(
    rw.getKey().toStringFormat(true));or better if you have access to the table (
    private void createRowInTable(RichTable table){
    CollectionModel model = (CollectionModel ) table.getValue();
    JUCtrlHierBinding _binding = (JUCtrlHierBinding) model.getWrappedData();
    DCIteratorBinding dcIteratorBinding= _binding.getDCIteratorBinding();
    Row rw = dcIteratorBinding.getRowSetIterator().createRow();
    rw.setNewRowState(Row.STATUS_INITIALIZED);
    //insert row to iterator
    dcIteratorBinding.getRowSetIterator().insertRow(rw);
    //make new row the current
    Key k = rw.getKey();
    dcIteratorBinding.setCurrentRowWithKey(k.toStringFormat(true));
    }Timo

  • Set default 3 empty rows on edit (in the table view)

    Hi
    i need to add 3 empty rows, currently only 1 rows gets added by default on edit..
    i tried using the add method of collection wrapper.. i did not find any differrence..
    its adding only one row.
    has anyone worked on similar requirement or any help on this..
    thanks
    Dinesh.

    hi Ravi,
    thank you very much for the reply,  but i even gave 10,10 but there is no change in the display..
    even before edit and after.. in the insert button.. i am able to add 3 new empty rows but on edit
    its not working.. through collection wrapper->Add or insert methods..
    is there any other way to insert new empty rows through program on edit or is there any configuration...
    thanks
    DInesh

  • How to make all the rows editable in webdynpro alv output

    Hi,
    How to make all the rows editable in webdynpro alv output.
    Thanks
    Rakshar

    Hi Rakshar,
    Check this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP
    Regards

  • ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    ı have 2 account one gamecenter with single emaill and password.it is like a identical twins of different.how can ı make it single?

    Are you referring to 2 iTunes accounts/Apple ID's? If so you can't, all purchases are tied to each Apple ID so if you need to say reload an app or update, it would be with that account. 

  • How to make an list row Read only

    Hi All,
        Can anyone please tel me how to make the List row (list item) read only where the status column value is Submit.(i.e the whole row has to be made as readonly, am using event handler to try this out)
    Thanks in advance 

    Hi,
    According to your description, my understanding is that you want to set the list item read only based on the status column.
    If you want to do it using Event Receiver, you need to check the status column value using Server Object Model, then break role  Inheritance and rest role assignments to set the item read only.
    Here are some detailed code demo for your reference:
    Change SharePoint list item permissions to Read only programmatically
    How to: Create an Event Receiver
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to make a particular row and column field editable in ALV

    Hi Experts,
    I have a requirement to make a particular row and column field editable in ALV output. Like i need to make 2nd row - 4th column editable of ALV output.
    Kindly help me out to solve this.
    Any help would be appreciated.
    Thanks,
    Ashutosh

    Hi Ashutosh,
    please check below, explained by some experts.
    In the below link  editing two columns MOD_RANK and TECH_RANK.
    These two columns will be in edit mode once after selecting the required record
    Editing single cell in a row of ALV table
    And also look for more info
    http://scn.sap.com/thread/884976

  • How do I make a single row with 6-8 images in css?

    I would like to make a header row with 6-8 icons of different dimensions and use them as links.  I am having trouble getting them to align horizontally in a container. How do I do this?

    You can do it by making the area around the icons the same size. i.e., all images become the same dimension it's just the icons within the image that are different sizes.
    If you don't want to do that then probably a good reason to use a table with 6/8 cells otherwise you'll have to set individual padding/margin on each icon to get them to align correctly, doable but a bit long-winded.

  • How can I programmatically select row to edit in ADF - 11g

    Hello,
    I'm having a table with rowSelection="single" and editingMode="clickToEdit". Currently i'm facing two issues.
    First issue: the first click on a table row makes the row selected, on second click it becomes editable. If I click on another row it gets selected, but previously selected row remains editable. I would like to change this, so when I select another row, the previously selected one to become read-only again. By now, I didn't find any solution to set programmatically the 'editable' state of a row.
    The second issue might be a bug and is related to deleting an editable row. I select a row, click to edit it, and then delete it. The next row get's selected, but clicking on it to edit, has no effect unless I press the 'ESC' select another row before. Does anyone have a tip how to workaround it?
    Thank you very much!
    Eniko

    try adding this method in the table selectionListener.
    public void table1_selectionListener(SelectionEvent selectionEvent) {
        public String getCurrentRow() {
            BindingContainer bindings = getBindingsForDCB();
            RichTable table=table1; 
            DCIteratorBinding outListIter = getBindingsForDCB().findIteratorBinding("outlistOutIterator");
            RowKeySet rowSet = table.getSelectedRowKeys();
            Iterator rowKeySetIter = rowSet.iterator();
            while (rowKeySetIter.hasNext()) {
                    List l = (List) rowKeySetIter.next();
                    Key key = (Key)l.get(0);
                    outListIter.setCurrentRowWithKey(key.toStringFormat(true));   
                    Row r = outListIter.getCurrentRow();
            return null;
        }

  • How to get a single row column from a viewobject in java?

    I have a class file that goes out and gets a viewobject and sets its where clause
    this is it:
    vcRow = vc.createViewCriteriaRow();
    vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'");
    vc.addElement(vcRow);
    vo.applyViewCriteria(vc);
    vo.executeQuery();
    I know this working cause I can watch it in debug..
    but now the problem.
    I've looked in the docs and don't see how one can pull the value of the row it found and place it in a uix page in a textinput area
    how can I get a single row column, in this case the UserName that is in the view object to a string and then place it into my
    uix page? I've looked and looked and don't see a method for this.
    is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
    what way do you do this and where is it documented?

    is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
    what way do you do this and where is it documented? What you can do is get the value from your VO and set it somewhere that UIX can data bind to -- as a Page proprety, on HttpSession, etc. This is documented in Chapters 4 (Data Binding) and 5 (Controller) of the UIX Developer's Guide.
    To set a property, you use Page.setProperty(String key, String value). Then, in your UIX file, to make a textInput that has the value pulled from a given page property, use:
    <textInput data:text="key@ctrl:page" />
    -brian
    Team UIX

  • How to make a single recording into multiple songs garageband

    I recorded my band's gig the other night using my Zoom H2 recorder.  I want to take the single 1.5 hour recording (12songs) and make it into a CD with 12 individual tracks.  I would like to use garageband so i can edit out the deadtime between songs but I don't know how to make a CD.

    johndmalone wrote:
    I want to take the single 1.5 hour recording (12songs) and make it into a CD with 12 individual tracks
    http://www.bulletsandbones.com/GB/GBFAQ.html#chaptertocdtracks
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Spark datagrid - how can i open entire row for editing?

    Hi,
    I want to create a datagrid with add button. The user can add a row and i want all the editable columns to be opened for editing.
    I can open a single cell for editing by using startItemEditorSession, but how can i do it for multiple columns in the same time?

    redskyventures wrote:
    it seems mine has automatically done so...
    I recommend you turn off the automatic update feature -- It can really cause you a lot of trouble.
    Have you already determined that your coauthor cannot open your file?  If so, I suggest you go backwards, get a copy of the old iBA from him to put on your machine, so you both use the same version.  There's no way to convert iba files to anything, as far as I know.

  • How to add A single row at the middle of the table in a Webi report

    Hi,
         I created a Webi report using Universe(Created universe using bex query).Now i have a requirement to display a row at the middle of a report. Can you please tell me ,how to add a sigle row at the middle of a Webi report.
                                                    Thanks in advance
    Regards
    Monika

    Hi Monika,
    It is not really possible to add a row (I assume you mean of unrelated data) to the middle of a table in a report. You can add a new table with a single row between two tables. For instance you could add a new one row table, or even single cells which are positioned relatively between two tables. Possibly a block on top of another. But this gets tricky.
    Can you explain in more detail what you are trying to do?
    Thanks

  • How to make a slide show or edition including mpeg and other formats

    Hi,
    I am i bit puzzled by the use of iphoto/imovie/itunes.
    I have a Sony camera which generates jpg photos and mpg videos; besides, i have 3gp and mp4 videos from cell phones.
    Firstly, i imported all of them to iphoto. I used a automator workflow to help importing from hotsynced Palm centro files, to discover the first problem with the 3gp files: they could not be iported by workflows.
    Still, they could be seen in iphoto, but then i tried to make a slide show. My idea was to put the photos and videos of a certain event to be watched together, or at least to be able to watch the videos in a sequence, without having to click on each one.
    I didnt get it in iphoto, so i switched to imovie. it was even worse, since it cannot import the mpgs and the 3gps (the jpg photos were ok). What could i do about that? is there any converter or other way?
    then i tried the itunes, and it was the opposite: it imported and played in sequence the mpg videos, but not the photos. This is a workaround anyway, since the program expects to play movies, and makes my daughter a "star", but that`s ok, she is one to me.
    i'll be thankful for hints on how to make the imovie compatible with the 3gp and mpgs, or finding some way to do this edition in iphoto or even with itunes.
    regards

    I see, it sounds reasonable , i think i will buy the pro and try.
    QT Pro ($30) and MPEG Streamclip (free) complement each other. In many cases one can do things that the other cannot. For instance, MPEG Stramclip can handle/edit multiplexed formats while QT Pro cannot. QT Pro allows layering of data tracks while Streamclip does not. Streamclip merges file streams more easily than QT Pro but QT Pro allows the "Movie to MPEG-4" export to "passthrough" the video while Streamsclip does not. And so on and so forth...
    I was referring to the mpegs from the Sony camera, of which a have hundreds, shot in the last 3 or 4 years, mainly from my 5-year old daughter. Is the above true to these?
    That still doesn't help. By "sony camera," are you referring to a still digital camera (multiplexed MPEG-1) or a Sony video camcorder taking MPEG-4/AVCHD with AC3 audio in an MPEG wrapper, a Sony DVD/HDD camera storing some kind of MPEG-2/AC3 files. On a Mac, the extension MPG normally refers multiplexed MPEG-1 (or MPEG-1 audio layer) files while MPEG normally refers to multiplexed MPEG-2 video content with MPEG-1, layer 2 audio (MPEG2/MP2) but may also refer to files with MP3 or AC3 files in an MPEG, VOB, or TS wrapper. In addition it may loosely refer to elementary M2V video streams (M2V video file paired with a separate AIFF or AC3 file), a standard MPEG4/AAC file (in an MOV or MP4 wrapper) or a standard H.264/AAC file in MOV, MP4, or M4V wrapper). Since the handling, conversion, editing requirements vary with each type of file, it becomes important to what specific kind of content/file container we are dealing with here.

Maybe you are looking for

  • Error sending Idoc's to SAP

    Hi, I'm getting error in file-XI-SAP scenario. File is read and transformed to Idoc ok, but then I get this kind of error message in SXMB_MONI: <SAP:Stack>Error: Basic type 'HRMD_A01' is unknown</SAP:Stack> What I'm I missing in the scenario?

  • Location of log directory with respect to data guard

    I am working with Oracle 10g in Linux platform I was during a switchover from primary to standby which failed due to the incorrect settings of log_file_name_covert parameter . To debug this case I was going through Oracle Documentation material for D

  • Anyone successfully using the credit card interface?

    I have heard that this interface is not really a 'mature' product. Has anyone implemented it, and if so, would you mind providing some info about how you got there? Thanks in advance!

  • Requestes are not forwarded to next level after approval

    Hi all, Apps version 11.5.10, Solaris 10 we have modified a user name in apps after that what ever that particular user has approved is not going to next level. Is it not recommended to update a user name? Hope some one can help me fix the issue Than

  • Best Keyboard Customizations

    Please let me know what you find are the best keyboard customizations while editing in Pr.  /Just a side note: (I am also a Ps and Lr user.)/  I would like to know how everyone has the F1 - F12 keys set up.  I know of course that it is "customizable"