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: 

To enable a selected row

Former Member
0 Kudos

How can i get the row which is selected by the user and enable all the columns in that particular row.Please give me a sample code.

1 REPLY 1

Former Member
0 Kudos

HIDE

The HIDE keyword is used to store data objects and their values so they can be made available when the User selects a report line. When a line is selected, the fields that were hidden are filled with the values that you hid for that line.

The user selects a line for which

data has been stored in the HIDE

area. The runtime system evaluates

field SY-LILLI to determine the

selected line.

The runtime system jumps to the

point in the HIDE area where data

for this line is stored.

The runtime system then inserts all

values stored for the selected line in

the HIDE area into their

corresponding fields.

The runtime system processes the

event AT LINE-SELECTION and

its corresponding program

processing block.

A detail list is created.

READ LINE

Use the statements READ LINE and READ CURRENT LINE to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.

Example...........

REPORT demo_list_hide NO STANDARD PAGE HEADING.

TABLES: spfli, sbook.

DATA: num TYPE i,

dat TYPE d.

START-OF-SELECTION.

num = 0.

SET PF-STATUS 'FLIGHT'.

GET spfli.

num = num + 1.

WRITE: / spfli-carrid, spfli-connid,

spfli-cityfrom, spfli-cityto.

HIDE: spfli-carrid, spfli-connid, num.

END-OF-SELECTION.

CLEAR num.

TOP-OF-PAGE.

WRITE 'List of Flights'.

ULINE.

WRITE 'CA CONN FROM TO'.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

CASE sy-pfkey.

WHEN 'BOOKING'.

WRITE sy-lisel.

ULINE.

WHEN 'WIND'.

WRITE: 'Booking', sbook-bookid,

/ 'Date ', sbook-fldate.

ULINE.

ENDCASE.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'SELE'.

IF num NE 0.

SET PF-STATUS 'BOOKING'.

CLEAR dat.

SELECT * FROM sbook WHERE carrid = spfli-carrid

AND connid = spfli-connid.

IF sbook-fldate NE dat.

dat = sbook-fldate.

SKIP.

WRITE / sbook-fldate.

POSITION 16.

ELSE.

NEW-LINE.

POSITION 16.

ENDIF.

WRITE sbook-bookid.

HIDE: sbook-bookid, sbook-fldate, sbook-custtype,

sbook-smoker, sbook-luggweight, sbook-class.

ENDSELECT.

IF sy-subrc NE 0.

WRITE / 'No bookings for this flight'.

ENDIF.

num = 0.

CLEAR sbook-bookid.

ENDIF.

WHEN 'INFO'.

IF NOT sbook-bookid IS INITIAL.

SET PF-STATUS 'WIND'.

SET TITLEBAR 'BKI'.

WINDOW STARTING AT 30 5 ENDING AT 60 10.

WRITE: 'Customer type :', sbook-custtype,

/ 'Smoker :', sbook-smoker,

/ 'Luggage weight :', sbook-luggweight UNIT 'KG',

/ 'Class :', sbook-class.

ENDIF.

ENDCASE.

Regards,