Using a database field in Condition
Hi,
I have created a subtype of BUS1065 (ZBUS1065) and added three new attributes;
1-) Job Key reading from IT0001
2-) A (check) field indicating if the new employee is eligible for health insurance (SAGLIKSIGORTASI), reading from a customer table with the key field Job Key
3-) A (check) field indicating if the new employee is to be provided an uniform, reading from the same customer table with the key field Job Key.
If I use the Job Key as a condition in the WF it works as it should be, however if I use SAGLIKSIGORTASI as the decision criteria system issues the following error:
"Error at start of an IF branch
Error when evaluating the IF condition for node 0000000075
Error when starting work item 000000418572
Operator 'EQ': The value of the left operand cannot be determined
Error in the evaluation of expression '&EMPLOYEE.AGGREGATE<???>.SAGLIKSIGORTASI&' for item '19'
Error when determining attribute 'SAGLIKSIGORTASI' of object instance '[BO.BUS1065.00050040]'
Work item 000000418572: Object FLOWITEM method EXECUTE cannot be executed
Error at start of an IF branch"
I'm testing the subtype object and see that all three fields are filled correctly. Any idea what I'm doing wrong?
Arghadip,
If I use the subtype (ZBUS1065) WF do not trigger, so I'm selecting BUS1065.
I think the attributes are getting poppulated, I have tested the object via SWO1. Please find below the results (JOBKEY, KIYAFET and SAGLIKSIGORTASI are customer attributes)
ZBUS1065 00050045
Attributes
ADMINISTRATOR 0 Entries
ADMINISTRATORPAYROLL 0 Entries
ADMINISTRATORTIME 0 Entries
EVENTTYPE 1 Entry
JOBKEY 51000083
KIYAFET X
LANGUAGE 1 Entry
NAME 1 Entry
NUMBER 00050045
OBJECTTYPE ZBUS1065
PAYROLLACCOUNTAREA 1 Entry
PERSONNELAREA 1 Entry
REASONFOREVENT 0 Entries
SAGLIKSIGORTASI X
STAFFING 1 Entry
STATUS 1 Entry
SUBGROUP 1 Entry
USER 0 Entries
USERID 0 Entries
I have used the wizard for the program and modified few things. You can find the code below.
1 ***** Implementation of object type ZBUS1065 *****
2 INCLUDE <OBJECT>.
3 BEGIN_DATA OBJECT. " Do not change.. DATA is generated
4 * only private members may be inserted into structure private
5 DATA:
6 " begin of private,
7 " to declare private attributes remove comments and
8 " insert private attributes here ...
9 " end of private,
10 BEGIN OF KEY,
11 NUMBER LIKE PAKEY-PERNR,
12 END OF KEY,
13 _PA0001 LIKE PA0001,
14 _ZHR_WF_JOBDETAIL LIKE ZHR_WF_JOBDETAIL.
15 END_DATA OBJECT. " Do not change.. DATA is generated
16
17 TABLES PA0001.
18 *
19 GET_TABLE_PROPERTY PA0001.
20 DATA SUBRC LIKE SY-SUBRC.
21 * Fill TABLES PA0001 to enable Object Manager Access to Table Properties
22 PERFORM SELECT_TABLE_PA0001 USING SUBRC.
23 IF SUBRC NE 0.
24 EXIT_OBJECT_NOT_FOUND.
25 ENDIF.
26 END_PROPERTY.
27 *
28 * Use Form also for other(virtual) Properties to fill TABLES PA0001
29 FORM SELECT_TABLE_PA0001 USING SUBRC LIKE SY-SUBRC.
30 * Select single * from PA0001, if OBJECT-_PA0001 is initial
31 IF OBJECT-_PA0001-MANDT IS INITIAL
32 AND OBJECT-_PA0001-PERNR IS INITIAL
33 AND OBJECT-_PA0001-SUBTY IS INITIAL
34 AND OBJECT-_PA0001-OBJPS IS INITIAL
35 AND OBJECT-_PA0001-SPRPS IS INITIAL
36 AND OBJECT-_PA0001-ENDDA IS INITIAL
37 AND OBJECT-_PA0001-BEGDA IS INITIAL
38 AND OBJECT-_PA0001-SEQNR IS INITIAL.
39 SELECT SINGLE * FROM PA0001 CLIENT SPECIFIED
40 WHERE MANDT = SY-MANDT
41 AND PERNR = OBJECT-KEY-NUMBER.
42 * AND SUBTY = ??????????
43 * AND OBJPS = ??????????
44 * AND SPRPS = ??????????
45 * AND ENDDA = ??????????
46 * AND BEGDA = ??????????
47 * AND SEQNR = ??????????.
48 SUBRC = SY-SUBRC.
49 IF SUBRC NE 0. EXIT. ENDIF.
50 OBJECT-_PA0001 = PA0001.
51 ELSE.
52 SUBRC = 0.
53 PA0001 = OBJECT-_PA0001.
54 ENDIF.
55 ENDFORM.
56
57 TABLES ZHR_WF_JOBDETAIL.
58 *
59 GET_TABLE_PROPERTY ZHR_WF_JOBDETAIL.
60 DATA SUBRC LIKE SY-SUBRC.
61 * Fill TABLES ZHR_WF_JOBDETAIL to enable Object Manager Access to
62 * Table Properties
63 PERFORM SELECT_TABLE_ZHR_WF_JOBDETAIL USING SUBRC.
64 IF SUBRC NE 0.
65 EXIT_OBJECT_NOT_FOUND.
66 ENDIF.
67 END_PROPERTY.
68 *
69 * Use Form also for other(virtual) Properties to fill TABLES
70 * ZHR_WF_JOBDETAIL
71 FORM SELECT_TABLE_ZHR_WF_JOBDETAIL USING SUBRC LIKE SY-SUBRC.
72 * Select single * from ZHR_WF_JOBDETAIL, if OBJECT-_ZHR_WF_JOBDETAIL
73 * is initial
74 IF OBJECT-_ZHR_WF_JOBDETAIL-MANDT IS INITIAL
75 AND OBJECT-_ZHR_WF_JOBDETAIL-STELL IS INITIAL.
76 SELECT SINGLE * FROM ZHR_WF_JOBDETAIL CLIENT SPECIFIED
77 WHERE MANDT = SY-MANDT
78 AND STELL = object-_pa0001-stell.
79 SUBRC = SY-SUBRC.
80 IF SUBRC NE 0. EXIT. ENDIF.
81 OBJECT-_ZHR_WF_JOBDETAIL = ZHR_WF_JOBDETAIL.
82 ELSE.
83 SUBRC = 0.
84 ZHR_WF_JOBDETAIL = OBJECT-_ZHR_WF_JOBDETAIL.
85 ENDIF.
86 ENDFORM.
Similar Messages
-
Is there a way to use a date field and conditionally change its LABEL?
Hi I have 2 date select lists and desire to change the label text at runtime.
If I use it for one query it would be Order Date, another it would be Start Date.
?? BillCVikas,
...a page template is a special case since everything is finally rendered on a page.Don't know what you mean.
references in page templates probably get evaluated first...References in page templates get replaced with their session state values when the portion of the page template containing the references is rendered, e.g., before the box, inside the box, after the box, in the footer..., and within each section each item reference is replaced "when it is encountered" with the current value of the item from session state.
There is a Before Footer computation that sets that item to the current timestamp.I see an "After Regions" computation. On your page, the form item is rendered using the current (from the previous page request) value of the item in session state. Then your compuation sets a new value. Then the remaining sections of the page template (after the regions) are rendered and you see the newly computed value in the footer section of the template.
Is there a way to pass in the current form item name to the shortcut so that I can have a generic shortcut that returns a different value for the label depending on which item it is being invoked from?Starting in XE and now in 2.2, you can use the strings #CURRENT_FORM_ELEMENT#, #CURRENT_ITEM_ID#, and #CURRENT_ITEM_NAME# in shortcuts. This makes PL/SQL Function shortcuts such as the following possible: if '#CURRENT_ITEM_NAME#' = 'P2_ENAME' then
return ('employee name');
elsif '#CURRENT_ITEM_NAME#' = 'P2_JOB' then
return ('job');
else
return ('foo');
end if; Scott -
How to display two database field in report
hi,
i have made a report and in that report i am displaying two fields with same data and these fields are database.In the FORM f_display_report i have given the same name in both fields.But when i going to SUM it gave me only one field SUM and other fields gives null.
give me some guidance as i have to display both fields with same data and same amount of SUM.
Thanksif i am using the database field i-e wt_qbshb then it gave me the data but when im going to sum both field it gave me sum of only one field.This the code:
ITAB:
BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the BEGIN OF gi_main OCCURS 1,
belnr LIKE bseg-belnr, " Document No.
buzei LIKE bseg-buzei, " Item
blart LIKE bkpf-blart, " Document Type
lifnr LIKE bseg-lifnr, " Vendor No.
lifntn LIKE lfa1-stcd2, " NTN
lifnic LIKE lfa1-stcd1, " CNIC
name1 LIKE lfa1-name1, " Vendor Name
stras LIKE lfa1-stras, " Address
ort01 LIKE lfa1-ort01, " City
qekar LIKE v_t059e-qekar, " Source of income Description
qscod LIKE v_t059z-qscod, " Section Code
budat LIKE bkpf-budat, " Date of Payment(DD/MM/YYYY).
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
qsatz LIKE v_t059z-qsatz, " Rate of WHT
dmbtr LIKE bseg-dmbtr, " WHT Base Amount
wt_qbshb LIKE with_item-wt_qbshb, " Amt of tax collected & deducted
AMT_TAX TYPE with_item-wt_qbshb, "Amt tax Deposited.
p_tax type sy-datum, " Date of Tax Deposited
witht LIKE t059z-witht, " WHT Type
wt_withcd LIKE t059z-wt_withcd, " WHT Code
hkont LIKE with_item-hkont, " Gl Code
text40 LIKE t059ot-text40, " Section Description
eatxt LIKE v_t059e-eatxt, " Source of Income Code
END OF gi_main,
and this is the PERFROM DISPLAY REPORT:
PERFORM fill_fieldcat USING 'LIFNTN' 11 'NTN' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'LIFNIC' 16 'NIC' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'LIFNR' 10 'Vendor' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'NAME1' 35 'Name' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'STRAS' 35 'Address' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'ORT01' 35 'City' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QEKAR' 40 'Nature of Payment etc' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QSCOD' 10 'Payment Section Code' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'BUDAT' 10 'Date of Payment(dd/mm/yyyy)' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'DMBTR' 20 'Value/Amount on which Tax Collected or Deducted' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'QSATZ' 10 'Rate of tax (%)' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'WT_QBSHB' 16 'Tax Amount Collected/Deducted' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'WT_QBSHB' 16 'Amount of Deposited' 'GI_MAIN'.
PERFORM fill_fieldcat USING 'P_TAX'(001) 15 'Date of Tax Deposited(DD/MM/YYYY)' 'GI_MAIN'.
Thanks. -
Filtering OVD with database field and not field which is used for mapping
Hi,
I have a requirement where we are using OVD and creating a dataabase adapter. In the database adapter, I want to put a condition to check whether Status = 0. This field is not used in mapping, but only for putting condition.
Can you please guide me how to put filter condition in OVD?
Thanking you,
Regards,
PrashantHi,
Use the floating field in Adobe.
Use a Static Text Field and Insert the Field EMPLOYEE_DETAIL-PERIOD from your Data View
Thanks.
Uma -
To read all the database fields used in a Crystal report 10 file using Vb 6 Code
Hi
Iam in development of an Application in Visual basic which lists all the
database fields used in a particular report (crystal 10)
In simple i need to show all the checked fields in the database fields section in field explorer section of the crystal report file.
regards
venkateshGPlease re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly
-
RE: What's database field are used in crystal report file?
Hi all
Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
We looking forward to hearing from you
Thanks
SonHello Son,
please use this code below to get a list of used database fields in a report :
//File Name: CS_Get_report_data_out_inproc.sln
//Created: April 11, 2008
//Author ID: FLI
//Purpose: This C# .NET sample Windows application demonstrates
// how to retrieve report data and put the into a XML file
// using unmanaged RAS.
// Note this is available without a dedicated RAS with SP2 for XI R2
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer.ClientDoc;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.ReportAppServer.DataDefModel;
namespace CS_Get_report_data_out_inproc
public partial class Form1 : Form
// CR Declarations
ReportDocument boReportDocument;
ISCDReportClientDocument boReportClientDocument;
public Form1()
InitializeComponent();
//Create a new ReportDocument
boReportDocument = new ReportDocument();
// load the RPT file
boReportDocument.Load("..
ReportData.rpt");
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument;
private void button1_Click(object sender, EventArgs e)
//Access the ReportClientDocument in the ReportDocument (EROM bridge)
boReportClientDocument = boReportDocument.ReportClientDocument;
// Retrieve the Rowset Controller
RowsetController boRowsetController = boReportClientDocument.RowsetController;
// Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
RowsetMetaData boRowsetMetaData = new RowsetMetaData();
Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
boRowsetMetaData.DataFields = boFields;
// Now print out the data in XML file
//(Note: This will print out the results of formulas too)
StreamWriter sw = new StreamWriter("C:
ReportData.xml", false);
sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
sw.WriteLine("<ReportData>");
sw.WriteLine("<Reportheader>");
// Print out the titles
for (int i = 0; i < boFields.Count; i++)
String boFieldName = boFields<i>.Name;
sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
sw.WriteLine("</Reportheader>");
//Create the cursor which lets us loop through the data
RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
Record boRecord;
while (boRowsetCursor.IsEOF == false)
sw.WriteLine("<Customer>");
boRecord = boRowsetCursor.CurrentRecord;
for (int j = 0; j < boFields.Count; j++)
try
sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
catch (Exception err)
sw.WriteLine("<Error>" + err.Message + "</Error>");
sw.WriteLine("</Customer>");
boRowsetCursor.MoveNext();
sw.WriteLine("</ReportData>");
// CLose the file
sw.Close();
MessageBox.Show("XML File 'ReportData.xml' successfully created on C:"); -
I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
the length of the string is prepended to the string itself as a big-endian four-byte integer.
I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
Am I missing something here?David,
You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
I am attaching three files that you can use to demonstrate the problem. The VI file c
ontains an explanation of the problem and instructions for installing and operating the demonstration.
Ron Martin
Attachments:
TestLongBinaryFields.vi 132 KB
Sample.UDL 1 KB
Sample.mdb 120 KB -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
Problem in database fields creation using default class of B1DE Wizard
Hi Experts
In an AddOn I am creating database fields in default class "Project_DB'. It does not give any message weather it creates fields or not. My code for database creation is given below
Namespace FormARE
Public Class FormARE_Db
Inherits B1Db
Public Sub New()
MyBase.New
B1Connections.theAppl.StatusBar.SetText("Please wait. AddOn is updating database", BoMessageTime.bmt_Long, BoStatusBarMessageType.smt_None)
Columns = New B1DbColumn() {New B1DbColumn("OCRD", "BondNo", "Bond No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BFrDate", "Bond From Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BTDate", "Bond To Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntner_no", "Container No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntnr_Seal", "Container Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cust_Seal", "Custom Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "ctryOrgn", "Country of Origin", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1)}
GC.Collect()
B1Connections.theAppl.StatusBar.SetText("Successfully updated database", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
End Sub
End Class
End Namespace
It does not give first message. and second message come properly and immediately when I start the AddOn. I checked it makes all fields accuratly. But when I open the related form it gives error message "Data Source not found". I checked fields name are same as used in form and database .What can the reason? Should I use a simple function for creation of database fields which will run when a button is pressed? Is it fine to using default class for database fields creation?
Thanks
Best Regards
JitenderI solved the problem.
Procedure I followed :
UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
'GLOBAL_NAMES = FALSE' in init.ora file.
RESTARTED MY MACHINE.
INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE. -
Custom selection field using Logical database
Hi All,
I have to create a program that would print out employee contracts from infotype 16.
I am using logical database PNPCE.
Is there a way to add "contract type" as a selection parameter in the screen that is generated by PNPCE?
Thanks,
~MarkHi,
Create CTTYP(Contract type) as input parameter in the program.
Then after GET PERNR.
write check stmt for that field like below.
PARAMETERS: p_cttyp type p0016-cttyp.
GET PERNR.
CHECK p0016-cttyp EQ p_cttyp.
Rewards points if helpful.
Regards,
Srinivas Ch -
Number database field treated as String in formula when using 64bit runtime
Hey just a quick shout out to those with the above problem or those following the now "closed but unanswered" thread by the same name - if you're getting "A string is required here" error messages after switching over to the 64-bit runtime, or other weird loss of formatting issues, then try turning off the "Verify on First Refresh" or "Verify Stored Procedures on First Refresh" options in File | Report Options... as the case may be.
Previous post was here.
Number database field treated as String in formula when using 64bit runtime
Thanks for the find ezachman. -
Removing or automatic fill the database field at login when using TWO_TASK
Couple of questions when using TWO_TASK on HP-UX
1. Is it possible to alter the login window, by removing the database field, as it is not needed anymore?
2. Is it possible to automatically fill the login window with the required database connect string?Hello,
Are you sure this question is relative to the Oracle Forms product ?
Francois -
Update sql server database field of type datetime using jsp
I'm working in a jsp applicaion which use SQL server 2000 as database. I need to update database field with current time, so I used a bean for that in which I used following method:
public java.sql.Time getSqlTime(){
Calendar cal=Calendar.getInstance();
cal.setTime(new Date());
java.sql.Time sqlTime=new java.sql.Time(cal.getTime().getTime());
return sqlTime;
when I print the time on a page using this method works properly, but I update a database field of type datetime, it takes correct time but updates with '01/01/1900 12:26:46 PM' like that. I need only time , how can I correct this?
Thank youpublic java.sql.Time getSqlTime(){
Calendar cal=Calendar.getInstance();
cal.setTime(new Date());
java.sql.Time sqlTime=new
java.sql.Time(cal.getTime().getTime());
return sqlTime;
}to get the Time for current time, you can just simply do
java.sql.Time sqlTime = new java.sql.Time(System.currentTimeMillis());I dun know about SQL server 2000... but thinked that you should declare you
field as time rather as datetime. -
How can I use a subsummary field in a calcultaion field in a database ???
how can I use a subsummary field in a calcultaion field in a database???? I need to use the average I get in my sorted records to make another calculation. Can this be done???
powerbook G4 Mac OS X (10.4.8)Calculation fields work with data that is contained in a single record.
Summary fields use data from the same field(s) in a range of records.
Summary field results can't be used in further calculations.
You may be able to define a summary field to include the average AND the further calculation that you need, but only if you do not want the results to be placed into a particular record or records.
A detailed description of the data you want to use and the result you want to achieve might lead to some ideas on whether it can be done, and how to do it.
Regards,
Barry -
Use formsweb.cfg to pre-populate database field on login screen?
Hello,
Is it possible to configure formsweb.cfg to pre-populate the 'Database' field on the Oracle forms login screen? I still want users to be able to overwrite what's entered there but just have it populated with something by default.
Thanks,
Andrew
Edited by: Andrew V on Nov 16, 2011 12:33 PMHi,
In Forms 10g you can set the userid parameter to something like "@DATABASEID LOGON_SCREEN=YES", where databaseid is your database server.
In Forms 11g this doesn't work so well, but I got round this by doing the following in our menu form, if you haven't got a single menu form then you may need to do this in all your forms where the user isn't already logged on when the form opens.
First off you need to set the userid parameter to something like "@DATABASEID".
Next an on-logon trigger is required in your menu or first form, I used the following:
on-logon trigger
DECLARE
cn VARCHAR2(80);
BEGIN
** Get the connection info
** If userid paramater in formsweb.cfg is set to '@<database>' or
** '@<database> login_screen=true' then this will put <database> into database field
** in default logon form
cn := Get_application_property(CONNECT_STRING);
if instr(cn,' ') > 0
then
cn := substr(cn,1,instr(cn,' ')-1);
end if;
LOGON(null,'@'||cn,TRUE);
if form_success
then :global.login_success := 'TRUE';
end if;
END;
Also, to deal with the situation where a user decides to click cancel in the logon screen, you need to put the following at the start of your wnfi trigger.
when-new-forms-instance trigger
default_value('FALSE','global.login_success');
if :global.login_success != 'TRUE'
then
erase('global.login_success');
exit_form;
end if;
erase('global.login_success');
Edited by: Ady Keeling on Nov 16, 2011 2:38 PM
Maybe you are looking for
-
Unable to Open/Import Multiple Files in Audtion 3 - Old Bug?
As stupid as it might sound I can't seem to open more then single files from the Files Window in Audition 3.0.1. You can select them (shift+click or right click) but they don't open. However if you drop them from explorer or "open file with" they do
-
Can I use my Adobe Acrobat 7 Pro on my new iMac
I have Adobe Acrobat 7 Pro installed on my old iMac. I would like move it to my new iMac (OS 10.6.7). Do you know if Adobe Acrobat 7 Pro is compatible with the new iMacs, and if so, how to move it? I tried dragging my backup folder to the application
-
WebDynpro for Abap in SAP NetWeaver
Hi Experts, I need some help, i'm using SAP Netweaver to develop a WebDynpro application but the thing is that when i try to open the Layout tab of the view i can't see the elements or the tools? I don't know what to do i have been searchin
-
PL/SQL String - To see what's in?
Hello, I have a long sql-statement in a region source. The type ist "SLQ Query(PL/SQL function...) Example of my code: declare q varchar(4000); begin q:= ' SELECT org '; If :P110_EMPLOYEE = '%null%' and :P110_WRKCTRL1 = '%null%' then q:=q||' BUKRS Na
-
Getting Document Type..?
Hi All! Does anyone happen to know how a documents type (i.e. txt, doc, xls etc.) can be ascertained. At the moment I am using the extensions to do this, however this of course is ricky as some documents do not have extensions (especially if the user