Regarding processing of radio Button
hi,
i have 2 radio buttons on top of selection-screen and i have 2 parameters on the selection-screen.
By selecting one radio button,one among 2 parameters is ready for input and that parameter i ahve to made as Mandatory field....
How can we do it....
Help me.....
Nice answers are rewarded with Maxi Points...
Hi Subhas,
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER R1 RADIOBUTTON GROUP G1 USER-COMMAND UC.
PARAMETER p_EBELN TYPE EKKO-EBELN MODIF ID S1.
PARAMETER R2 RADIOBUTTON GROUP G1.
PARAMETER P_MATNR TYPE MARA-MATNR MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT ****
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 = 'X'.
IF SCREEN-GROUP1 = 'S1'
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
ENDIF.
IF R2 = 'X'.
IF SCREEN-GROUP1 = 'S2'
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
CLEAR SCREEN.
ENDIF.
ENDLOOP.
Try this code. it'll solve your requirement.
Reward if useful.
Regards
ANUPAM
Similar Messages
-
Dear All,
I add two radio button in my form. And they work. One button for 'male' and another for 'female'.
When i click male button then it sends '1' to database in the respective field and
when i click female button then it sends '2' to database.
But i need 'M' for male and 'F' for female.
what is the solution.
Good day.
Regards
Bodhisatya BhattacharjeeTry something like this for the first Option button ...
Dim oOptionBtn As SAPbouiCOM.OptionBtn
With oItem
.Left = 100
.Top = 100
.Width = 50
.Height = 20
oOptionBtn = .Specific
End With
With oOptionBtn ' data bind
.Caption = strCaption
.ValOn = 'M'
.ValOff = 'F'
If Len(strGroupWith) > 0 Then .GroupWith(strGroupWith) ' Use tihis to group the option buttons
If Len(Trim(strFieldName)) > 0 Then .DataBind.SetBound(True, "", "FIELD1")
End With
and then set the
ValOn = 'F'
and .
ValOff = 'M'
for the other button.
hope it works for you
null -
Dynamic data processing (concerning radio buttons)
hello again. first of all, whoever you are in my last topic,
thank you for helping me solve that checkbox problem. (forgot your
username)
here's a new puzzle:
this puzzle involved 2 pages,
editMODS.cfm and editMODS2.cfm. in editMODS.cfm, there are 2
rows of radio buttons, one row for edit, one row for delete. but
only one out of all can be checked at a time. once the user has
selected whether he want to edit/delete that module, he will submit
the value for editMODS2.cfm to process. editMODS2.cfm's
responsibility is to check what the value submitted by editMODS.cfm
is, then choose which page to redirect to. when the page is chosen,
editMODS2.cfm should then pass the value passed by editMODS.cfm to
that chosen page so that the chosen page can work its magic.
editMODS.cfm
===========
<cfquery datasource="fypdatabase" name="listMODS">
SELECT *
FROM moduleTABLE
ORDER BY courseID
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post"
action="editMODS2.cfm">
<table width="318" border="0" cellpadding="4"
cellspacing="3">
<tr>
<td colspan="3" align="center"><strong>Edit /
Delete Modules</strong></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="center"
valign="top"><strong>Edit</strong></td>
<td align="center"
valign="top"><strong>Delete</strong></td>
</tr>
<cfloop query="listMODS">
<tr>
<td width="192" align="left" valign="top">
<cfoutput>#listMODS.moduleNAME#
(#listMODS.moduleCODE#)</cfoutput> </td>
<td width="45" align="center" valign="top">
<cfoutput><input type="radio" name="radio"
id="radio" value="E#listMODS.moduleID#" /></cfoutput>
</td>
<td width="45" align="center" valign="top">
<cfoutput><input type="radio" name="radio"
id="radio" value="D#listMODS.moduleID#" /></cfoutput>
</td>
</tr></cfloop>
<tr>
<td height="3" colspan="3" align="center"
valign="middle"></td>
</tr>
<tr>
<td colspan="3" align="center"
valign="middle"><input type="submit" name="button"
id="button" value="Submit" /></td>
</tr>
</table>
</form>
</body>
</html>
+++++++++++++++++++++
editMODS2.cfm (all those cfoutputs are there for faster
testing of the checking function)
============
<cfquery datasource="fypdatabase" name="listMODS">
SELECT *
FROM moduleTABLE
ORDER BY courseID
</cfquery>
<cfif #form.radio# is "E#listMODS.moduleID#">
<cfoutput>rw</cfoutput>
<cfelseif #form.radio# is "D#listMODS.moduleID#">
<cfoutput>sd</cfoutput>
<cfelse>
<cfoutput>ec</cfoutput>
</cfif>
as a bonus, it will be greatly appreciated if anyone can
enlighten me on value passing too.hi. this post is to inform that the first part of the puzzle
has been solved using CONTAIN instead of IS in editMODS2.cfm.
the second part about value passing is still open. -
How to handle Event when a radio button in selection screen is clicked
Hi all,
What is the Event generated when a radio button is clicked in the selection Screen. My requirement is .If one radio button is clicked a field in selection screen should be greyed.
Here I used AT SELECTION-SCREEN OUTPUT. but this event is generated only if i press 'ENTER' after clicking the radio button in the selection screen.
Is there any other way to process this radio button event?
Thanks&Best Regards,
Vishnuhi,
try like this
TABLES : kna1,lfa1.
SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : rad_but1 RADIOBUTTON GROUP one DEFAULT 'X' USER-COMMAND ucom.
SELECTION-SCREEN COMMENT 3(26) text-003.
SELECT-OPTIONS : kunnr FOR kna1-kunnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : rad_but2 RADIOBUTTON GROUP one .
SELECTION-SCREEN COMMENT 3(26) text-004.
SELECT-OPTIONS : lifnr FOR lfa1-lifnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN:END OF BLOCK blk1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rad_but1 = 'X'.
IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH' .
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
screen-input = '0'.
REFRESH lifnr.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF rad_but2 = 'X'.
IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH'.
REFRESH kunnr.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
reward if usefull.... -
Option ( Radio button or check box) on selection - screen , to go to CNR2
<b>Subject - Option ( Radio button or check box) on selection - screen , to go to Tcode CNR2</b>
Hi all,
I have developed a report , which has a selection screen with one select-option , where i enter employee number and two radio buttons , one is for all workcentres and other one for active workcentre. so when i enter employee number and choose either of the radio button i wil get the output properly. the output displays , employee no, employee name , work centre and project of that employee . an employee may have many workcentres and a corresponding project for that work centre.
Now the Problem is , from the same report i need to add a option on the selection -screen , ( plz tell me whether to use radio button or check box and if it is radio button should i use it seperately or group it in the above two buttons.) .
so that when user selects the option , the control should go to transaction code CNR2, from where i can enter workcentre and in the next screen i have HR assigntment tab , after choosing that it will dsplay persons linked to the workcentre and there is a delete icon , from where i can delete the person.
The only thing is now to move / Navigate to the screen or go to transaction code CNR2 from the report or from the selection screen.
Your valuable Inputs are awaited, PLz do lemme know
Thanks in advance ,
regards,
ShujaShuja,
A radio button nor a checkbox should be used for navigation. I would suggest a COMMAND BUTTON.
Something like this:
Report ZZZZZZ.
TABLES: sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
selection-screen: PUSHBUTTON /10(20) but1 USER-COMMAND cli1.
SELECTION-SCREEN END OF BLOCK ONE.
initialization.
but1 = 'Button Text Goes Here'.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
call transaction 'CNR2'.
start-of-selection.
Your code here -
Creating radio button in sourcing7
Hi,
Is it possible to create a radio button (not a check box) in SAP Sourcing7 as a field extension?
If yes, how? If the datatype is selected as Boolean, the system by default creates a checkbox.
Regards
MoumitaHi Moumita,
Radio button extension is currently not supported.
Regards,
Vikram -
How can I select a radio button in a table regarding the data in the cells?
Hi everyone
This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
Could you please help me with this problem?? I'm Kind of frustrated with this issue jejejeHere is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
Private Sub RSWVBAPage_afterPlay()
Dim tbl As HTMLTable
Dim tblRow As HTMLTableRow
Dim tblCell As HTMLTableCell
Dim strValue As String
Dim rButton As HTMLInputElement
' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
' Strip out the ; for inner text comparison
strValue = Replace(strValue, ";", "")
' This will get the table but can be modifoed to be more specific
Set tbl = RSWApp.om.FindElement(, "TABLE")
' This loops through all the rows in the table until a match to the strValue is found
' then clicks the radio button. Findelements allows you to specify a root element
' once the correct root row is found, FindElemets can get the correct radio button
For Each tblRow In tbl.rows
If tblRow.innerText = strValue Then
Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
rButton.click
End If
Next
End Sub
I also uploaded the script I created. You should be able to run it and see how it works.
This should get you going. -
How to set button disabled wile processing radio button request.
Hi,
I have one panel gropu layout and inside that i am displaying radio buttons, select many check box and save button. Actually on change of radio button selection based on the value selected i am seltting some values selected in select many check box. the problem here is when we are changing selection for radio button and while it is in processing user can click on save button. so until the radio button change is complete we want to disable save button and once process is complete we want to enable save button.
Please help me on this.
Thanks in advance.Hi,
try this
<af:resource type="javascript">
function enforcePreventUserInput(evt) {
var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
if (popup != null) {
AdfPage.PAGE.addBusyStateListener(popup, handleBusyState);
evt.preventUserInput();
function handleBusyState(evt) {
var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
if (popup != null) {
if (evt.isBusy()) {
popup.show();
else {
popup.hide();
AdfPage.PAGE.removeBusyStateListener(popup, handleBusyState);
</af:resource>
<af:popup id="popupBusyPage" animate="false" contentDelivery="immediate"
autoCancel="disabled">
<af:panelWindow id="d2" closeIconVisible="false" modal="false"
title="Processing"
titleIconSource="/images/processWind_ena.png"
contentHeight="10">
<af:panelGroupLayout layout="horizontal" id="pgl2" halign="center">
<af:image source="/images/process_animation_blafplus.gif" id="i1"/>
</af:panelGroupLayout>
</af:panelWindow>
</af:popup>add client listener tag to radiobutton
<af:clientListener method="enforcePreventUserInput" type="valueChange"/>
How-to show a glasspane and splash screen for long running queries
Regards,
Edited by: Santosh Vaza on Aug 13, 2012 12:02 PM -
Error in Process execution with Radio Button List
Hello All,
In HCM Processes & Forms, we have a scenario of employee rating. To accomodate the same in the Interactive form have used 'ISR_RadioButtonList' that have corresponding binding with Form scenario fields.Upon selecting the corresponding radio button, we were able to retain the values and send it across the approval levels as defined in the workflow. These fields were to be used as place holders for the 'Radio Buttons' to retain the values(when sent from one approver to another as defined in the workflow) and not to save in the back end.
The form was working fine all the time and since we have upgraded to SP20 the form is giving error as "The Entered Value Is Not on the List of Valid Values."
Regards,
PoornimaThanks for your answer.
It's what I had done but I had saved the ID in a private member of the class and there is <b>two</b> different objects involved : one to render the component ("buildContent()" method) and one to manage the Event produced !
Now, I put the ID in a static field.
Regards.
Mathieu -
Step by step process to add Radio Buttons and Check boxes in a view
Hi,
Could somone give me the steo by step process for adding the Radio Buttons and Check boxes in a view.
Regards
Hrudaya Rajuhttps://www.sdn.sap.com/irj/sdn/articles-topic?rid=/webcontent/uuid/7082f9fc-070d-2a10-88a2-a82b12cea93c
https://www.sdn.sap.com/irj/sdn/webdynpro-elearning
https://help.sap.com/javadocs/NW04S/current/wd/index.html
https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBox.html
https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBoxGroup.html
https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByIndex.html
https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByKey.html
Armin -
Processing report in background with a radio button option
Hi all,
We have a requirement where we need to run report output as background job,
where we need to give radio button option in selection screen for background run and manual run .
Thanks
KarthikHi,
so depending upon the radio button selected you can run the job in background or manually.
if rb_bkgd = 'X'.
<write a perform to make it run in background please refer this link for background job>
<a class="jive_macro jive_macro_message" href="" __jive_macro_name="message" modifiedtitle="true" __default_attr="3050646"></a>
elseif rb_frgd = 'X'.
<write a perfrom which will make the report run in normal way>
endif.
Regards,
Neha -
Regarding Radio button in selection screen?
Hi experts,
In my selection screen I am having two radio buttons.
By default I am selecting the first radiobutton and displaying a selection block correspoding to that below.
If I am selecting second radio button I want to display another selection block regarding to that second radio button.
At that time first selection block should be hidden or should be disabled.
Please help me out with sample codings.
Thanks,
Sakthi.Hi ,
Try like this..
TABLES : mara.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE select.
PARAMETERS : p1 RADIOBUTTON GROUP rado USER-COMMAND hi DEFAULT 'X',
p2 RADIOBUTTON GROUP rado.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 .
SELECT-OPTIONS : s_hello FOR mara-matnr MODIF ID m1,
s_hi FOR mara-mtart NO-EXTENSION NO INTERVALS MODIF ID m2.
SELECTION-SCREEN END OF BLOCK b2 .
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'M1'.
IF p1 = 'X'.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
WHEN 'M2'.
IF p2 = 'X'.
screen-active = 1.
ELSE.
screen-active = 0.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
AT SELECTION-SCREEN ON s_hi.
CHECK sy-ucomm NE 'HI'.
START-OF-SELECTION.
IF p1 = 'X'.
WRITE 'hi'.
ENDIF.
cheers,
Sai -
Suppose i have created a 2 radio buttons say A1, A2. If i click A1 radio button One table which i have created should open, Similarly when i click A2 radio button Another table should Display...an u plz give code for that??
Hi
What do you mean by table to be displayed? You mean the data from that table to be displayed in the report output.
first fetch the data of two tables into two internal tables ITAB1 and ITAB2
now write the code as
if v_r1 = 'X'. (first radiobutton is selected)
write: ITAB1 fields
else.
Write ITAB2 fields
endif.
<b>Reward points for useful Answers</b>
Regards
Anji -
Urgent regarding radio buttons
hi friends i created radio buttons with the if else i am checking the output is coming wight..but can we ktake case statement..? if so after case what i have to wright..?
.ParameterS:a1 type c radiobutton group radi .
ParameterS:a2 type c radiobutton group radi.
ParameterS:a3 type c radiobutton group radi.
start-of-selection.
*if a1 = 'X'.
*WRITE: ' A1 SELECTED'.
*ELSEIF A2 = 'X'.
*WRITE: ' A2 SELECTED'.
*ELSE.
*WRITE: ' A3 SELECTED'.
*ENDIF.
as follows..?
CASE radi.
when a1.
write: ' a1 selected'.
when a2.
write: ' a2 selected'.
when a3.
wruite: 'a3 selected'.
when others.
WRITE: 'A2 SELECTED'.
endcase....
but this radi is not accpetin can my question is can i write case here if so how..?plz reply asapHi,
You cannot do so... since Case-EndCase can be used to value of a single variable, and depending on its value, you perform some action.
Though it is meaningless to use Case-Endcase for your version of code, since it is not appropriate here, I am just writing it down the corresponding CASE-ENCASE version of your IF-ELSE-ENDIF so that you can better understand how it works.
Data: v_param(2) type c.
If a1 = 'X'.
v_param = 'A1'.
ELSEIF A2 = 'X'.
v_param = 'A2'.
ELSE.
v_param = 'A3'.
ENDIF.
Case v_param. " so here you are checking the value of a single variable
When 'A1'. " checking value using When statement
write: ' a1 selected'.
When 'A2'
write: ' a2 selected'.
When 'A3'
write: ' a3 selected'.
EndCase.
Hope it clears your doubt and answers your question.
Regards, Tapas
<Pls reward if useful or answered> -
Regarding Radio button position
Hi All,
I have a requirement in which i have 2 radio buttons and 1 push button and i have declared these three like this
PARAMETERS: r1 RADIOBUTTON GROUP g1,
r2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: PUSHBUTTON 30(30) pb01 USER-COMMAND onli
VISIBLE LENGTH 15.
SELECTION-SCREEN: END OF LINE.
If i select the first radio button and click on the push button ztable should be updated. i have written code for this but 2nd time when user clicks on the push button with out changing the radio button position, a pop up message should be displayed like 'Nothing has been changedu2019.
Please suggest me in this issue.
Thanks in advance.
Regards,
Samathatext 001 :Selection screen sample
tex t002 : List
text 003: Alv
text 004: None
CONSTANTS : rbSelected TYPE c LENGTH 1 VALUE 'X'.
DATA : p_txt type c LENGTH 100.
SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
SELECTION-SCREEN ULINE /10(40).
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: rb1 RADIOBUTTON GROUP rb.
SELECTION-SCREEN COMMENT 20(30) text-002.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: rb2 RADIOBUTTON GROUP rb.
SELECTION-SCREEN COMMENT 20(30) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 15.
PARAMETERS: rb3 RADIOBUTTON GROUP rb.
SELECTION-SCREEN COMMENT 20(30) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN ULINE /10(40).
SELECTION-SCREEN END OF BLOCK frame1.
IF rb1 = rbSelected.
CONCATENATE 'You selected' text-002 INTO p_txt SEPARATED BY space.
ELSEIF rb2 = rbSelected.
CONCATENATE 'You selected' text-003 INTO p_txt SEPARATED BY space.
ELSEIF rb3 = rbSelected.
CONCATENATE 'You selected' text-004 INTO p_txt SEPARATED BY space.
ENDIF.
WRITE / p_txt.
Maybe you are looking for
-
How to return a value from sql plus activity
Hi, I want to return a value from sqlplus activity to a processflow variable. SQL PLUS activity has a property :"RESULT_CODE", whenever i run the process flow this value is always reurned as 0. in sqlplus activity i have written some pl/sql block....
-
Hp 1200 series all-in-one won't print in greyscale
I've selected the option "Print>Properties>Print in greyscale" but there is no effect. Window 7 or Vista (usually on Adobe PDFs)
-
[Solved] can't enter package management in latest version of Emacs
When I try to do something like 'package-install' or 'list-packages' in the latest version of Emacs, it refuses, complaining: Lisp error: (void-function package-desc-vers) package-desc-vers([(0 0 1) nil "Matrix themed Zone mode" tar]) ad-Advice-packa
-
Disk containing iPhoto is running low on space, photos cannot be imported???
How is this possible? I have 659 GB space available? Please help! I want to import more pics. Mac OS 10.6.7 2.3 GHz Intel Core i7 Memory: 4 GB 1333 MHz DDR3 Volumes: Capacity: 209.7 MB (209,715,200 bytes) Writable: Yes BSD Name: disk0s
-
Stuck On Runtime.exec() with cmd.exe
I've done my best to look through the forums and implement what's been said but I'm getting a problem where my whole Java program freezes when the exec() is executed. Can anyone tell me what I'm missing or have misunderstood ? try