Set item master value in UDF
Dear All,
I have created 1 UDF in Item master Title level.
Ex UDF1= 14A. This is already stored with the Item master data in DB.
I have created another UDF2 in invoice at row level.
Now i want UDF1 value to be displayed at run time in UDF2 when the item is selected.
How to do this.....
swapnil
Hi,
I am getting following error while executing it:
1). [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '$PCH1.ItemCode'. 2). [Microsoft][SQL Native Client][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
and after applying in UDF error is :
Internal error (3006) occurred [Message 131-183]
I am apply this FMS in UDF at row level of A/P invoice.
Similar Messages
-
HOW TO SET ITEM MASTER IN ITEM GROUP AUTHORIZATION
Hello,
Using Sap Business One 2007 B how to solve this item master authorization issue.
Kind regards,
Karunagaranjanani.Hi,
Try this,
Create 1 Mendatory UDF field in Item Master Header.
->> Choose Tools on menu bar.
->> User Defined fields. -> Manager User Fields.
->> Open the Manager User Fields Window.
->> Master Data.
->> Items. -> Items.
and Click Add button in bottom right then add the UDF Title & Description.
put the Tick mark of Set Default value for Field and put the value of 0.
then, put the Tick mark of Mendatory Value and add the UDF.
Assign the below FMS in UDF.
->> Open the Item Master and ShiftAltF2 in UDF then put the Saved Query.
put the Tick mark of AutoRefresh and select the Item Group,
put the Tick mark of Display saved values.
Try assign the below FMS in UDF(Mendatory field).
for example: Item Group -> (100) -> Item.
Item Group -> (101) -> Accessories. Item Group -> (102) -> Hardware.
USer sign 1 -> Manager. USer sign 2 -> Admin.
SELECT ' ' FROM OITM T0
WHERE
$[OITM.ItmsGrpCod] in ('100', '101', '102')
AND
$[OITM.UserSign] in ('1', '2', '3')
Regards,
Madhan. -
Query to set item default value
I'm trying to set a default value of an item by using a query. The first thing I tried is setting the source value to be:
select 'TRDM-R-'||LPAD((MAX(SUBSTR(EXPAND_REQ_ID,8,3))+1),3,'0') EXPAND_REQ_ID FROM BANKSRG.TRDM_REQUIREMENTS;
with item display type as Text, source type SQL Query. This displayed the value in the form, but did not save to the DB. (I tried all the other display types for text too)
The next thing I tried (a suggestion for someone else in the forum) was set item display type is Display as Text (based on PL/SQL, does not save state), and the source type is PL/SQL Anonymous Block, with this query:
for c1 in
(select LPAD((MAX(SUBSTR(EXPAND_REQ_ID,8,3))+1),3,'0') EXPAND_REQ_ID
FROM BANKSRG.TRDM_REQUIREMENTS)
LOOP
htp.p('TRDM-R-'||C1.EXPAND_REQ_ID);
EXIT;
END LOOP;
but I get this error: Error ERR-9132 Error in PLSQL expression for item default code, item=P2_EXPAND_REQ_ID
Then I tried the above query in the Default Value section, with the same error.
I've also tried adding computations, but if i get the value to display, it still won't save to the DB.
I would greatly appreciate any suggestions!
RobinIn case anyone else is new to HTMLDB and needs the answer to this question, I finally figured it out.
In the Item the Display is Text Field, Source Used is Always..., Source Type Database Column, Source Value EXPAND_REQ_ID, Default Value &P2_EXPAND_REQ_ID., Default Value Type is Static Text...
Then I created a Before Region computation, type sql Query, entered my query in the computation,
select Condition Type Value of Item in Expression 1 is NULL, Expression 1 is P2_EXPAND_REQ_ID.
Not so difficult, it just took a lot of time to try all the options. -
Hi,
Is there a way to include the UDF in the items master data into the <<Inventory In Warehouse Report (Detailed)>> PLD?
I checked the default layout and found out all the column source type is "free text" and the content is #Item, how do I know the value of the UDF?
ThanksHi,
Some of the standard reports are hardcoded in sap. Not possible to add UDF field in PLD.
Also refer this thread Variables - Sap business one
Thanks & Regards,
Nagarajan -
Cannot set the default value of an item in the detailed table
Hi,
I have Master-Detail group, both are Table formats.
I need to set the default value of an item in the details row to the value of an item in the selected row in the Master table.
I tried Default Display Value=#{row.MasterItem}, but it seems it is trying to access current details row instead of the Master.
I tried #{bindings.MasterGroupColumnName.inputValue}, but it does not work.
Any ideas
Thanks in advance
MohamedI think I now what I'm doing differently, I had the "New Rows" JHS property of the detailed table group "empty" instead of the default "2" value.
It seems that "Default Display Value" expression works only for the new records specified in the "New Rows" property. But when I try to "Add" new record using the "Add Row" button, the new record inserted does not have the default values generated, only has values populated for the items of the FK (in the view link) but not the ones set through the property.
I guess in a nutshell, how I can get the details item to behave like the FK columns?
Thanks much
Mohamed -
Item Code Auto generation in item master UDF field
Dear Expert,
I want to Generate automatic item code in the item master U_STY UDF field . the number start with 'SL' prefix
like this 'SL000001' and continue when i generate next item master.
for example 'SL000001' for X item . when add next item Y then item nuber will be 'SL000002'. kindly help me.
thanks.
sridharan
Edited by: Sridharan.R on Oct 28, 2011 10:02 AMHi!
Try this
declare @temp as char(15)
IF (Select max(Itemcode) from OITM ) IS Null
BEGIN
set @temp = 'SL000001'
select cast(@temp as char(15))
END
set @temp=(select max(right(ItemCode,6)) + 1 from OITM )
set @temp='SL'+isnull(replicate(0,6-len(@temp)),'')+@temp
select cast(@temp as char(15))
END
Regards,
[Thanga Raj K|Q3 Wrap-Up: What happened in the third quarter of 2009 in the SAP Business One Community] -
Automatically Update a UDF in the Item Master
Hi Experts,
I am new to SAP Business One. I need to update automatically the value of a UDF. The value will be calculated using data from related tables. Calculation includes -summation, divide and minus etc. Could you provide guide.
For example a new UDF should contain the suggested quantity to order in the Item Master Data. This is calculated considering the running average sales quantity as of current time for this month and deduct the available quantity on hand and also deduct the quantity already ordered (arriving soon to be delivered to warehouse).
Formula: = ( S / N ) * D - ( OnHand ) - ( Ordered )
where S = Quantity sold so far within this month
N = days count ( if today is March 18, N = 18 )
D = number of days for this month. (can be 28, 30 or 31 days)
This means that the data in the database must also be updated. I appreciate your input.
If possible, the OITW, MinOrder will be updated instead of a UDF.Haven't tested it properly, but something like this....
select
(s0.qty / datepart(day,getdate())) * datepart(day,(DateAdd(day, -1, DateAdd(month, DateDiff(month, 0, getdate())+1, 0)))) - t0.onhand - t0.onorder
from
oitm t0
left join
(select t0.itemcode,
sum(t0.quantity) as qty
from inv1 t0
inner join
oinv t1
on t0.docentry = t1.docentry
where datepart(month,t1.docdate) = datepart(month,getdate())
and datepart(year,t1.docdate) = datepart(year,getdate())
group by t0.itemcode) s0
on t0.itemcode = s0.itemcode
where t0.itemcode = $[OITM.ITEMCODE]
Currently this adds up the qty from all invoices, if you want to subtract credit notes you just have to build in a second subselect from ORIN and RIN1 and subtract them off.
Hope this helps. -
Dear Experts
I am getting the following error message while adding item in Item Master data. I have modified the following SBO_SP_transactionNotification in SQL server after that could not able to add the item
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
@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 -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
-- IF @OBJECT_TYPE = '59' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
BEGIN
IF EXISTS(
SELECT T0.Price FROM IGN1 T0
where IsNull(T0.Price, '0') = '0' and T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @ERROR=1,@ERROR_MESSAGE='Please insert the price !'
END
end
-- Select the return values
select @error, @error_message
endHi Rathna,
Just put the SP like this, without the -- before the IF. A -- marks the line as a command therefore you need to uncomment and it will work.
IF @OBJECT_TYPE = '59' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
BEGIN
IF EXISTS(
SELECT T0.Price FROM IGN1 T0
where IsNull(T0.Price, '0') = '0' and T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @ERROR=1,@ERROR_MESSAGE='Please insert the price !'
END
end
Hope it helps -
HOW TO SET A ITEM DEFAULT VALUE to today
I have a item using select list and I like to set this item default value as
today's date , such as "select to_char(sysdate,'YYYY-MM-DD') from dual"
HTMLDB failed recongnize the default value, or throw error Error ERR-9132 Error in PLSQL expression for item default code, ...". I have tried each of 3 avaialable Default Value Types
Per http://forums.oracle.com/forums/thread.jspa?messageID=443287, it is used to be doable, but the default value type (sql) is no longer avaialble in HTMLDB 2.0
I would appreaciate it very much if anyone has successfully done this before, either set to today or current monthChing - Did you try a PL/SQL Expression using to_char(sysdate,'YYYY-MM-DD')?
There have been no changes to the item default types available in HTML DB. The thread you referenced is for Oracle Portal, a separate and unrelated product.
Scott -
Set Length in Inches in item master data in purchasing tab
Dear Experts,
I want to set the length,width and height in Inches in the item master data of purchasing data tab. By default it is coming in meter. Please help me
Regards,
RavindraHi Ravindra......
Go to Administration --> System Initialization --> General Settings --> Display Tab --> Default Length UoM --> set in Inch.
Hope this will solve your problem.......
Regards,
Rahul -
Can't Set Item Value After Calling Stored Procedure
In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate.
When I run the form and execute the program unit the stored procedure executes successfully, but then the program unit gives me a No Data Found error when I set the value of the date item on the block. The value of the date item never changes. However, if I comment out the call to the stored procedure, the date item changes to sysdate and there is no error message generated.
Just to be sure, I moved the logic to set the date item value to a separate button on the form. Then I re-ran the program unit. The stored procedure executed successfully. Then I clicked the button to set the value of the date field on the block, which gave me the same no data found error.
Then I commented out the call in the program unit and re-ran the test. The program unit executed. Then I clicked the button to set the date value in the block and it was set to sysdate with no errors.
Why can I not set the date item after running a stored procedure?Seems like a MSDTC config issue
See if this helps
http://support.microsoft.com/kb/2027550/en-us
http://zarez.net/?p=1469
http://danieladeniji.wordpress.com/2013/03/06/microsoft-sql-server-linked-server-error-the-partner-transaction-manager-has-disabled-its-support-for-remotenetw/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Set as default value the Item Category in the Maintenance Order
Hello everyone,
We are trying to find a user exit in order to set as default value the item category in the Maintenance Order once the Material has been introduced (Tag Components).
SAP Customizing let the user set the Item Category automatically per Material Type, but we need to set different Item Categories to materials belonging to the same material type.
We would really appreciate any help relating this issue.
Thank you very much,
Víctor LiedoDear Paul,
Thank you very much for your response.
I had already tried customizing mentioned by Pithan, but it did not work because we need to set different Item Categories for Materials with same Material Type.
We have been searching for exits which may let us set Item Category in the Maintenance Order, but it does not seem to be possible.
What you say about adding some custom validation through user exit, not to set item category as default value, but to check if the one entered is valid, sounds the best way of achieving our commitments.
I have tried to look for CNEX0037 & CNEX0038, by using transactions SE37 and SE38, search for programs and functions modules, but it did not work. Could you please tell us what kind of objects are?
Thank you very much in advance.
Víctor Liedo -
Problem in Set GLby in Item Master
Dear All,
I am facing problem in set GL by method in item master, In my master I have defined some items with warehouse determination, some items with Item group determination and few items with Item level determination.
but in case of items for which i have set GL by item level are automatically changes to item group as i have determined GL at item level and my item group GLs are blank system wont allow me to transact as there is no account in item group and anyway it is not desired .
anybody has faced problems like that and what would be the possible solution
Thanks,
Regards,
Atul JoshiHi Atul,
>> I am facing problem that in Item master "Set GL By" changes from Item level to Item Group automatically
I am not sure whether my reply will be of any further help to you or not!
However, would you please check whether this behaviour is also reproducible in demo database (say OEC computers) or any other database on the same server environment.
If you are able reproduce the same problem in all databases that are configured in your current server environment, I recommend to report the issue to support via a ticket (if not created already).
If the problem is with only one database then as already recommended by other experts on this thread:
1. Comment all user code in Stored procedure
2. Verify if any formatted search queries are active on Item Master (like auto number generation, like ...)
3. Is there any add-ons that are active on Item Master
Would appreciate if you also write back whether you are not able to update on change of "Set GL By" (or) it is getting changed automatically from item level to Item group.
Good Luck.
Regards
Satish -
Good day,
I have a form with a Data Block and two items in the Data Block. The first item is a checkbox, while the second is an ID. I've set up a trigger on the ID item (POST-CHANGE) that should set the checkbox item if the ID has a valid system ID. The problem I'm having is that I can't seem to be able to set the checkbox. I need advice.
Data Block = VARREQ
Items:
USE_VAR_FLAG (valid values are "Y", "N")
VAR_ID (valid values are a number)
The code I've tried so far:
begin
:VARREQ.USE_VAR_FLAG := 'Y';
end;
This does not set the checkbox value.Hi ThomasBoxall
As a result when the code triggers it only applies to the first value of the LOV and every subsequent check box is not being checkedit's not very clear to me but it's row by row the validation is made...
provide a resource on how to step through a LOV to check every checkbox in the LOV that has a valid VAR_ID?a check box is a form item has 2 values y or but when dealing with LOV u r dealing with db column compared to e.g. a form item to be validated or compared with in the WHERE clause statment in the record group when building a query (Record Group) of a List Of Value.
Any way,here is a link on How to Create a List of Values and all other forms basics for beginners from scratch.
For more visualization pls watchOracle Forms lesson 4 (create LOV)
Hope this helps...
Regards,
Amatu Allah -
How to set the default value of an item type DATE PICKER to the day of yest
Hi
How to set the default value of an item type DATE PICKER to the day of yesterday ?
Thank you very much !
Christian.Hi Christian,
Have a look at this thread Re: Default the Date Picker to Today
It covers this issue in detail.
Regards
Paul
Maybe you are looking for
-
Hi, I have an ongoing problem with scanning from my Canon Pixma to my Mac Airbook. The printer scans, but the image is not made available on the computer - Image Capture says that 'no device is connected'. Having done some internet research, I see th
-
Battery Recall (Need Serious Help)
Hi all, I have a Black Macbook (July 06). My battery for the last 3 weeks has been horrid. My computer lasts a total of 1.5 hours under min. brightness and no serious workload. And the worst part is, it just shuts off, doesn't sleep when it gets low.
-
ITunes App Stuck Loading on "More" Button
I have a strange issue that I haven't seen reported anywhere else. I recently purchased a song on itunes on my mac, and wanted to download it on my iphone. When I opened the iTunes store and clicked on "More" to find my available purchased downloads,
-
Hello all, I'm novice in Flex and I would like to know how to show my hard disk tree in a mx:tree. Is it possible?Is anyone could help me? Thank you.
-
HT4097 I have tried everything, my ipad is still on connect to itunes, help
My ipad has been stuck on connect to itunes for about 2 weeks now, i have tried everything. help me please