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: 

interactive reports

Former Member
0 Kudos

Dear gurus,

I have developed interactive report for one secondary list.

It works fine.

wherever entered in the first screen it goes to next screen.

Issue is

i want to double click the particular field only. if i double click on any other field next screen should not be displayed.

how can i do.

Please provide the solution.

Regards

R.Rajendran

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Reward points if useful,

Regards,

Swapna.

10 REPLIES 10

Former Member
0 Kudos

hi

pick the postion of the coloumn with sy-cucol and trigger the event only when sy-cucol is in specified range.

You will get the result.

Reward if useful.

Regards

Sumit Agarwal

Former Member
0 Kudos

Use HIDE Keyword

Former Member
0 Kudos

Hi,

While using the double click event you can get the field name too, so use that field name when navigating to next screen.

for example:

fields: field1, field2, field3.

  • Please find the below pseudo code.

if para_values-field_name eq 'FIELD1'

--> Then navigate to next screen

--> Process your logic

endif.

Reward with points if helpful.

Former Member
0 Kudos

daat w_data(30) type c.

at line-selection.

get cursor field w_data.

if w_date eq 'Required field'.

process

endif.

Former Member
0 Kudos

hiii

you can do it as follows

AT LINE-SELECTION.

    sy-lsind = sy-lsind + 1.

  IF sy-lsind = 1.
    PERFORM detail_list.               " Call Subroutine
  ELSE.
    MESSAGE e572(zerror).           " No Record Found
  ENDIF.                               " IF sy-lsind = 0.

FORM detail_list .

  SELECT
        carrid                         " Carrier ID
        connid                         " Connection ID
        fldate                         " Flight Data
        bookid                         " Booking ID
        customid                       " Customer ID
    INTO TABLE t_book
     FROM sbook
     WHERE fldate = w_date .


  IF sy-subrc = 0.
    PERFORM display_detail.
  ELSE .
   write:sy-lsind.
    MESSAGE e571(zerror).           " No Record Found
  ENDIF.                               " IF sy-subrc = 0.



ENDFORM.                               " Detail list

regards

twinkal

Former Member
0 Kudos

hi,

1. use sy-cucol field to specify the col positon from which event is triggered.

or

2. use GET CURSOR statement. the syntax is as follows

GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>]

[VALUE <val>] [LENGTH <len>].

either one will defenitely help.

Reward if helpful

Anirban Bhattacharjee

Former Member
0 Kudos

Hi,

You can use GET CURSOR FIELD f, like give a condition

At line-selection.

if f = field1.

( display the secondary list)

else.

sy-lsind = 0.

message ....

endif.

or you can also do it by sy-cucol by giving the positions in if condition.

with luck,

Pritam.

Former Member
0 Kudos

hi,

1. use sy-cucol field to specify the col positon from which event is triggered.

or

2. use GET CURSOR statement. the syntax is as follows

GET CURSOR FIELD <f> [OFFSET <off>] [LINE <lin>]

[VALUE <val>] [LENGTH <len>].

either one will defenitely help.

Reward if helpful

Anirban Bhattacharjee

Former Member
0 Kudos

Hai,

Try to copy this code and directly execute in the abap editor and try to understand it. This This program is used to display Details from Tables VBAK & VBAP on Basic & Detail List . On the Detail list the details are displayed only when the user double clicks on Sales doc no.

*" Table declarations..................................................

TABLES :

vbak, " Sales Document Header Data

vbap. " Sales Document Item Data

*" Selection Screen Elements...........................................

SELECT-OPTIONS :

s_vbeln FOR vbak-vbeln. " Sales Document Number

*"Data declarations....................................................

"----


  • Work variables *

"----


DATA :

w_rowno LIKE sy-curow VALUE 3, " Row Number

w_curr LIKE vbak-waerk. " SD document currency

"----


  • Internal table to hold Sales Document Header data *

"----


DATA :

t_vbak LIKE

STANDARD TABLE

OF vbak.

"----


  • Internal table to hold Sales Document Item data *

"----


DATA :

t_vbap LIKE

STANDARD TABLE

OF vbap.

"----


  • TOP-OF-PAGE EVENT *

"----


TOP-OF-PAGE.

WRITE :/50 'SALES DOCUMENT HEADER INFORMATION'(001),

sy-uline.

FORMAT COLOR 3.

WRITE :/3 'Sales Doc.No'(002),

20 'Date'(003),

30 'Created By'(004),

45 'Doc.Category'(005),

62 'Doc.Type'(006),

73 'Del.Block'(007),

87 'Bill Block'(008),

102 'Net Value'(009),

115 'Sales Org.'(010),

130 'Sold to Party'(011).

"----


  • TOP-OF-PAGE DURING LINE-SELECTION EVENT *

"----


TOP-OF-PAGE DURING LINE-SELECTION.

WRITE 😕 'SALES DOCUMENT ITEM DATA'(012),

sy-uline.

FORMAT COLOR 3.

WRITE :/5 'Sales Doc.No'(002),

22 'Sales Doc.Item'(013),

41 'Material Number'(014),

71 'Base Unit of Measure'(015).

"----


  • AT SELECTION-SCREEN EVENT *

"----


AT SELECTION-SCREEN.

SELECT vbeln " Sales Document

FROM vbak

INTO CORRESPONDING FIELDS OF

TABLE t_vbak

WHERE vbeln IN s_vbeln.

IF sy-subrc NE 0.

MESSAGE e184(bc_global) WITH text-017.

ENDIF. " IF SY-SUBRC NE 0.

"----


  • START-OF-SELECTION EVENT *

"----


START-OF-SELECTION.

PERFORM fetch_vbak_data.

"----


  • AT LINE-SELECTION EVENT *

"----


AT LINE-SELECTION.

IF sy-lsind = 1.

IF sy-cucol LT 14

AND sy-curow GT 3

AND sy-curow LE w_rowno.

PERFORM fetch_vbap_data.

ELSE.

MESSAGE e184(bc_global) WITH text-016.

ENDIF. " IF SY-CUCOL LT 14...

ENDIF. " IF SY-LSIND = 1.

&----


*& Form FETCH_VBAK_DATA *

&----


  • This Subroutine Fetches Data from the Database Table VBAK *

----


  • There are no interface parameters to be passed to this subroutine. *

----


FORM fetch_vbak_data .

SELECT vbeln " Sales Document

erdat " Creation Date

ernam " Person who created the object

vbtyp " SD document category

auart " Document Type

lifsk " Delivery Block

faksk " Billing Block

netwr " Net value of the document

vkorg " Sales Organization

kunnr " Sold to Party

FROM vbak

INTO CORRESPONDING FIELDS OF

TABLE t_vbak

WHERE vbeln IN s_vbeln.

IF sy-subrc EQ 0.

PERFORM display_vbak_data.

ENDIF. " IF SY-SUBRC EQ 0

ENDFORM. " FORM FETCH_VBAK_DATA

&----


*& Form display_vbak_data *

&----


  • This Subroutine Displays Data from the Database Table VBAK *

----


  • There are no interface parameters to be passed to this subroutine. *

----


FORM display_vbak_data .

SORT t_vbak BY vbeln ASCENDING.

LOOP AT t_vbak INTO vbak.

ADD 1 TO w_rowno.

FORMAT COLOR 1.

WRITE 😕 vbak-vbeln UNDER text-002.

FORMAT COLOR 2.

WRITE :17 vbak-erdat,

vbak-ernam UNDER text-004,

vbak-vbtyp UNDER text-005,

vbak-auart UNDER text-006,

vbak-lifsk UNDER text-007,

vbak-faksk UNDER text-008,

90 vbak-netwr CURRENCY w_curr,

vbak-vkorg UNDER text-010,

vbak-kunnr UNDER text-011.

HIDE : vbak-vbeln.

ENDLOOP. " LOOP AT T_VBAK...

ENDFORM. " FORM DISPLAY_VBAK_DATA

&----


*& Form FETCH_VBAP_DATA *

&----


  • This Subroutine Fetches Data from the Database Table VBAP *

----


  • There are no interface parameters to be passed to this subroutine. *

----


FORM fetch_vbap_data .

SELECT vbeln " Sales Document Number

posnr " Sales Document Item

matnr " Material Number

meins " Base unit of measure

FROM vbap

INTO CORRESPONDING FIELDS OF

TABLE t_vbap

WHERE vbeln = vbak-vbeln.

IF sy-subrc EQ 0.

PERFORM display_vbap_data.

ENDIF. " IF SY-SUBRC EQ 0

ENDFORM. " FORM FETCH_VBAP_DATA

&----


*& Form DISPLAY_VBAP_DATA *

&----


  • This Subroutine Displays Data from the Database Table VBAP *

----


  • There are no interface parameters to be passed to this subroutine. *

----


FORM display_vbap_data .

LOOP AT t_vbap INTO vbap.

AT NEW vbeln.

FORMAT COLOR 2.

WRITE 😕 vbap-vbeln UNDER text-002.

ENDAT. " AT NEW VBELN

WRITE 😕 vbap-posnr UNDER text-013,

vbap-matnr UNDER text-014,

vbap-meins UNDER text-015,

90 space.

ENDLOOP. " LOOP AT T_VBAP INTO VBAP

ENDFORM. " FORM DISPLAY_VBAP_DATA

Former Member
0 Kudos

Reward points if useful,

Regards,

Swapna.