Skip to Content
author's profile photo Former Member
Former Member

Display information of selected checkbox

Here is some gre8t report: Mosimanegape

TABLES:sflight.

DATA: BEGIN OF key_sflight OCCURS 0,

carrid LIKE sflight-carrid,

connid LIKE sflight-connid,

fldate like sflight-fldate,

END OF key_sflight.

data: ws_date(10).

  • define field for the checkbox

DATA markfield(1) TYPE c VALUE space.

  • Define filed for counting line numbers

DATA lineno TYPE i.

*PARAMETERS:p_chk AS CHECKBOX .

PARAMETERS:p_carrid LIKE sflight-carrid,

p_connid LIKE sflight-connid.

START-OF-SELECTION.

SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE key_sflight

WHERE carrid = p_carrid

AND connid = p_connid .

END-OF-SELECTION.

SORT key_sflight BY fldate.

LOOP AT key_sflight.

  • Writing the report with a checkbox

WRITE:/ markfield AS CHECKBOX,

key_sflight-carrid,

key_sflight-connid,

key_sflight-fldate.

HIDE: key_sflight-carrid,

key_sflight-connid,

key_sflight-fldate.

ENDLOOP.

SET PF-STATUS 'BASE'.

***************************************************************************

AT USER-COMMAND.

*AT LINE-SELECTION.

CASE sy-ucomm.

WHEN 'BOOK'.

  • Reading the lines and cehcking if the line has been checked

  • lineno = 0.

DO.

CLEAR markfield.

  • Read the value of markfield

READ LINE sy-index FIELD VALUE markfield.

  • Test for end of report

IF sy-subrc NE 0.

EXIT.

ENDIF.

CHECK NOT markfield IS INITIAL.

READ CURRENT LINE FIELD VALUE key_sflight-carrid INTO key_sflight-carrid

key_sflight-connid INTO key_sflight-connid

key_sflight-fldate INTO ws_date.

WRITE: / "markfield AS CHECKBOX,

key_sflight-carrid,

key_sflight-connid,

ws_date.

ENDDO.

ENDCASE.

Message was edited by: peter phasha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 09:17 AM

    Where is the problem?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.