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
Similar Messages
-
FMS Query for default Profit Center in SO
Dear Experts,
Can anybody help me by providing FMS query for getting default Profit Center based on the default Warehouse in the user default settings.
Regards
SriniHi Rahul,
I created each Branch as a profit Centre and the filed name is OPRC.PrcCode . If the user at a particular branch logged in SAP by using his ID and when he is adding a SO the profit centres list should appear in Profit centre filed.
And is there any provision to set the profit centre (OPRC.Code) as default for the user at a branch by taking document no.series or location ID or User ID as consideration in the FMS query.
Thanks
Srinivas -
Hi,
I want to FMS Query for Purchase Order.
I want to display the weight * price in one user define field.
Please suggest meHi Tushar.......
Try this.......
declare @var1_wt as varchar(255)
declare @var2_Pr as varchar(255)
declare @var3 as float
declare @var4 as float
set @var1_wt=$[$38.58.0]
set @var2_Pr=$[$38.14.0]
set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
select @var3 * @var4
Regards,
Rahul -
What is the Tcode for document header.
HI all.
What is the Tcode for document header.Hi,
Post Document: Header Data (FBR2)
Purpose
Use this procedure to post a new document referencing (copying all or part) of an existing document. This process will also allow the user to reverse a document that cannot be reversed using transaction FB08.
Trigger
Perform this procedure when there is a need to post with reference an existing document to create a new document. Or to reverse a document that cannot be reversed using transaction FB08.
Prerequisites
Before beginning this task, obtain the following information.
· Document number and fiscal year of the document to be referenced or reversed
Document being referenced must be a posted document.
· If applicable, the reversal reason code
Menu Path
Use the following menu path(s) to begin this transaction:
· N/A
Transaction Code
FBR2
Helpful Hints
Generate reverse posting can be used when using transaction FB08 is not possible. Examples provided below.
· Original document types such as WA and ZF cannot be reversed using the FB08 transaction
· Document was already reversed but the reversing document is incorrect
· Document to be reversed is a reversing document
· R/O/C/D indicates a field is required, optional, conditional (dependent upon another selection) or the information defaults (based on previously entered information or system configuration)
Reward if helpful
Jagadish -
Hi Experts,
I would like to write a FMS query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Sales Order.
For example. A query on Sales Order where I have Item ABCD and Quantity 200.
I have a UDF named Abatement where the value is fixed 35%. And other is Assessable Value fixed with MRP Price say 350
And based on the result should be given in Assessable Value field.
Formula is Assessable Value fixed 350 then Abatement 35 % = 122.50 and then 350-122.50 = 227.50 should be displayed in the Assessable value field.
Kindly provide me the solution for the query.
Regards
AmolHi,
Try this:
SELECT ((select $[RDR1.U_AssessableValue]) - ((select $[RDR1.U_Abatement]) * ((select $[RDR1.U_AssessableValue])/100)))
Please post screen shot sale order window with UDF filed and values.
Thanks & Regards,
Nagarajan -
Hi,
Is there a way via the API to query the database for Document Type data (specifically the ImageUUID in PTDOCUMENTTYPES) for a given file extension or MIME type - whether in one step or multiple, doesn't matter?
Naturally I'd rather do this via API methods than querying the DB directly for scalability/upgrade reasons.
We have a custom crawler which crawls manifest files containing meta data about the end documents. The click through url is overwritten to be the document to which the manifest file refers but we'd also like to overwrite the ImageUUID to represent the real end document's type rather than the manifest's.
thanks
AniYeah it is clear visible that, the same combination might have available in different plants.
So to avoid the duplicate entries, always select all the primary key fields available in all the tables in the output.
If not atleast try restricting based on plant in the selection screen or any possible duplicate entreis.
So add the key fields at Infoset level in SQ02 -
Unable to sum RDR1 UDF for ORDR header use.
Hi Forum,
Trying to run a query at Sales Order Header Level ORDR to get a sum of a UDF in Sales lines level RDR1.
I tried following two queries and they all fail with given error code:
1. Fails with internal error code - 3006
SELECT sum($[$38.U_RA_TotWODisc.number]) FROM RDR1 T0 INNER JOIN ORDR T1 ON T1.DocEntry = T0.DocEntry WHERE T1.[DocNum]=$[ordr.docnum]
2. Fails with internal error code - 1004
SELECT sum($[RDR1.U_RA_TotWODisc.number]) FROM RDR1 T0 INNER JOIN ORDR T1 ON T1.DocEntry = T0.DocEntry WHERE T1.[DocNum]=$[ordr.docnum]
How could I make it work please? Thank you.Hi Syed Aleem.....
The FMS query for column sum won't work during runtime.
You can make it to work when your document is added......
Regards,
Rahul -
Approval Query For A/R Delivery
Hi
I have made a query for Approval Procedure, only those Delivery documents will go for approval for which A/R Down payment Request has not been made. But it is not working properly Kindly Correct the query.
SELECT Distinct 'True' where dln1 t0 inner join odln t1 on t0.docentry = t1.docentry inner join ordr t2 on t0.baseentry = t2.docentry and t2.docentry not in (Select distinct t4.baseentry from dpi1 t4) and
t2. docentry = $[DLN1.Baseentry]
Thanks
RashidHi Rashid,
B1 does not support approval queries on document lines. you can query only document header.
you can either try to workaround it with all sorts of aggregate UDFs in the header, or alternatively take a look at:
[http://www.beonesolutions.com/ip/Solutions/ap.html|http://www.beonesolutions.com/ip/Solutions/ap.html]
all details, including the ability to query all document tables, are in:
[http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf|http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf]
Gilan -
Hello, I recently created an FMS query which pulled all expense gl accounts. I linked the query to a UDF on business partners. This way my users could select a default GL account for a business partner which would appear automatically on the ap invoice. It was working fine, but now the fms query on the BP UDF is failing, returning no results. I also get NO error messages either so I don't know why its failing.
I can run the fms query in Query Manager fine.Hi Robert ,
Press Shift +F2 on your User Defined field and you will see the list of accounts .
Your problem will be solved .There is no issue with query .
Thank you
Bishal -
Document header text in Tcode FBl3n
hello
Plz help me regarding this issue.
Our fico consultants demanded to display the document header text in the tcode FBL1n,FBL3n and FBL5n
So through SPRO by using this path Financial Accounting (new)->General ledger Accounting->Master Data->G/L Acounts -> line items ->Define Special fields for line item Display.
In this i made the new entry BKPF BKTXT ,
Now after this field start coming in the above tcodes by setting the layout but the problem is that data inside is not coming and when i go to details the data is there.
I am not gettting problem to get the data also.
Now it is showing extra column with header Document header text but it is not showing the data inside it.
and similar if i doing for someother field both things are coming data and field also.
WHy this problem for document header text only.
Plz let me know and give the solutions as soon as possible.
Thanks a lot.Hi,
You can use READ_TEXT to retreive header text.
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
You have to used the READ_TEXT functions to read the SAP long text. e.g. Sales Order, Purchase Order Item text etc.
To check your long text header, go into the long text. Click Goto -> Header
This will give you OBJECT, NAME, ID, and LANGUAGE.
Pass them in the FM, you will get the header text that you want.
Also go through the below link:
http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8c8494511d182b70000e829fbfe/content.htm
Hope this will help.
Thanks&Regards,
Naresh kumar. -
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 -
How to get a Header UDF value in a FMS ?
Hi !
How is it possible to get a Header UDF value from a Formatted Search in a header ? If we don't want to create as many FMS as there are marketing documents in the system, how is it possible ? Can we have a syntax like the following ?
SELECT T0.OnHand
FROM OITW T0
WHERE T0.ItemCode=$[$38.1.0]
AND T0.WhsCode=$[$U_Nwr_WH.0.1]
Thanks,
LuceHi Gordon,
oh, I'm sorry, I did a mistake...
In fact, my question is "How can we get a header UDF value in any FMS without specifying the table name?" !!!!!
Can we access it through specific syntax like $ and [ ?
thanks,
Luce -
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 -
Need a fms query on G/L account code for the AP Screen
Hi SAP B1 Experts,
Could somebody suggest a simple query I could run on the G/L account code field to select a particular account code when using a particular BP code.
So for example I would like the user to be able to choose just 2/3 accounts instead of the mass list you get based on the BP partner he is looking at.
Do I need to add a UDF field into the BP for the particular Account Code I want associated with him?
Any suggestions would be appreicated as I want to cut down the time on search the g/l code list as it is quite long
regards
PaulHi Rahul,
I think I follow the below overall however I have setup the UDT and created the UDF's BP CODE and ACCOUNT as you suggested.
How do you associate the BP Code with the Account Number in the Table?
So for my example:
I will setup a Supplier Code and two account codes with it.
BP Code: S1234 Account 1234567
S1234 Account 1234567
I have tried setting up default values but they don't appear to work. I must be doing something wrong as nothing appear when I query the table. Have I missed a step here?
Once the table is right I assume I then use the FMS Query below to look at the table based on my UDT vs the OPCH.Cardcode Field?
If I can get the table right I think I follow your example from there
thank you both for a quick response -
Document Header Mandatory for FV50
Hi Experts,
I would like to make the document header a required field for FV50 transactions. They are document type SA. I set the document type to make this a required field.
However, I don't want all SA document types to require this field. Is it possible to only make it a required field for some transactions?
Or is there a better way to do this.
Thank youDear,
For your query we have 2 options only.
1) Make required entry at Document type level - It will ask for for all trasactions related to that particular document type.
2) Transaction code level (SHD0) - It will for all document types and transactions.
Header details we will contrlo by using Document type only.
Regards,
Dharma Rao. Yekula
Maybe you are looking for
-
Hi, can anyone help please. Thanks
-
The cube was compiling ok. I was using sql Server 2012 Standard. I upgraded to Sql Server 2014 Standard. Now when compiling the cube, without any changes, I get this error : Internal error: An unexpected error occurred (file 'pcprocbinding.cpp', l
-
Initial Value in Enter Query Mode
Hi Everyone, If you ever need to set a "visual" default (or initial) value for an item in Enter-Query mode, here is one solution to accomplish this: Create a WHEN-NEW-ITEM-INSTANCE trigger at the block level where the item is located. Make sure it ca
-
Photoshop cs5 unexpectedly quits on startup
Photoshop cs5 upgraded to 12.05 Mac Yosemite 8 Gb ram Macbook pro It happens when I try and open a file on my desktop. Process: Adobe Photoshop CS5 [1830] Path: /Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents
-
Premiere 7 - stereo sound exports without one audio channel
Hi there. I have a strange problem with Adobe Premiere 7.0. Every time I export a wideo it looses one audio channel - the right one. I have no idea why. I have a stereo audio file in my Timeline and it plays in stereo during editing. I choose stereo