‎2013 Oct 15 6:05 PM
Hi SDN,
I've developed an alv edit grid, and the insert button (for overwrite values on the cell) doesn't work! Can you help?
Thanks.
Best regards,
Maria João Rocha
‎2013 Oct 15 6:19 PM
‎2013 Oct 16 9:47 AM
Hi,
Our final users ask if that is possible. They enter data massively,
The program automatically fills in some values ​​and they have to change only part of the data.
Thanks.
Regards,
Maria João Rocha
‎2013 Oct 16 10:20 AM
Hi Maria
It's possible of course...but youìve written:
"I've developed an alv edit grid, and the insert button (for overwrite values on the cell) doesn't work! "
so what doesn't work?
Max
‎2013 Oct 16 11:04 AM
Hi,
The mode insert is always set (on)!
I trid also with program BCALV_GRID_EDIT, the keyboard button insert is always ON!
Example:
I want to change the Column "occupied", this column have the value 375 and I want 385, for example. if I press (or not the button insert) I'd like to write only the 8 (over the number 7). Like in the word, excel, etc...
How is it possible?
Thaks,
Maria João Rocha
‎2013 Oct 16 11:16 AM
Hi,
It is possible.
Get the DB Table data into itab1.
Upload the data from the excel into itab2.
Logic.
When press 'INSERT'.
loop at itab2 into wa2.
read table itab1 into wa1 condition.
if sy-subrc is initial.
modify DBTable from wa1.
else.
inser into DBTable values wa1.
endif.
endloop.
Try like this.
Thanks
Pavan.N
‎2013 Oct 16 11:32 AM
Hi
So you want to implement a button in order to replace a certain value in your filled cells.
- You need to insert a your own button in ALV status (see demo program BCALV_GRID_05)
- After pressing the button you need to show a popup in order to insert the old and new value and then to implement a code in order to check all fields and replace the value with the new one, something like this:
FIELD-SYMBOLS: <FS_CELL> TYPE ANY.
DATA: CHAR_CELL(30) TYPE C.
LOOP AT ITAB.
DO.
ASSIGN COMPONENT SY-INDEX OF STRUCTURE ITAB TO <FS_CELL>,
IF SY-SUBRC <> 0. EXIT. ENDIF.
* It's better to move the field in a char variable (but if yout output table has only char field is useless)
IF NOT <FS_CELL> IS INITIAL.
MOVE <FS_CELL> TO CHAR_CELL.
REPLACE ALL OCCURRENCES OF <old value> IN CHAR_CELL WITH <new value>.
ENDIF.
ENDDO.
ENDLOOP.
- after changing outpu table probably you need to refresh the ALV
Max
‎2013 Oct 16 11:42 AM
Hi,
I don't want to implement any code, just to have the normal functionlitty of the keyboard insert button, like ABAP EDITOR, word, excel, etc .
If I was wrong to write "perform" and write 'preform', just position the cursor on the 'r' press INSERT(mode off) and write 'er'.
Thanks,
Maria João Rocha
‎2013 Oct 16 1:24 PM
Hi
I believe you need to implement something by yourself, in context menu there is a chance to overwrite fully a value
Max
‎2013 Oct 16 2:21 PM
Hi,
But and not fully? I can achieve that selection with the cursor or mouse. the objective is to have the same functionality with the keyboard insert button that we have on other editors, environments... is there a method of the CL_GUI_ALV_GRID class to reach that?
Regards,
Maria João Rocha
‎2013 Oct 16 3:17 PM
Hi
but I believe the "INSERT" key of keyboard doesn't work in the layer used to show the data in alv grid output, I've tried to check the class but no methods
Max
‎2015 Mar 03 10:03 AM
Hi,
I put this question to SAP and the answer was:
unfortuntely this behaviour is not implemented (see SAP note 825068)
Regards,
Maria João Rocha