Application Development and Automation 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: 
Read only

Problem regarding the system fields....

aarif_baig
Active Participant
0 Likes
1,028

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

1 ACCEPTED SOLUTION
Read only

h_senden2
Active Contributor
0 Likes
995

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

8 REPLIES 8
Read only

h_senden2
Active Contributor
0 Likes
996

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

Read only

0 Likes
995

I have already mentioned as its is not an ALV report

Read only

Former Member
0 Likes
995

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

Read only

Former Member
0 Likes
995

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

Read only

Former Member
0 Likes
995

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

Read only

Former Member
0 Likes
995

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

Read only

Former Member
0 Likes
995

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.

Read only

Former Member
0 Likes
995

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.