Creating a radio button group in a column of a table in Web Dynpro
Hi,
I want to put a radio button group in a column of a table in Webdynpro. I added a column to a web dynpro view and then inserted a tableCellEditor for that column.. But I cannot define it as Radio Button group. I want the user to be able to select 3 statuses using this group.
Does anyone have a solution for this??
Thanks in advance...
Nakul
Hi,
You wont be able create three RB in one cell.
Create as many column as the no of options is.Here it is 3.
Create 4 attributes inside the node , option 1,option 2,option 3 and selectedoption.
Map each RB s keytoSelect to option 1,2,3. Map all the RBs selectedKey atribute to selectedoption.
Now selection for each row will be stored in the selected option.
Regards
Bharathwaj
Similar Messages
-
Hi I am trying to create two radio button groups, one which contains other text buttons and names buttons, in this group only other text button or names can be chosen. But then within the other group I have all the names buttons, but i only want one of these to be chosen at a time. Heres my code
[AS]
import fl.controls.RadioButtonGroup;
//===========================All Name Buttons============================
var NameTxtRadio:RadioButtonGroup=new RadioButtonGroup("NameTxtRadio");
LBtextMenu.LBnames.group=NameTxtRadio;
RBtextMenu.RBnames.group=NameTxtRadio;
LStextMenu.LSnames.group=NameTxtRadio;
RStextMenu.RSnames.group=NameTxtRadio;
LBtextMenu.LBnames.addEventListener(MouseEvent.CLICK, NamesshowResult);
RBtextMenu.RBnames.addEventListener(MouseEvent.CLICK, NamesshowResult);
LStextMenu.LSnames.addEventListener(MouseEvent.CLICK, NamesshowResult);
RStextMenu.RSnames.addEventListener(MouseEvent.CLICK, NamesshowResult);
function NamesshowResult(event:MouseEvent):void {
switch (NameTxtRadio.selection) {
case RBtextMenu.RBnames :
trace ("RB names chosen");
RStextMenu.RSnames.selected = false;
RBtextMenu.RBnames.selected = true;
LBtextMenu.LBnames.selected = false;
LStextMenu.LSnames.selected = false;
break;
case LBtextMenu.LBnames :
trace ("LB names chosen");
RStextMenu.RSnames.selected = false;
RBtextMenu.RBnames.selected = false;
LBtextMenu.LBnames.selected = true;
LStextMenu.LSnames.selected = false;
break;
case LStextMenu.LSnames :
trace ("LS names chosen");
RStextMenu.RSnames.selected = false;
RBtextMenu.RBnames.selected = false;
LBtextMenu.LBnames.selected = false;
LStextMenu.LSnames.selected = true;
break;
case RStextMenu.RSnames :
trace ("RS names chosen");
RStextMenu.RSnames.selected = true;
RBtextMenu.RBnames.selected = false;
LBtextMenu.LBnames.selected = false;
LStextMenu.LSnames.selected = false;
break;
//==========================Right Breast text menu==========================
var RBTxtRadio:RadioButtonGroup=new RadioButtonGroup("RBTxtRadio");
RBtextMenu.RBotherTxt.group=RBTxtRadio;
RBtextMenu.RBnames.group=RBTxtRadio;
RBtextMenu.RBotherTxt.addEventListener(MouseEvent.CLICK, RBshowResult);
RBtextMenu.RBnames.addEventListener(MouseEvent.CLICK, RBshowResult);
function RBshowResult(event:MouseEvent):void {
switch (RBTxtRadio.selection) {
case RBtextMenu.RBotherTxt :
trace ("RB other chosen");
break;
case RBtextMenu.RBnames :
trace ("RB names chosen");
break;
//==============================================================================
//==========================Left Breast text menu==========================
var LBTxtRadio:RadioButtonGroup=new RadioButtonGroup("LBTxtRadio");
LBtextMenu.LBotherTxt.group=LBTxtRadio;
LBtextMenu.LBnames.group=LBTxtRadio;
LBtextMenu.LBotherTxt.addEventListener(MouseEvent.CLICK, LBshowResult);
LBtextMenu.LBnames.addEventListener(MouseEvent.CLICK,LBshowResult);
function LBshowResult(event:MouseEvent):void {
switch (LBTxtRadio.selection) {
case LBtextMenu.LBotherTxt :
trace ("LB other chosen");
break;
case LBtextMenu.LBnames :
trace ("LB names chosen");
break;
//==============================================================================
//==========================Left Shoulder text menu==========================
var LSTxtRadio:RadioButtonGroup=new RadioButtonGroup("LSTxtRadio");
LStextMenu.LSotherTxt.group=LSTxtRadio;
LStextMenu.LSnames.group=LSTxtRadio;
LStextMenu.LSotherTxt.addEventListener(MouseEvent.CLICK, LSshowResult);
LStextMenu.LSnames.addEventListener(MouseEvent.CLICK,LSshowResult);
function LSshowResult(event:MouseEvent):void {
switch (LSTxtRadio.selection) {
case LStextMenu.LSotherTxt :
trace ("LS other chosen");
break;
case LStextMenu.LSnames :
trace ("LS names chosen");
break;
//==============================================================================
//==========================Right Shoulder text menu==========================
var RSTxtRadio:RadioButtonGroup=new RadioButtonGroup("RSTxtRadio");
RStextMenu.RSotherTxt.group=RSTxtRadio;
RStextMenu.RSnames.group=RSTxtRadio;
RStextMenu.RSotherTxt.addEventListener(MouseEvent.CLICK, RSshowResult);
RStextMenu.RSnames.addEventListener(MouseEvent.CLICK,RSshowResult);
function RSshowResult(event:MouseEvent):void {
switch (RSTxtRadio.selection) {
case RStextMenu.RSotherTxt :
trace ("RS other chosen");
break;
case RStextMenu.RSnames :
trace ("RS names chosen");
break;
//==============================================================================
[/AS]
I have no problem choosing between either, other text button or names, only one is selected at a time, but this isnt the case for the other group im able to select multiple name buttons without the other one becoming deselected.
Thanks in advance for any help.Hi just if anyone else wants to do something like i have, I had to ditch the radio button component and make my own.
Heres the code.
[AS]
RBnamesTextButton.CustomRadioButton.stop();
LBnamesTextButton.CustomRadioButton.stop();
RSnamesTextButton.CustomRadioButton.stop();
LSnamesTextButton.CustomRadioButton.stop();
RBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState01);
LBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState01);
RSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState01);
LSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState01);
function rollOverState01(event:MouseEvent):void
if (event.target.currentFrame !== 3)
event.target.gotoAndStop("over");
RBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState01);
LBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState01);
RSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState01);
LSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState01);
function rollOffState01(event:MouseEvent):void
if (event.target.currentFrame !== 3)
event.target.gotoAndStop("off");
RBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState01);
LBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState01);
RSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState01);
LSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState01);
function rollupState01(event:MouseEvent):void
RBnamesTextButton.CustomRadioButton.gotoAndStop(1);
LBnamesTextButton.CustomRadioButton.gotoAndStop(1);
RSnamesTextButton.CustomRadioButton.gotoAndStop(1);
LSnamesTextButton.CustomRadioButton.gotoAndStop(1);
event.target.gotoAndStop(3);
//======================================OTHER TEXT========================================================
RBotherTextButton.CustomRadioButton.stop();
LBotherTextButton.CustomRadioButton.stop();
LSotherTextButton.CustomRadioButton.stop();
RSotherTextButton.CustomRadioButton.stop();
RBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState02);
RSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState02);
LBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState02);
LSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OVER, rollOverState02);
function rollOverState02(event:MouseEvent):void
if (event.target.currentFrame !== 3)
event.target.gotoAndStop("over");
RBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState02);
RSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState02);
LBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState02);
LSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_OUT, rollOffState02);
function rollOffState02(event:MouseEvent):void
if (event.target.currentFrame !== 3)
event.target.gotoAndStop("off");
//===============================RB BUTTONS================================================
RBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState03);
RBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState04);
function rollupState03(event:MouseEvent):void
RBnamesTextButton.CustomRadioButton.gotoAndStop(3);
RBotherTextButton.CustomRadioButton.gotoAndStop(1);
trace("Right Breast names clicked")
function rollupState04(event:MouseEvent):void
RBotherTextButton.CustomRadioButton.gotoAndStop(3);
RBnamesTextButton.CustomRadioButton.gotoAndStop(1);
trace("Right Breast text clicked")
//======================================================================================== =======
//===============================LB BUTTONS================================================
LBnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState05);
LBotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState06);
function rollupState05(event:MouseEvent):void
LBnamesTextButton.CustomRadioButton.gotoAndStop(3);
LBotherTextButton.CustomRadioButton.gotoAndStop(1);
trace("Left Breast names clicked")
function rollupState06(event:MouseEvent):void
LBotherTextButton.CustomRadioButton.gotoAndStop(3);
LBnamesTextButton.CustomRadioButton.gotoAndStop(1);
trace("Left Breast text clicked")
//======================================================================================== =======
//===============================RS BUTTONS================================================
RSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState07);
RSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState08);
function rollupState07(event:MouseEvent):void
RSnamesTextButton.CustomRadioButton.gotoAndStop(3);
RSotherTextButton.CustomRadioButton.gotoAndStop(1);
trace("Right Shoulder names clicked")
function rollupState08(event:MouseEvent):void
RSotherTextButton.CustomRadioButton.gotoAndStop(3);
RSnamesTextButton.CustomRadioButton.gotoAndStop(1);
trace("Right Shoulder text clicked")
//======================================================================================== =======
//===============================LS BUTTONS================================================
LSnamesTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState09);
LSotherTextButton.CustomRadioButton.addEventListener(MouseEvent.MOUSE_UP, rollupState10);
function rollupState09(event:MouseEvent):void
LSnamesTextButton.CustomRadioButton.gotoAndStop(3);
LSotherTextButton.CustomRadioButton.gotoAndStop(1);
trace("Left Shoulder names clicked")
function rollupState10(event:MouseEvent):void
LSotherTextButton.CustomRadioButton.gotoAndStop(3);
LSnamesTextButton.CustomRadioButton.gotoAndStop(1);
trace("Left Shoulder text clicked")
//======================================================================================== =======
[/AS]
There is probably a more efficent way to code this but im an AS noob :] -
Dynamic creation of Radio Button Group
Hi,
I need to create a Radio Button Group dynamically and add Radio buttons to it.
I am able to create the Radio buttons dynamically. Could someone help me how to create Radio Button Groups.
I tried creating the Radio Button Group using the following code
DATA : lr_radiobuttongrp type REF TO CL_WD_RADIOBUTTON_GROUP_BY_IDX.
call method CL_WD_RADIOBUTTON_GROUP_BY_IDX=>NEW_RADIOBUTTON_GROUP_BY_IDX
EXPORTING
bind_texts = 'test'
RECEIVING
control = lr_radiobuttongrp.
cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_radiobuttongrp ).
lr_container->add_child( lr_radiobuttongrp ).
But when I run it I am geting a dump "subnode viewname.ME does not exist".
Thanks,
Suvarna.
Edited by: Suvarna Chittor on Aug 12, 2008 12:10 PMwhat is 'test' in bind text parameter
you should provide the name in Capitals along with the node name,
if the node name is TEXTS and the context attribute under this node is TEXT then you have to pass
TEXTS.TEXT
also provide the VIEW parameter to the call
Abhi
Edited by: Abhimanyu Lagishetti on Aug 12, 2008 12:26 PM -
How to disable a lead selected item in a radio button group ?
Hi,
I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both. So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
Please help.
Thanks
PraveenTry setting the radio button value of the lead selected button to abap_false/space.
-
How to create a radio button on OA Page using Personalization
I am trying to create a radio button on OA Page using Personalization. The item style , I can see is Message Radio Group.
How to create Message Radio Button and bring them under one group.
ThanksYou should use jdev to define a radiogroup and radio buttons under that, wrap that definition inside a stackLayout in jdev, use personalization to add a stackLayout and extend the region which you had created earlier in jdev.
-
Can i create conditional Radio Buttons?
I'm creating forms in Acrobat 9 Pro.
Does anyone know if it is possible to create conditional Radio Buttons that only need to be checked if a certain box or button from another group is checked?
For example: the first group of buttons might show the days of the week. If Tuesday was chosen a choice would need to be made from a further group of buttons (say a choice of time - 9am, 10am or 11am.). If any other day was chosen a different choice might be required or none at all.
I hope this is clear.Here are other ways to share your library but it only works if you're both on the same network: Enable Home Sharing under iTunes/File Menu and read the iTunes Help entry for Home Sharing for additional info. It will allow up to 5 computers on your network to play and download items from your iTunes Library. Alternatively, you can enable "Share My Library On My Local Network" under iTunes Preferences which allows up to 5 computers to play any content in your library but without the ability to download them.
I assume you keep your iTunes Library synchronized on both computers. If you have it also on the MacBook, this Apple support document will explain how to share your iTunes Library with multiple users on the same computer. This is by far the easiest and always available without using the network. -
Can I create a Radio button in ALV
Hello All,
My requirement is to create a ALV column as Radio button. Is there a way to achieve it. I can create a check box but didnt find the option to create a radio button.
Thanks & Regards,
AnjuHello,
Check the code snippet given here
[http://wiki.sdn.sap.com/wiki/display/Snippets/ALV%20Grid%20List%20Using%20Radio%20Buttons]
Vikranth -
Cannot create additional Radio Button items
Hi. I am new to Appleworks database, so this my be a stupid question. When I try to add a field and define it as a radio button group, then try to customize the buttons via Options, it normally only shows 2 buttons "Item 1" and "Item 2". I can modify these 2 buttons, but cannot create any other buttons or delete either of these buttons. The "Create" button is greyed out when in Options. I tried re-installing Appleworks with no change.
Adding to the previous comments:
You can't delete either of the two items because two is the minimum number of items for a radio button field. The purpose of radio buttons is to allow a choice between (or among) items.
When you click on either item in the list (and make no change to its label) AppleWorks offers you only the choice to modify it because it won't allow two items with the same label. When you change the label, AppleWorks offers the choice of Modifying the existing button or Creating a new button with the label/item name you've typed into the box.
Once you've created an additional button it's possible to delete a button without leaving fewer than the minimum two buttons in the field, so AW then adds Delete to the available choices.
Regards,
Barry -
Calling radio button group by group name in SAP Appbuilder
Hi, I'm new to SAP Appbuilder but I do have some really beginner Javascript knowledge.
I'm trying to create a survey mobile app but I don't seem to be able to get the ID of a radio button based on the radio button group.
This is my logic to try to change the text of a label with the ID of the selected radio button.
This function has been set to the event of all 4 radio buttons that have the same radio button group name, "choices".
Help needed.
Regards RotiJohnFirst, why do you set the value in wdDoModifyView() and not in a non-static method of the controller?
In your code example you read the value from a node named "AddEmployeeTime" but you set the value on a node named "EmployeeTime". Is that correct?
Armin -
Hi ,
Is there any way we can create 'Text' along with radio button groups beside the text 'YES' and 'NO' dynamically in a VIEW through 'ABAP WEBDYNPRO'. Can we create a context node with 'TEXT' attribute.
Eg : TEXT RADIOBUTTON1 'yes' RADIOBUTTON2 'no'.
Thanks,
kumarhi,
check this out.
method wddomodifyview .
data : LR_RADIOBUTTON1 type ref to CL_WD_RADIOBUTTON,
CALL METHOD cl_wd_radiobutton=>new_radiobutton
EXPORTING
bind_selected_key = '01'
BIND_TEXT = 'One'
receiving
control = LR_RADIOBUTTON1.
I think with the above code you will be able to create text along with Radio button.
Thanx. -
How to Create a radio button?
How to Create a radio button with the label Maintenance of RSDDTREXHPAFAIL tab".Once the user chooses this then there will two options
Create and Delete.Table has three fields.When user chooses the create button then it should create a new entry and delete should delete an entry. If the entry exist then create should overwrite an entry. There is no update.hi...
the sample code below should help you .....
parameters:Maintenance of RSDDTREXHPAFAIL tab radiobutton group grp1.
this will create the radio button on the screen with the lable required.
now in the user command of the screen ..
PROCESS AFTER INPUT.
MODULE user_command_0100.
MODULE user_command_0100 INPUT.
*assigning the sy-ucomm value to ok_code
ok_code= sy-ucomm.
*clear the sy-ucomm
CLEAR sy-ucomm.
CASE ok_code.
*when user presses CREATE button
WHEN 'PB_CREATE'.
if Maintenance of RSDDTREXHPAFAIL tab = 'X'.
here write query to fetch data into the internal table
and then use modify command to modify the database.
endif.
*when user presses CHANGE button
WHEN 'PB_DELETE'.
if Maintenance of RSDDTREXHPAFAIL tab = 'X'.
HERE write the delete query.
endif.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
<b>plz reward pts if helpful.</b>
regards
vijay -
Radio Button Groups - always below each other?
Hello,
When you create a RadioButtonGroup either ByKey or ByIndex it always puts each element under the next one. I was wondering if there was a way to put each element NEXT to each other, so I read each option from left to right instead of from top to bottom.
Thanks in advance,
JenniferHi Jacobs,
Assign the 'colCount' property of RadioGroupByXX object to the number of radio buttons you want to have. Then you would get all ur radio buttons side-by-side instead of below to each other.
for example, if u have 2 radio buttongs in the radio button group then assign colCount=2.
Thanks,
Raags
PS: If useful assign points -
Radio Button group with images stored as BLOB files in database
Hey all!
I have radio button group, my idea is that radio button's LOV must display images, I mean BLOB files stored in a table.
How can I do this?Hello Ken,
I asked similar question in the past, and I believe the answer is still the same.
Select List as an option of a Radio Group
In your case, I think you can use a select list with added functionality, like "Select List with Branch to Page" or "Select list with Submit", or you can just attach an onChange event (JavaScript) to each select list. The effect should be similar to a radio group as soon as the user select one item from any of the select lists, you can fire some action, based on the select list value.
Hope this can help,
Arie. -
How to create a radio button in ALV Reports
Hi all,
Best wishes to all..
Kindly reply me to this question... that is "How to create a radio button in ALV Report"
Thanks and Regards
AnjaliHI
here is an example :
PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
Based on: BCALV_GRID_DEMO.
TYPE-POOLS: icon.
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE lvc_emphsz.
TYPES: button2 TYPE lvc_emphsz.
TYPES: button3 TYPE lvc_emphsz.
TYPES: button4 TYPE lvc_emphsz.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gt_fcat TYPE lvc_t_fcat.
DATA: ok_code LIKE sy-ucomm,
gt_sflight TYPE TABLE OF sflight,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_cnt TYPE i.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
define local data
FIELD-SYMBOLS:
<ls_entry> TYPE ty_s_sflight,
<ld_fld> TYPE ANY.
READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
CHECK ( <ls_entry> IS ASSIGNED ).
Set all radio buttons "unselected"
<ls_entry>-button1 = icon_wd_radio_button_empty.
<ls_entry>-button2 = icon_wd_radio_button_empty.
<ls_entry>-button3 = icon_wd_radio_button_empty.
<ls_entry>-button4 = icon_wd_radio_button_empty.
ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
TO <ld_fld>.
IF ( <ld_fld> IS ASSIGNED ).
Set selected radio button "selected".
<ld_fld> = icon_wd_radio_button.
ENDIF.
Force PAI followed by refresh of table display in PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
MAIN *
PERFORM select_data.
CALL SCREEN 100.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
PERFORM build_fieldcatalog.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Set event handler for event TOOLBAR
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR grid1.
else.
CALL METHOD grid1->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 1
others = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "PAI INPUT
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM. "EXIT_PROGRAM
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
define local data
DATA:
ls_fcat TYPE lvc_s_fcat,
ls_hype TYPE lvc_s_hype.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'EMPHASIZE'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON3'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON2'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON1'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
define local data
DATA:
ls_sflight TYPE ty_s_sflight.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
ls_sflight-button1 = icon_wd_radio_button.
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
Regards,
Prasanth
Reward all helpful answers -
How to create a radio button in dynpro during runtime?
Hi guys!
How can i create radio buttons in dynpro during runtime??
any ideas?
thanks!!Hi Thomas,
I think as of now there is no possibility to create a Radio Button Dynamically during runtime. But of course, there is a work around which I feel you can evaluate.
If your business requirement demands that you need to have a Radiobutton, you can use the subscreen to place the Radiobutton and later based on your need you can call that screen to enable that button to the user and to make it available.
Hope this will help.
Thanks,
Samantak.
Maybe you are looking for
-
I have two printers on my network. Does anyone know how to change the printer nomenclature - Officejet Pro 8600 (0B54AF) to a recognizable name...like Brad's Office when you use Airprint?
-
CS4 Trial Version: How to Uninstall from PC?
Hi! I downloaded the CS4 Trial Version. Now I would like to uninstall it from my PC. I still have 23 remaining days, but would like to clear space on my hard drive asap. What will happen when the Trial expires? Will it self-delete, or what?? Would yo
-
T410 triple monitor capability??
Hi all, I currently use my T410 (w/ NVS3100MS optimus tech) with a LCD via DisplayPort. I have another monitor at home with RGB connector. I've tried connecting 2 external monitors to have a triple monitor but it did not work. I went through the web
-
Is there anyway to move the menu items on the left?
In help I found this, "You can't rearrange the application menus on the left." Is anyone aware of any possible way to do this? Thanks. Melody
-
Hi everyone, I am working with flexible planning in SOP and I would like to find an SD information structure that includes the following key figures: -Material -Plant or Shipping point -Open orders quantity Could anyone please tell me whether exists