Enabling Insert allowed for particualr records in a block,
Hi All,
I have a requirement to enable insert allowed(and delete allowed) button for only particular records(say for all records where column1=2) and for all other values that insert allowed button should be disabled.
I tried setting the property
SET_BLOCK_PROPERTY for insert allowed for my block, in new_block_instance.
when i'm querying the first time with column1=2, its working fine.
But, when im querying my blcok with column1=5 and then requerying the block with column1=2, im facing issue. insert allowed button is disabled here.
Not sure, whether this can be achieved or not using this way. Please suggest me if there is any other ways we can do in oracle forms.
Thanks & regards,
Pavan Kumar
I have used the below code in when new record instance at block level,
IF event='INSERT'
THEN
IF :xxscp_gbl_exp_detail_v.order_type=5
THEN
SET_BLOCK_PROPERTY('XXSCP_GBL_EXP_DETAIL_V',
insert_allowed,
property_true);
ELSE
SET_BLOCK_PROPERTY('XXSCP_GBL_EXP_DETAIL_V',
insert_allowed,
property_false);
END IF;
END IF;
as i already told, it work when i directly search with order_type=5.
But not working, when i first search with order_type=1 and then with order type 5.
Thanks in advance,
pavan
Similar Messages
-
Hi,
for example, in student table i am having 1000 columns, column names like(id ,name,class, dept,etc,.).
i want to insert 998 fields to department table from student tables except(id,class).
i don't want to mention all column names in the insert command,
is there any possibilities to filter the column names in insert command like (EXCEPT, NOT IN).
Thanks in advance..duplicate of
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b31fa034-5b8f-42e4-b4e1-592a632ca6a5/inserting-values-for-all-records-except-1-or-2-column-without-specify-column-names?forum=sqlce
please dont cross post
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to get the total record in the block before save them
Hello,
I need to recalculate the amout for all records in one block before saving them.
How can I get it?
Thanks for your helpingYou write a loop, something like this:
Go_block('B1');
If not form_success then
Raise Form_Trigger_failure;
End if;
First_Record;
If not form_success then
Raise Form_Trigger_failure;
End if;
Loop
If :system.record_status in('CHANGED','INSERT') then
-- modify the record here--
End if;
Exit when :System.Last_Record = 'TRUE';
Next_Record;
End Loop;
First_Record;But be very careful-- If your block can fetch a large number of rows, (over 100), this loop can take a long time, and you should not use this method. The loop will continue fetching more rows from the database until all rows satisfying the query are retrieved. -
Delete Allowed Property For Current Record
I have a requirement where I need to make a record allowed proeprty delete_allowed as false.
Eg:
If :variable:='YES' then
SET_ITEM_INSTANCE_PROPERTY('block_name.item',CURRENT_RECORD,UPDATE_ALLOWED,PROPERTY_FALSE);
end if;
I cannot set delete_allowed property here, so how can I set delete allowed property to false?
if I use
SET_ITEM_PROPERTY('block_name.item',ENABLED,PROPERTY_FALSE);
it will set property for all the records in the block, I have a multi-record block
I am using Oracle Forms 10g
ThanksThanks for the reply.
Yes I was thinking of doing this.
if I put a validation in key-delrec trigger, then do I need to explicitly call a commit or any other method to delete a record if condition is not true?
Eg:
If :variable:='YES' then
Message(' DELETE IS NOT ALLOWED');
Raise Form_Trigger_Failure;
ELSE
commit or delete_record;
End if; -
I have a m-audio producer usb microphone and since the update on Dec. 22, 2013 Logic hasn't been allowing me to record with it. Logic is reading the microphone as the input but the audio tracks don't have the record enable button and won't let me select an input for the audio track on the inspector panel. What are some possible solutions.
Certain M-Audio USB devices (along with some other USB2 class compliant devices that don't use drivers) no longer work with Logic Pro X 10.0.5
At this time it is unknown as to why this has happened. Nor is it known if Apple will need to fix it or if it is up to the Developers of said USB2 devices to remedy the problem.
In the mean time, assuming you made/could make backups prior to updating to 10.0.5.... the solution is to roll back to LPX 10.0.4... -
Check for duplicate record in SQL database before doing INSERT
Hey guys,
This is part powershell app doing a SQL insert. BUt my question really relates to the SQL insert. I need to do a check of the database PRIOR to doing the insert to check for duplicate records and if it exists then that record needs
to be overwritten. I'm not sure how to accomplish this task. My back end is a SQL 2000 Server. I'm piping the data into my insert statement from a powershell FileSystemWatcher app. In my scenario here if the file dumped into a directory starts with I it gets
written to a SQL database otherwise it gets written to an Access Table. I know silly, but thats the environment im in. haha.
Any help is appreciated.
Thanks in Advance
Rich T.
#### DEFINE WATCH FOLDERS AND DEFAULT FILE EXTENSION TO WATCH FOR ####
$cofa_folder = '\\cpsfs001\Data_pvs\TestCofA'
$bulk_folder = '\\cpsfs001\PVS\Subsidiary\Nolwood\McWood\POD'
$filter = '*.tif'
$cofa = New-Object IO.FileSystemWatcher $cofa_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
$bulk = New-Object IO.FileSystemWatcher $bulk_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
#### CERTIFICATE OF ANALYSIS AND PACKAGE SHIPPER PROCESSING ####
Register-ObjectEvent $cofa Created -SourceIdentifier COFA/PACKAGE -Action {
$name = $Event.SourceEventArgs.Name
$changeType = $Event.SourceEventArgs.ChangeType
$timeStamp = $Event.TimeGenerated
#### CERTIFICATE OF ANALYSIS PROCESS BEGINS ####
$test=$name.StartsWith("I")
if ($test -eq $true) {
$pos = $name.IndexOf(".")
$left=$name.substring(0,$pos)
$pos = $left.IndexOf("L")
$tempItem=$left.substring(0,$pos)
$lot = $left.Substring($pos + 1)
$item=$tempItem.Substring(1)
Write-Host "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp" -fore green
Out-File -FilePath c:\OutputLogs\CofA.csv -Append -InputObject "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp"
start-sleep -s 5
$conn = New-Object System.Data.SqlClient.SqlConnection("Data Source=PVSNTDB33; Initial Catalog=adagecopy_daily; Integrated Security=TRUE")
$conn.Open()
$insert_stmt = "INSERT INTO in_cofa_pvs (in_item_key, in_lot_key, imgfileName, in_cofa_crtdt) VALUES ('$item','$lot','$name','$timestamp')"
$cmd = $conn.CreateCommand()
$cmd.CommandText = $insert_stmt
$cmd.ExecuteNonQuery()
$conn.Close()
#### PACKAGE SHIPPER PROCESS BEGINS ####
elseif ($test -eq $false) {
$pos = $name.IndexOf(".")
$left=$name.substring(0,$pos)
$pos = $left.IndexOf("O")
$tempItem=$left.substring(0,$pos)
$order = $left.Substring($pos + 1)
$shipid=$tempItem.Substring(1)
Write-Host "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp" -fore green
Out-File -FilePath c:\OutputLogs\PackageShipper.csv -Append -InputObject "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp"
Rich ThompsonHi
Since SQL Server 2000 has been out of support, I recommend you to upgrade the SQL Server 2000 to a higher version, such as SQL Server 2005 or SQL Server 2008.
According to your description, you can try the following methods to check duplicate record in SQL Server.
1. You can use
RAISERROR to check the duplicate record, if exists then RAISERROR unless insert accordingly, code block is given below:
IF EXISTS (SELECT 1 FROM TableName AS t
WHERE t.Column1 = @ Column1
AND t.Column2 = @ Column2)
BEGIN
RAISERROR(‘Duplicate records’,18,1)
END
ELSE
BEGIN
INSERT INTO TableName (Column1, Column2, Column3)
SELECT @ Column1, @ Column2, @ Column3
END
2. Also you can create UNIQUE INDEX or UNIQUE CONSTRAINT on the column of a table, when you try to INSERT a value that conflicts with the INDEX/CONSTRAINT, an exception will be thrown.
Add the unique index:
CREATE UNIQUE INDEX Unique_Index_name ON TableName(ColumnName)
Add the unique constraint:
ALTER TABLE TableName
ADD CONSTRAINT Unique_Contraint_Name
UNIQUE (ColumnName)
Thanks
Lydia Zhang -
INSERT works for only last record of the Internal table ...??
I am trying to insert data from an internal table JTAB to a Databse Table
in CRM. The name of the databse table in CRM is CRMD_PARTNER
For this i first declared an internal table JTAB with same structure as that of
the databse table CRMD_PARTNER
DATA: BEGIN OF JTAB OCCURS 0,
INCLUDE STRUCTURE CRMD_PARTNER,
END OF JTAB.
Then I filled my JTAB with the required entries. For filling the JTAB i am
getting data from couple of other tables and filling the internal table JTAB
loop at ktab.
here i am filling values in JTAB and then i say APPEND JTAB.
endloop.
Till here every thing works well and my internal table JTAB has all values that
I need to insert to the CRMD_PARTNER table. Also my JTAB has vales for all primary key fields.
Now I write a condition like below.
if not jtab[] inital.
MODIFY CRMD_PARTNER from TABLE JTAB.
COMMIT WORK.
endif.
Here comes the problem...once this code is executed and once program totally executes...
i always see that only last record in JTAB is being inserted to the databse table CRMD_PARTNER.
When i check in the debugger ..i see that the loop is being executed only once
and the SY-TABIX of JTAB is being always set to the length of JTAB and
that is why only last record is being inseretd to the table CRMD_PARTNER.
Now what should i do ..to insert all records of JTAB to CRMD_PARTNER table?
is there a way i can restet the SY-TABIX and make the modify statement work for all records of JTAB?
Finally i hardcoded the values in JTAB then i dont have any problem and all records of JTAB are being
inserted into the database table.
only if i am dynamically fetching the values into JTAB(by Putting in loop..endloop statements and
pushing values to JTAB and APPENDING JTAB ) i have a problem .
in this case also my JTAB is being correctly filled with values ..but when i try to
insert theses values to CRMD_PARTNER with MODIFY stmt ..only always last record is being inserted.
i tried with INSERT instead of MODIFY and i am getting runtime error.
kindly pease help.
Regards,
Jessica Samyes a@s i am really struggling from last 3 days.
I actually want to create a sales order in CRM and want to
assign ship to party for each line item in a sales order in CRM
for that i used the standard bapi BAPI_BUSPROCESSND_CREATEMULTI and i am able
to create an order successfully, but i see that the ship toparty
that i give at header is being copied to each line item.
but this is not what is expected.
So finally i tracked in which table the ship to party gets stored in each line item
and then tried to insert the records directly into databse. and it worked
but only if i am hardcoding..but not when i am dynamically fecthing the values into JTAB for insertion,
Can yoy help ..if you have any idea why insert/modify is processing only last record?
any help will be highly appreciated.
Regards,
Jessica Sam -
Only records of less than one day allowed for attendance/absence type 1002
Hi All,
I am getting an error while maintaining my sick leave absence type
"Only records of less than one day allowed for attendance/absence type 1002"
how to resolve this
SDBcz recently i made a change like this
For our sick leave
"First 14 days(1- 2 weeks) Full Salary
Next 14 days (3- 4 weeks) 75% Salary
Next 14 days (5- 6 weeks) 50% salary
Next 28 days (7- 10 Weeks) 25 % Salary
More than 10 Weeks no Salary"
so what i did is
I mantain one Sick leave type and counting rule as -
seq no 1 for "First 14 days(1- 2 weeks) Full Salary
seq no 2 for Next 14 days (3- 4 weeks) 75% Salary
like this for all the conditions
and in deduction rule I maintained deifferent Absence quotas
Plz suggest me this solution will work out
SD -
Only records of less than one day allowed for attendance/absence type COMP
Hi Friends
I configured all the process in IMG for compensatory off
ie ,Absence types,Attendance Types ,counting rules and assignment
but when I tried to create attendances on a particular public holiday in PA 30 then the system shows 'Only records of less than one day allowed for attendance/absence type COMP' (Compensatory Off)
Anyone pls help me to solve this problem
regards
LakshmiHi
In PA30 which infotype I should maintain and where I can see the result.
Eg If the person works on 25/12/2007(public holiday) ,he wants to take compensatory off on the next working day.
In this case How I can configure
Pls help
Regards
Lakshmi -
how do I enable the "fn + enter" key to work as an "insert" function for windows on my mac laptop?
enable /disable function within the Bootcamp control panel within Windows Vista or 7
-
Record inserted (for all records) datetime
Hi All,
I want to find out the record inserted (for all records) datetime for each and every records. If there is any way please let me know.
Thanking YouHi,
There is no way of finding datetime unless you have a column dedicated for this.
Normally, designers add columns related to auditing like who and when inserted the record and who and when modified the record. Something like this:
desc my_emp
(empno number,
ename varchar2(30),
create_user varchar2(30),
create_date date,
update_user varchar2(30),
update_date date) -
I have an attachment to my iPod Classic that allows me to record. However, when the hard drive died on my last computer I lost the software that allowed me to transfer files for burning CD's or email, etc. I don't remember have an attachment to my iPod Classic that allows me to record. However, when the hard drive died on my last computer I lost the software that allowed me to transfer files for burning CD's or email, etc. I don't remember where I got the software and the package with the instructions is long gone. Anyone know where to get it?
What is the make and model of this recorder? Do you have that information available?
You can still use iTunes to transfer and manage your recorded audio.
iPod: Recording voice memos
B-rock -
Had problems with Flash not working. Windows 7, IE 9(?)latest. Uninstalled Flash, reinstalled Flash. Problems look like Flash never reinstalled ok. Can't see the "Clowds" shows version 15 installed. Had Flash Professional installed, reinstalled tha too, no luck. I get "webpage wants to use Flash msg constantly at bottom of IE9. "Allow/Allow for all sites" Add on for Flash is in IE9, and Enabled. Please help!! reinstall IE? Thanks!
Here is the install log that is in the system32\Macromed
folder. This shows where the error is occuring and that the file
that will not install is Flash10b.ocx
File: wrote 3866528 to
"C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx"
IfFileExists: file
"C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx" exists, jumping
352
File: overwriteflag=4, allowskipfilesflag=2,
name="FlashUtil10b.exe"
File: wrote 240544 to
"C:\WINDOWS\system32\Macromed\Flash\FlashUtil10b.exe"
End Main Section
Section: ""
Start Post Section
Register Player
Error registering DLL: Could not load
C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx
Call: 997
CallFixDACLs
CreateDirectory: "C:\DOCUME~1\tr3Ks\LOCALS~1\Temp" (1)
File: overwriteflag=4, allowskipfilesflag=2,
name="FlashUtil10b.exe"
File: wrote 240544 to
"C:\DOCUME~1\tr3Ks\LOCALS~1\Temp\FlashUtil10b.exe"
Call: 1227
File: overwriteflag=1, allowskipfilesflag=0,
name="C:\DOCUME~1\tr3Ks\LOCALS~1\Temp\nsy10.tmp\nsExec.dll"
File: wrote 6144 to
"C:\DOCUME~1\tr3Ks\LOCALS~1\Temp\nsy10.tmp\nsExec.dll"
Delete: "C:\DOCUME~1\tr3Ks\LOCALS~1\Temp\FlashUtil10b.exe"
Delete:
DeleteFile("C:\DOCUME~1\tr3Ks\LOCALS~1\Temp\FlashUtil10b.exe")
CreateDirectory: "C:\WINDOWS\system32\Macromed\Flash" (1)
End CallFixDACLs
Jump: 356
Register Player
Error registering DLL: Could not load
C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx
MessageBox: 12582960,"Failed to install.
For troubleshooting tips, please see
http://www.adobe.com/go/tn_19166" -
Insert new Master Data Record for an InfoObject using a Function Module
Hi @ all,
is there any Function Module for creating a new master data record for an InfoObject? Implementing a FM for inserting a master data record into a master data table is done quickly. I think there will be problems with inconsistency implementing a FM using a simple "Insert" Statement. Isn´t it?
I know it is possible to maintain an InfoObject in RSA1 (Master data IO> right click>Maintain Master data>execute(F8)> ...) but I have another requirement for using a FM.
Thanks!
Regards,
Johannesuse this
RSNDI_MD_ATTRIBUTES_UPDATE -
Without result recording closing system should not allow for usage decesion
Hi
without result recording closing system should not allow for usage decision.I think it is possible through user status. Please tell the procedure .
Thanks and regards,
vairavanDear vairavan,
You can check for the authorisation object.I can't remember that authoriation object right now.But surely you can restrict that with authorisation object.
Anyone knows the authoristaion object.
Regards,
Sunil Patil
Maybe you are looking for
-
I am getting 2 warning messages in the event log about every 6 to 8 seconds and it is affecting the PC's performance significantly. Window XP and tried hard wired and wireless setup with same result. 1st message is with event ID 4 and says "printer .
-
Help - I'm a newbie to Mac and still need my Internet Explorer browser!
macbook pro Mac OS X (10.4.8) Hi - I just purchased a macbook pro and am in the process of designing a website - after encountering problem after problem, the hosting company figured out that I'm using a Mac, and said that their program doesn't s
-
XP Mode in Windows 7 Will Not Recognize my Vision:M 30gb
I am trying to attach a Creative Labs Zen Vision M: 30 GB MP3 player in my XP Mode on Windows 7 Professional. It shows in the drop-down under USB and I 'attach' it. However, for some reason, no program sees it and it's not showing in device manager o
-
Leading Zeros in Cost Center Account Creation
Hi All, I am creating new cost centers using KS01. The problem I have is that the numbering system that my client requires have leading zeros for some of the cost centers, e.g. 00702. However, the system is not taking the leading zeros and creating t
-
I have bought a Apple iMac with Retina 5K display yesterday! But today I read something negative about this Imac regarding to to Adobe Creative Cloud, - so I would ask if I can use this iMac with Retina 5K with all my Adobe Creative Cloud programs??