‎2006 Mar 30 11:51 AM
Hi all,
this query is the extension of the above link.
After dispalying the window as a dailog box,if the user clicks on the other line then the table must refersh and display all line items that corresponds to the clicked line. her i have used the 'RESUE_ALV_LIST_DISPALY' to display the output and i set the parametres like 'line no column' etc to dispaly as a dailog box.
My requirment is after double click on another line automaticaly the dailog box must refresh and it has to display all line items which correspond the line which i have clicked it.
I hope you understood my problem and also i guess there might be another function module to behave like this.
Regards,
Lisa.
‎2006 Mar 30 12:01 PM
Hi lisa,
1. automaticaly the dailog box must refresh
For that in the call back form,
we have to use
slis_selfield-REFRESH = 'X'.
and then we should
again show another alv.
2. just copy paste to get a taste of it.
REPORT abc.
TYPE-POOLS : slis.
*----
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
*----
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*----
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
I_SCREEN_START_COLUMN = 5
I_SCREEN_START_LINE = 5
I_SCREEN_END_COLUMN = 75
I_SCREEN_END_LINE = 25
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
*----
CALL BACK FORM
*----
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
READ TABLE itab INDEX whatrow-tabindex.
whatrow-refresh = 'X'.
*----
Select Data
SELECT * FROM t001 INTO TABLE itab
where bukrs = itab-bukrs.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*----
Display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
I_SCREEN_START_COLUMN = 5
I_SCREEN_START_LINE = 5
I_SCREEN_END_COLUMN = 75
I_SCREEN_END_LINE = 25
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "ITAB_user_command
regards,
amit m.
‎2006 Mar 30 12:39 PM
Hi Amit,
The solution which u have provided to me is not working. Some thing might me wrong. Can you please explain it.
Regards,
Lisa
‎2006 Mar 30 12:44 PM
Hi lisa,
1. what i understood is
on double-clicking the 1st alv,
2nd alv should come !
2. for that
a) call back form u must have used
b) it would be somewhat like this :
FORM itab_user_command USING whatcomm TYPE sy-ucomm <b>whatrow TYPE
slis_selfield.</b>
READ TABLE itab INDEX whatrow-tabindex.
ENDFORM. "ITAB_user_command
c) in that,
we have to use
whatrow-REFRESH = 'X'.
(so that same alv gets refreshed,)
d) then in that same thing,
we write code to show NEW alv.
(it wont show in new window, bcos
we have given REFRESH = 'X'.
regards,
amit m.
‎2006 Mar 30 12:38 PM
Hi
I think you should only refresh the output table you're moving to ALV for POPUP, so:
every time you call ALV you should append only the records you have to display and after backing from popup you should clear the output table.
Max
‎2006 Mar 30 12:45 PM
Hi Max,
Thats not a pop up actually,I am defining the size of the screen by using some parameters.Is there any function exists to dispaly as popup?.
Regards,
Lisa
‎2006 Mar 30 12:47 PM
Hi lisa,
1. in the reuse_alv_list_display FM,
we have to pass
I_SCREEN_START_COLUMN
I_SCREEN_START_LINE
I_SCREEN_END_COLUMN
I_SCREEN_END_LINE
so that it comes as POPUP.
regards,
amit m.
‎2006 Mar 30 12:50 PM
Hi Mittel,
I have defined the same parameters thats why the window looks like pop-up.Even though i defined as what you said above its not working.
Regards,
Lisa
‎2006 Mar 30 2:28 PM
Hi Mittel,
The problem unable to refresh is! when the popup window is active the back ground window is inactive so even if i double click on it its not working.
Regards,
Lisa.
‎2006 Mar 30 2:41 PM
Hi again,
1. it seems i have not understood your question properly !
regards,
amit m.
‎2006 Mar 30 2:43 PM
Hi
Lisa, excuse me, but where are you doing the doubleclick?
If your're selecting a line of popup window, you should implement the user_command for it to manage the doubleclick.
Max
‎2006 Mar 31 8:25 AM
Hi max,
I am clicking on the back ground window not on the popup window.
Regards,
Lisa.
‎2006 Mar 31 8:34 AM
Hi,
how can you click on background window , and how can it let you do that. it will not be possible, and it won't respond.
that is impossible.
Regards
vijay