‎2006 Oct 03 2:40 PM
Hi experts,
Please help me in the following code.
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when 'DISP'.
read table it_alv index rs_selfield-tabindex.
if sy-subrc = 0.
if rs_selfield-fieldname = 'AUFNR'.
set parameter id 'ANR' field rs_selfield-value.
call transaction 'CO03' and skip first screen.
elseif rs_selfield-fieldname = 'AUART'.
set parameter id 'AAT' field rs_selfield-value.
call transaction 'IW33' and skip first screen.
endif.
endif.
endcase.
endform. "user_command
when i click on AUFNR field it should go to transaction 'CO03' and if i click on field
'AUART' it should go to the transaction 'IW33'. But i am not getting please help me.
Thanks
Raj
‎2006 Oct 03 2:43 PM
Put a break point in the Case statement and check the value of R_UCOMM in debugger. I think double click in not DISP.
Aman
‎2006 Oct 03 2:45 PM
Hi raj,
1. when double-clicking, the r_ucomm
will be &IC1
(and not DISP)
2. so change your code
3
case r_ucomm.
<b>when '&IC1'.</b>
regards,
amit m.
‎2006 Oct 03 3:15 PM
Change the code like this:
FORM user_command USING ws_ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
CASE ws_ucomm.
WHEN '&IC1'.
CASE selfield-tabname.
WHEN 'AUFNR'.
set parameter id 'ANR' field rs_selfield-value.
call transaction 'CO03' and skip first screen.
WHEN 'AUART'.
set parameter id 'AAT' field rs_selfield-value.
call transaction 'IW33' and skip first screen.
ENDCASE.
ENDCASE.
endform. "user_command
Regards,
Prakash.
‎2006 Oct 03 3:31 PM
Hi Prakash,
Thank u for ur reply.
I have taken two values for order number. ie from
813217 to 813218.
But when i clicking on the order type 'PM01' for the order number '813217' it is showing values for '813218' in 'iw33'.
Please help me..
Thanks
Raj
‎2006 Oct 03 3:40 PM
Hi,
in debug mode check sy-ucomm value when you double
click and replace your case statement with
sy-ucomm value.
Regards
amole
‎2006 Oct 03 3:49 PM
Hi,
problem may be with your
<b> read table it_alv index rs_selfield-tabindex</b>Regards
amole