‎2020 Oct 12 7:41 AM
im working on mpp, i have 5 selection check boxes on the selection screen...when i check the top check box...all the other check boxes present in the selection screen should also be checked?pls help me with this question
‎2020 Oct 12 7:42 AM
Hi and welcome to the SAP Community!
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 (if you haven't already), 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) and share screenshots of what you've seen/done. The more details you
provide, the more likely it is that members will be able to assist
you.
Should you wish, you can still edit your question.
Finally, if you're hoping to connect with readers, please consider adding a
picture to your profile as it encourages readers to respond to you. Here's how
you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS.
P.S. Capitalizing your headline might come across as shouting in the community - you might want to edit it.
Best,
Lena
SAP Community Moderator
‎2020 Oct 12 7:43 AM
‎2020 Oct 12 8:04 AM
Hi,
In the Process After Input (PAI) event of the screen, write CHAIN-ENDCHAIN block with the first Checkbox field.
PROCESS AFTER INPUT.
CHAIN.
FIELD <CHECK_BOX_FIELD>.
MODULE HANDLE_CHECKBOX.
ENDCHAIN.In the CHAIN block, call a module to handle the other check-boxes.
In the module you can validate the first checkbox and make other check box active / inactive.
Thank you,
GVK
‎2020 Oct 12 10:48 AM
Such a feature would imply the use of a radio button group.
If your goal is to simulate the same feature with check boxes then you must trigger a function code for each check box, and select or unselect the check boxes accordingly in your ABAP program.
TABLES sscrfields.
PARAMETERS chkbox1 AS CHECKBOX USER-COMMAND toggle_chkbox1 DEFAULT 'X'.
PARAMETERS chkbox2 AS CHECKBOX USER-COMMAND toggle_chkbox2.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm. " (to be preferred over sy-ucomm)
WHEN 'TOGGLE_CHKBOX1'.
IF chkbox1 = abap_true.
chkbox2 = abap_false.
ENDIF.
WHEN 'TOGGLE_CHKBOX2'.
IF chkbox2 = abap_true.
chkbox1 = abap_false.
ENDIF.
ENDCASE.