2022 Feb 11 9:01 AM
Hello all,
I attend some courses for Abap development and I encounterd the following issue:
I made a program that gather flight info and I need to set a checkbox in the start of selection for a parameter that should return only the canceled flights.
I defined it in the start of selectiin but I don t know how to make it do what I need.
Can someone help me?
Thank you
2022 Feb 11 9:01 AM
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with: https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.
For example, you can:
- outline what steps you took to find answers (and why they weren't helpful)
- share screenshots of what you've seen/done
- make sure you've applied the appropriate tags
- use a more descriptive subject line
The more details you provide, the more likely it is that members will be able to respond. Feel free to also take our Q&A tutorial at: https://developers.sap.com/tutorials/community-qa.html
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM
2022 Feb 11 9:42 AM
Hello madalinacorina.floca
If you need to define a default value for your checkbox parameter, then the easies way is to use DEFAULT key word - see SAP Help Defining Checkboxes
Best regards
Dominik Tylczynski
2022 Feb 11 12:50 PM
Hi,
Declare check box and give condition as per your requirement.
Simple Example:
*******declaration**********
PARAMETERS P_CANCL AS CHECKBOX. "check box
**********selection*********
select * from tableA into internalTableA " Your select statement
IF P_CANCL IS NOT INITIAL. "if check box is checked then
DELETE internaltableA WHERE STATUS NE 'C'. "delete data which are not cancel
ENDIF.
2022 Feb 13 12:51 PM
2022 Feb 13 1:02 PM
2022 Feb 15 5:10 AM
hello,
thank for your answers.
sandra.rossi , my questions is " how do I do a checkbox to return all canceled flights"?
for example: this is my cl_salv report

and in the selection-screen I wrote this:
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.thank you,
2022 Feb 15 9:43 AM
Something like that?
SELECT * FROM sbook INTO TABLE list_of_bookings WHERE cancelled = p_cb_can.Next time, please add relevant code to help answering. Here I'm assuming that you read the table SBOOK.