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

EDIT ALV FIELDS....

Former Member
0 Likes
487

1)ONCE REPORT IS GENERATED THROUGH ALV GRID DISPLAY.........CAN I MAKE ANY COLUMN EDITABLE ON CLICKING ON AN BUTTON GIVEN BY ME IN APPLICATION TOOL BAR.

<b>REMB</b>: OPERATION IS TO BE PERFRORMED AFTER GRID DISPLAY.

-


2) ONCE I EDIT ANY FIELD OF THE COLUMN .........WILL THAT CHANGE BE REFLECTED IN THE INTERNAL TABLE AUTOMATICALLY OR I NEED TO DO SOME EXTRA CODE MANIPULATION,B'COS I HAVE TO POST IT USING BAPI.

<b>SAMPLE CODE IF NAY PLEASE POST IT.............</b>

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
449

Hi,

1. This is a normal requirement and just you need to trigger your EDIT event on the click of the button so handle user command for that and call the edit functionality there.

Check this thread -

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a41...

2. For saving in internal table back you need to move it from work area to internal table, the above links will also help you in that too.

Regards,

Amit

Reward all helpful replies.

Read only

anversha_s
Active Contributor
0 Likes
449
Read only

Former Member
0 Likes
449

chk this blog

/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

Read only

Former Member
0 Likes
449

Hi,

you can do this, but you have write the code for that.

1. To edit the field when a button is clicked you need to change the field catalog.

if sy-ucomm = 'your button function code'.

change the field catalog.

gs_fieldcat-edit = 'X'. --- Need to set this for your field.

endif.

2. In user command routine you need to update your internal table accordingly.

Meaning if sy-ucomm = 'your button function code'. then update your internal table with your recent changes.

3. In the above routine only you need to say refreshing your screen.

slis_selfield-refresh = X.

BCALV_TEST_GRID -- check this program as an example.

Br,

Laxmi