‎2008 Nov 21 7:06 AM
Hi Abapers,
I have developed a report where in i have 10 columns..
now the requirement is that if the user click on the first columns and for the rest of columns it should not work
it should call some transaction
its is not an Alv...
Code is...
At line selection.
IF sy-colpos = 1.
call tranaction 'va01'.
endif.
but this is not working....
‎2008 Nov 21 7:15 AM
You can use the ALV OO method :
in the fieldcat you can set hotspot on X for the first column.
You also should define a eventhandler that handles the click on the hotspot.
Search on this forum/wiki for answers. This question is asked many times before.
regards,
Hans
‎2008 Nov 21 7:15 AM
You can use the ALV OO method :
in the fieldcat you can set hotspot on X for the first column.
You also should define a eventhandler that handles the click on the hotspot.
Search on this forum/wiki for answers. This question is asked many times before.
regards,
Hans
‎2008 Nov 21 7:16 AM
‎2008 Nov 21 7:18 AM
Try using Hotspots when writing data to the single column,
Check more detailed information on hotspots from the following link,
http://help.sap.com/saphelp_NW04/helpdata/en/9f/dba1e235c111d1829f0000e829fbfe/content.htm
‎2008 Nov 21 7:19 AM
So what you mean by "its not working"?
Have you debugged the program, at runtime when you click on column one, what is the value of Sy-colpos coming?
Regards
Karthik D
‎2008 Nov 21 7:19 AM
hi,
You can use
AT LINE-SELECTION.
if sy-lsind = 1.
set parameter id 'MAT' field i_makt-matnr.
call transaction 'MM03' and skip first screen.
endif.
thanks
‎2008 Nov 21 7:20 AM
hi,
You can use like for mm03 trnsaction
AT LINE-SELECTION.
if sy-lsind = 1.
set parameter id 'MAT' field i_makt-matnr.
call transaction 'MM03' and skip first screen.
endif.
thanks
‎2008 Nov 21 7:33 AM
REPORT ZSRK_074 .
TABLES : VBAP.
SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
DATA : BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
WERKS LIKE VBAP-WERKS,
MATKL LIKE VBAP-MATKL,
NETWR LIKE VBAP-NETWR,
WAERK LIKE VBAP-WAERK,
KWMENG LIKE VBAP-KWMENG,
BRGEW LIKE VBAP-BRGEW,
NTGEW LIKE VBAP-NTGEW,
END OF IT_VBAP.
DATA : CF1(15),
L_VBELN LIKE VBAP-VBELN.
AT LINE-SELECTION.
GET CURSOR FIELD CF1 VALUE L_VBELN.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_VBELN
IMPORTING
OUTPUT = L_VBELN.
SY-LSIND = 1.
IF CF1 EQ 'IT_VBAP-VBELN'.
SET PARAMETER ID 'AUN' FIELD L_VBELN.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
START-OF-SELECTION.
SELECT VBELN POSNR MATNR WERKS MATKL NETWR WAERK KWMENG BRGEW NTGEW
FROM VBAP
INTO TABLE IT_VBAP
WHERE VBELN IN S_VBELN.
SORT IT_VBAP BY VBELN POSNR.
LOOP AT IT_VBAP.
HIDE : IT_VBAP-VBELN.
WRITE : / IT_VBAP-VBELN, IT_VBAP-POSNR, IT_VBAP-MATNR, IT_VBAP-WERKS, IT_VBAP-MATKL,
IT_VBAP-NETWR, IT_VBAP-WAERK, IT_VBAP-KWMENG, IT_VBAP-BRGEW, IT_VBAP-NTGEW.
ENDLOOP.
‎2008 Nov 21 7:40 AM
use this code
tables: vbak, vbap, mara.
data: begin of it_vbak occurs 0,
pernr type pa0002-pernr,
nachn type pa0002-nachn,
end of it_vbak.
data: fnam(30), fval(30) type c.
select pernr nachn from pa0002 into table it_vbak where begda le sy-datum and endda ge sy-datum.
loop at it_vbak.
write:/2 it_vbak-pernr hotspot on,
it_vbak-nachn.
hide it_vbak-pernr.
endloop.
at line-selection.
get cursor field fnam value fval.
if fnam = 'IT_VBAK-PERNR'.
call transaction 'SE11'.
else.
exit.
endif.