Reg. Query for UDFs.
Hello All,
I've created a multiple UDFs Like, Vendor Name,Vendor Address,Vendor Excise Details like ECC No,Range, Division,VAT No,CST No. in Marketing Documents.
I want to write a query, for example if I select the Vendor Name, the vendor address and excise details should pick up automatically from that vendor master record. Please help.
Thanks,
Pratheeviraj.
Dear Avijit,
Thanks for your reply.
I can't understand your solution. Can you please explain me in detail?
I'm giving the scenario in detail,
In the marketing document 'Outgoing Excise Invoice', I've created UDFs like vendor name, vendor address, vendor excise number, etc., my requirement is the moment I select the vendor in Vendor Name UDF, the address and excise number should get populated in the respective UDFs.
Thanks,
Pratheeviraj
Similar Messages
-
NOTIFICATION QUERY FOR UDF COLUMN
Dear experts,
I want notification query for delivery should not be add without fill up the information in machine number column (UDF Column- U_MCnumber)
Please do needful.
Thanks & Regards,
AkshataDear all,
I have got query ...........
If @object_type = '15'and @transaction_type= ('A')
BEGIN
If Exists (Select T0.DocEntry from ODLN T0 Inner Join DLN1 T1
On T0.DocEntry=T1.DocEntry INNER JOIN OITM T3 ON T3.ItemCode = T1.ItemCode
Where (T1.U_MCnumber Is Null and T3.ITMsgrpcod='119')
And T0.DocEntry = @list_of_cols_val_tab_del )
BEGIN
Select @error = -1,
@error_message = 'Please fill up machine number!!!'
End
End
Thanks & Regards,
Akshata -
Reg Query For Multiple Text Fields
Hi all
I am New to this forum..
I am developing an application for generating reports.
In my application i have multiple text fields.
The user might enter any of the textfields or even enter all the fields.
In those cases how to use the query when some fields are empty??Welcome to the forum.
It always helps to post a small, simplified example of what it is you're trying to achieve.
(When posting examples, put the {noformat}{noformat} tag before and after the example, so it will get posted formatted on this forum.)
In those cases how to use the query when some fields are empty??If your textfields serve as parameters/bind variables for you query, then you could use NVL.
Something like:select ...
from some_table
where col1 = nvl(p_col1, col1)
and col2 = nvl(p_col2, col2)
And how about wildcards (the '%' or '_' sign), by the way? Are they allowed as well?
You also might want to read about this approach:
http://www.oracle.com/technology/oramag/oracle/09-jul/o49asktom.html -
Hi All
I need some help here , One of our clients doesnot report on vat or can't not claim , but the vendors they deal with some are vat vendors and do claim so it need to be shown on the marketing docs.
So what we've done is on the client side we used a UDF to display the vat amount per line.
So i need a query that will perform task like this.
Scenario.
Supplier is vat vendor then client selects a UDF with YES or No ( Defaults to No) , then based on the selection the Tax Amount UDF must be updated automatically by the query running in the back ground.
something more like this :- if vat udf = 1 ( Yes) then price x 0.14 --- tax amount
then the total must be be combination off the two fields price plus tax amount.
Hope it makes sense.
BonganiHi Bongani,
It is better if you can use tax code to deal with this problem. The line total calculation is hard coded by system. If you try to add your calculation to it, you may voliate the support agreement with SAP.
UDF is used to facilate grouping, categorying or something similar. Or if you want some numbers in parall to system value, you can hold them in UDF.
Thanks,
Gordon -
Query for SP to make a udf field mandatory
Hi,
I got a UDF with name (Received By) in Header of GRPO document if the user does not fill the field the document should not be added. I know this is possible by SP but can any one give me the query for it. I searched i got certain query but i dont Know how to use it Or modify it for my case. Pls help me!
Thanks,
GopalALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(25),
@transaction_type nchar(1),
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int
declare @error_message nvarchar (200)
select @error = 0
select @error_message = N'Ok'
IF @transaction_type = 'A' AND @object_type = '13'
BEGIN
if exists (Select T0.cardcode from oinv T0 where T0.UDFName is null and T0.DocEntry=@list_of_cols_val_tab_del)
begin
SET @error = 10
SET @error_message = N'UDF is Null'
end
END
select @error, @error_message
end
I have written the above code for AR Invoice Screen.
Replace 'T0.UDFName' in the Select Statement to your UDF Name -
FMS Query for Document Header UDF
Hi,
I have created an UDF in the header level of Marketing Document. I want to add FMS on it. UDF Value will be 4% of DocTotal Value and auto Refresh on DocTotal.
What will be the query for Sales Order.I am saving this query
Select ($[$29.0.number]) * 0.04
and setting this query in the udf by.
now when i am creating an order and pressing shift+f2 on it it's giving an error msg : internal error(3006) occured.
Edited by: Sibasish Sengupta on Dec 8, 2008 1:11 PM -
Query on Stored Procedure for UDF's
Hi guys,
I have created 3 UDF's T0.[U_LR_Receipt], T0.[U_Removal_Time], T0.[U_Removal_Date]
at header level for the marketing documents.I want the invoice to be added only if the above fileds is entered or else it has to show the error message.
to acheive this i have created a stored procedure in SBO_SP_TransactionNotification for U_LR_Receipt.
But i want to know whether we can add two more procedures in the same or else i need a single query for the 3 fields.
Below is the code i used ,
if @object_type = '13' and @transaction_type IN ('A','U')
begin
declare @LRRECEIPT NVARCHAR(10)
set @LRRECEIPT = (select isnull(T0.U_LR_Receipt,0) from OINV T0 where T0.DocEntry = @list_of_cols_val_tab_del)
If (@LRRECEIPT = 0)
begin
select @error = 1
select @error_message = 'You cannot post the INVOICE without LR Receipt No'
End
End
Thanks in advance,
Regards,
Vamsi.Hi Vamsi,
Give this a go.
Kind Regards,
Adrian
if @object_type = '13' and (@transaction_type= 'A' or @transaction_type= 'U')
begin
if (select count(1) from OINV where DocEntry = @list_of_cols_val_tab_del and (U_LR_Receipt IS NULL or U_Removal_Time IS NULL or U_Removal_Date IS NULL)) > 0
begin
select @error = 1
select @error_message = N'You cannot post the Invoice without the LR Receipt No, Removal Time or Removal Date'
end
end -
Query for Sales Order Analysis
Dear Experts
I have written a Query for Sales Order Analysis and would like to have help on this.
The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
where U_Total_GP is a UDF for storing the GP of each order.
After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
Thank you
Regards
EltonHi Elton,
Try this:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
Union ALL
SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0]
ORDER BY T0.[DocNum]
Thanks,
Gordon -
QUERY FOR CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE
Hi Friends,
I need query for CUSTOMERS FULL DEBIT AND CREDIT WITH CLOSING BALANCE for selection criteria from date and to date.
I know the Trial Balance Report will sort out this issue... but i need routeday wise report
1. Business Partner Master Data - i created one UDF field called U_Routeday (MONDAY, TUESDAY, WEDNESDAY,THURSDAY,FRIDAY)
2. The query should be like selection criteria
- Routeday [%0]
- Posting Date [%1]
- Posting Date [%2]
CardCode
Debit
Credit
Balance
D10503
25031.50
24711.50
2962.00
D10641
5466.00
7460.00
285.00
D10642
2866.00
142.00
give any helpful query ASAP... Thanks in advanceHi,
Try this query:
Declare
@fromdate as datetime
Declare
@Todate as datetime
Declare
@Code as nvarchar(25)
set
@fromdate = ( select min(Ta.[RefDate]) from OJDT ta where
Ta.[RefDate] >= [%0])
set
@Todate = ( select max(Tb.[RefDate]) from OJDT tb where Tb.[RefDate]
<= [%1])
set
@code = (select max(Tc.[ShortName]) from JDT1 tC where Tc.[ShortName]
= [%2])
SELECT
[Name] as AcctName, [Jan]= sum([1]), [Feb]= sum([2]), [Mar]=
sum([3]), [Apr]= sum([4]), [May]= sum([5]), [June]= sum([6]),
[July]= sum([7]), [Aug]= sum([8]), [Sept]= sum([9]), [Oct]=
sum([10]), [Nov]= sum([11]), [Dec]= sum([12]), total = sum
(isnull([1],0)+ isnull([2],0) + isnull([3],0) + isnull([4],0) +
isnull([5],0) + isnull([6],0) + isnull([7],0) + isnull([8],0) +
isnull([9],0)+ isnull([10],0) + isnull([11],0) + isnull([12],0))
from
(SELECT
T0.[ShortName] as Name, sum(T0.[Debit]-T0.[Credit]) as T,
month(T2.[RefDate]) as month FROM JDT1 T0 INNER JOIN OACT T1 ON
T0.Account = T1.AcctCode INNER JOIN OJDT T2 ON T0.TransId =
T2.TransId WHERE T2.[RefDate] between @fromdate and @todate and
T0.[ShortName] = @code GROUP BY T0.[ShortName],T2.[RefDate] ) S
Pivot
(sum(T)
For Month IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) P
group
by [Name],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]
Let me know your result.
Thanks & Regards,
Nagarajan -
How to set reg.cgi for VideoPhoneLabs
i start with stratus .i try set it to work with my dedicated apache server and sql but have no clue how to do it or where to put this file on my server.
i realy have probleme with reg.cgi
for now i did www/cgi-bin/reg.cgi and in the xml i set my websiteurl = "http://88..../cgi-bin/"
also how to complete reg.cgi for have it to talk with my db ?
here the reg.cgi file.
help please ...
#! /usr/bin/python --
reg.cgi by Michael Thornburgh.
This file is in the public domain.
IMPORTANT: This script is for illustrative purposes only. It does
not have user authentication or other access control measures that
a real production service would have.
This script should be placed in the cgi-bin location according to
your web server installation. The database is an SQLite3 database.
Edit the location of the database in variable "dbFile".
Create it with the following schema:
.schema
CREATE TABLE registrations (
m_username VARCHAR COLLATE NOCASE,
m_identity VARCHAR,
m_updatetime DATETIME,
PRIMARY KEY (m_username)
CREATE INDEX registrations_updatetime ON registrations (m_updatetime ASC);
# CHANGE THIS
dbFile = '.../registrations.db'
import cgi
import sqlite3
import xml.sax.saxutils
query = cgi.parse()
db = sqlite3.connect(dbFile)
user = query.get('username', [None])[0]
identity = query.get('identity', [None])[0]
friends = query.get('friends', [])
print 'Content-type: text/plain\n\n<?xml version="1.0" encoding="utf-8"?>\n<result>'
if user:
try:
c = db.cursor()
c.execute("insert or replace into registrations values (?, ?, datetime('now'))", (user, identity))
print '\t<update>true</update>'
except:
print '\t<update>false</update>'
for f in friends:
print "\t<friend>\n\t\t<user>%s</user>" % (xml.sax.saxutils.escape(f), )
c = db.cursor()
c.execute("select m_username, m_identity from registrations where m_username = ? and m_updatetime > datetime('now', '-1 hour')", (f, ))
for result in c.fetchall():
eachIdent = result[1]
if not eachIdent:
eachIdent = ""
print "\t\t<identity>%s</identity>" % (xml.sax.saxutils.escape(eachIdent), )
if f != result[0]:
print "\t\t<registered>%s</registered>" % (xml.sax.saxutils.escape(result[0]), )
print "\t</friend>"
db.commit()
print "</result>"Persistent binding is effectively provided by STMS (MPxIO) - is there anything in particular you're wanting to do that STMS doesn't provide?
-
Hi All,
I have a line UDF called U_PO in the sales order documents that denotes our purchase order number that particular item is ordered on.
I have another line UDF called U_XMill which I want to populate with the corresponding PO document due date.
What would be my query for that?
Basically, it should be something like:
SELECT T0.DocDueDate FROM OPOR T0 WHERE T0.DocNum=$[$38.44.0] FOR BROWSE
However, I am sure that "38.44" is wrong.
It should denote my current document's UDF *.U_PO.
And I am not sure what would be the correct notation for it.
I was wondering if there was a help document I could refer to to figure out the corresponding field numbers for the cases like this.
Thank you for your help.Hello
use FMS on matrix (tables) as
[ItemUID.ColumnUID.Type] or [TableName.FieldName]
where itemUID is 38
ColumnUID is U_XMill
Type is 0 (general).
There is a now-to guide on service.sap.com/smb/sbo where you can find how to us FMS.
Regards
J -
Formatted Search query for Vacation Accrued
Hi Experts,
I have a Client who needs to keep tract on the Vacation Accrued on the Employee Master Data. I have created this UDF on the Master Data, but I could not get the query for the Formatted Search right.
This Formatted search on the UDF ( must look at the OHEM.startDate field and populate the following:
If it is a still within year of the system date, it must populate 0,
If it is > 1 year and < 3 years, it must populate 5,
etc.
Any help would be greatly appreciated.
MarliHi Experts,
Here is what I did for the query mentioned above:
{SELECT
CASE
WHEN (T0.startDate > GETDATE() -356)
THEN 0
WHEN (T0.startDate > GETDATE() - 712)
THEN 5
END
As 'Vacation Accrued'
FROM OHEM T0}
The issue is that if I link this query to the UDF on the EMD, I get a list of 0 and 5 to choose from. I need to populate automatically.
Thanks.
Marli -
Can we write query for fomatted search without from clause
can we write query for fomatted search without from clause as below.
SELECT (($(u_amt)*14)/100)
here U_amt is a UDF .I want to assign this to another field .
Rgds,
RajeevHi Rajeev,
You can write query for FMS without from. That is because you can omit it when you get value from active form by default. The grammar of it is:
Select $[$38.u_amt.0\] * 14/100 in your case if you have item type marketing document @line level.
From View-System Information, you can get the info you need for your FMS query at the left bottom of your screen.
Thanks,
Gordon -
Dear All,
My A/P Invoice entry is as Follows.
A/P Invoice
1) Item code (Multiple Items Possible)
2) Quantity per item
3) Unit Price per item
4) Under frieght I entry 3 freight value
5) Tax Code is selected
The report required is
1) A/P Invoice No
2) A/P Post Date
3) A/P Documnet date
4) A/P Vendor Code
5) A/P Vendor Name
6) Vendor state ( From Vendor Master date Address)
7) Vendor Cst no / Vat no / Tin No ( These all are UDF)
8) A/P Doc total before Discount ( This does not contain frieght value) ( I am able to obtain this from the OPCH-- Max 1099 Amount Field)
9) A/P Doc total After discount
10) A/P Feieght Break up.
11) A/P DOc total + Excise details
12) A/P Tax Code
13) A/P Tax Amount
14) A/P Final Total Value
The main issue is till point number (8) I can get the query after that the query goes wrong.
I need a similar query for A/R Invoice also.
Please advice.hi aslam,
Try this query,
SELECT T0.DocNum as 'AP Invoice No.',
T0.DocDate as 'Posting Date',
T0.TaxDate as 'Doc. Date',
T0.CardCode as 'Vendor Code',
T0.CardName as 'Vendor Name',
T1.State1,
T2.TaxId1 as 'CST No.',
T2.TaxId11 as 'TIN No.',
T0.Max1099, T0.DocTotal,
T0.TotalExpns,
T0.VatSum
FROM [dbo].[OPCH] T0 INNER JOIN [dbo].[OCRD] T1 ON T0.CardCode = T1.CardCode
INNER JOIN [dbo].[PCH12] T2 ON T0.DocEntry = T2.DocEntry
WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]'
Whether it solves ur requirement ?
Jeyakanthan -
Query for Order recomendation from MRP.
Good evening,
Recommendations are saved for the Production and Purchase Order after MRP is done. New Production and/or Purchase Orders are created in Planned stages. We need a query for the Alert Management to the users for the new Orders created.
Please can anyone guide and help me.
thank you.Hi,
Welcome you post on the forum.
Try this for production order:
SELECT T0.DocNum, T0.ItemCode FROM OWOR T0
WHERE T0.OriginType = 'R' AND DateDiff(dd,T0.DocDate,GetDate())=0
Thanks,
Gordon
Good Morning Sir,
Thanks for your message, guidance and support for the query.
The query for the alert for Production is working fine, we just changed the DocDate to PostDate as the Production Order, Posting date is as PostDate.
We tried to change the OWOR to OPOR and the Origin type to T0.Comments='Origin :MRP' and tried for Purchase Order, but the alert is not visible. Would it be ok, that we create an UDF and try the same?.
thanks and warm regards.
Maybe you are looking for
-
I am unable to use Firefox with Windows 7 64 bit. I've tried everything I can think of!
I have Window 64 bit installed on my HP laptop. It came with Vista but I upgraded to Windows 7. Firefox will not work properly now. I have installed the right version from the Mozzilla website and disabled all add-ons. Still wont display any pages pr
-
How to transport the report object from development clint to quality clint
any body knows different ways of transferring report object from development clint to quality clint.pse send ...
-
Can I put Discoverer Portlet in my web application
Hi! Can I put Discoverer Portlet in my web application? Let's say I want to put or publish worksheets it in my own J2EE web application (not on Oracle AS Portal) Please comment on this. Thanks.
-
Installed 10.2.3 update Cannot install software on this disk, volume does
I recently bought an ibook and installed mac os x 10.2.2 which is the original software that shipped with this ibook. I am trying to update the 10.2.2 to 10.2.3 using a download off of apples website. When i try to install it, it runs as it should an
-
J1inchln - no download option available
Hi, I am using the Tcode - JiINCHLN. In the 1st screen Im putting all the mandatory fields like section and account no. After I execute the screen appeare is all the document no along with posting date and amount. i.e. how much the TDS we have to p