10-10-2008 4:14 AM
Dear All,
I have some doubt in alv report,
Actually my report looks like this,
slno. KPI currentweek
1 headcount 20
2 Contractoffered 30
Here if i double click on 20 it must call the standard transaction 'S_L9C_94000095',
Then if i couble click on 30 it must call transaction 'S_AHR_61015512'.
my codings::
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE it_pa00001 INTO WA_Pa00001 INDEX US_SELF_FIELD-tabindex.
CASE us_self_field-FIELDNAME.
WHEN 'CWEEK' .
here when i double click on cweek it triggers only the first transaction..
Thanks,
Thiru.
10-10-2008 4:21 AM
The test you are performing will always result in CWEEK being the answer as that is the field that you clicked on.
You need to check which row of the ALV grid was double clicked.
10-10-2008 4:50 AM
Thanks for your useful reply, and want to know how to find the row that i was double clicked.,.,
10-10-2008 4:21 AM
in that case you can code like this..
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE it_pa00001 INTO WA_Pa00001 INDEX US_SELF_FIELD-tabindex.
CASE us_self_field-FIELDNAME.
WHEN 'CWEEK' .
case self_field-value.
when '20'.
"check you have to set any parameters
call the standard transaction 'S_L9C_94000095'.
when '30'.
"check you have to set any parameters
call transaction 'S_AHR_61015512'.
endcase.
endcase.
endcase.
10-10-2008 4:49 AM
Thanks for your useful reply, and how to set parameters to that report, Initially i have to clear all the values in that report and i have to pass the values ...
10-10-2008 5:08 AM
i am not sure what are the values with you, but i can see that you have to pass PERNR and DATE. instead of CALL TRANSACTION, use SUBMIT PROGRAM and Return.
find the programs behind the transactions and use submit in the above code.
10-10-2008 4:56 AM
Hi Thirukumaran,
Try the below code. create one parameter ID or memory Id for saving the triggered line and set that triggered line in to variable. after that get that variable.
form validate_command using pv_ucomm type sy-ucomm ws_selfield type slis_selfield.
case pv_ucomm.
when '&IC1'.
Read table it_ekko into wa_ekko index ws_selfield-tabindex.
if sy-subrc eq 0.
set parameter id 'BES' field wa_ekko-ebeln.
GET PARAMETER ID 'BES' FIELD lv_ebeln .
READ TABLE ITAB_CURRENTWEEK INTO WA_ CURRENTWEEK WITH KEY CURRENTWEEK = LV_EBELN.
if sy-subrc eq 0
Call Transaction wa_currentweek-tcode.
endif.
endif.
endcase.
endform.
regards,
ragu
Edited by: Ragu Prasad on Oct 10, 2008 5:58 AM