Validation by using Database Table Values
Dear Experts,
Please suggest us how can we validate the user input values with our database table values in ADF.
thanks in advance
Shiv Naresh
Take a look at Edwin Biemonds blogpost.
Using database tables as authentication provider in WebLogic
http://biemond.blogspot.de/2008/12/using-database-tables-as-authentication.html
Similar Messages
-
Submititng the program to another program using internal table values
Hi All,
How to Submit from one program to another program using internal table values minimum 7 int tables without using the seletion screen
thanks
rajHi All,
Thank you very much for your inputs.
i am facing another issue:
For each 10,000 records it should trigger a job (we are trying to call a program) were the validation will be done only through the other program.
please find the code mentioned below :
TABLES : but000.
DATA: int_bp LIKE but000 OCCURS 0 WITH HEADER LINE.
data released like BTCH0000-CHAR1.
DATA: jobnumber LIKE tbtcjob-jobcount, " Job ID and
jobname LIKE tbtcjob-jobname, " job name.
startdate LIKE tbtcjob-sdlstrtdt, " Start-time
starttime LIKE tbtcjob-sdlstrttm, " window specs.
laststartdate LIKE tbtcjob-laststrtdt,
laststarttime LIKE tbtcjob-laststrttm,
job_released LIKE btch0000-char1. " JOB_CLOSE: Was job released?
DATA : l1 TYPE i,
b_size TYPE i,
b_cursor TYPE cursor.
INITIALIZATION.
b_size = 5000.
START-OF-SELECTION.
OPEN CURSOR WITH HOLD b_cursor
FOR
SELECT *
FROM but000
WHERE bpkind = 'AA'.
IF sy-subrc = 0.
DO.
FETCH NEXT CURSOR b_cursor INTO TABLE int_bp
PACKAGE SIZE b_size.
Note : here in this point we are getting a dump for the second job trigger.
IF sy-subrc = 0.
CLEAR jobname.
CONCATENATE sy-repid sy-datum sy-uzeit INTO jobname.
export int_bp to memory id 'ABC'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobnumber.
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobname = jobname
jobcount = jobnumber
report = 'YTEST_RRR'.
variant = lv_variant.
SUBMIT ytest_rrr
VIA JOB jobname NUMBER jobnumber
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
event_periodic = 'X'
jobcount = jobnumber
jobname = jobname
strtimmed = 'X'
IMPORTING
job_was_released = released
else.
EXIT.
ENDIF.
ENDDO.
calling program :
REPORT YTEST_RRR .
data itab1 like but000 occurs 0 with header line.
data l type i.
import itab1 from memory id 'ABC' .
describe table itab1 lines l.
free memory id 'ABC'.
write:/ 'total records are:', l.
Please give your suggestion why its going for dump in the second iteration.
thanks in advance. -
Thread pool and use database table as queue
is this possible to use database table as queue rather than using "LinkedBlockingQueue"..and store in memory ? If yes, how do i serialized the task object into table and how to retrieve the task object back when need to be execute by executorservice..?
cometta wrote:
is this possible to use database table as queue rather than using "LinkedBlockingQueue"..and store in memory ? If yes, how do i serialized the task object into table and how to retrieve the task object back when need to be execute by executorservice..?From the sound of this I think BDLH is on the right track. I would think in terms of messaging with JMS. There is one potential pitfall you may have to work around. JMS does not guarantee the order in which messages will be extracted from the queue. If the order of messages is important that is a problem you'll have to solve.
PS. -
Use of Table Valued Parameter to restore databases
I'm a noob with table valued parameters. Not sure if I can use TVP for what I need to do. I want to restore/refresh multiple databases from arbitrary number of .BAK files. I can successfully populate a TVP with the needed
source information which includes:
Database name
File/device name (i.e., xxx.BAK file)
Logical data file name
Logical log file name
Now I want to create a stored procedure that contains Restore Database command like this:
RESTORE DATABASE <@database name>
FROM <@path and name of .bak file>
WITH MOVE <@logical data file> TO <new path and file name>,
MOVE <@logical log file name> TO <new path and file name>;
Can I replace those variables with the column values in the TVP? I'm not sure because all the stored proc examples I see simply insert rows from the TVP into rows of an existing table.Yes, but you would need to run a cursor of your TVP:
DECLARE cur CURSOR STATIC LOCAL FOR
SELECT db, path, logical_data_file, new_data_path, logical_log_file,
new_logfile_apth
FROM @TVP
OPEN cur
WHILE 1 = 1
BEGIN
FETCH cur INTO @db, @path, @logical_data_file, @new_data_path,
@new_logical_log_file, @new_logfile_path
IF @@fetch_status <> 0
BREAK
RESTORE DATABASE @db FROM DISK = @path
WITH MOVE @logical_data_file TO @new_data_path,
MOVE @new_logical_log_file, @new_logfile_pth
END
DEALLOCATE cur
Erland Sommarskog, SQL Server MVP, [email protected] -
Define hashed table using database table
Hi,
I have a database table and would want to define a hashed table using this table structure, how would I do that?
Thanks
RTHi Rob,
The syntax is as follows,
DATA ITAB TYPE HASHED TABLE OF SPFLI
WITH UNIQUE KEY CARRID CONNID.
The table object ITAB has the type hashed table, a line type corresponding to the flat structure SPFLI from the ABAP Dictionary, and a unique key with the key fields CARRID and CONNID. The internal table ITAB can be regarded as an internal template for the database table SPFLI. It is therefore particularly suitable for working with data from this database table as long as you only access it using the key. -
Use database table in different system?
Hi, experts,
I am new to WD. I have a question here:
For example, now my WD application is in IB* system and the database table I need is in IS* system. I want to create functions in IB* system to operate the data from database table in IS* system and I will then use BAPI to call the created functions to transfer the results to WD. Is this possible?
Best Regards
FanHi, Jagdish,
thank you for your reply. Do I need to do anything special to call the function module in another system? Or the WD wizard of making service call will automaticlly identify the position of the needed function module after i specify the name of the function module?
Best Regards
Fan -
How can I list used database/table size resp user space ? Compression after
How can I list used + maximum tablespace/database/table size of an Oracle database ?
How can I list the space used currently by a user resp. his tables+indizes ?
By the way: If I delete a user or table from an Oracle database installation: are then only the entires deleted
or is the space released as well ?
In otherwords: After I deleted a user resp. table is it recommended to do something like a "compress" similarly to Outlook
or other eMail clients to shrink really the occupied space on hard disc ?I hope this helps you
select df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
df.totalspace "Total MB",
round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
"Pct. Free"
from
(select tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from dba_data_files
group by tablespace_name) df,
(select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
from dba_segments
group by tablespace_name) tu
where df.tablespace_name = tu.tablespace_name; -
Passing database table values to drop down list list using "vrm_set_values"
DEar Experts,
How can we pass database travel to drop down list using vrm_set_value call function.
Looking forward for advise from you experts .
REgards
CHandanDear Anubhab,
Thanks for your suggestion,
Plz see my code:
Type-pools: vrm.
DATA: it_zlt_mita TYPE STANDARD TABLE OF Zlt_mita,
wa_zlt_mita TYPE zlt_mita,
it_vrm TYPE vrm_values with header line .
Selection-Screen: Begin of Block b1 With Frame Title text-001.
Parameters:
p_mitar Type Zlt_mita-M1 as listbox visible length 20 user-command zcc01 obligatory,
p_mitarn Type Zlt_mita-M2.
Selection-Screen : End of Block b1.
AT SELECTION-SCREEN OUTPUT.
Select * From ZLT_mita INTO CORRESPONDING FIELDS OF TABLE it_zlt_mita.
LOOP at it_zlt_mita into wa_zlt_mita.
it_vrm-key = wa_zlt_mita-m2.
it_vrm-text = wa_zlt_mita-m1.
APPEND it_vrm.
Clear: it_vrm, wa_zlt_mita.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_mitar'
values = it_vrm[]
* EXCEPTIONS
* ID_ILLEGAL_NAME = 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.
Data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'p_mitar'.
Append dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = 1000 " can I use sy-dynnr here
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
tables
dynpfields = dynfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* INVALID_PARAMETER = 7
* UNDEFIND_ERROR = 8
* DOUBLE_CONVERSION = 9
* STEPL_NOT_FOUND = 10
* OTHERS = 11
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 FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = 1000
tables
dynpfields = dynfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PLZ SUGGEST ME IF ANYWHERE I WENT WRONG IN MY CONCEPT AS PER YOUR SUGGESTION.
Looking forward for your further guidance.
Regards
Chandan -
How to use a table- valued function as a datasource for SSRS report?
CREATE FUNCTION [dbo].[GetNetSheetRegionNetPerCapitaRow](@WeekBeginDate smalldatetime)
RETURNS @RegionNetPerCapitaRow TABLE
(WTD1 DECIMAL(18,6),PYWTD1 decimal(18,6),percentDiff1 float,diff1 float,WTD2 decimal(18,6),YTD2 decimal(18,6),percentDiff2 float,Diff2 float,YTD3 decimal(18,6),PYTD3 decimal(18,6),percentDiff3 float,Diff3 float)
how to use the above function as a data source for SSRS report instead of a stored procedure ?Hi,
In the Dataset - > Query Type - > Text - >
SELECT * FROM [dbo].[GetNetSheetRegionNetPerCapitaRow](@WeekBeginDate)
sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **. -
How to use nested table values in IN expression?
Hi!
Can someone please give me a hint to the correct syntax for this:
declare
TYPE numtable is table of number;
tt numtable;
begin
select myId bulk collect into tt from some_table;
update some_other_table set name = 'kakadu' where xId in (select * from tt); -- this line is wrong as it is
end;What I am doing is fixing a stored procedure that was like this before:
update table_a set name = 'kakadu' where column_X in (select one.A from table_1 one join table_a on x y z WHERE a b c);
update table_b set name = 'nimfa' where column_Y in (select one.B from table_1 one join table_a on x y z WHERE a b c);The problem is, the first UPDATE changes the result of the SELECT, so I want to "remember" it.
A and B are columns in table_1, A is the primary key. So the fixed code would be like:
-- store the list of selected IDs from table_1
select A bulk collect into tt from table_1 one join table_a on x y z WHERE a b c ; -- same conditions as in old code
-- do the updates
update table_a set name = 'kakadu' where column_X in (select * from tt);
update table_b set name = 'nimfa' where column_Y in (select one.B from table_1 one where one.A in tt);(it can be a varray instead of nested table, as far as I am concerned)
Thanks,
DavidYes, it needs to be a SQL type
Re: How to pass an array to a function from a SELECT statement
Or you can use a built in SQL type (version dependent)
Re: Collection in where not working -
Use destination table values in source to get data
I have a requirement to get data from source table to destination table. Source is oracle say tablename - 'orasource' fielnames=empid, empname and destination table name is 'sqldest' and field name are empid, empname.
My requirement - I want to fetch only those rows from source based on destination table 'sqldest' and field name is empid. How do I do this?I am desperatly looking help...
Approach 1 - created two variables - oraquery string, empid string
step1 - ms sql database - created sql task - declare @empid varchar(max)
SELECT @empid=
Stuff((SELECT ',' + empid
FROM
(SELECT DISTINCT convert(varchar(10),empid ) empid FROM emp
) x
For XML PATH ('')),1,1,'')
select @empid = '(' + @empid + ')'
select @empid
resultset=singlerow
resultset=resultname=0; variablename=User::empid (empid is declared as string)
step2 - oracle database - created data flow task
created oledb source
I put this statemnt in oraquery expression - "select * from dept where dept in "
+ @[User::empid] + "
expression=true
[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E14 Description: "ORA-00936: missing expression
If I put this statement in above, then it is working fine.
SELECT top 10 convert(varchar(10),empid ) empid FROM emp
Approach-2
created three variables - oraquery string, empid int, loop object--when I put int then it is automatically setting to 0
step1 - ms sql database - created sql task - SELECT DISTINCT convert(varchar(10),empid ) empid FROM emp
resultset=fullresult
resultset=resultname=0; variablename=User::loop
step2 - created a for each loop container
for loop editor - for each ado ennumerator
enumerator configuration - loop
variablemapping - variable=empid;index=0
step3 - oracle database - created data flow task (outside for each loop. If I put inside it is taking long time)
created oledb source
I put this statemnt in oraquery expression - "select * from dept where dept in "
+ @[User::empid] + "
expression=true
Data inserting in a destination table but empid=0. -
1) create a new datagrid with from scratch option
2) Define columns names for example: A(type: String), B (Type: String)
3) It saves the grid information apex_ws_data_grid with data_grid_id and data_grid_name or
Add 1 dummy row to appear in the APEX$_WS_ROWS table. For example (1 ,1)
4) Issue Insert:
INSERT into APEX$_WS_ROWS ( ws_app_id, data_grid_id, owner, c001, c002)
SELECT '107', '1380030299403107','ABC', A, B
FROM table
Delete the dummy row, you created.
Thanks.
Edited by: user-Rachel on Aug 3, 2010 1:06 PMHi Steve,
The endpoint would be the in the mxml file as part of the generated code. If you have used the service using the "Bind To Data" dialog, It would be part of the declarations tag in the mxml file as shown below.
>>
<YourService :YourService id="YourService" destination="YourService" endpoint="http://localhost/YourProject-debug/gateway.php" fault="Alert.show(event.fault.faultString)" showBusyCursor="true" source="yourService"/>
<<
The localhost needs to be changed to the server, where you are deploying your swf.Also the YourProject-debug folder to the directory under the webroot where you have copied the swf files and the corresponding php files.
Hope this helps.
Thanks
-Sunil -
Hi All,
I have to maintain a huge SharePoint 2010 list with more than 700,000 items in it. The items are data records(not documents) and are distributed among a number of folders. There are also a number webparts that are currently using this list. As you can imagine
the performance of queries on the list have degraded considerably. Even opening the folders with too many items in them takes quite some time. We are looking for a solution for this situation and some people suggested to move the list items to a SQL Server
table and make an external list representing the original list. They think this way the changes that we have to make in the webparts source codes will be minimal.
I am not sure if this is the best solution as I have heard about slow external lists. Do you think using the external list instead of our current list improves the performance? Do you think this is the right solution for us?
I would be grateful if you tell me your ideas to solve this problem.
Thanks in advance"right solution for us" is hard to solve without more info.
SharePoint list items can include things like version history, content approval, audit tracking, and more... such things are NOT built into SQL.
BCS is an option, and generally changing a list CAN have a very minimal impact (making many assumptions about how it's used)...
BCS also incurs an overhead of the lookup (since it's external). And there are record limits (defaults at a minimum).
And more importantly, SharePoint *can* handle large lists... if done appropriately... but can also be mis-handled.
The limits imposed on large lists by SharePoint, are largely attributable DIRECTLY BACK TO SQL (specifically, the number of records that can be obtained with ROW locks before switching to PAGE locks or TABLE locks, which have LARGER impacts).
So again, BCS is an option, but whether it's the "right solution for us" is more dependent. Plus, you would probably also benefit by spending some time investigating the other uses (web parts/etc) for opportunities to improve their performance,
user experience, etc.
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
How to use Table valued MSSQL function in OBIEE
Hi all,
Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
I know for MSSQL Stored Procedure we can write as
EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
but now I have a table valued function in the query window I can get the data as
select * from myfunction(parametervalue)
In physical layer of OBIEE I have tried as
select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
Can some one help me to solve this.
Thanks,
MithunFollow this link and try yourself. let me know for issues
Substring instr issue in obiee
Appreciate if you mark
Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM -
How to edit database table in jsf
Hi all!
Can anyone give me some clue or link on editing database table in jsf, i have got the database table values shown using h:dataTable but i'm unable to edit and save them in database,i also want to perform jsf validation while editing so that illegal values may not be entered?
Thanks in advance.Tougher than what? I suggest you try again. It is all there, including sample code, which is a lot more than you're ever going to get here. If you have a specific question, ask it. But just bleating that it's all too hard isn't going to get you anywhere, here as in life.
Maybe you are looking for
-
IPhone not recognized by iTunes (windows XP)
Problem: On home computer, when iPhone is pluged into pc, iTunes does not recognize it, nor does it give me any sign that it has detect it. I have an Windows XP machine running most recent iTunes. I also have a 3rd Gen iPod that has been working with
-
How to mirror my components ?
I made a swing UI application with buttons, label etc... I d like to know how to mirror the displaying of all this components so as to support mutli-language (arabic for example). To sum up, I want the buttons that are on the left to go on the right
-
XML data repository and Search
I am looking for a tool/technology to stored huge number of XML documents probably as BLOBS and search on them using XPath/XQL Is Oracle right technology for it? I heard about Intermedia. Is it a product from Oracle suite which does that. Could you p
-
TS3694 Has anyone ever had an error code -1202? Cannot find any info on it, please help
Has anyone ever had an error code -1202? Cannot find any info on it, please help
-
My CAT 4510 switch is showing 99.9% CPU usage almost through out the day. After some analysis i saw that the "Cat4k Mgmt LoPri" process is having 86% CPU utilization. This process is a package that is including multiple process. 2. Within this