Application Development 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: 

ALV REPORT

Former Member
0 Kudos

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.

6 REPLIES 6

Former Member
0 Kudos

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.

0 Kudos

Thanks for your useful reply, and want to know how to find the row that i was double clicked.,.,

former_member188685
Active Contributor
0 Kudos

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.

0 Kudos

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 ...

0 Kudos

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.

Former Member
0 Kudos

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