HOW TO MAKE FIELDS AS READ ONLY IN TABLE MAINTAINANCE
HI ABAPers,
HOW TO MAKE SOME FIELDS AS DISPLAY MODE.
FOR SUPPOSE, THERE ARE 5 FIELDS in SM30.
AMONG THEM 1 FIELD SHUD BE USED FOR EDITING AND THE OTHER 4 FIELDS SHUD ONLY BE USED FOR DISPLAY PURPOSE
WHEN EVER I ENTER A VALUE IN THAT 1 PARTICULAR FIELD THEN THE DATA OF THE REMAINING 4 FIELDS SHUD BE DISPLAYED IN THE SAME SCREEN ITSELF.
HOW CAN IT BE POSSIBLE...
PLZ HELP.
THNX IN ADV,
SP.
Hello SP,
You can create a maintenance view for the table & here you can define the maintenance attribute for individual fields.
For the fields you want to be READ-ONLY pass 'R' to those fields. (It is the 4th column from the left, the one to the immediate left of the Key column).
Don't change the TMG function group directly. If you regenerate the TMG the changes would be overwritten !
You can use the Event '01' to fulfill your requirement:
*& Form f_event_01
* text
FORM f_event_01.
DATA: v_indx TYPE sy-index,
v_land1 TYPE land1,
v_name1 TYPE name1.
FIELD-SYMBOLS: <vendor> TYPE lifnr,
<val> TYPE ANY.
BREAK-POINT.
"TOTAL contains all data which are read, changed and created in TMG
LOOP AT total.
IF <action> = neuer_eintrag " New Entry.
OR <action> = aendern "Changed entry
OR <action> = original. "Same as DB
READ TABLE extract WITH KEY <vim_xtotal_key>.
IF sy-subrc = 0.
v_indx = sy-tabix.
ELSE.
CLEAR v_indx.
ENDIF.
ASSIGN COMPONENT 'LIFNR' OF STRUCTURE total TO <vendor>.
CHECK sy-subrc = 0.
* select data from the LFA1 based on LIFNR
SELECT SINGLE name1 land1 FROM lfa1
INTO (v_name1,v_land1)
WHERE lifnr = <vendor>.
CHECK sy-subrc = 0.
* Populate the hidden fields NAME1 & LAND1
ASSIGN COMPONENT 'NAME1' OF STRUCTURE total TO <val>.
CHECK sy-subrc = 0.
<val> = v_name1.
ASSIGN COMPONENT 'LAND1' OF STRUCTURE total TO <val>.
CHECK sy-subrc = 0.
<val> = v_land1.
MODIFY total.
CHECK v_indx GT 0.
extract = total. "Pass the changes in TOTAL to EXTRACT
MODIFY extract INDEX v_indx.
ENDIF.
ENDLOOP.
sy-subrc = 0.
ENDFORM. "f_event_01
BR,
Suhas
Edited by: Suhas Saha on Aug 16, 2010 11:58 AM
Similar Messages
-
How to make a page READ ONLY / all fields are DISABLED ?
Hi all,
I am using ONE page to do ADD/EDIT/DISPLAY data. When users are in DISPLAY mode, I want all fields on the page to be read only / disabled.
How is the best approach to do that ?
(other than going to every fields and set the ReadOnly/Disabled property)
Thank you for your help,
xtantoHi Xtanto,
My business logic is somewhat different - I don't do this for new/editted rows, but based upon other security. You could certainly set something in your backing bean based upon a user clicking "new" or "edit"
John -
How to make Select List Read only (Keep key Data)
I'd like to make a select list read only when the screen is in maintenance mode because the select list value is part of the key.
However, when I make the select list read only, the update fails because it appears making it disable lose's it's value.
How can I make a select list read only and keep it's value for update.In HTML Header I have
<script type="text/javascript">
function Disable_List(pthis,hideitem)
if ($x(hideitem).value == 'Y')
{ $x(pthis).disabled = "disabled";
</script>
<script type="text/javascript">
function Load_Start()
Disable_Item('P5_SUBCODE','P5_XW_HAS_VALUE');
Disable_List('P5_LTY','P5_XW_HAS_VALUE');
</script>
When I click apply changes, my Validation check that doesn't allow nulls in the "P5_LTY" fires saying the field can't be null. The select list is grayed out and I see the value, but the validation check thinks it's null.
Edited by: spuchc on Jun 15, 2010 8:03 AM -
Hi all,
Can anyone please help me out on the following issue.
How to make a total page read only, so that he/she can not make any changes. I want the total page read only.
Do we have any functions to do that?
I need to do through peoplecode only because i have to check a condition.
Please help me.
Thank you,
Bye.Without customizing, this may be accomplished via Permission List Security.
Go to PeopleTools - Security - Permission List
Select the desired Permission List. Click on the Pages tab.
Find the menu and click on "Edit Components" hyperlink.
Find the Component on the List and click on the "Edit Pages" hyperlink.
Click on the Display Only check box for each page in the component you wish Display Only.
If that does not sufice, you may use PeopleCode to set the Field DisplayOnly property to true for those editable fields that you wish not to be.
HTH
Steven E. Davies -
How to make form as read only when another time as user sees it..
Hi All,
I have a form to raise the issue. once the issue is raised it appears in the issue raised reports( that is form on a report )
so all can view this report and click on issue no ..the form with details appear .
but i want to restrict it , by allowing only one up manager to view the form on a report in editable format rest all can just view it .
how can i do this?????????
can any one help me with this ????..
my approach is like this ...
a column called "checked shud be added to issue table , then its values must be set to "raised" when issue is submitted for the very first time..( so it is zero when the end user is submitting it ).
when ( the logged in user =1 up manager or checked!="raised") then
form fields to be displayed as edited
else
form fields need to be read only .
Thanks & Regards,
Nandini Thakur.
Edited by: Nandini thakur on Jun 26, 2010 12:04 PMNandini,
If you edit any item, you can see a section where you can specify "Read-Only" condition. Here you can write your read-only logic using SQL OR PL/SQL or predefined conditions.
Cheers,
Hari -
WebDAV how to make root folders read only but contents writable
Hi everyone.. Thanks in advance to anyone who can help me out..
1 PERMISSIONS
I have a working WebDAV server. In each realm (or user account) they have a setup that mocks their home folder, ie, Documents, Movies, Websites, etc.
How can I modify the permissions so that these root folders cannot be deleted, but they can obviously have items added/deleted inside of them?
2 QUOTAS
Is there anyway to add quotas to WebDav accounts?
Thanks a lot!
-Melsorry guys..
Just figured out how to sort out the permissions.. You need to modify the WWW user the way you would normally set the standard user's permissions..
Any help on setting the quotas?
Thanks!
-Mel -
How can I make Keynote files read-only (eg: to share with students)?
I would like to share some keynote files with students, and I would like to set them up as read-only, so that the students can tap the screen, read my presentation, but not alter it. I've tried to set the files up as read-only on my iMac desktop, but when I load the file onto my iPad, it's still editable.
Any ideas re: how to make Keynote files read-only?
I've tried to export the files as PDF and load them into iBook, but some of Keynote's basic "build" functions won't work this way. Specifically, I have files set up with questions and answers (ie - a question appears, and you have to tap the screen to see the answer, but this "build" function seems to disappear when I get it to show up in iBook).
Any ideas how to make Keynote files read-only? I am happy to use another program, but I want the students to tap the screen in order to see the answer to a question.
Thanks!as long as $PATH is set, you shouldn't need to reconnect them (i think). if you send the list of apps through | awk -F '/' '{print $NF}' | that'll strip the path
/edit: added the "(i think)" part
Last edited by brisbin33 (2009-06-02 21:33:06) -
1) Make the column read only without coding
Please guid eme how to make the column read only in the list without using the coding.
VijBasically, the answer is that you can't. There are ways to change a specific list view to make a column readonly by replacing the form with a custom DataView form. But that only applies to that view and since users can create their own views,
those views would have read/write access to the column if the user has read/write access to the item. SharePoint only supports security down to the item level out of the box and not down to the individual column level.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
How to make fields read only after form is filled in
I am creating forms to be used within our company. The customer srv representative (CSR) would fill in the form and send it to the customer for signature and initial. There are a few issues I can't solve.
1) I need to make the rate & services fields read only after the CSR initials the formWill the CSR have Acrobat or just Reader, and what type of computer will the CSR be using (Windows/Mac/mobile OS)? If just Reader (Wind/Mac), this is possible by setting the fields to read-only with JavaScript. The problem is this can't be considered secure, even if using a password as discussed here: Password-protect and hide one form field
With Acrobat you have the ability to flatten certain fields, which makes it a bit more difficult to change the "fields". -
How to make field is editable in ALV CL_SALV_TABLE only)
Hi,
How to make field is editable in ALV CL_SALV_TABLE only)
Any one has tried to make field si editable by using CL_SALV_TABLE class.
*I know how to do it in REUSEALV function module and CL_GUI_ALV class.*_
Please reply only if you riedin CL_SALV_TABLE class method.
Regards
Rajesh V
Moderator message: not supported, please read class documentation and search for previous discussions.
Edited by: Thomas Zloch on Mar 17, 2011 2:07 PMHi Chad,
Please refer the link,
Edit field in alv
Regards,
Hema.
Reward points if it is useful. -
How to right align a read only numeric field in a panel form layout
Hi, does anyone know how to right align a read only numeric field in a panel form layout? I am using: Style Class = AFFieldNumberMarker, but it only seems to work if the field is disabled. Disabling the field gives it a difference appearance that does not look right on our forms. These are calculated fields, which cannot be modified, so read only is necessary.
I have looked online for some answers, and it seems that others are having similar issues.
I have tried different combinations for the properties, but so far I cannot get it to work.
Thanks
Judy
I am using JDEV 11.1.1.5Sorry for the delay in my response. Here is the code
<af:inputText value="#{bindings.TotalAirlineCostEst.inputValue}"
label="#{bindings.TotalAirlineCostEst.hints.label}"
required="#{bindings.TotalAirlineCostEst.hints.mandatory}"
columns="#{bindings.TotalAirlineCostEst.hints.displayWidth}"
maximumLength="#{bindings.TotalAirlineCostEst.hints.precision}"
shortDesc="#{bindings.TotalAirlineCostEst.hints.tooltip}"
id="it20" readOnly="false"
disabled="true"
styleClass="AFFieldNumberMarker">
<f:validator binding="#{bindings.TotalAirlineCostEst.validator}"/>
<af:convertNumber groupingUsed="true"
pattern="#{bindings.TotalAirlineCostEst.format}"
type="number"
maxFractionDigits="0"/>
</af:inputText>
thank you,
Judy -
How to change report region fields in read only mode?
How to change report region fields in read only mode?
skud.add the following javascript fuction to page header(or Javascript function and variables section)
function disableItems(pRegionStaticId,pDisableFlag) {
$('#'+pRegionStaticId).find('[name^=f]').each( function(){ /* matches fxx */
if( $(this).attr('name').match(/f[0-9][0-9]/) ){
return $(this);
}).attr('disabled',pDisableFlag);
pRegionStaticId is the region's static Id+
Note that this code specifically disables only application arrays. Disabled items are not available after submission (and hence are different from readonly) . But any page javascript can modify disabled or readonly items(client side), so you must check at the server side to validate the data.
You can disable items using
disableItems('MY_REGION_ID' ,true);and enable them by passing false
disableItems('MY_REGION_ID' ,false); -
Hi
How can I have a check box that a user checks and populates a field with read only text, then if another check box is checked it will allow user text input into that same field, her is my javascript
var a ="Not Applicable"
if (this.getField("Do").value == "Yes")
a=""
if (this.getField("DoNot").value =="Yes")
a=a + ""
event.value=a
say if the "Do" cb is checked, Not Applicable would populate the text field, and if the "DoNot" cb is checked it would allow user input into the same text field, the javascript I have will not allow user input,
thanks for any help I am new to javascriptAre these fields mutually exclusive?
-
How to make fields disappear after making them appear
I've got a drop-down list with a question like this: Q) how many people did you interview? and you can select a number that corresponds to the number of people you interviewed. I've got the fields appearing without any problems, so if I select 2, I get two text fields to appear asking for the names of the people you interviewed.
My problem is once I select a number, lets say I select 4 by mistake but intended to select 3, I get 4 text fields appearing. However if I go back and select 3, which is the number of fields I wanted, I still have 4 fields showing. How do I get the number of fields I select be the only number of fields to appear?Will the CSR have Acrobat or just Reader, and what type of computer will the CSR be using (Windows/Mac/mobile OS)? If just Reader (Wind/Mac), this is possible by setting the fields to read-only with JavaScript. The problem is this can't be considered secure, even if using a password as discussed here: Password-protect and hide one form field
With Acrobat you have the ability to flatten certain fields, which makes it a bit more difficult to change the "fields". -
Making a field as read-only using Forms Personalization.
Hi All,
I have one requirement.I developed one form which is used to display Customer related Information.Some fields are created under one block and "reason-for-write off amount" field is created under another block.I have created Master-Detail relation for these 2 blocks.If there is any "reason-for-write off amount" is present for queried customers then it shows the "reason-for-write off amount" data.check boxes also created beside customer number field in Master block.If there is no "reason-for-write off amount" for any customer I need to write it and when I click on "submit" button in my form it goes to database.
Now my requirement is :
I need to make "reason-for-write off amount" field as read-only and I need to CHECK corresponding Customer "check_box" and make "SUBMIT" button as disable using personalization.
I wrote code in Personalization as
Trigger-Event:WHEN-NEW-FORM-INSTANCE
Condition: :DUMCUST.REASON_FOR_WRITEOFF IS NOT NULL
Processing mode:BOTH
Actions:
object type: ITEM
Target Object: :DUMCUST.REASON_FOR_WRITEOFF
Property Name: Enterable
Value:false
object type: ITEM
Target Object: :XXMCS_CUSTOMER_DETAILS.CUSTOMER_NUMBER_CBX
Property Name: Value
Value:1
object type: ITEM
Target Object: :XXMCS_CUSTOMER_DETAILS.SUBMIT
Property Name: Enabled
Value:False
But it is not working..the applied changes are not affected in my form.I tried the above actions with WHEN_NEW_BLOCK_INSTANCE trigger also.I didn't write any validation triggers for these items in my FMB also.
Could anyone please help me..
Thanks in Advance.in your iterator declare the inputfield with disabled = true .
p_replacement_bee = cl_htmlb_inputfield=>factory(
id = p_cell_id
disabled = 'true'
value = comments ).
this will generate the html like below
<input type="Text"
class="urEdf2TxtEnbl urEdf2TxtRo urV" autocomplete="off" id="TAB1_1_4" ct="InputField" name="TAB1_1_4" st="r" tp="STRING"
readonly value="some value" onblur="sapUrMapi_InputField_Blur('TAB1_1_4',event)"
onkeydown="sapUrMapi_InputField_keydown('TAB1_1_4',event)"
onkeyup="sapUrMapi_InputField_KeyUp('TAB1_1_4',event)" onfocus="sapUrMapi_InputField_focus('TAB1_1_4',event)">
now you can use js getElementById as this now has a id attached (TAB1_1_4)
Maybe you are looking for
-
F9I4 - Payment item parking - IHC
Hi: I have a problem when processing a payment item in In In House Cash. When trying to park a manually created payment item, in transaction F9I4, the system gives an error. The error is "Parking payment items on CpD (suspense) account is not possibl
-
Retrieve the fields name of a table
HI, I need to write a loop to get the name of each fields in a table. I nedd something like for each field.fieldname do something thanks, Mandana
-
Can't Change Port number on Mail account settings
I am trying to use Mac mail to read my .mac email. I can recieve messages but can't send them. I have isolated the problem to the port number which is 993. The problem is I can't change it to 25 or to 587 which is what .mac recommends. If I uncheck "
-
How to reconfigure Oracle-xe (Oracle 10g for linux)?
Hello! I found this article (seems useful since I use Mandriva 2010.2): [http://www.e-angel.net/index.php?tg=articles&idx=Print&topics=195&article=912|http://www.e-angel.net/index.php?tg=articles&idx=Print&topics=195&article=912] I installed Oracle 1
-
COMPILER QUESTION Do I have to start over again?
I've got large project compiling in DSP3. If compiler stops because of an error that I need to fix, do I have to start compiling from the beginning again after I fix the error. I am hoping there is a way for compiler to pickup from where it left. Aga