Community
Topics
Groups
Answers
Blogs
Events
Programs
Resources
What's New
Explore SAP
Read the SAP Community Privacy Statement
SAP Community is updating its Privacy Statement to reflect its ongoing commitment to be transparent about how SAP uses your personal data. Read the new Privacy Statement now.
Read the SAP Community Privacy Statement
Home
Community
Questions
Ask a Question
Write a Blog Post
Login / Sign-up
Top of Form
Search Questions and Answers
Bottom of Form
Vote up-1Vote down
Former Member
Nov 20, 2019 at 07:40 PM
Hide selection screen based on radio button.
3091 Views Last edit Nov 20, 2019 at 05:59 PM 2 rev
Follow
RSS Feed
I'm new to abap. Toggling(hide) the selection screens based on radio button input. But the code seems not working.
• Radio button block
SELECTION-SCREEN BEGIN OF BLOCK search_block WITH FRAME TITLE text-001.PARAMETER: rad_flt RADIOBUTTON GROUP rgb DEFAULT 'X',
rad_cus RADIOBUTTON GROUP rgb.
SELECTION-SCREEN END OF BLOCK search_block.• Selection screen 1
SELECTION-SCREEN BEGIN OF BLOCK flight_block WITH FRAME TITLE text-002.PARAMETER: carrid TYPE sbook-carrid,
connid TYPE sbook-connid,
fldate TYPE sbook-fldate MODIF ID sc1.
SELECTION-SCREEN END OF BLOCK flight_block.*Selection screen 2
SELECTION-SCREEN BEGIN OF BLOCK customid_block WITH FRAME TITLE text-002.PARAMETER: customid TYPE sbook-customid MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK customid_block.AT SELECTION-SCREEN OUTPUT.
• Toggle the selection screens based on radio buttons
LOOP AT SCREEN.IF rad_flt = 'X' AND screen-group1 = 'sc2'.screen-active = 0.
MODIFY SCREEN.ELSEIF rad_cus = 'X' AND screen-group1 = 'sc1'.
screen-active = 0.
MODIFY SCREEN.ENDIF.ENDLOOP.Thanks in advance.
Add a Comment
Alert Moderator
2 comments
Sandra Rossi
Nov 20, 2019 at 07:49 PM
Question also asked at StackOverflow with a comment/answer.
Like 3
Share
Alert Moderator
Dev Parbutteea
Nov 21, 2019 at 02:47 AM
Hi, there are lots of example on the forums. please search ..
https://answers.sap.com/questions/6427270/dynamic-selection-screen-change-in-selection-scree.html
https://answers.sap.com/questions/4404812/dynamic-selection-screen-modification.html
Hint: you are missing something in your program...
Like 0
Share
Alert Moderator
Add a Comment
Assigned Tags
ABAP Development
Similar Questions
TABLE CONTROL made VISIBLE / invisible on clicking RADIO BUTTON.
Former MemberJan 02, 2013
Radio button field issue in the selection screen
Former MemberJul 05, 2014
1 Answer
Votes
Newest
Oldest
Vote up2Vote down
Satish Kumar Balasubramanian
Nov 21, 2019 at 03:45 AM
Hello,
1) You did not Assign USER COMMAND value to your radio button group.
2) In the Loop at screen, you are comparing SC1 and SC2 using lowercase.
Below is the correct code for your reference.
SELECTION-SCREEN BEGIN OF BLOCK search_block WITH FRAME TITLE TEXT-001.PARAMETER: rad_flt RADIOBUTTON GROUP rgb USER-COMMAND cmd_rd DEFAULT 'X',
rad_cus RADIOBUTTON GROUP rgb.
SELECTION-SCREEN END OF BLOCK search_block.• Selection screen 1
SELECTION-SCREEN BEGIN OF BLOCK flight_block WITH FRAME TITLE TEXT-002.PARAMETER: carrid TYPE sbook-carrid,
connid TYPE sbook-connid,
fldate TYPE sbook-fldate MODIF ID sc1.
SELECTION-SCREEN END OF BLOCK flight_block.*Selection screen 2
SELECTION-SCREEN BEGIN OF BLOCK customid_block WITH FRAME TITLE TEXT-003.PARAMETER: customid TYPE sbook-customid MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK customid_block.AT SELECTION-SCREEN OUTPUT.
• Toggle the selection screens based on radio buttons
LOOP AT SCREEN.IF rad_flt = 'X' AND screen-group1 = 'SC2'.screen-active = 0.
MODIFY SCREEN.ELSEIF rad_cus = 'X' AND screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.ENDIF.ENDLOOP.Regards!
Add a Comment
Alert Moderator
Share
1 comment
Sandra Rossi
Nov 21, 2019 at 07:59 AM
ABAP documentation: PARAMETERS ... RADIOBUTTON GROUP ... [USER-COMMAND ...]
Like 2
Share
Alert Moderator
Know someone who can answer? Share a link to this
question.
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 your answer complies with our Rules of Engagement.
Rules of Engagement
You must be Logged in to submit an answer.
Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.
Submit your Answer
Find us on
Privacy
Terms of Use
Legal Disclosure
Copyright
Trademark
Cookie Preferences
Newsletter
Support
Community
Topics
Groups
Answers
Blogs
Events
Programs
Resources
What's New
Explore SAP
Read the SAP Community Privacy Statement
SAP Community is updating its Privacy Statement to reflect its ongoing commitment to be transparent about how SAP uses your personal data. Read the new Privacy Statement now.
Read the SAP Community Privacy Statement
Home
Community
Questions
Ask a Question
Write a Blog Post
Login / Sign-up
Top of Form
Search Questions and Answers
Bottom of Form
Vote up-1Vote down
Former Member
Nov 20, 2019 at 07:40 PM
Hide selection screen based on radio button.
3091 Views Last edit Nov 20, 2019 at 05:59 PM 2 rev
Follow
RSS Feed
I'm new to abap. Toggling(hide) the selection screens based on radio button input. But the code seems not working.
• Radio button block
SELECTION-SCREEN BEGIN OF BLOCK search_block WITH FRAME TITLE text-001.PARAMETER: rad_flt RADIOBUTTON GROUP rgb DEFAULT 'X',
rad_cus RADIOBUTTON GROUP rgb.
SELECTION-SCREEN END OF BLOCK search_block.• Selection screen 1
SELECTION-SCREEN BEGIN OF BLOCK flight_block WITH FRAME TITLE text-002.PARAMETER: carrid TYPE sbook-carrid,
connid TYPE sbook-connid,
fldate TYPE sbook-fldate MODIF ID sc1.
SELECTION-SCREEN END OF BLOCK flight_block.*Selection screen 2
SELECTION-SCREEN BEGIN OF BLOCK customid_block WITH FRAME TITLE text-002.PARAMETER: customid TYPE sbook-customid MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK customid_block.AT SELECTION-SCREEN OUTPUT.
• Toggle the selection screens based on radio buttons
LOOP AT SCREEN.IF rad_flt = 'X' AND screen-group1 = 'sc2'.screen-active = 0.
MODIFY SCREEN.ELSEIF rad_cus = 'X' AND screen-group1 = 'sc1'.
screen-active = 0.
MODIFY SCREEN.ENDIF.ENDLOOP.Thanks in advance.
Add a Comment
Alert Moderator
2 comments
Sandra Rossi
Nov 20, 2019 at 07:49 PM
Question also asked at StackOverflow with a comment/answer.
Like 3
Share
Alert Moderator
Dev Parbutteea
Nov 21, 2019 at 02:47 AM
Hi, there are lots of example on the forums. please search ..
https://answers.sap.com/questions/6427270/dynamic-selection-screen-change-in-selection-scree.html
https://answers.sap.com/questions/4404812/dynamic-selection-screen-modification.html
Hint: you are missing something in your program...
Like 0
Share
Alert Moderator
Add a Comment
Assigned Tags
ABAP Development
Similar Questions
TABLE CONTROL made VISIBLE / invisible on clicking RADIO BUTTON.
Former MemberJan 02, 2013
Radio button field issue in the selection screen
Former MemberJul 05, 2014
1 Answer
Votes
Newest
Oldest
Vote up2Vote down
Satish Kumar Balasubramanian
Nov 21, 2019 at 03:45 AM
Hello,
1) You did not Assign USER COMMAND value to your radio button group.
2) In the Loop at screen, you are comparing SC1 and SC2 using lowercase.
Below is the correct code for your reference.
SELECTION-SCREEN BEGIN OF BLOCK search_block WITH FRAME TITLE TEXT-001.PARAMETER: rad_flt RADIOBUTTON GROUP rgb USER-COMMAND cmd_rd DEFAULT 'X',
rad_cus RADIOBUTTON GROUP rgb.
SELECTION-SCREEN END OF BLOCK search_block.• Selection screen 1
SELECTION-SCREEN BEGIN OF BLOCK flight_block WITH FRAME TITLE TEXT-002.PARAMETER: carrid TYPE sbook-carrid,
connid TYPE sbook-connid,
fldate TYPE sbook-fldate MODIF ID sc1.
SELECTION-SCREEN END OF BLOCK flight_block.*Selection screen 2
SELECTION-SCREEN BEGIN OF BLOCK customid_block WITH FRAME TITLE TEXT-003.PARAMETER: customid TYPE sbook-customid MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK customid_block.AT SELECTION-SCREEN OUTPUT.
• Toggle the selection screens based on radio buttons
LOOP AT SCREEN.IF rad_flt = 'X' AND screen-group1 = 'SC2'.screen-active = 0.
MODIFY SCREEN.ELSEIF rad_cus = 'X' AND screen-group1 = 'SC1'.
screen-active = 0.
MODIFY SCREEN.ENDIF.ENDLOOP.Regards!
Add a Comment
Alert Moderator
Share
1 comment
Sandra Rossi
Nov 21, 2019 at 07:59 AM
ABAP documentation: PARAMETERS ... RADIOBUTTON GROUP ... [USER-COMMAND ...]
Like 2
Share
Alert Moderator
Know someone who can answer? Share a link to this
question.
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 your answer complies with our Rules of Engagement.
Rules of Engagement
You must be Logged in to submit an answer.
Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.
Submit your Answer
Find us on
Privacy
Terms of Use
Legal Disclosure
Copyright
Trademark
Cookie Preferences
Newsletter
Support