2008 May 31 11:53 AM
Hello,
I am having 5 radiobuttons out of which the one tht is selected will have store in the DB table the code tht i am having is working fine. It is like..
types: begin of st_zws,
radio type c,
end of st_zws.
case wa_wsst-ws.
when '1'.
radiobutton1 = 'X'.
when '2'.
radiobutton2 = 'X'.
when '3'.
radiobutton3 = 'X'.
when '4'.
radiobutton4 = 'X'.
when '5'.
radiobutton5 = 'X'.
endcase.
when 'ZRADIO'.
if radiobutton1 = 'X'.
wa_wsst-radio = '1'.
wa_wsst-ws = 'Not YET started'.
elseif radiobutton2 = 'X'.
wa_wsst-radio = '2'.
wa_wsst-ws = 'TASK IN PROGRESS'.
elseif radiobutton3 = 'X'.
wa_wsst-radio = '3'.
wa_wsst-ws = 'RETURNED (INFORMATION INCOMPLETE)'.
elseif radiobutton4 = 'X'.
wa_wsst-radio = '4'.
wa_wsst-ws = 'FINISHED (WAITING FOR APPROVAL)'.
elseif radiobutton5 = 'X'.
wa_wsst-radio = '5'.
wa_wsst-ws = 'FINISHED AND APPROVED'.
endif.
But my requirment is like in the place of 5 radiobuttons i want to replace it with the checkboxs in this wht changes i have to do in the coding part.
Thks
Hello,
I am having 5 radiobuttons out of which the one tht is selected will have store in the DB table the code tht i am having is working fine. It is like..
types: begin of st_zws,
radio type c,
end of st_zws.
case wa_wsst-ws.
when '1'.
radiobutton1 = 'X'.
when '2'.
radiobutton2 = 'X'.
when '3'.
radiobutton3 = 'X'.
when '4'.
radiobutton4 = 'X'.
when '5'.
radiobutton5 = 'X'.
endcase.
when 'ZRADIO'.
if radiobutton1 = 'X'.
wa_wsst-radio = '1'.
wa_wsst-ws = 'Not YET started'.
elseif radiobutton2 = 'X'.
wa_wsst-radio = '2'.
wa_wsst-ws = 'TASK IN PROGRESS'.
elseif radiobutton3 = 'X'.
wa_wsst-radio = '3'.
wa_wsst-ws = 'RETURNED (INFORMATION INCOMPLETE)'.
elseif radiobutton4 = 'X'.
wa_wsst-radio = '4'.
wa_wsst-ws = 'FINISHED (WAITING FOR APPROVAL)'.
elseif radiobutton5 = 'X'.
wa_wsst-radio = '5'.
wa_wsst-ws = 'FINISHED AND APPROVED'.
endif.
But my requirment is like in the place of 5 radiobuttons i want to replace it with the checkboxs in this wht changes i have to do in the coding part.
Thks
2008 May 31 11:59 AM
Hi Venkateshwar Reddy,
In radio buttons u can select any one out of five.
but where as in check box we can select as many as we want. we can also select all the check boxes.
Syntax
WRITE <f> AS CHECKBOX.
DATA: flag1(1) TYPE c VALUE ' ',
flag2(1) TYPE c VALUE 'X',
flag3(5) TYPE c VALUE 'Xenon'.
WRITE: / 'Flag 1 ', flag1 AS CHECKBOX,
/ 'Flag 2 ', flag2 AS CHECKBOX,
/ 'Flag 3 ', flag3 AS CHECKBOX.Please check this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e6435c111d1829f0000e829fbfe/content.htm
Best regards,
raam
2008 May 31 12:04 PM
Hello Reddy Garu thks for the reply but the think is shall i give checkbox name as checkbox1,checkbox2, checkbox3 in screen painter. If yes how to write "write statement" when i clicke save.
When 'save'.
WA-field = <Tablename> - <FN>
Ela check box ke ela rayali.
2008 May 31 12:17 PM
Hi Venkateshwar Reddy,
u can give any name to check boxes. U can declare it similar to the radiobuttons.
It is similar as radiobuttons yaar.
if u check the check box then the variable stores the value as ' X '.
Now u can write in the similar way as u wrote to the radio buttons.
If checkbox1 = 'X'.
statements....
endif.Best regards,
raam
2008 May 31 12:26 PM
Anna please send me your gmail id. I am fresher in ABAP if i need any help i want to join you. My gmail id is musicalvenkat @ gmail.com.
Please join me anna.
thks
2008 Jun 02 5:34 AM
Hello
If u r working on reports first u need to declare radio buttons
as follows:
PARAMETERS : R1 RADIOBUTTON GROUP A,
R2 RADIOBUTTON GROUP A.
*Min. two radio buttons should be declared under one group.
IF R1 = ''X'.
Statements.
ELSEIF R2 = 'X'.
Statements.
ENDIF.
If u r working on MPP
u need to create a screen and in the layout take no. of radiobuttons as per ur requirement and name them
select all the radiobuttons
and group them as follows:
Goto Edit Menu ->
Grouping ->
Radiobutton->
Define.
Then u need to declare FCT code for that one in the screen attributes.
Only one FCT code is enough for all the radiobuttons under one group.
Save and comeback to flowlogic
In the main program declare radiobuttons as
Data R1, R2, R3.......
Goto PAI Module write the code as follows:
CASE SY-UCOMM.
WHEN 'RDB'. "FCT Code.
IF R1 = 'X'.
ZTABLE-FIELDNAME = '1'. "Storing in a ZTABLE
ELSEIF R2 = 'X'.
ZTABLE-FIELDNAME = '2'.
.
.
.
.
.
.
ENDIF.
ENDCASE.
Reward points if useful.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |