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

issue with oops alv

Former Member
0 Likes
617

Hi,

i am displaying out put on oops alv.

then if user select a line item on out put i have to do calll some pop up alv and then populate some checked item to

oops alv.

after doing modify th eoops alv i am not able to see selected item in the output?

to be short

on second alv selected item to be populated to fist alv.

then whatever changes it reflect in fist alv..

wht i ahv eto do?

please suggest

i have to refresh alv or call method refresh alv?

just suggest

HI,

In order to get the selected row in the alv table you have to write

Say first alv is displayed the data from an iternal table ITAB1.

Write this code in CASE SY-UCOMM

When user click Change or modify button then write this code.

DATA:

rows TYPE lvc_t_row,

row_id TYPE lvc_t_roid.

CALL METHOD grid->get_selected_rows

IMPORTING

et_index_rows = rows

et_row_no = row_id.

LOOP AT row_id INTO w_row.

here assign the details of selected to row in a table to temporary internal table ITAB2

and when pop up displays show this internal table data in ALV table 2 as edit mode.

ENDLOOP.

In the second ALV where it displays the selected records, after modifying records

use the same method get_selected_rows and modify internal table then finally before comming to basic alv list

modify the first internal table ITAB1 with the modified internal table ITAB2.

and in Last PAI module in every list it is very important to refresh the container and grid

c_container->free( ).

r_grid->free( ).

Hope it helped!!

Thanks and Regards.

3 REPLIES 3
Read only

Former Member
0 Likes
576

1° update your table with the selected table....

2° Refresh the second alv : CALL METHOD alv2->refresh_table_display.

Read only

Former Member
0 Likes
576

HI,

In order to get the selected row in the alv table you have to write

Say first alv is displayed the data from an iternal table ITAB1.

Write this code in CASE SY-UCOMM

When user click Change or modify button then write this code.

DATA:

rows TYPE lvc_t_row,

row_id TYPE lvc_t_roid.

CALL METHOD grid->get_selected_rows

IMPORTING

et_index_rows = rows

et_row_no = row_id.

LOOP AT row_id INTO w_row.

here assign the details of selected to row in a table to temporary internal table ITAB2

and when pop up displays show this internal table data in ALV table 2 as edit mode.

ENDLOOP.

In the second ALV where it displays the selected records, after modifying records

use the same method get_selected_rows and modify internal table then finally before comming to basic alv list

modify the first internal table ITAB1 with the modified internal table ITAB2.

and in Last PAI module in every list it is very important to refresh the container and grid

c_container->free( ).

r_grid->free( ).

Hope it helped!!

Thanks and Regards.

Read only

Former Member
0 Likes
576

This message was moderated.