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

interective reporting

Former Member
0 Likes
780

There are two columns in the basic list of my report. My requirement is that on clicking the first column I get different list and on clicking the output secondf column I get different list?

Is it possible?

In simple words like At line selection ,is there anything for column selection?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
762

Hi tanuj,

Yes it is possible.

HIDE the both fields.

WRITE the output.

AT LINE SELECTION.

READ the selected value

based on that write the outputs.

There are two columns in the basic list of my report. My requirement is that on clicking the first column I get different list and on clicking the output secondf column I get different list?

Is it possible?

In simple words like At line selection ,is there anything for column selection?

6 REPLIES 6
Read only

Former Member
0 Likes
763

Hi tanuj,

Yes it is possible.

HIDE the both fields.

WRITE the output.

AT LINE SELECTION.

READ the selected value

based on that write the outputs.

Read only

Former Member
0 Likes
762

Hi tanuj joshi,

use the system field SY-COLNO.

SY-COLNO

Current column during list creation. Counting starts at 1. SY-COLNO is set by the following output statements:

· WRITE, ULINE, SKIP set SY-COLNO to the next output position.

· BACK sets SY-COLNO to 1.

· POSITION sets SY-COLNO to . If

lies outside the page, the subsequent output statements are ignored.

· NEW-LINE sets SY-COLNO to 1.

· NEW-PAGE sets SY-COLNO to 1.

Plzz reward if it is useful,

Mahi.

Read only

Former Member
0 Likes
762

hi,

try like this

REPORT zclassical_inter.

TABLES : vbrk.

DATA : off TYPE i,

lin TYPE i,

fld TYPE char10.

DATA : BEGIN OF itab OCCURS 0,

vbeln LIKE vbrk-vbeln,

fkart LIKE vbrk-fkart,

fkdat LIKE vbrk-fkdat,

netwr LIKE vbrk-netwr,

kunag LIKE vbrk-kunag,

END OF itab.

TOP-OF-PAGE.

ULINE AT /1(80).

FORMAT COLOR 3 ON.

WRITE:/1 sy-vline,

3 'Billing Doc.',

18 sy-vline,

20 'Billing Type',

33 sy-vline,

35 'Billing Date',

48 sy-vline,

50 'Net Value',

68 sy-vline,

69 'Customer',

80 sy-vline.

ULINE AT /1(80).

FORMAT COLOR OFF.

START-OF-SELECTION.

SET PF-STATUS 'TEST'.

SELECT vbeln fkart fkdat netwr kunag FROM vbrk

INTO CORRESPONDING FIELDS OF TABLE itab

WHERE vbeln LIKE '00000033%'.

LOOP AT itab.

WRITE:/1 sy-vline,

itab-vbeln UNDER 'Billing Doc.' HOTSPOT ON,

18 sy-vline,

itab-fkart UNDER 'Billing Type',

33 sy-vline,

itab-fkdat UNDER 'billing Date',

48 sy-vline,

itab-netwr UNDER 'Net Value' LEFT-JUSTIFIED,

68 sy-vline,

itab-kunag UNDER 'Customer' HOTSPOT ON,

80 sy-vline.

HIDE : itab-vbeln.

HIDE : itab-kunag.

ENDLOOP.

ULINE AT /1(80).

AT LINE-SELECTION.

IF sy-lsind = 1.

PERFORM cal_vf03.

ELSEIF sy-lsind = 2.

WRITE : / 'There is no list to display'.

ENDIF.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'BACK' OR 'UP' OR 'CANC'.

LEAVE PROGRAM.

ENDCASE.

&----


*& Form cal_vf03

&----


  • text

----


FORM cal_vf03.

GET CURSOR FIELD fld. " DISPLAY OFFSET off LINE lin.

IF fld = 'ITAB-VBELN'.

SET PARAMETER ID 'VF' FIELD itab-vbeln.

CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

SET PARAMETER ID 'VF' FIELD space.

ELSEIF fld = 'ITAB-KUNAG'.

CALL TRANSACTION 'MIGO'.

ELSE.

CALL TRANSACTION 'MM03'.

ENDIF.

ENDFORM. "cal_vf03

reward if usefull....

Read only

0 Likes
762

Hfrnd thanx ur code was helpful

could u give me more code on interactive reports so that i can enhance my skills?

what all is possible in interactive reporting?

thanx hope u'll reply

Read only

0 Likes
762

hi,

u can display second list (detail list) by clicking on basic list...

means in first list u display some info and clicking on some doc no u can get detail info of that perticular doc....

Read only

Former Member
0 Likes
762

Hi ,

use GET CURSOR FIELD f statement to know the field name on which user clicked.

based on field name u can write what ever u want.

Thanks,

Hari.