‎2008 Dec 26 11:14 AM
hii all,
i m illustrating my problem through following example:
Suppose i m on the first page of an interactive report..that contains 4 rows and 3 columns..
and i have selected first row...
Now the problem is : when i click on 1 st column of selected row it should display some interactive report
but when i click on another column of the same selected row it should display SOME
OTHER ALV....what code should i write?????//
Can any1 help me ,plzzzz???
Regards,
Apoorv.
‎2008 Dec 26 11:46 AM
Hi,
Actually i too faced the same issue try to do like this ur problem get resolved,
FORM USER_COMMAND USING U_UCOMM TYPE SY-UCOMM
US_SELF_FIELD TYPE SLIS_SELFIELD. "#EC CALLED
CASE U_UCOMM.
WHEN '&IC1'.
READ TABLE IT_OUTPUT INTO WA_OUTPUT INDEX US_SELF_FIELD-TABINDEX.
CASE US_SELF_FIELD-FIELDNAME.
WHEN 'CWEEK'.
IF US_SELF_FIELD-VALUE = 0.
MESSAGE E001(ZHR_KPI).
ENDIF.
IF US_SELF_FIELD-TABINDEX = 1.
Thanks and Regards,
Thirukumaran. R
‎2008 Dec 26 11:43 AM
You are calling different screens, Based on the Alv row.
try with this
DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
CLEAR LINE_EVENT.
CLEAR LINE_EVENT.
LINE_EVENT-NAME = 'USER_COMMAND'.
LINE_EVENT-FORM = 'USER_COMMAND'.
APPEND LINE_EVENT TO I_EVENTS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
< all others paramets are as required
IT_EVENTS = I_EVENTS
TABLES
T_OUTTAB = I_FINAL.
FORM USER_COMMAND USING WS_UCOMM LIKE SY-UCOMM
WS_SELFIELD TYPE SLIS_SELFIELD.
CASE WS_UCOMM.
WHEN '&IC1'.
if WS_SELFIELD-TABINDEX =1 (1st row)
elseif WS_SELFIELD-TABINDEX =2 (2nd row)
elseif WS_SELFIELD-TABINDEX =3 (3rd row)
and so on
endif.Regards
Sasi
ENDFORM.
‎2008 Dec 26 12:02 PM
hii sasi,
thanx for replying ..
can u help me once more?????/
can i write like this:
if ws_selfield-fieldname = 'Vendor_no'.
*some code that lead me to 2 nd ALV that contains VENDOR DETAILS.
elseif ws_selfield-fieldname = 'Mat_no'.
*some code that leads me to 3rd ALV that contains MATERIAL DETAILS.
endif.
plzz reply....
Regards,
Apoorv
‎2008 Dec 26 11:46 AM
Hi,
Actually i too faced the same issue try to do like this ur problem get resolved,
FORM USER_COMMAND USING U_UCOMM TYPE SY-UCOMM
US_SELF_FIELD TYPE SLIS_SELFIELD. "#EC CALLED
CASE U_UCOMM.
WHEN '&IC1'.
READ TABLE IT_OUTPUT INTO WA_OUTPUT INDEX US_SELF_FIELD-TABINDEX.
CASE US_SELF_FIELD-FIELDNAME.
WHEN 'CWEEK'.
IF US_SELF_FIELD-VALUE = 0.
MESSAGE E001(ZHR_KPI).
ENDIF.
IF US_SELF_FIELD-TABINDEX = 1.
Thanks and Regards,
Thirukumaran. R
‎2008 Dec 26 12:05 PM
hii thirukumaran,
thanx for replying ..
can u help me once more?????/
can i write like this:
if ws_selfield-fieldname = 'Vendor_no'.
*some code that lead me to 2 nd ALV that contains VENDOR DETAILS.
elseif ws_selfield-fieldname = 'Mat_no'.
*some code that leads me to 3rd ALV that contains MATERIAL DETAILS.
endif.
plzz reply....
Regards,
Apoorv
‎2008 Dec 26 12:11 PM
Yes you can do that ws_selfield-fieldname contains the selected field name value, so based on that you can navigate to some other transactions
Regards
Sasi
‎2008 Dec 26 12:12 PM
Hi,
if ws_selfield-fieldname = 'Vendor_no'.
you can write the above statement but the field name should be in caps.
Regards,
Dev.
‎2008 Dec 26 12:17 PM
‎2008 Dec 26 12:18 PM