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

Prg. Help

Former Member
0 Likes
442

Hi,

I have a query regarding 'read current line' statement. I wanted to read from a basic list output of a report program. And i want to select some specific value (LIFNR) from a specific coloumn, depending on the 'check box' clicked against that row.

And basing on those specific values (LIFNR), i will be selecting from another table(LFA1).

Can anybody plz help me in this regard. If possible drop me a piece of code plz...

Thanking u in advanced

Sangram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
398

hi

read line can be used to solve your requirement...read current line reads a line from line selection or a line read by a read line statement...

just create a pf-status CLIC and execute this code

DATA: BEGIN OF ITAB OCCURS 0,

FLAG(1),

MATNR LIKE MARA-MATNR,

END OF ITAB.

DATA: MLINE TYPE I, MPAGE LIKE SY-PAGNO.

START-OF-SELECTION.

SET PF-STATUS 'OPUI'.

SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 20 ROWS.

LOOP AT ITAB.

WRITE : / ITAB-FLAG AS CHECKBOX, ITAB-MATNR INPUT ON.

HIDE : ITAB-MATNR.

ENDLOOP.

MPAGE = SY-PAGNO.

MLINE = MPAGE * 72.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'CLIC'.

DO MLINE TIMES.

READ LINE SY-INDEX FIELD VALUE ITAB-FLAG ITAB-MATNR.

MODIFY LINE SY-INDEX .

IF ITAB-FLAG NE SPACE.

WRITE : / ITAB-MATNR.

ENDIF.

ENDDO.

ENDCASE.

if helpful, reward

Sathish. R

2 REPLIES 2
Read only

Former Member
0 Likes
398
Read only

Former Member
0 Likes
399

hi

read line can be used to solve your requirement...read current line reads a line from line selection or a line read by a read line statement...

just create a pf-status CLIC and execute this code

DATA: BEGIN OF ITAB OCCURS 0,

FLAG(1),

MATNR LIKE MARA-MATNR,

END OF ITAB.

DATA: MLINE TYPE I, MPAGE LIKE SY-PAGNO.

START-OF-SELECTION.

SET PF-STATUS 'OPUI'.

SELECT MATNR FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 20 ROWS.

LOOP AT ITAB.

WRITE : / ITAB-FLAG AS CHECKBOX, ITAB-MATNR INPUT ON.

HIDE : ITAB-MATNR.

ENDLOOP.

MPAGE = SY-PAGNO.

MLINE = MPAGE * 72.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'CLIC'.

DO MLINE TIMES.

READ LINE SY-INDEX FIELD VALUE ITAB-FLAG ITAB-MATNR.

MODIFY LINE SY-INDEX .

IF ITAB-FLAG NE SPACE.

WRITE : / ITAB-MATNR.

ENDIF.

ENDDO.

ENDCASE.

if helpful, reward

Sathish. R