HOW TO ENABLE FIELD ONLY IN CURRENT RECORD?
I have a field in a multi record block that i want protected when user is editing a record. The problem is if the user wants to add a record they need to be able to enter a value for that field. My questions is how do you unprotect the field for the current record to be inserted without unprotecting the existing records in the block with the same field.
Also, I want to clear a record in multi record block after it fails validation. What trigger would be ideal for such an operation or what method? I have a field that if they enter a duplicate value when doing an iserting I give an error to change. If they blank the field out(the user decided that they are not going to perform an insert) it seems that the record remains even though there are no values for the record. I am hoping that the user would not have to press a delete button that performs a delete_record but instead I can call clear_record to actually get rid of it. Thanks.
Hi ,
If you wish to hide or show fields, proceed as follows(through screen variants):
1. Determine the screen variant, for example, BBP_SC(For shopping cart), using the list in documentation of BADI BBP_SCREENVARIANT.
2. Copy this screen variant, for example, in Zbbp_SC, in Transaction SHD0.
3. Change the new screen variant as required. Note that you can only change the display properties for fields of table controls. You can switch the display on and off.
4. Implement the appropriate method (see the list above). Fill the export parameter EV_SCVARIANT with the new screen variant.
You can create multiple screen variants for a screen and then select these in the BAdI depending on the user or on other criteria.
here is sample code in BADI BBP_SCREENVARIANT implementation after creating Z screen variant.
Method IF_EX_BBP_SCREENVARIANT~GET_SCREENVARIANT_SC.
IF iv_progname EQ 'SAPLBBP_SC_UI_ITS'
AND iv_dynnr EQ '0120'
AND flt_val EQ c_fltval.
IF iv_scvariant EQ 'BBP_SC'.
ev_scvariant = 'Zvariant'.
ENDIF.
ENDIF.
ENDMETHOD.
Please reward points if helpful..
Thanks
Venkatesh
Similar Messages
-
How to enable the only row(s) assigned to a user to edit
Dear All,
ADF BC and ADF faces pages. i have implented a login page(login.jsp) to authenticate users. an Employee page is configured to display the detail info of all Employees.
what i'd like to have is: in the table view, all rows should be read only, except the only one(s) that belong(s) to the current logged-in user. in other words, a user can only edit his record, while other are read only. how can i implement it? thanks.
regards
Jerrysome followups:
i used #{row.Naam == facesContext.externalContext.userPrincipal.name}
but it only worked in the table view but not in the form view. and in my application is set to have table-form view, where you basically have a table view and a detail button, which will take you to a form view when clicked on. any idea?
i found out:
in the table view: #{row.Name == facesContext.externalContext.userPrincipal.name}
in the form view: #{bindings.EmployeeName.inputValue == facesContext.externalContext.userPrincipal.name}
thank you. -
How to enable field "reason for rejection" of view "status" in CRMD_ORDER
Hello Everyone
I need to activate/enable field "Reason for Rejection" in view "Status" of transaction CRMD_ORDER though a delivery document is created for the sales order.
Can some one pls let me know where do I need to code to make field "Reason for Rejection" enabled.
FYI, the same logic was applied for VA02 as well and the logic is written in userexit "USEREXIT_FIELD_MODIFICATION" which is working fine.
Apprecriate your quick response.
Thanks
DharmaHi Raj,
Usually we use function module CRM_STATUS_UPDATE to
change user status in document. But if you want to
trigger next process or change from certain user status to next status interactively by the system, you can
use Badi CRM_ORDER_STATUS (here you have after and before
method).
Hope this could help.
Rgds,
Gun. -
Update once only most current record that meets conditions
Want to only allow the most current date with the stateID of 1 to update once and not update after the intial update when running sql code over again.
changeTypeID containerID stateID dateEntered note
UPDATE 900172-0800 5 2014-09-23 04:38:29.313 Pallet #71809
UPDATE 900172-0800 1 2014-11-20 09:17:51.017
UPDATE 900172-0800 10 2014-11-24 15:03:32.177 900172-0800->Destroyed
UPDATE 900172-0800 10 2014-11-24 15:04:00.777 900172-0800->Destroyed
UPDATE 900172-0800 10 2014-11-24 15:05:44.763 900172-0800->Destroyed
SELECT containerID
INTO #Temp
ContainerHistory
WHERE dateEntered >= DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP) -1, 0)
AND dateEntered < DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP), 0)
AND stateID = 1 ORDER BY dateEntered DESC ????
UPDATE ContainerStates
SET stateID = 10,
dateEntered = getdate(),
note = containerID + '->Destroyed'
WHERE containerID IN (
SELECT barCode AS containerID FROM #Temp WHERE containerExpired = 1>> Want to only allow the most current date with the state_id of 1 to update once and not update after the initial update when running SQL code over again. <<
Please follow basic Netiquette and post the DDL we need to answer this. Do you know how to follow industry and ANSI/ISO standards? You should follow ISO-11179 rules for naming data elements. You hjave noi idea what that means. Avoid dialect in favor of
ANSI/ISO Standard SQL.
There is no such attribute as a “change_type_id” in RDBMS. You can have a “<something>_id” “<something>_type” but not a weird mix of attribute proprieties. Likewise, “state_id” makes no sense. If you meant a status, then you need two dates to show
when that state of being applied to the entity.
To track the history of, say, Foobars we need to see time as a continuum and model it as (begin_date, end_date) pairs that define when a foobar had a particular value. Here is the skeleton.
CREATE TABLE Foobar_History
(foo_id CHAR(9) NOT NULL,
start_date DATE NOT NULL,
end_date DATE, --null means current
CHECK (start_date <= end_date),
foo_status INTEGER NOT NULL,
PRIMARY KEY (foo_id, start_date));
When the end_date is NULL, that state of being is still current. You use a simple query for the status on any particular date;
SELECT *
FROM Foobar
WHERE @in_cal_date
BETWEEN start_date
AND COALESCE (end_date, CURRENT_TIMESTAMP);
There are more tricks in the DDL to prevent gaps, etc
CREATE TABLE Events
(event_id CHAR(10) NOT NULL,
previous_event_end_date DATE NOT NULL
CONSTRAINT Chained_Dates
REFERENCES Events (event_end_date),
event_start_date DATE NOT NULL,
event_end_date DATE UNIQUE, -- null means event in progress
PRIMARY KEY (event_id, event_start_date),
CONSTRAINT Event_Order_Valid
CHECK (event_start_date <= event_end_date),
CONSTRAINT Chained_Dates
CHECK (DATEADD(DAY, 1, previous_event_end_date) = event_start_date)
-- CHECK (previous_event_end_date + INTERVAL '01' DAYS) = event_start_date)
-- disable the Chained_Dates constraint
ALTER TABLE Events NOCHECK CONSTRAINT Chained_Dates;
GO
-- insert a starter row
INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
VALUES ('Foo Fest', '2010-01-01', '2010-01-02', '2010-01-05');
GO
-- enable the constraint in the table
ALTER TABLE Events CHECK CONSTRAINT Chained_Dates;
GO
-- this works
INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
VALUES ('Glob Week', '2010-01-05', '2010-01-06', '2010-01-10');
-- this fails
INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
VALUES ('Snoob', '2010-01-09', '2010-01-11', '2010-01-15');
What you did post is awful. Why did you append “->Destroyed” to an identifier? This is redundant AND destroys the integrity of the original encoding. Why do you use a local temp table? This mimics a 1950's scratch tape and no SQL programmer would use
it. Why would a note repeat another column?
Please read this and try again.
https://www.simple-talk.com/sql/t-sql-programming/state-transition-constraints/
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How to set Display Only for some records in CAT2 Worklist
Hi,
I have a requirement to modify an attributes for some records in the Worklist of CAT2.
We have an external system where we book our time. Weekly we import data from that external system into CATSDB using BAPI for every single employee.
We would like when the user wants to modify his time sheet to be able to add/modify all records except those which were imported from the external system. Which means that those records should be in Display only mode / grayed out / before release.
Is there any user exit or BADI that could help to modify that attribute and that will be triggered before displaying the Worklist ?
Please advise !
Thanks,
StefanI've solved the problem.
First I've added customer field in CI_CATSDB structure and when I am importing the data I am populating that field with 'X', which means that this is record from the external application.
I've created enhancement implementation in Function group->CATS, screen->2003 MODULE->D2000_MODIFY_LOOP, subroutine->modify_d2000_loop where I am checking the field mentioned above if it is 'X' I am modifying the screnn-output = off.
It works, thak you for your help.
Regards,
Stefan -
How retrieve custom fields only when using SPListItemCollection?
Hi with following code I am retrieving a DataTable from a List:
using (SPSite site = new SPSite("http://..."))
using(SPWeb web = site.OpenWeb())
SPList oList = web.Lists.TryGetList("Serverliste");
if(oList != null)
DataTable dt = oList.Items.GetDataTable();
This works fine. My problem is that I only want to get custom ListFields. When working with Fields one can simply call
FromBaseType which will show if a Field is custom or not. The only value which seems right is
IsCustomType. Though it is listed under Not public members, which makes it unaccessable via code for me, right?
Well a dirty approach would be to iterate through ListFields, match them with DataColumns and check whether they are custom or not.
Is there any clean, efficient solution for this? Is this possible using CamlQueries? If yes, how would that query look like?
Algorithmen und Datenstrukturen in C#:
TechNet WikiHi,
To retrieve the custom fields, CAML query is incapable, do a iteration with SPField.FromBaseType or the SPField.SourceId property seems the only way at this moment.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they
help and unmark them if they provide no help. If you have feedback for TechNet
Subscriber Support, contact [email protected]
Patrick Liang
TechNet Community Support -
PLM UI: How to hide fields in Create Engineering record screen?
Hi Experts,
I have an requirement, where I need to hide fields that are present in "Create Engineering Record" screen, I need only 4 to 5 fields among them I want remaining fields to be hidden.
Please kindly help me in achieving this.
Thanks in advance!
Thanks and regards,
Prathyusha RudrarajuHello Prathyusha,
I assumed that you want some fields to be invisible for all scenarios so i suggested the option of configuration instead of enhancing the SAP Standard component.
and i would copy paste what i already wrote
"So if your use case includes that fields needs to be hidden for all users and for all clients you should go for Configuration
and if it is only for selected clients you could go for Customization.
and if it is only for selected users you could go for personalization "
I am sorry i completely overlooked that you want to achieve that as per user role, i would suggest you to read about Access Control Management, and revisit whether you want to change the UI or you dont want to display data as per user role and all those operations update create as per the role.
Impact of ACM on the Work with PLM Web UI - Authorizations and Access Control Context (PLM-WUI-APP-ACC) - SAP Library -
How to enable "Shift-F6" or "Copy Record" feature in custom Forms
I am looking for sample code or setup to enable Shift-F6 (Copy Record) functionality in multi-record block of a custom Form.
If someone has tried it earlier, can you pls share. Or, point me to a documentation which has these details.
Thanks.forms has a built-in duplicate_record, see forms help for examples and click the link below,
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cbuiltd_f%7Cduplreco~html/
check do_key too
see this link too
http://www.tek-tips.com/viewthread.cfm?qid=637515
Message was edited by:
zaibiman -
Lumia520 gdr3 how to enable 3g only
Any way to force 3g setting only on lumia 520 gdr3? although 2g and 3g available, it keep using 2g even after setting higher network to 3g.
this is because your network has issues, not your phone itself. in this case, contact your network carrier to check you are in an area of appropriate coverage and network reception.
-
How to restrict AS02 access to certain fields only
How to restrict AS02 (Asset Master Record) access to certain fields only. Currently when you assigned AS02 to a certain user, this will enable the user to change all the fields in the asset master record. Suppose i want only the user to restrict the access to certain field eg.NDJAR (Life in Yrs).
Thanks for your inputs.
Regards,
Roberthello,
basis has to assign the proper activity with object A_S_ANLKL. in this case they have to allow activity 03 only with combination of Cocode,asset class. see some more details below.
This authorization object is the first part of the object "asset master record."
The definition at this level determines whether the user is authorized to process data in a given company code. The activity type for the transaction is also defined here. This authorization object is used for master data transactions, for the display of value fields, and for reporting.
Defined Fields
The following fields are assigned to the authorization object
Asset class (specified by entering a value in the pop-up window)
Company code (specified by entering a value in the pop-up window)
Activity type - there are three different activity types:
01 = Create
02 = Change (including blocking and deleting)
03 = Display -
No field in current record - message
Access2007.accd of an old db built circa 90s .mdb;
Main form, with single form Sub form2, with continuous Sub form3
Main form has a Combobox1 to select record from Table 1
Sub form2 has a Combobox2 in its header to select record from Table 2 (Many to Table 1 key)
Combobox2's record set is a query with criteria of Main form Key ID so it only displays choices valid to Main form
continuous Sub form3 displays records from Table 3 (Many to Table 2 key)
and this all works fine
when Main form's combobox1 is changed, subform 2 is requeried and combobox 2 requires an explicit requery in the combobox 1 AfterUpdate Event
this also works fine - except - if one has highlighted a row in continuous sub form 3, and then using your cursor to go to Main form combobox 1 and select ; then the error message 'No combobox2 is in the current record' appears
so I am guessing the 'current record' is the issue but not sure how to resolve.......All that I can add to this is:
clicking in a row/field in continuous sub form 3 causes the problem as per the first post
if one clicks into single Sub Form 2 before triggering the Main combo box - everything works ok
because the error is saying 'there is no such field in the current record'....and the Go To step of the macro is to a control and not a field - it is a baffling error to me. But to satisfy this insanity I created a calculated field in the query record
source of continuous sub form 3 using the name of the control and just entering a fixed 'dummy' value....
and that works.... a bizarre work around....... -
How can I get the last / newest record of a table?
Hi,
I am developing an ecard app that has a create greeting page, a preview page with edit and send buttons and an edit page.
I got he insert working, and on the preview page I created a master record page (displays all records), and delete all unecessary designs. Doing it this way also gives me the 'edit' button, so people are able to edit their page.
How do I get only the last record displayed though? At the moment it loops through all records and displays them in sets of 10. I found the variable that holds the totla count of records ('$totalRows_rs7417_content1'), but how do I (re-)write the script so it ONLY diplays the last record?
I need to get the ID of this record as I am writing this into the PARAMs of the object and embed tags of my message .swf (this picks up the ID and based on that sucks the greetings text out of the database via another php script.
Also, from this page, how can I send an email to the sender (ie creator of the message) as well as the recipient? Both email addresses are in the databse so should be part of the erecord returned.
Thanks,
Nik-----
OK, So how do I recreate what I got in a non-ADDT list?
well, when you´re just about to display one certain record, the term "list" is somewhat inappropriate anyway.
What you´d simply need to do IMHO, is using DW´s native functions to create the basic "SELECT * FROM table_name ORDEr BY ID DESC" query, add "LIMIT 1" manually, and display the desired "dynamic text" placeholders in 1 table cell -- don´t think there were any need for all the fancy stuff
(sorting, filtering etc) provided by ADDT´s list, as it´s just 1 record.
It also occurred to me just now that finding the last record that has been added *may-* notbe enough if the site gets used a lot by our executives (I am thinking of a situation where 2 or three peolpe create greetings at the same time and press submit and then getting each others messges rather than their own).
in this case you might want to additionally store the respective executive´s "kt_login_id" session variable -- because it´s this unique "identifier" which should be used to show the last inserted record of the person who actually inserted it, means adding a "WHERE submitter_id" equals the session variable kt_login_id - clause to the query.
When creating a non-ADDT list that´s at some point based on detecting a user session, you´ll BTW need to insert at line 1
I can't seemt o insert it on the page as it is looking for a insert, update or delete bahaviour on the page which of course I don't have
please search these forums for several posts I made which explain my "use dummy table" approach that´s made for cases when you actually don´t have anything to insert/update/delete, but need "something" for ADDT´s send email behaviours.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
Enable Field on current record
Hi i have multi data block filed. and checkbox field which based on control block
My task is when i check checkbox only one field should enabled and my mouse goes to that field
e.g
item11 item21 item31 chkbox1
item12 item22 item32 chkbox2
Scenario like this :
My item field based on data block and checkbox based on control block,
while i checked chkbox1 , only item31 on that current record should be enabled and i changed value only on that field
second scenario is when i checked chkbox1 , my cursor goes to item31...not item32Hello,
use THE following :
IF : chkbox1 = 1 -- CHECKED THEN
SET_ITEM_PROPERTY ( 'item3',ENABLED ,PROPERTY_TRUE);
SET_ITEM_PROPERTY ( 'item3',NAVIGABLE,PROPERTY_TRUE);-- and set other items as
ELSE
SET_ITEM_PROPERTY ( 'item21' ,ENABLED ,PROPERTY_FALSE);
SET_ITEM_PROPERTY ( 'item21' ,NAVIGABLE,PROPERTY_FALSE);and u have 2 set the focus of the cursor to a navigable enable item..
-- AS
GO_ITEM ( 'item3');
this is affecting a whole record or block's behaviour
but better use SET_ITEM_INSTANCE_PROPERTY for a given item as Ahmed Mentioned
Hope this solve ur problem,
Regards,
Abdetu..
Edited by: Abdetu on Nov 19, 2010 10:52 PM -
How to edit only the selected record in Oracle forms 6i
Hi,
I have a form which has three control blocks.
First block is for search criteria, The results in the second block are displayed based on the values entered in the first block. Second block is a multi record block.
Below is my requirement:
I want to edit the record in the second block, based on the cursor position.
For EX: If the cursor is placed on the first record, all the fields in the first record should be in the editable mode.
If I move the cursor down, the next record should be editable and the previous record should again go back to non editable mode.
I have tried using :system.cursor_record, but it's applying the editable property to all fields, irrespective of the cursor position.
Any suggestions would be of great help.
Thanks
DeepthiDeepthi,
Why would you need to do this...it seems unnecessary to me because your user can only edit the record they are physically at. So, if your user is in record 3 he/she can't edit record 5.
Now, to the specific issue you are having - if you are using the SET_ITEM_PROPERTY() built-in to make a record "Editable" then what you are seeing is expected results. The SET_ITEM_PROPERTY() built-in affects ALL instances of a specific item. If you need to set item instance specific properties then you need to use the SET_ITEM_INSTANCE_PROPERTY() built-in. However, this built-in does not have the same set of properties that it can set. Take a look at the Forms Help to compare these built-ins.
If you must make each record editiable as your user navigates through them here is how I would attempt this. I must reiterate however, I really don't think this is necessary...but I don't know your requirements .
1. Create a Forms parameter to caputure the CURRENT and PREVIOUS Record number.
I prefer a parameter object over a Global because you can't choose the data type of a Global so you have to cast the value to accurately perform any numeric calculations on a Global.
2. Create/update When-New-Record-Instance trigger...
/* Sample When-New-Record-Instance... */
BEGIN
:PARAMETER.Prev_Record := :PARAMETER.Curr_Record;
:PARAMETER.Curr_Record := :SYSTEM.Trigger_Record;
IF ( :PARAMETER.Prev_Record != :PARAMETER.Curr_Record) THEN
-- Make the previous record the user was at Non-Editable...
Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', INSERT_ALLOWED, PROPERTY_FALSE);
Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', UPDATE_ALLOWED, PROPERTY_FALSE);
-- You MUST do this for each of the items in the row of your multirecord block. There is no built-in to set the properties
-- all of the items in a row...
END IF;
-- Now make the current record editable...
Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', INSERT_ALLOWED, PROPERTY_TRUE);
Set_Item_Instance_Property('YOUR_BLOCK.YOUR_1st_BLOCK_ITEM', UPDATE_ALLOWED, PROPERTY_TRUE);
-- You MUST do this for each of the items in the row of your multirecord block. There is no built-in to set the properties
-- all of the items in a row...
END;
This sample code is untested and it meant to show you the logic, not the actual functioning code.
Hope this helps.
Craig... -
How to enable/disable the input fields based on the data entered in the web dynpro application abap? If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.
Hi,
Try this code.
First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
Next go to Init method.
Set the readonly value as 'X'.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_visible TYPE wd_this->element_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* @TODO fill attribute
* lv_visible = 1.
* set single attribute
lo_el_context->set_attribute(
name = `READONLY`
value = 'X').
After that Go to the Action ENTER.
First read the input field ( first input field, which is value entered field) , next give a condition
if input value is not initial then set the readonly value is ' '.
DATA lo_nd_input TYPE REF TO if_wd_context_node.
DATA lo_el_input TYPE REF TO if_wd_context_element.
DATA ls_input TYPE wd_this->element_input.
DATA lv_vbeln TYPE wd_this->element_input-vbeln.
* navigate from <CONTEXT> to <INPUT> via lead selection
lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
* @TODO handle non existant child
* IF lo_nd_input IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_input = lo_nd_input->get_element( ).
* @TODO handle not set lead selection
IF lo_el_input IS INITIAL.
ENDIF.
* get single attribute
lo_el_input->get_attribute(
EXPORTING
name = `VBELN`
IMPORTING
value = lv_vbeln ).
if lv_vbeln IS not INITIAL.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_visible TYPE wd_this->element_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* @TODO fill attribute
* lv_visible = 1.
* set single attribute
lo_el_context->set_attribute(
name = `READONLY`
value = ' ' ).
Maybe you are looking for
-
I am trying to connect my macbook pro to a windows 7 server pc.
I am trying to connect my macbook pro to a windows 7 server pc. I keep getting a connection failed message saying "The server is available on your computer. Access the volumes and files locally". Any ideas on how to resolve this? I cannot find the t
-
Question about Panel,toolbar and scrolling
I have Panel that contains a ControlBar at the top, and a DataGrid that takes up most of the space. All good. However. When the Panel scrollbars appear. It scrolls not only the grid, but, also the ControlBar. Is there a way to prevent the panel from
-
ORA-06503 Function returned without value
Hi All, I'm getting ORA-06503: PL/SQL: Function returned without value error on this function..... can u guide me where Im going wrong? Cheers! I FUNCTION XX(P_Trial_No IN PATIENT_VISITS.TRIAL_NO%TYPE, P_PATIENT_VISIT_NO IN PATIENT_VISITS.PATIENT_VIS
-
I received the same error log loading OS X Mavericks On different hard drives at different times of the day yet log file is identical! Send to Apple gives same response "unable to submit crash report log in OS install environment!" "The certificate f
-
IMovie cropping edges of vidcap in final output
When I am editing in iMovie, the video screen capture looks fine, but after exporting to QT, the output seems to be truncated on the right and left edges. Or the image could be expanded slightly in the frame. Has anybody run into this and if so, any