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 display

Former Member
0 Likes
456

hi all,

I am using ALV-grid display. In which after displaying the list, user wants to give input into a particular field. This can be done with EDIT-option. But after getting the input the value must be added to the next field and should be displayed the same in the next field.

How to read the value in ALV display, like which is possible using read current line in classical report.

& also all the inputed valued should be added if multiple item occurs.

Expecting reply... its urget.

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
434

hi sundar,

chk this link.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm

here in this link, its shows how to catch the user command.

so we will get the selected row in ALV using the user commnad option.

from that row, take the value u required and do the manipulations according <b>to the valus in the internal table u r passing to ALV grid fro display.</b>

then just <b>refresh</b> the ALV display.

<b>new values will be get updated.</b>

rgds

anver

if hlpful pls mark points

hi sundar,

chk this link.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm

here in this link, its shows how to catch the user command.

so we will get the selected row in ALV using the user commnad option.

from that row, take the value u required and do the manipulations according <b>to the valus in the internal table u r passing to ALV grid fro display.</b>

then just <b>refresh</b> the ALV display.

<b>new values will be get updated.</b>

rgds

anver

if hlpful pls mark points

2 REPLIES 2
Read only

anversha_s
Active Contributor
0 Likes
435

hi sundar,

chk this link.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm

here in this link, its shows how to catch the user command.

so we will get the selected row in ALV using the user commnad option.

from that row, take the value u required and do the manipulations according <b>to the valus in the internal table u r passing to ALV grid fro display.</b>

then just <b>refresh</b> the ALV display.

<b>new values will be get updated.</b>

rgds

anver

if hlpful pls mark points

Read only

Former Member
0 Likes
434

Hi,

You have to handle the requirement in the user command routine as below.

FORM handle_user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

  • The selected record is in the structure rs_selfield.

  • here you have to read the record from the internal table using index value from the structure rs_selfield-index and store in workarea and now you can update the changed value to required field of the internal table from the workarea. after that set the field rs_selfield-refresh = 'X'.

handle this logic for your usercommand.

if r_comm = 'MODI'.

  • here you apply the above mentioned logic.

endif.

ENDFORM.

thanks,

sksingh