Hi Everyone,
I have a requitement where i need to display a classic report based on the records checked in the first report.
The first classic report has list of material details with checkbox.when the user selects a particular record,and clicks the button,the selected record should be displayed in the second classic report.
i tried framing the logic based on some inputs from SDN,but the problem is the check box value is not getting captured because of which i get all the records from the first report.
iam using at user comamnd event,as this has to occur at button click.
iam also posting my at user command code.
kindly have a look and guide me where iam going wrong.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'EXECUTE'.
SET PF-STATUS 'EXECUTE'.
WRITE:/1(60) sy-uline.
WRITE:/1 sy-vline,
2 'MATERIAL NUMBER',
15 sy-vline,
16 'MATERIAL DESCRIPTION',
60 sy-vline.
WRITE:/1(60) sy-uline.
DO .
READ LINE sy-index.
IF sy-subrc NE 0.
EXIT.
ENDIF.
LOOP AT it_makt .
if sy-lisel+1(1) = 'X'.
it_final-matnr = it_makt-matnr.
it_final-maktx = it_makt-maktx.
APPEND it_final.
else .
if sy-index > 1 and sy-lisel = space.
exit.
endif.
endif.
ENDLOOP.
LOOP at it_final.
WRITE:/1 sy-vline,
2 it_final-matnr,
17 sy-vline,
18 it_final-maktx,
60 sy-vline.
ENDLOOP.
ENDDO.
ENDCASE.
WRITE:/1(60) sy-uline.
thanks in advance.