Create a user defined approval query
anybody can help me whitch syntax i have to use to create a user defined query for an approval template please?
for Exp: i want to create a query to check if a the customer in an invoice ="C0001"
so select distinct 'true' where ????(current invoice customercode)="C0001"
10x
Hi.......
Try This......
Select Distinct 'True' From OCRD T0 where T0.CardCode='C0001' and T0.CardCode=$[OINV.CardCode.0]
Hope this will solve the problem......
Reagards,
Rahul
Similar Messages
-
Problem with user defined approval query
Hi
Sorry me for my english
I have a problem with approval query
DECLARE @DocDate DATETIME
SET @DocDate = (SELECT $[OINV.DocDate])
IF (DATEDIFF(DAY,@DocDate,GETDATE())) != 0
BEGIN
SELECT DISTINCT 'TRUE'
END
the query works with the previous invoices, but today's invoices show me a error colud not commit transaction
Can Help me?
Thanks
Felipe LoyolaHi Felipe Loyola,
Try this:
SELECT DISTINCT 'TRUE' FROM OINV T0
WHERE DATEDIFF(DD,T0.DocDate,GETDATE()) != 0 AND T0.DocNum = '$[$8.0.0\]'
Thanks,
Gordon -
How to create a user defined trigger and execute my form
Hi All,
I am working with oracle Apps r12 and oracle forms 10g.
I have created a custom form. So i need to create a special menu and when the user click the menu it need to open a new block and query it accordingly.
I have followed this link
http://egeapp.egeseramik.com:8000/pls/prod/fndgfm/fnd_help.get/us/fnd/@g_special#g_special
and created a special menu in my custom form
In PRE_FORM trigger i have coded this
APP_SPECIAL.INSTANTIATE('SPECIAL3','&ACTION HISTORY DETAILS',NULL,TRUE,'LINE');
and IN PRE_BLOCK i have coded this
APP_SPECIAL.ENABLE('SPECIAL3',PROPERTY_ON);.
Now the special menu is enabled when i press it shows error
that frm-40700 no such trigger:special3.
Now i came to know that we need to create a user defined trigger put the code and when we press special menu it need to query it accordingly.
Can any one tell the steps that how to do that accordingly.
Thanks & regards
SrikkanthHi ,
The problem is fixed, the link mentioned below might be use full for doing this.
http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T457083.htm
regards
Srikkanth -
How do you create a user defined functions UDF and passing a value like a ID to GEt a Value.
How do you create a user defined functions UDF and passing a
value like a ID to GEt a Value.
using a query.
are there example.
Thankstons of examples at cflib.org - good place to start, even
though many
udfs there are a bit outdated in their code...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com -
Syntax error when creating a user-defined table type in SQL Server 2012
Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
CREATE TYPE ReportsTableType AS TABLE
( reportId INT
, questionId INT
, questionOrder INT );
Results:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'AS'.Hope these posts could help,
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
Regards, Dineshkumar,
Please Mark as Answer if my post answers your question and
Vote as Helpful if it helps you -
Creating a user defined control using java Beans
Hi,
I want to create a user defined control which is used to draw a line ...
same as we using in VB as Line control.In java we will create the component using using Beans . I created a code
which will draw a line in the run time .For tat i extend the class with JPanel,but i cant use the same program in beans....b'coz it simply draws the jpanel when we drag and drop that control in the form....
so can u give me some ideas to create a control which is used to draw a line .....i am attaching the same which i did .....
thank u in advance...
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import javax.swing.*;
import javax.swing.event.*;
public class Line extends JPanel
BufferedImage image;
Color color;
Stroke stroke;
Point start = new Point();
Point end = new Point();
public Line()
color = Color.blue;
stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
BasicStroke.JOIN_MITER);
protected void paintComponent(Graphics g)
super.paintComponent(g);
if(image == null)
initImage();
g.drawImage(image, 0, 0, this);
// Draw temp line over image.
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(Color.red);
g2.drawLine(start.x, start.y, end.x, end.y);
public void setTempPoints(Point p1, Point p2) {
start = p1;
end = p2;
repaint();
public void draw(Point p1, Point p2)
Graphics2D g2 = image.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(color);
g2.setStroke(stroke);
g2.drawLine(p1.x, p1.y, p2.x, p2.y);
g2.dispose();
start = end;
repaint();
private void clearImage()
Graphics g = image.getGraphics();
g.setColor(getBackground());
g.fillRect(0, 0, image.getWidth(), image.getHeight());
g.dispose();
repaint();
private void initImage()
int w = getWidth();
int h = getHeight();
image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = image.createGraphics();
g2.setPaint(getBackground());
g2.fillRect(0,0,w,h);
g2.dispose();
public static void main(String[] args)
Line wbclient = new Line();
DrawingListener listener = new DrawingListener(wbclient);
wbclient.addMouseListener(listener);
wbclient.addMouseMotionListener(listener);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(wbclient);
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
class DrawingListener extends MouseInputAdapter
Line wbclient;
Point start;
Point end;
final int MIN_DIST = 5;
public DrawingListener(Line fh)
this.wbclient = fh;
public void mousePressed(MouseEvent e)
start = e.getPoint();
public void mouseReleased(MouseEvent e)
end=e.getPoint();
if(start.distance(end) > MIN_DIST)
wbclient.draw(start, end);
public void mouseDragged(MouseEvent e)
wbclient.setTempPoints(start, e.getPoint());
}Hi Ravi,
How about something like this:
IUserMaint user = UMFactory.getUserFactory().newUser("myNewUser");
user.setFirstName("1st Name");
user.setLastName("2nd Name");
user.setEmail("[email protected]");
user.save();
user.commit();
IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("myNewUser", user.getUniqueID());
uacc.setPassword("initial");
uacc.setPasswordChangeRequired(false);
uacc.save();
uacc.commit();
Hope this helps.
Daniel -
Creating a user defined control in java using java Beans
Hi,
I want to create a user defined control for drawing a line like a line control which is used in Visual Basic. I have created a program which will be drawing a line in runtime..but i cant use the same program in the beans to act as a user defined control to work as a line control ..b'coz i extend the class with JPanel..so when i drag and drop the control i am getting the panel only...so can u give me some ideas to create the line control...i am attaching the code which i created ...so pls do make some modification or correction to work as a line control....
Thank u in advance..........
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.BufferedImage;
import javax.swing.*;
import javax.swing.event.*;
public class Line extends JPanel
BufferedImage image;
Color color;
Stroke stroke;
Point start = new Point();
Point end = new Point();
public Line()
color = Color.blue;
stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT,
BasicStroke.JOIN_MITER);
protected void paintComponent(Graphics g)
super.paintComponent(g);
if(image == null)
initImage();
g.drawImage(image, 0, 0, this);
// Draw temp line over image.
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(Color.red);
g2.drawLine(start.x, start.y, end.x, end.y);
public void setTempPoints(Point p1, Point p2) {
start = p1;
end = p2;
repaint();
public void draw(Point p1, Point p2)
Graphics2D g2 = image.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setPaint(color);
g2.setStroke(stroke);
g2.drawLine(p1.x, p1.y, p2.x, p2.y);
g2.dispose();
start = end;
repaint();
private void clearImage()
Graphics g = image.getGraphics();
g.setColor(getBackground());
g.fillRect(0, 0, image.getWidth(), image.getHeight());
g.dispose();
repaint();
private void initImage()
int w = getWidth();
int h = getHeight();
image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = image.createGraphics();
g2.setPaint(getBackground());
g2.fillRect(0,0,w,h);
g2.dispose();
public static void main(String[] args)
Line wbclient = new Line();
DrawingListener listener = new DrawingListener(wbclient);
wbclient.addMouseListener(listener);
wbclient.addMouseMotionListener(listener);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(wbclient);
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
class DrawingListener extends MouseInputAdapter
Line wbclient;
Point start;
Point end;
final int MIN_DIST = 5;
public DrawingListener(Line fh)
this.wbclient = fh;
public void mousePressed(MouseEvent e)
start = e.getPoint();
public void mouseReleased(MouseEvent e)
end=e.getPoint();
if(start.distance(end) > MIN_DIST)
wbclient.draw(start, end);
public void mouseDragged(MouseEvent e)
wbclient.setTempPoints(start, e.getPoint());
}%TYPE is PL/SQL syntax, which thus cannot be used inside SQL.
The other way around, SQL can be used inside PL/SQL.
Regards,
K. -
How to create a user defined type base on existing table
Hi Everyone,
Are there any way to create a user defined type base on existing table us as :
CREATE OR REPLACE Type MyTable Is Table Of PART%ROWTYPE;
where Part is a table.
Regards,
JDangHi JDAng,
Can't be done. %ROWTYPE is a PL/SQL construct, and as such cannot be used in SQL.
Regards
Peter -
Error creating a user defined report in the grid control
I am trying to create a simple User Defined report in the Grid OEM
Under the 'Elements' tab I have a 'Type' - 'Database Table from SQL'
And I have this 'Statement' - SELECT * FROM SYS.DBA_USERS
When I Click the 'Preview' button I get this error.
Error rendering element. Exception: ORA-00942: table or view does not exist
I'm logged on as SYSTEM.
Isn't the SYS.DBA_USERS table accessible by SYSTEM?
Any advice on what I'm doing wrong/
Edited by: bfee_sdc on Oct 19, 2010 9:12 AMWhat are the tricks?
It has to be some what supported since I found this somewhere in an Oracle note...
How to create custom reports on tables other than mgmt* views.
To create reports on other tables, grant permissions to MGMT_VIEW user as MGMT_VIEW is responsible for creating reports in grid control
SQL> GRANT SELECT on SYSMAN.<table_name> to MGMT_VIEW;
And then create the reports in the reporting framework referencing SYSMAN.<table_name> in the query.
I tried GRANT SELECT on SYS.DBA_USERS to MGNT_VIEW but this did not work. -
Creating a user-defined field in VL06
Dear all ,
Please guide me how to add few user defined fields in the output list of standard VL06 transaction code - (Delivery Monitor Report - WS_DELIVERY_MONITOR) - I have to add in the option of 'List Outbound deliveries' -
Pls revert.
Thanks in Advance.
P.G.RHai
Follow the bellow steps for creating User Defined Field Exit
Step by step procedure for creating Field Exits
There are eight steps to creating a field exit:
Step 1: Determine Data Element
Step 2: Go To Field Exit Transaction
Step 3: Create Field Exit
Step 4: Create Function Module
Step 5: Code Function Module
Step 6: Activate Function Module
Step 7: Assign Program/Screen
Step 8: Activate Field Exit
Step 1: Determine Data Element
- Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
- An easy way to determine the data element associated to a particular screen field is to:
Go the appropriate screen.
Position the cursor in the appropriate field.
Press F1 for field-level help.
Click on the Technical info pushbutton (or press F9) on the help dialog box.
On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.
Step 2: Go To Field Exit Transaction
- The transaction to create field exits is CMOD.
- You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
- From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
- After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.
NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.
Step 3: Create Field Exit
- From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
- After choosing this menu path, a dialog box will prompt you for the appropriate data element .
- Enter the data element name and click the Continue pushbutton.
- Now, you will be able to create the function module associated to the data elements field exit.
Step 4: Create Function Module
- You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the Continue pushbutton.
- In the Function module field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:
FIELD_EXIT_<data element>
- You can add an identifier (an underscore followed by a single character ).
- The first function module for a data elements field exit must be created without an identifier.
- To create the function module, click on the Create pushbutton, choose menu path Function module -> Create, or press F5.
- After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing Enter, you will be able to go ahead and create the function module.
- Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.
Step 5: Code Function Module
- From the function modules attributes screen, click on the Source code pushbutton or choose the Goto -> Function module menu path to the code of the function module.
- Here you will add your desired functionality for the field exit.
- Remember that field exits function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.
- You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.
Step 6: Activate Function Module
- After coding the function module, you must remember to activate it.
- Use the Function module -> Activate menu path to activate the function module.
- At this point, you can return to the field exit transaction.
- You should be able to 'green arrow' back to this transaction.
- When you return to the field exit transaction, you will see an entry for the newly created field exit.
- At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.
- Also, the field exit will not be triggered yet because it is inactive.
Step 7: Assign Program/Screen
- This step is only needed if you want to make a field exit local.
- To make a field exit local, select the field exit and click on the Assign prog./screen pushbutton.
- In the dialog box , indicate the appropriate program name and screen number.
This information indicates that the field exit is local to the specified screen in the specified program.
- In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the Fld. Exit field.
- If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
- If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.
Step 8: Activate Field Exit
- The field exit must be active for it to be triggered by the system.
- Activate the field exit by choosing the Field exit -> Activate menu path.
- After assigning the field exit to a change request, its status will change to Active and it will be triggered automatically on the appropriate screen(s).
NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers
Regards
Sreeni -
Creating a User-defined Selection variant for Transaction ME21N
Hi,
In transaction ME21N with the 'Document Overview' feature turned on we can view a list of standard selection variants. I would like to add a user-defined selection variant to that list. There is an OSS Note 377180 present which describes how to do that but(as per transaction SNOTE) that note cannot be implemented in our system. Is there any other way to get that done?
Any help would certainly be appreciated.
Thanks,
Alam.So I am having a similar issue. I have a fixed length flat file with 3 different record types.
1 a header ( length is 82 bytes with the first byte set to H ( single record always the first )
2 a detail record ( length is 382 bytes ) with the first byte set to D ( multiple records )
3 a trailer record ( length is 82 bytes ) with the first byte set to T ( single record always the last )
I created a UD OTD with 3 elements for each record type, RECORD_TYPE is the first field 1 byte. Matching for each on either H,D, or T. When I try and test the OTD with the Run Test button I get an unmarshal error
<SOD>""<POS>"HACCUMULAT..." failed input match, Fog#431, after <no path>: failed node: trailing junk in fixed/parent
HACCUMULATED BENEFIT TRANSACTION FILE 20080801 20080825 0 0
D ar3531 ar3531 ar3531 ar3531000 55887027260 30.000 30 5098765 20080804 000T114 120080806 82820P30000001024511 25.00 0.00 25.00 0.00 25.00 25.00 0.00 0.00 0.00 0.00 0.00T
TACCUMULATED BENEFIT TRANSACTION FILE 20080801 20080825 2894 0 0
Not sure whats going on, so if anyone has any suggestions on where to look that would be great
Thanks -
Create a user-defined selection variant in transaction ME21N
Hi,
In transaction ME21N with the 'Document Overview' feature turned on we can view a list of standard selection variants. I would like to add a user-defined selection variant to that list. There is an OSS Note 377180 present which describes how to do that but(as per transaction SNOTE) that note cannot be implemented in our system. Is there any other way to get that done?
Any help would certainly be appreciated.
Thanks,
Alam.I would suggest that you replay the transaction with breaks, so that you can see exactly what is happening (in the start options, set the SAPGUI replay options to stop at each ProcessedScreen)
It may be that the Selection Variant button is not present during replay. In this case, you would need to make the step where this button is pressed as optional.
ME21N is a difficult transaction to automate because it always remembers what you were last doing in it and restarts the transaction from that point. You can delete the user settings (so you always start the transaction as though for the first time) using the following code in your script:
ABAP.
* Delete all User-Settings in MM
DELETE FROM ESDUS WHERE UNAME = SY-UNAME.
* Delete all User-Settings in search help
DELETE FROM DDSHDEFSH WHERE USERNAME = SY-UNAME.
ENDABAP. -
Creating a User-Defined Application on BT HomeHub ...
Hi,
I'm trying to get Back To My Mac working from my BT HomeHub 5. I've set up a new User Defined Application, and set up these ports:
TCP 5354-5354
UDP 4500-4500
UDP 5353-5353
UDP 500-500
Any 4488-4488
However, if I try to switch it on for one of my computers, it displays the message:
Conflict
The game or application you’ve selected conflicts with an application () you’ve already assigned to another device.
Please remove the other application or select the same device.
This is the only port forwarding application I've tried adding to any device. There are no other applications or games assigned to any other devices. I've tried rebooting the hub, but still no joy.
Any ideas? Thanks!Disable uPnP first.
This page should help.
Port forwarding problems
There are some useful help pages here, for BT Broadband customers only, on my personal website.
BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones. -
Creating a User Defined Type in SQLDeveloper
SQLDeveloper Version 1.2.1.3213-no-jre
Platform: Microsoft Windows XP Professional Version 2002 SP2
Java: jdk-1.5.0_12
I'm new to PL/SQL and so what I'm trying to do may not be possible. I've checked loads of examples online but cannot find a precise example of what I am trying to do.
I'm trying to create a type as follows:
create or replace
TYPE t_favourite_obj AS OBJECT
( favourite_id user_favourites.FAVOURITE_ID%TYPE
, msisdn VARCHAR(20)
, url VARCHAR(512)
, title VARCHAR(512)
, hit_count NUMBER(10,0)
, time_stamp TIMESTAMP(6)
However, I get the following error:
Error(3,18): PLS-00201: identifier 'USER_FAVOURITES.FAVOURITE_ID' must be declared
I've got a USER_FAVOURITES table within scope and I've had no problems referencing 'USER_FAVOURITES.FAVOURITE_ID' in procedures and functions.
However, whenever I type user_favourites. (note the period) in the editor a list of columns for the table is displayed indicating that the table is in scope. I then select from the list, append %TYPE and then try to compile but without success.
I simply cannot reference a table column as a datatype when defining a user type. Is this an SQLDeveloper bug or is it a PL/SQL characteristic?
Cheers%TYPE is PL/SQL syntax, which thus cannot be used inside SQL.
The other way around, SQL can be used inside PL/SQL.
Regards,
K. -
Problem creating a user defined function...
I have written a function in oracle as follows:
===========================
CREATE OR REPLACE
function getTeacherNameForHmroomAndSch(in_student_id STUDENTS.STU_ID%TYPE)
return varchar2 as
emp_full_name varchar2(64);
begin
stu_school_id STUDENTS.STU_CURRENT_SCHOOL_ID%TYPE;
stu_home_room STUDENTS.STU_HOMEROOM%TYPE;
emp_id EMPLOYEES.EMPLOYEE_ID%TYPE;
select STU_CURRENT_SCHOOL_ID, STU_HOMEROOM INTO stu_school_id, stu_home_room from STUDENTS where STU_ID = in_student_id;
select el1.TL_EMPLOYEE_ID into emp_id from EMPLOYEE_LOCATIONS el1
where el1.TL_ID = (select max(el2.TL_ID) from (select el.TL_ID
from EMPLOYEE_LOCATIONS el
where el.TL_LOCATION_ID = stu_school_id
and el.TL_HOMEROOM = stu_home_room) el2 group by el2.TL_ID);
select case when FIRST_NAME is null then LAST_NAME else FIRST_NAME || ' ' || LAST_NAME end into emp_full_name from EMPLOYEES where EMPLOYEE_ID = emp_id;
return emp_full_name;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURN null;
end getTeacherNameForHmroomAndSch;
===========================
When I am executing this create function i.e., compiling function in a SQL Editor, the SQL engine is throwing a warning message as follows:
===========================
Warnings: --->
W (1): Warning: execution completed with warning
<---
===========================
As a result, am not able to use this function in my SQL.
Please suggest a solution for my problem.
Thank You.
Shravan Kumar.MHello,
It is possible to create user fields using SDK on anykind of table but, sometimes in some Tables, adding them causes integrity problems and B1 cannot create the document of the Table, you can try that, but if there's an error when adding the bank statement you should erase it from the OBNK table using SDK again.
I've tried this on MRV1 (Inventory Revaluation Lines) and IPF2 (Landed Costs, Costs), when I tried to add the document (Inventory Revaluation or Landed Costs) appeared an error and B1 could not create the document, so i had to remove them with SDK again and the error was solved.
Best Regards hope it'll help you
Gabriela
Maybe you are looking for
-
Purchase Register Custom Report -
Hi Expert, Hope you all are fine! I am new to CIN. I have to develop a custom report for LIV details which will contain the follwing column: could you please help me to know from where i can take these field i.e reference table and links. Tax Invoice
-
IPhone 3G dropped on the floor on the first day
it looks like the slot where you switch SIM card is a bit damaged too since I got another card stuck and it took me an hour too take out. Then I updated the phone and got it locked, and on ITunes it says that the SIM card inserted is not supported, s
-
Automatic output of purchasing documents
Hi I want to send purchasing documents to vendor automatically when i save the documents.I have maintained all settings ( email in vendor master,communicatio startegy...etc).when i saving the PO document is not automatically ouputing.If go to preview
-
How to find my password in my macbookpro?
how to find my password in my macbookpro?
-
How to make a Basic BD with Encore CS5
Are there any basic tutorials around that will step one through how to create a basic BD dvd with a simple menu in Encore CS5. For the most part I've been using Nero 9/10 to create DVD's and BD discs, and it works well with Premiere but for H.264 fi