Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

alv grid edit - insert keyboard button

MariaJooRocha
Contributor
0 Likes
1,412

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,258

Hi

Which is the problem?

Max

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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

Read only

MariaJooRocha
Contributor
0 Likes
1,258

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

Read only

0 Likes
1,258

Hi

I believe you need to implement something by yourself, in context menu there is a chance to overwrite fully a value

Max

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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

Read only

0 Likes
1,258

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