Radio Button Size
Radio Buttons do not seem to have a "SIZE" property.
CheckBoxes have a "SIZE" property on the OBJECT-FIELD tab. For checkboxes, the size can be set in points and it is reflected in the size of the box that is checked. This size is independent of the object width/height or font size.
Radio buttons seem to be a fixed size circle. The OBJECT-FIELD tab has no size property. Changing width, height, margins, reserve, font, etc does not impact the size of the circle.
There seems to be a hidden size property, since radio buttons that are imported from previous pdf seem to retain their size. Whereas, creating a new radio button always gives the same small size.
It appears that the OBJECT-FIELD interface for the radiobutton needs to be modified to implement the "hidden" size property.
Does anyone have a workaround. For instance, if I knew what the hidden property name and syntax was, I could set the size during the initialization event for the radio button. I suspect it's the same name and syntax as for the checkbox, but I don't have that either. The documentation that came with the "professional" version of Acrobat 7 does not seem to go to this level of detail.
This is available in the Designer 7.1 UI, easiest thing would be to upgrade.<br /><br />Basically it sets the size attribute of the <checkButton> node, which is inside the <ui> node which is in the <field> node.<br /><br />Chris<br />Adobe Enterprise Developer Support
Similar Messages
-
Exported To FLash 8 - MC question Radio Button Size?
I have a quiz that uses MC and T or F questions - I am
exporting it to flash to integrate it with some other content.
I have everything working at this point, except I need to
increase the font size of the question Radio buttons and everything
i have tried so far hasn't worked. I am guessing it is somewhere in
the captivate quiz class files but i havent been able to track it
down.Thanks for the response.
After i posted I kept digging and found where the code is
that sets the font for the Radio buttons in the quizzes when you do
an export to flash. What I found out is listed below in case anyone
else ever needs the information- hopefully it will save someone
else some time.
The ".as" file is --
C:\Documents and Settings\YOUR NAME HERE\Local
Settings\Application Data\Macromedia\Flash
8\en\Configuration\Classes\AdobeCaptivate\quiz\CpMultipleChoice.as
Strating at line 106 there is the following code
p._font.name = "Arial";
p._font.size = 12;
p._name = "" + numAnswers;
I was then able to make the font size larger to match the
other text on the screen (i do have to say it's rather annoying
that those attributes don't get exported from the captivate file,
because i set the font properties before exporting - but i guess
there is probably a reason for that) -
I create PDF forms on daily basis for multiple people around but still, I create a table in Word and then manually convert it to PDF. I'm using Acrobat X and then I manually create radio buttons or check boxes in each cell of the table so aligning those buttons or check-boxes in the same line is a problem. I know there would be some solution to this but can anyone guide me to that? Also, making the same size of the radio-buttons of check boxes likewise ? ? ?
Please see the image above and advise how to align them in the same line and how to make them same size using Acrobat X?
Your help appreciated.You should create these fields using the Place Multiple Fields command, so that they are aligned properly and all the same size. Read about it here:
http://help.adobe.com/en_US/acrobat/X/pro/using/WS8C2DDC1C-C174-4ad1-893F-B14A1C0289B4.htm l
Read how to align and distribute fields here:
http://help.adobe.com/en_US/acrobat/X/pro/using/WS6D2D2BFC-6F69-4a8b-BDE6-8043D7EE240D.htm l -
Changing text size of radio button label
Is it possible to change the size of the text of the label of
a radio button component? I'm trying to create a questionnaire for
youngsters and need much larger text...
I know I could have no label and a text area but the text
area would not be "clickable" whereas the label is.
Thanks.Actionscript 3:
var _textFormat:TextFormat = new TextFormat();
_textFormat.font = "Arial";
_textFormat.size = 15;
myRadioButton.setStyle("textFormat",_textFormat);
Actionscript 2:
myRadioButton.setStyle("fontSize",15); -
Enlarge Image to fixed size using radio button
Hi,
I'm looking for a script that allows me to enlarge an image (withing the PDF Form) to a specified size via the click of a radio button.
Any Ideas?Hi,
check the image solutions from Niall O'Donovan.
http://www.assuredynamics.com/index.php/code-solutions/image-solutions/ -
Hello:
I have Adobe Acrobat 9 Standard (9.3.1), and I use the form tool to insert radio buttons (and other fields). While I am able to do most of the things I need to do, I cannot figure out (I have read Help) how to change the size of the radion buttons (or other fields; I can change the text size in text fields, though). The radio buttons are oversized. I assume there must be away to change their sizes. Would appreciate help on this issue.
Regards,
Hans LI figured it out. I just realized that I had seen the size-change pattern around teh fields when I moved the cursor on top of the field.
Best regards,
Hans L -
Making checkboxes/radio buttons the same size?
Hi,
I'm trying to figure out a way to make all my checkboxes and/or radio buttons the same size on a document. I've tried right-clicking the button, to check the properties but it's not giving me much. When I tried to copy-paste the checkbox, it will automatically assign the same properties of the copied checkbox to the pasted one - which is annoying because if I check the first box, the second box is automatically check too! Not what I want
Any ideas on how I can fix this?
Thanks a million!For Acrobat 9, select all of your checkboxes or radio buttons. With them selected, right click Set Fields to Same Size and choose Both. The fields will size to match the size of the last item you selected.
-
Why does disabling radio buttons change my formatted text size?
When I recycle through a multiple choice quiz i have created,
disabling the radio buttons also makes the label of the radio
button resort to a (circa) point 12 font. There doesn't seem to be
a way to get around this. Any advice?I guess you, like me, are a poor typist. There is a bug, but it only really shows up when you use the mouse to repeatedly position the cursor, or move around with the arrow keys.
My "work around" is to press enter about three times as soon as I get into the typing space. Then if I accidentally go "past the end of the formating" it does not turn to rubbish. I did not realise I was doing the pressing of enter, as I wanted to get my signature out of my face while composing, but it appear to have had side benefits I just was not aware of.
The other formatting hell you can get into is with text pasted from Microsoft Office. Any office suite can make things unpleasant for a while, but but the Microsoft product just stands out with it's references to Microsoft specific data structures and it's magical ability to make the mail ring the anti virus bell.. -
Hi experts,
I am using radio buttons in alv report by using screen painter but error occurs in alv that screen doesn't exist in module.
plz help me.Hi Ankita,
check this program.
*& Report ZALVGRID_WITH_RADIOBUTTONS
*& This program shows how to realize radiobuttons in ALV grid lists
*& using event HOTSPOT_CLICK.
*& Screen 100:
*& - Flow logic
*& PROCESS BEFORE OUTPUT.
*& MODULE PBO.
*& PROCESS AFTER INPUT.
*& MODULE PAI.
*& - Screen elements: none
*& - ok-code field -> gd_okcode
*& GUI Status MAIN100:
*& - F3 = 'BACK', Shift+F3 = 'EXIT', F12 = 'CANC'
PROGRAM zalvgrid_with_radiobuttons.
TYPE-POOLS: abap, icon. " INCLUDE . for releases < 6.20
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE iconname.
TYPES: button2 TYPE iconname.
TYPES: button3 TYPE iconname.
TYPES: button4 TYPE iconname.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gs_layout TYPE lvc_s_layo,
gt_fcat TYPE lvc_t_fcat.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
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:
IS ASSIGNED ).
Set all radio buttons "unselected"
IS ASSIGNED ).
Set selected radio button "selected".
= 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 = 'REFRESH'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
MAIN *
START-OF-SELECTION.
PERFORM select_data.
PERFORM init_controls.
PERFORM build_fieldcatalog.
PERFORM set_layout.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Link docking container to dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
CONTAINER =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
lifetime_dynpro_dynpro_link = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL SCREEN 100.
END-OF-SELECTION.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
Leave report
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
Refresh table display
WHEN 'REFRESH'.
PERFORM refresh_display.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR gd_okcode.
ENDMODULE. "PAI INPUT
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
ALV List with Radio Buttons
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2007 SAP AG 7
define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'ICON'
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 <> 'NAME' ).
NOTE: field ICON-NAME has data element ICONNAME.
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 = 'NAME'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-coltext = ls_fcat-fieldname.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON3'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON2'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
ls_fcat-fieldname = 'BUTTON1'.
ls_fcat-coltext = ls_fcat-fieldname.
INSERT ls_fcat INTO gt_fcat INDEX 5.
Renumbering of the columns
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. " selected radiobutton
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
Alternatively: create icons using function module 'ICON_CREATE'
on SAP releases where these icons are not available.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
*& Form INIT_CONTROLS
text
--> p1 text
<-- p2 text
FORM init_controls .
CHECK ( go_docking IS NOT BOUND ).
ALV List with Radio Buttons
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2007 SAP AG 9
Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
REPID =
DYNNR =
SIDE = DOCK_AT_LEFT
EXTENSION = 50
STYLE =
LIFETIME = lifetime_default
CAPTION =
METRIC = 0
ratio = 90
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Size of container = full screen size
CALL METHOD go_docking->set_extension
EXPORTING
extension = 99999
EXCEPTIONS
cntl_error = 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.
Create ALV grid instance
CREATE OBJECT go_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = go_docking
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Set event handler for event HOTSPOT_CLICK
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid.
ENDFORM. " INIT_CONTROLS
*& Form REFRESH_DISPLAY
Refresh table display after switching the radiobuttons
--> p1 text
<-- p2 text
FORM refresh_display .
define local data
DATA:
ls_stable TYPE lvc_s_stbl.
ls_stable-row = abap_true.
ls_stable-col = abap_true.
CALL METHOD go_grid->refresh_table_display
EXPORTING
is_stable = ls_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.
ENDFORM. " REFRESH_DISPLAY
*& Form SET_LAYOUT
Set layout for ALV list
--> p1 text
<-- p2 text
FORM set_layout .
CLEAR: gs_layout.
gs_layout-cwidth_opt = abap_true. " optimize column width
gs_layout-zebra = abap_true.
ENDFORM. " SET_LAYOUT
Regards,
Prasanth
Reward if helpful -
Multiple sets of radio buttons no longer working
Hello All:
My first post so I apologize in advance if I don't do it
properly.
I have a few web forms that have multiple groups of radio
buttons on them that are suddenly errorring out since we moved to
CF 7. I started tinkering with the one form that I have posted the
code for and kept cutting it down to the simplest code that begins
to produce the error. If I just use 1 radio button group everything
works fine, but the minute I add the second one, the whole thing
throws a "Syntax error (missing operator) in query expression"
message. Each radio button group has it's own group name and a
checked value. It is very simple code and very frustrating why it
has suddenly stopped working so any assistance is welcome.
Here's the form code:
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body background="white" marginheight="0"
marginwidth="0">
<cfform action="testSub.cfm" method="POST">
<table width="95%" border="0" cellpadding="0">
<tr>
<td width="24%"><img src="survey.jpg"
border="0"></td>
<td width="76%"><p>It is our desire to assure
that MID is meeting the needs of
our clients. xxxxxxx
<p> </p>
<p>*****************************************************<br>
</p></td>
</tr>
<tr>
<td colspan="2"><p>Please answer questions 1
through 4 with a 1 - 5 rating, with 1 being POOR and 5 being
EXCELLENT.</p>
<p> You are not obligated to provide this
information.</p>
<p><font face="Arial, Helvetica, sans-serif"
size="2">My Name (First &
Last):</font> <font face="Arial, Helvetica,
sans-serif" size="2">
<cfinput type="Text" name="poc" required="no" size="50"
maxlength="50">
<br>
<b>1. Was
your service technician polite and
courteous?</b><br>
<cfinput type="radio" name="polite" value="1">
1
<cfinput type="radio" name="polite" value="2">
2
<cfinput type="radio" name="polite" value="3" checked>
3
<cfinput type="radio" name="polite" value="4">
4
<cfinput type="radio" name="polite" value="5">
5 </p>
<p><br>
<br>
2. Was
your service technician polite and
courteous?</b><br>
<cfinput type="radio" name="know" value="1">
1
<cfinput type="radio" name="know" value="2">
2
<cfinput type="radio" name="know" value="3" checked>
3
<cfinput type="radio" name="know" value="4">
4
<cfinput type="radio" name="know" value="5">
5 </p>
<input type="submit" name="btnSubmit" value="Submit My
Comments!">
<input type="reset" name="reset" value="Reset
Form"><br>
<br>
</cfform>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
The ACTION code
<html>
<head>
<title>test</title>
</head>
<body>
<CFIF IsDefined("FORM.btnSubmit")>
<CFQUERY NAME="Add" datasource="newMID">
INSERT INTO survey(
poc,
polite,
know
VALUES (
'#poc#',
'#polite#'
'#know#',
</CFQUERY>
</CFIF>
<cfoutput>
Thank you. Your IT survey has been forwarded to our NHCPR IT
mailbox.
</cfoutput>
<cfmail to="[email protected]"
FROM="[email protected]"
SUBJECT="IT Survey Form">
Polite: #polite#
Know: #know#
POC (opt.): #poc#
</cfmail>
</body>
</html>OK. I took out the extra comma. Put a space in after *survey*
and put "form" in front of the variables in order to scope them. I
got it to work just then and decided to add the next radio button
and once again, the error message keeps coming up.
Here's what it looks like now.
ACTION
code***********************************************************
<html>
<head>
<title>test</title>
</head>
<body>
<CFIF IsDefined("FORM.btnSubmit")>
<CFQUERY NAME="Add" datasource="newMID">
INSERT INTO survey (
poc,
polite,
know,
time
VALUES (
'#form.poc#',
'#form.polite#',
'#form.know#',
'#form.time#'
</CFQUERY>
</CFIF>
<cfoutput>
Thank you. Your IT survey has been forwarded to our NHCPR IT
mailbox.
</cfoutput>
<cfmail to="[email protected]"
FROM="[email protected]"
SUBJECT="IT Survey Form">
Polite: #polite#
Know: #know#
POC (opt.): #poc#
Timely: #time#
</cfmail>
</body>
</html>
The ERROR msg
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
INSERT INTO statement.
The error occurred in
C:\Inetpub\wwwroot\PaxNew\chiefOscar\testSub.cfm: line 20
18 : '#form.polite#',
19 : '#form.know#',
20 : '#form.time#'
21 : )
22 :
SQL INSERT INTO survey ( poc, polite, know, time ) VALUES (
'kennedi', '3', '5', '3' )
DATASOURCE newMID
VENDORERRORCODE -3502
SQLSTATE 42000
Resources:
Check the ColdFusion documentation to verify that you are
using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Remote Address 10.249.6.81
Referrer
http://205.115.107.22/chiefoscar/tsurvey.cfm
Date/Time 29-Jan-08 02:05 PM
Stack Trace (click to expand) -
Change field from read only and override calculation based on radio button
Hi,
I have a form in which one of the fields has a simple sum calculation and is set to read only so the user can't change it as it sets a print amount as well.
But if one of the radio buttons is ticked there is a chance that the print amount needs changing but it can be different based on a few other options so I have managed to set the field so the user can edit it depending on an option but the calculation that sets the value overrides what the user enters. I would like to know if it is possible to change this?
I use
this.getField("Quantity_Boxes").readonly = false;
So the user can edit the field when they select the radio button 'yes' under Mesh_b
and
this.getField("Quantity_Boxes").readonly = true;
So the field goes back to read only when the user selects the 'no' under Mesh_b
and in the Quantity_Boxes field I use:
Quantity_Curtains / csn
Just as a simplified division sum with the decimal places set to 0 so a whole number appears.
csn is just a hidden field that has an amount set depending on the size of curtain.
Thanks,
BruceI have found a solution but caused another problem (well more of an irritation than a problem)
I have made it so the can field throws a dialogue box asking how many of the item fit into a box, the only problem is that the dialogue box will appear more then once.
For example I have made a new size know as bespoke and when I select that size and hit return the dialogue box pops up which is fine but when the amount of the product is changed it throws the dialogue box again. I guess this is because the calculation has to be run again but is there anyway of stopping this?
Here is the code I use in the can field which defines how many curtains are in the box and is used to calculate how many labels need printing out.
if(this.getField("SizeDrop").value=='LG'){
event.value = "5"
} else if (this.getField("SizeDrop").value=='ST'){
event.value = "8"
} else if (this.getField("SizeDrop").value=='ME'){
event.value = "10"
} else if (this.getField("SizeDrop").value=='SM'){
event.value = "15"
} else if (this.getField("SizeDrop").value=='BE'){
var resp = +app.response("Enter the amount of curtains in a box","","1");
event.value = resp
} else {
event.value = " "
Thanks,
Bruce
EDIT:
I have found that the dialogue box will appear every time something is changed on the form (even while in the editor as well) -
Radio button 'Names' and grouping
Ok, I am still working on my Monster form...
Probably pushing the envelope for what Forms can do...but hey...
My "buttons" are all named "Button.section.number" (ex. Button.1.13) so that my validate scripts can quickly go through and build other tables and things....
In each section, there are 3-4 buttons where I want at-least-one to be selected.
Obviously, a "Radio Button" will give me ONLY one selected, but I am having NAME problems in that when I try to name them so the scripts will work the button come out of the group. (and crash Acrobat)
so...in a section, what I want to have is:
Button.2.0 (.hidden, .value = "Grounds")
Button.2.1 \
Button.2.2 want these 4 in an exclusive group, where an entry is ".required" for at least one of them
Button.2.3 /
Button.2.4 A validate script runs later that looks for "blank" .required fields and reports out using "userName" in an "appAlert"
Button.2.5
Button.2.16 (.hidden, .value= "MAX")
My Validate scripts go through all the sections and all the buttons finding boxes that are checked that represent problems, and copy's the fields "Export Data" to a summary page -AND- looks for empty .required fields (and other things)
I would LIKE the user to be forced to select one of : Serviceable, Deficient, Hazard or N/A for each section. (Button.1.1, Button.1.2, Button.1.3, Button.1.4 in this example)
Do I need a "button_up" script (the same in all 4 buttons) that makes sure there is at least one selected. and clearing/setting the .required's on the fields ? That seems messy. I could start the form with the last choice (N/A) checked, but that seems error prone.
The current validate script checks for empty .required fields, so if I make all 4 fields as required I will get 4 error messages, not ideal....
Ideas Please??
Idea as I was writing this.... Since Button.section.0 is hidden, I can toggle the .required flag on that? But I still need a script that will set/clear the .required when the user select -any- of the checkboxes/buttons
In case people are interested, all my sections are different sizes, but Button.section.0 contains the "Section Name" ('Grounds' for example) and when (Button.Section.number).value = "MAX" you have reached the end of -that- section. It works very nicely and is FAST becasue the build is only done when requested, not continously..
PS...this works with PC Reader ONLY. Android reader does not support this but qPDF for Android does.I had the same problem; hopefully my solution will be of help to anyone searching this problem via a search engine.
http://forums.adobe.com/message/4347266#4347266
Individual radio buttons cannot be named (only the overal exclusion group can be named) or else rawValues will not export. -
Hide Input(s) Until A Radio Button or Checkbox is selected
I've got a CFFORM I'm sculpting for my family's genealogy. The first section is for people's names. I would like to hide teh inputs from teh user, unless a radio button value is selected. Most people are not adopted, but occasionally, a person may need to enter a persons's biological name as well sas their adopted name. Starting out, the form is supposed to display only FirstName, MiddleName, and LastName, but if the radio button is selected for "This person is adopted" I wish for the inputs to display for adopted information. Is there Coldfusion that will do this?
<CFFORM..etc.etc.>
<TR>
<TD><B>Biological First Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_f"
SIZE="18"
MAXLENGTH="18"
TABINDEX=1
id="txt_p_nm_bio_f"
onBlur="javascript:changeCase(this.form.txt_p_nm_first)">
</TD>
</TR><TR>
<TD><B>Biological Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_m"
SIZE="18"
MAXLENGTH="18"
TABINDEX=2
id="txt_p_nm_bio_m"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_m)">
</TD>
</TR><TR>
<TD><B>Biological 2nd Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_m2"
SIZE="18"
MAXLENGTH="18"
TABINDEX=3
id="txt_p_nm_bio_m2"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_m2)">
</TD>
</TR><TR>
<TD><B>Biological Last Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_l"
SIZE="18"
MAXLENGTH="18"
TABINDEX=4
id="txt_p_nm_bio_l"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_l)">
</TD>
</TR><TR>
<TD><B>Biological Maiden Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_mdn"
SIZE="18"
MAXLENGTH="18"
TABINDEX=5
id="txt_p_nm_bio_mdn"
onBlur="javascript:changeCase(this.form.txt_p_nm_bio_mdn)">
</TD>
</TR><TR>
<TD><B>Male:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_g"
LABEL="Male"
VALUE="M">
</TD>
<TD COLSPAN="3"><B>Female:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_g"
LABEL="Female"
VALUE="F">
</TD>
</TR>
<!--- radio buttons are linked to text field in the database, thus the letter "A" or "B" --->
<TR>
<TD><B>Biological:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_a_b"
VALUE="A">
<TD COLSPAN="3"><B>Adopted:</B>
<CFINPUT
TYPE="radio"
NAME="rdo_p_a_b"
VALUE="B">
</TD>
</TR>
<!--- 'hoping to hide the following three inputs and labels, if the radio button selection is biological. --->
<TR>
<TD><B>Adopted First Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_f"
SIZE="18"
MAXLENGTH="18"
TABINDEX=1
id="txt_p_nm_adp_f"
onBlur="javascript:changeCase(this.form.txt_p_nm_first)">
</TD>
</TR>
<TR>
<TD><B>Adopted Middle Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_m"
SIZE="18"
MAXLENGTH="18"
TABINDEX=2
id="txt_p_nm_adp_m"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_m)">
</TD>
</TR>
<TR>
<TD><B>Adopted Last Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_adp_l"
SIZE="18"
MAXLENGTH="18"
TABINDEX=4
id="txt_p_nm_adp_l"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_l)">
</TD>
</TR>
<TR>
<TD><B>Adopted Maiden Name:</B></TD>
<TD><CFINPUT
TYPE="text"
NAME="txt_p_nm_bio_adp"
SIZE="18"
MAXLENGTH="18"
TABINDEX=5
id="txt_p_nm_bio_adp"
onBlur="javascript:changeCase(this.form.txt_p_nm_adp_mdn)">
</TD>
</TR>
Submit, reset, /CFFORM etc.etc.Group the form fields into appropriate DIVs. Then use the style property Display or Visibility to show or hide a DIV. Google and find out more.
The major difference between display="none" and visibility="hidden" is that, when visibility is set to hidden, the hidden element still occupies its place in the layout of the page. Whereas, your page may experience a jumping motion when the display is changed to none.
Here follows an example for you to play with
<script type="text/javascript">
<!--
function toggleDisplay() {
var elem = document.getElementById('a_fields');
if(elem.style.display == 'block') {
elem.style.display = 'none';
else {
elem.style.display = 'block';
function toggleVisibility() {
var elem = document.getElementById('b_fields');
if (elem.style.visibility=="hidden"){
elem.style.visibility="visible";
else {
elem.style.visibility="hidden";
//-->
</script>
<form name="f" id="f">
<div id="a_fields">
A1: <input type="text" name="a1"><br>
A2: <input type="text" name="a2"><br>
</div>
<div id="b_fields">
B1: <input type="text" name="b1"><br>
B2: <input type="text" name="b2"><br>
</div>
<input type="checkbox" name="toggle_A" onclick="toggleDisplay()"><br>
<input type="radio" name="toggle_B" onchange="toggleVisibility()">
<input type="radio" name="toggle_B" onchange="toggleVisibility()">
</form> -
Report should executed based on the radio buttons on the selection screen
Hi everyone,
Greets....................
My scenario is I have 2 selection screen blocks on same screen..
One selection screen block contains input parameters as follows
Company Code - S_BUKRS
Business Area - S_GSBER
Customer Code - S_KUNNR
Fiscal Area - S_GJAHR
GL Account - S_HKONT
Posting Date -S_ZFBDT
Ledger Type -P_RLDNR
Open Item Key Date - P_ZFBDT
Another selection screen block contains 2 radio buttons with the option as follows
Collection Plan
*Credit days summary.
If i click Collection plan the report output should come based on the input parameters in first selection-screen block.
If i click Credit days summary the report output should come based on the input parameters in first selection-screen block.
Pls send me the sample code for this.
Thanks in Advance
Regards
Raj kumarSee the below folling example : it will have radio buttons and depends on radio button it will show output.
REPORT ZPPR_BOM_INFOL_REPORT no standard page heading
line-size 160
line-count 60.
======================================================================
Program Name : ZPPR_BOM_INFOL_REPORT
Description : This Program would be used for BOM List for a material*
and the component's where used list *
Author : Seshu *
Date : 07/24/2006 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
|----
|----
|----
*12/04/06 | Seshu | DEVK921821 | Removed new page for each material *
======================================================================
Table definition *
TABLES: mast,
stko,
stpo,
T418,
makt.
TYPE - POOLS
TYPE-POOLS: slis.
Constants
constants : c_tcode(4) type c value 'CS03',
gc_formname_top_of_page TYPE slis_formname
VALUE 'TOP_OF_PAGE'.
Variables
data : v_maktx like makt-maktx,
wa_stko like stko.
DATA:
Objekttyp 'Material'
otyp_mat(1) TYPE c VALUE '1',
ootyp_mat(1) TYPE c VALUE 'M',
Objekttyp 'kein Objekt'
otyp_noo(1) TYPE c VALUE '2',
Objekttyp 'Dokument'
otyp_doc(1) TYPE c VALUE '3',
Objekttyp 'Klasse'
otyp_kla(1) TYPE c VALUE '4',
Objekttyp 'Intramaterial'
otyp_ntm(1) TYPE c VALUE '5'.
maximal anzeigbare Menge
data: max_num(7) TYPE p DECIMALS 3 VALUE '9999999999.999',
ueberl_kz(1) TYPE c VALUE '*',
min_num(7) TYPE p DECIMALS 3 VALUE '9999999999.999-',
b_flag(1) TYPE c VALUE 'X',
ecfld(250) TYPE c,
v_flag type c.
ALV Variables
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gs_keyinfo TYPE slis_keyinfo_alv,
gt_sp_group TYPE slis_t_sp_group_alv,
gt_events TYPE slis_t_event.
DATA: g_repid LIKE sy-repid.
DATA: gt_list_top_of_page TYPE slis_t_listheader,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_save(1) TYPE c,
gx_variant LIKE disvariant,
g_variant LIKE disvariant,
g_default(1) TYPE c,
g_exit(1) TYPE c.
Includes *
INCLUDE .
Internal Table Declaration *
DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
*DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
BOM Function module Related
DATA: t_matcat LIKE cscmat OCCURS 0 WITH HEADER LINE.
Internal Table for Level by Level Function module
DATA: t_stb LIKE stpox OCCURS 0 WITH HEADER LINE.
Get the Relevant data from FM
DATA: BEGIN OF hd_tab OCCURS 0,
stufe LIKE stpox-stufe,
vwegx LIKE stpox-vwegx,
END OF hd_tab.
Final Output
DATA: BEGIN OF alv_stb OCCURS 0.
INCLUDE STRUCTURE stpox_alv.
DATA: info(3) TYPE c,
END OF alv_stb.
DATA: BEGIN OF stb_orig.
INCLUDE STRUCTURE stpox.
DATA: END OF stb_orig.
DATA: BEGIN OF stb_add.
INCLUDE STRUCTURE stpol_add.
DATA: END OF stb_add.
Internal Table for STPO
*-- BOM Line item
TYPES: BEGIN OF ty_stpo,
stlty TYPE stpo-stlty,
stlnr TYPE stpo-stlnr,
stlkn TYPE stpo-stlkn,
stpoz TYPE stpo-stpoz,
idnrk TYPE stpo-idnrk,
meins TYPE stpo-meins,
menge TYPE stpo-menge, "Component Qty
END OF ty_stpo.
DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
*-- BOM Header
TYPES: BEGIN OF ty_stko,
stlty TYPE stko-stlty,
stlnr TYPE stko-stlnr,
stlal TYPE stko-stlal,
stkoz TYPE stko-stkoz,
bmein TYPE stko-bmein,
bmeng TYPE stko-bmeng,
END OF ty_stko.
DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
data : t_makt like makt occurs 0 with header line.
DATA: BEGIN OF cl_clstab OCCURS 0, "YHG079407
class LIKE klah-class, "YHG079407
klart LIKE klah-klart, "YHG079407
chked LIKE csdata-xfeld, "YHG079407
noobj LIKE csdata-xfeld, "YHG079407
dsply LIKE csdata-xfeld, "YHG079407
END OF cl_clstab.
*-- Header table
TYPES: BEGIN OF ty_main_material,
matnr TYPE mast-matnr, "Material
werks TYPE mast-werks, "Plant
maktx TYPE makt-maktx, "Description
stlal TYPE mast-stlal, "Alternative BOM
stlnr TYPE stko-stlnr, "BOM Number
bmein TYPE stko-bmein, "UOM
bmeng TYPE stko-bmeng, "Base Qty
expand(1) TYPE c, "Expanding Field
END OF ty_main_material.
DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
HEADER LINE.
*-- Item (Component) Table
TYPES: BEGIN OF ty_item_material,
matnr TYPE mast-matnr, "Material
werks TYPE mast-werks, "Plant
idnrk TYPE stpo-idnrk, "Component (Material)
maktx TYPE makt-maktx, "Description
stlal TYPE mast-stlal, "Alternative BOM
stlnr TYPE stpo-stlnr, "BOM Number
meins TYPE stpo-meins, "UOM
menge TYPE stpo-menge, "Base Qty
END OF ty_item_material.
DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
HEADER LINE.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
SELECT-OPTIONS s_stlal FOR mast-stlal .
SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
SELECT-OPTIONS s_matnr FOR mast-matnr.
SELECTION-SCREEN SKIP.
PARAMETERS: p_compon RADIOBUTTON GROUP g1.
SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF BLOCK b1.
selection-screen begin of block b03 with frame title text-b03.
selection-screen begin of line.
selection-screen comment 1(40) text-005.
parameters: p_all radiobutton group r1 default 'X'.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(40) text-006.
parameters: p_one radiobutton group r1 .
selection-screen end of line.
selection-screen end of block b03.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK b3.
At slection screen events *
*-- Process on value request
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant.
Intitialisation
INITIALIZATION.
g_repid = sy-repid.
g_tabname_header = 'T_MAIN_MATERIAL'.
g_tabname_item = 'T_ITEM_MATERIAL'.
*-- define keyinformation
CLEAR gs_keyinfo.
gs_keyinfo-header01 = 'MATNR'.
gs_keyinfo-item01 = 'MATNR'.
PERFORM e03_eventtab_build USING gt_events[].
PERFORM e04_comment_build USING gt_list_top_of_page[].
PERFORM e07_sp_group_build USING gt_sp_group[].
PERFORM e08_layout_build USING gs_layout.
Set Options: save variants userspecific or general
g_save = 'A'.
PERFORM variant_init.
Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
S T A R T - O F - S E L E C T I O N *******************
start-of-selection.
if p_all = 'X'.
Get the data from MAST and MAKT Table
if p_bomlst = 'X'.
Get the data Based On Material #
perform get_data.
else.
Get the data Based On Component
perform get_data_component.
endif.
else.
Get the Single Level Report
*-- Moved the fiedl catalog here inorder to change the layout based on
*-- Selection
PERFORM e01_fieldcat_init USING gt_fieldcat[].
PERFORM select_data.
endif.
E N D - O F - S E L E C T I O N *******************
end-of-selection.
if p_one = 'X'.
perform alv.
endif.
User Command
at line-selection.
Interactive to CS03 Transaction
case sy-ucomm.
when 'PICK' or 'F2'.
if not alv_stb-idnrk is initial .
if not alv_stb-werks is initial.
if not alv_stb-objty is initial.
SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
call transaction c_tcode and skip first screen.
endif.
endif.
endif.
clear alv_stb.
endcase.
*& Form get_data
Get data from MAST and MAKT Table
FORM get_data.
data : wa_lines type sy-index.
REFRESH : T_MAST,
t_STB,
t_MATCAT,
alv_STB.
CLEAR : T_MAST,
t_STB,
t_MATCAT,
alv_STB.
Get the data from MAST Table
Get all the information from MAST - BOM Table
SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
werks = p_werks AND
stlan IN s_stlan AND
stlal IN s_stlal.
describe table t_mast lines wa_lines.
if wa_lines is initial.
Write:/2 'List contains no data'.
stop.
endif.
loop at t_mast.
clear : v_maktx.
Start of change Seshu
Reason - Remove the new page option
if sy-tabix ne 1.
skip 1.
endif.
End of Change Seshu
Get the material Description
select single maktx from makt into v_maktx
where matnr = t_mast-matnr
and spras = 'E'.
Get the material details from STKO Table
select single * from stko into wa_stko
where STLTY = 'M'
and STLNR = t_mast-stlnr
and STLAL = t_mast-stlal.
Main Header for Each Material
format color 5 on.
write:/2 'Material',20 'Material Description',65 'Alternative BOM',
90 'Base Qty', 115 'Base Unit'.
format color 5 off.
format color 1 on.
write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
115 wa_stko-BMEIN.
format color 1 off.
Use the Function Module and get the format level by level
perform get_level_level.
endloop.
ENDFORM. " get_data
Top of page *
top-of-page.
perform report_header .
*& Form report_header
text
--> p1 text
<-- p2 text
FORM report_header.
new-page line-size 160 .
format color col_heading intensified on.
write:/ sy-uline(160) .
*--- Write Company Name.
perform calc_col_and_write using text-h00
sy-linsz.
*--- Write Report Title.
perform calc_col_and_write using sy-title
sy-linsz.
*--- Write User Id, Date / Time, Program Id, Page etc.
perform write_other_hdr_details.
write:/ sy-uline(160) .
ENDFORM. " report_header
*& Form calc_col_and_write
text
-->P_TEXT_H00 text
-->P_SY_LINSZ text
FORM calc_col_and_write USING P_TEXT
P_LINSZ.
data: col1 type i,
col2 type i,
len type i,
str type i.
str = strlen( p_text ).
col1 = ( p_linsz / 2 ) - ( str / 2 ) .
len = p_linsz - col1 - 2.
write: at /1 '|'.
write: at col1 p_text,
at sy-colno(len) space.
write at 160 '|'.
ENDFORM. " calc_col_and_write
*& Form write_other_hdr_details
text
--> p1 text
<-- p2 text
FORM write_other_hdr_details.
data: col1 type i,
col2 type i,
len type i.
col1 = 3.
write:/1 '|'.
write: at col1 'UserId : ',
sy-uname.
len = sy-linsz - 1.
write at sy-colno(len) space.
col2 = sy-linsz - 18.
write: at col2 'Date: ',
sy-datum mm/dd/yyyy.
write: at sy-linsz '|'.
write:/1 '|'.
write: at col1 'ReportId: ',
sy-repid.
write at sy-colno(len) space.
col2 = sy-linsz - 18.
write: at col2 'Page: ',
sy-pagno.
write: at sy-linsz '|'.
ENDFORM. " write_other_hdr_details
*& Form get_data_component
Get the data based on Component level
FORM get_data_component.
data wa_lines type i.
*-- Get the BOM item details
SELECT stlty stlnr stlkn stpoz idnrk meins menge
FROM stpo
INTO TABLE t_stpo
WHERE idnrk IN s_idnrk.
IF sy-subrc = 0.
CLEAR wa_lines.
DESCRIBE TABLE t_stpo LINES wa_lines.
IF wa_lines > 0.
SELECT stlty stlnr stlal stkoz bmein bmeng
FROM stko
INTO TABLE t_stko
FOR ALL ENTRIES IN t_stpo
WHERE stlnr = t_stpo-stlnr.
CLEAR wa_lines.
DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
DESCRIBE TABLE t_stko LINES wa_lines.
IF wa_lines > 0.
*-- Get the BOM item details
SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
WHERE werks = p_werks AND
stlnr = t_stko-stlnr
and stlal in s_stlal.
ENDIF.
ENDIF.
else.
Write:/2 'List contains no data'.
stop.
endif.
loop at t_mast.
clear : v_maktx.
Start of change Seshu
Reason - Remove the new page option
if sy-tabix ne 1.
skip 1.
endif.
End of change Seshu
Get the material Description
select single maktx from makt into v_maktx
where matnr = t_mast-matnr
and spras = 'E'.
Get the material details from STKO Table
select single * from stko into wa_stko
where STLTY = 'M'
and STLNR = t_mast-stlnr
and STLAL = t_mast-stlal.
Main Header for Each Material
format color 5 on.
write:/2 'Material',20 'Material Description',65 'Alternative BOM',
90 'Base Qty', 115 'Base Unit'.
format color 5 off.
format color 1 on.
write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
115 wa_stko-BMEIN.
format color 1 off.
Use the Function Module and get the format level by level
perform get_level_level.
clear : t_mast.
endloop.
ENDFORM. " get_data_component
*& Form obj_ident
text
FORM obj_ident.
weder Mat noch Doc
CHECK: T_stb-objty NE otyp_mat,
T_stb-objty NE ootyp_mat,
T_stb-objty NE otyp_doc,
T_stb-objty NE otyp_ntm.
?T418-WA schon ok
nein
IF T_stb-postp NE t418-postp.
T418 einlesen
PERFORM t418_lesen USING T_stb-postp.
ENDIF.
PERFORM cl_clstab_maint.
?MatNr-Eingabe bei diesem PosTyp moeglich
und keine Textposition
trifft zu
IF t418-matin NE '-'
AND t418-txpos IS INITIAL.
aktuelles Objekt ist Material NLAG
T_stb-objty = '1'.
PosKurztext in ObjKurztext uebernehmen.
T_stb-ojtxp = T_stb-potx1.
MODIFY T_stb.
ELSE.
IF T_stb-objty IS INITIAL.
T_stb-objty = '2'.
MODIFY T_stb.
ENDIF.
ENDIF.
ENDFORM. " obj_ident
*& Form t418_lesen
text
-->P_T_STB_POSTP text
FORM t418_lesen USING lkl_postp LIKE stpo-postp.
T418-WA initialisieren
CLEAR:
t418.
Key angeben
t418-postp = lkl_postp.
PosTypDefinition lesen
READ TABLE t418.
ENDFORM. " t418_lesen
*& Form cl_clstab_maint
text
FORM cl_clstab_maint.
nur fuer Klassenpositionen
CHECK t_STB-OBJTY EQ OTYP_KLA.
Teilkey der Klassenpositionentabelle
CL_CLSTAB-CLASS = t_STB-CLASS.
CL_CLSTAB-KLART = t_STB-KLART.
Klassenpositionentabelle lesen
READ TABLE CL_CLSTAB
WITH KEY CL_CLSTAB(21)
BINARY SEARCH.
aktuelle Klassenposition bereits in Klassenpositionentabelle
nein
IF SY-SUBRC <> 0.
Klassenposition in Klassenpositionentabelle hinzufuegen
INSERT CL_CLSTAB INDEX SY-TABIX.
ENDIF.
ENDFORM. " cl_clstab_maint
*& Form alv_stb_prep
Printing the data as LEVEL BY LEVEL
FORM alv_stb_prep.
CLEAR:
alv_stb,
stb_orig,
stb_add.
IF t_stb-hdnfo IS INITIAL.
stb_orig = t_stb.
IF t_stb-mngko >= max_num.
stb_add-ovfls = ueberl_kz.
ELSE.
IF t_stb-mngko <= min_num.
stb_add-ovfls = ueberl_kz.
ELSE.
CLEAR: stb_add-ovfls.
ENDIF.
ENDIF.
IF NOT t_stb-xtlnr IS INITIAL.
stb_add-bomfl = b_flag.
ENDIF.
IF NOT t_stb-knobj IS INITIAL
OR NOT t_stb-class IS INITIAL
OR NOT t_stb-kzclb IS INITIAL.
stb_add-knofl = 'X'.
ENDIF.
ELSE.
CHECK t_stb-stufe > 1.
alv_stb-info = 'C30'.
IF t_stb-ttidx <> t_matcat-index.
READ TABLE t_matcat INDEX t_stb-ttidx.
ENDIF.
stb_orig-hdnfo = t_stb-hdnfo.
stb_orig-stufe = t_stb-stufe - 1 .
stb_orig-ojtxp = t_stb-ojtxb.
IF NOT t_stb-altst IS INITIAL.
stb_orig-stlal = t_stb-stlal.
IF stb_orig-stlal(1) EQ '0'.
stb_orig-stlal(1) = ' '.
ENDIF.
ENDIF.
stb_orig-idnrk = t_matcat-matnr.
ENDIF.
CLEAR:
stb_add-dobjt,
stb_add-objic.
CASE t_stb-objty.
WHEN otyp_mat.
WRITE: stb_orig-idnrk TO ecfld.
stb_add-objic = '@A6@'.
WHEN 'M'.
WRITE: stb_orig-idnrk TO ecfld.
stb_add-objic = '@A6@'.
WHEN otyp_noo.
WRITE: stb_orig-potx1 TO ecfld.
stb_add-objic = '@0Q@'.
WHEN otyp_doc.
write stb_orig-doknr to ecfld. "note 489354
IF ecfld CP '*# '. ENDIF. "note 489354
sy-fdpos = sy-fdpos + 1. "note 489354
CONCATENATE
*d stb_orig-doknr "note 489354
stb_orig-dokar
stb_orig-doktl
stb_orig-dokvr
*d INTO ecfld "note 489354
INTO ecfld+sy-fdpos "note 489354
SEPARATED BY space.
stb_add-objic = '@AR@'.
WHEN otyp_kla.
CONCATENATE
stb_orig-class
stb_orig-klart
INTO ecfld
SEPARATED BY space.
stb_add-objic = '@7C@'.
WHEN otyp_ntm.
WRITE: stb_orig-intrm TO ecfld.
WHEN OTHERS.
ENDCASE.
*d CONDENSE ecfld. "note 515408
stb_add-dobjt = ecfld(40).
CLEAR: ecfld.
WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
*d MOVE-CORRESPONDING stb_orig TO alv_stb. "note 331962
MOVE-CORRESPONDING stb_add TO alv_stb.
MOVE-CORRESPONDING stb_orig TO alv_stb. "note 331962
APPEND alv_stb.
ENDFORM. " alv_stb_prep
*& Form get_level_level
text
FORM get_level_level.
REFRESH : T_STB,
T_MATCAT,
ALV_STB.
CLEAR : T_STB,
T_MATCAT,
ALV_STB.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01'
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mtnrv = t_mast-matnr
stlal = '01'
stlan = '1'
stpst = 0
svwvo = 'X'
werks = p_werks
vrsvo = 'X'
TABLES
stb = t_stb
matcat = t_matcat
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: hd_tab.
Entry der KlassenstatusTab. initialisieren
cl_clstab,
Entry 'Objekte von Klassen' initialisieren
cl_objmemo.
REFRESH: hd_tab.
SORT t_matcat BY index ASCENDING.
Get the All levels
loop at t_stb.
IF NOT t_stb-hdnfo IS INITIAL.
EXIT.
ENDIF.
Object Identification
PERFORM obj_ident.
READ TABLE hd_tab
WITH KEY stufe = t_stb-stufe
vwegx = t_stb-vwegx
BINARY SEARCH
TRANSPORTING NO FIELDS.
?gibt es diesen Satz schon
nein
IF sy-subrc <> 0.
dann in SFP-Infosatzverweistab. aufnehmen
*d APPEND HD_TAB. "HGH054648
hd_tab-stufe = t_stb-stufe.
"HGH054648
hd_tab-vwegx = t_stb-vwegx.
"HGH054648
INSERT hd_tab "HGH054648
INTO hd_tab "HGH054648
INDEX sy-tabix. "HGH054648
PosNr initialisieren
CLEAR: t_stb-posnr.
SFP-InfosatzKz setzen
t_stb-hdnfo = 'X'.
stb-objty = otyp_mat.
"HGE246532
als SFP-Infosatz in die STB aufnehmen
append t_stb.
ENDIF.
*del ENDIF.
clear t_stb.
endloop.
SORT t_stb ASCENDING BY stufe
index ASCENDING
*del POSNR ASCENDING. "HGC062735
posnr ASCENDING "HGC062735
hdnfo DESCENDING.
LOOP AT t_stb.
T_stb-index = sy-tabix.
MODIFY T_stb.
PERFORM alv_stb_prep.
ENDLOOP.
Displays the Value as Level by Level
loop at ALV_stb.
if sy-tabix = 1.
format color 3 on.
write:/2 'Level',12 'Item',22 'Component',
42 'Material Description',82 'Base Qty',
107 'Base Unit',120 'Assembly Indicator'.
format color 3 on.
endif.
if alv_stb-MEINs is initial.
v_flag = 'X'.
endif.
if v_flag = 'X'.
format color 5 on.
write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP.
format color 1 off.
else.
if alv_stb-STUFE = '1'.
format color 1 on.
write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs, 120 alv_stb-bomfl .
format color 1 off.
elseif alv_stb-STUFE = '2'.
format color 2 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl.
format color 2 off.
elseif alv_stb-STUFE = '3'.
format color 3 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 3 off.
elseif alv_stb-STUFE = '4'.
format color 4 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 4 off.
elseif alv_stb-STUFE = '5'.
format color 5 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 5 off.
elseif alv_stb-STUFE = '6'.
format color 7 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl.
format color 6 off.
elseif alv_stb-STUFE = '7'.
format color 7 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 7 off.
else.
format color 1 on.
write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
42 alv_stb-OJTXP,72 alv_stb-mngko,
107 alv_stb-MEINs,120 alv_stb-bomfl .
format color 1 off.
endif.
endif.
hide: alv_stb.
clear : alv_stb.
clear v_flag.
endloop.
ENDFORM. " get_level_level
*& Form f4_for_variant
text
FORM f4_for_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = g_variant
i_save = g_save
i_tabname_header = g_tabname_header
i_tabname_item = g_tabname_item
it_default_fieldcat =
IMPORTING
e_exit = g_exit
es_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
p_vari = gx_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f4_for_variant
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = e03_lt_events.
READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE gc_formname_top_of_page TO ls_event-form.
APPEND ls_event TO e03_lt_events.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE -
How to enable a disabled radio button????
Hi here is the problem i have, i have a number of radio buttons contained in a buton group, all the buttons bar the first one are disabled. The buttons are all drawn on a JPanel. What i want to be able to do is once the enabled button has been selected, I want to enable the next button in the gropu and also then disable the one that was previously enabled. Is there any way i can do this, below is the code i have for setting the group up, and trying the above probelm. Any help much appreciated Thanks.
/* Function creates a radio button and adds it to the button group */
public JRadioButton getRadioButton(String myString, boolean val)
JRadioButton myButton=new JRadioButton(myString);
myButton.setActionCommand(myString);
myButton.addActionListener(myListener);
myButton.setEnabled(val);
group.add(myButton);
return myButton;
//adds the radio buttons to the panel, for each transition */
public void addTranPan()
for(int i = 0; i < dCreate.char2.size(); i ++)
if (i == 0) mPanel.add(getRadioButton(dCreate.char2.elementAt(0).toString(),true));
else
mPanel.add(getRadioButton(dCreate.char2.elementAt(i).toString(),false));
public void ChangeButtonState()
Component [] components = getContentPane().getComponents();
for (int i = 0; i < components.length; i++)
Component c = components;
if (c instanceof JRadioButton)
JRadioButton rb = (JRadioButton) c;
rb.setEnabled(false);
if (c.getName().equals(ch)) //find button to enable
JRadioButton rb = (JRadioButton) c;
rb.setEnabled(true);
break;
mPanel.repaint();import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class sol21 extends JFrame implements ItemListener {
JRadioButton
radio1 = new JRadioButton("One"),
radio2 = new JRadioButton("Two"),
radio3 = new JRadioButton("Three"),
radio4 = new JRadioButton("Four");
JRadioButton[] radios = {
radio1, radio2, radio3, radio4
int INITIAL_ENABLED = 0;
public sol21() {
ButtonGroup group = new ButtonGroup();
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(5,0,5,0);
gbc.anchor = gbc.WEST;
gbc.gridwidth = gbc.REMAINDER;
for(int j = 0; j < radios.length; j++) {
radios[j].addItemListener(this);
group.add(radios[j]);
panel.add(radios[j], gbc);
if(j == INITIAL_ENABLED)
continue;
radios[j].setEnabled(false);
setContentPane(panel);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(300,200);
setLocation(300,200);
setVisible(true);
public void itemStateChanged(ItemEvent e) {
JRadioButton button = (JRadioButton)e.getItemSelectable();
if(e.getStateChange() == ItemEvent.SELECTED) {
int index = 0;
for(int j = 0; j < radios.length; j++)
if(radios[j] == button)
index = j;
radios[(index + 1) % radios.length].setEnabled(true);
if(index == 0)
index = radios.length;
radios[(index - 1) % radios.length].setEnabled(false);
public static void main(String[] args) {
new sol21();
}
Maybe you are looking for
-
AFTER UPDATING THE IOS 8 IN MY IPHONE THE PHONE MEMORY REDUCED TO 5.5 GB WHICH IS VERY LOW COMPARED TO 8GB. IWANT DEGRADE IT TO IOS 7.1.2
-
Using Flash Catalyst to create components in Flash Builder
Hi, Apologies if this is a obvious question, but I wanted to solve the one way catalyst --> flash builder nightmare (there is no better word in my opinion) and create a number of basic components in catalyst (rather than an entire site), import them
-
How to translate Standard Text
Hello experts, I need to translate Standard text created in SO10. Where I can find it in SE63? What Object Type corresponds to Standard Text? Thanks in advance.
-
"Caller 09 contains an error message "in Process chain
Hi Most of my process chains have failed today.All are showing the same error i.e Error message from the source system Diagnosis An error occurred in the source system. System Response Caller 09 contains an error message. Further analysis: The error
-
Broken screen/inverter. Help?
Okay, so as the result of my stupidity (ie, coffee + macbook = sad day), my screen has been acting up. This happened actually several months ago, but it was never really bad enough to do anything about it (plus I didn't want to admit to Apple that I