Using UDF in Marketing documents
Dear All,
I made two UDF in Marketing docs rows and the same rows in Accounting - Journal transaction rows
The goal is: Every time when the user creates a marketing docs, I'd like to insert the corresponding data to accounting. What should I do for this? Could this be automatically somehow? Is it a simple way to capture all of the events which modifies the journal entries?
well,
i would do it so:
use et_VALIDATE and/or et_LOST_FOCUS in the matrix and make one procedure for all documents.
to be sure the code only works for your documents filter it like
if (pval.FormType = 139 or pval.Formtype = 133 or ...) then
anyway, it will be very tricky, because you will get troubles when more documents are opened
regards
David
Similar Messages
-
How to update UDF from marketing documents to Journal Entry UDF
Hi Experts,
I have a UDF in the marketing documents and I want to save the value to Journal Entry UDF.
Regards,
JummieHello Jummie,
If I understand correctly, the scenario is that copy the value of UDF from marketing document to the UDF its target JE from when the marketing document is created.
if so, just listen to FormDataAdd Event for the marketing document, copy the value of udf when document is created.
Here is the sample code.
Private Sub FormDataEventHandler( _
ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
'You may add the target documents, 133 - A/R invoice.
'Before action = true, start the transation
If BusinessObjectInfo.FormTypeEx = "133" _
And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
And BusinessObjectInfo.BeforeAction = True Then
oCompany.StartTransaction()
'BubbleEvent = False
End If
'Before Action = false,
'Update product item tree
'Succeed, commit, otherwise rollback
If BusinessObjectInfo.FormTypeEx = "133" _
And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Then
If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
Dim objectKey As String = String.Empty
oCompany.GetNewObjectCode(objectKey)
MsgBox(BusinessObjectInfo.Type)
Dim oInvoice As SAPbobsCOM.Documents = Nothing
oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
If oInvoice.GetByKey(CInt(objectKey)) Then
'Retrieve the UDF value in documents
Dim udfValueInDoc As String = oInvoice.UserFields.Fields.Item("***").Value
Dim oJE As SAPbobsCOM.JournalEntries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
'Retrieve the JE for the document
oJE.GetByKey(CInt(oInvoice.JournalMemo))
Dim succeeded = True
'add you code to copy the UDF from document into JE
If succeeded Then
'update the production tree succesfully,
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
Else
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
End If
End If
End If
End If
End Sub
Regards, Yatsea -
Hi Experts,
The UDFs and FMS which are working fine in A/R INV, not working in Sales ORder (Whenever trying to attach FMS, it shows internal error occurred)Hi,
Most FMS if structured correctly should work across all marketing documents as the table structures are the same.
The FMS's will not work however, if you are including table names in the queries, e.g. $\[ORDR.CardCode\] instead of $\[$-4.CardCode\] or $\[RDR1.ItemCode.0\] instead of $\[$38.1.0\]
If you are unsure how to replace the table names with the form references, simply change the table names in your query, save it with a different name and apply that query to the different screen.
There are some instances where using the table name is necessary, for example if you need to pick up header level UDFs $\[ORDR.U_UDF\].
If you are a SAP partner or customer, there is a useful e-learning session in the education section that will help you.
Post your query here if you have further problems.
Regards,
Adrian -
Hi,
When I add an UDF in the Marketting Documents -> Row/Title it appears in all the marketting related documents.
How can I add it only for say AR Invoice.
I tried defining Category for the user defined fields. But then I will have to do it for all the documents one by one seperately as this category definitions are not available when I go to the next document type.
How shall I handle this ?
Thanx in advance.
With Regards,
Ram.Hi Ram,
The UDF is correctly designed to apply to apply to all marketing documents in the event that say you start using the field in a sales quotation the informations will automatically carry forward to the sales orders, an automatically created purchase order and A/R Invoice etc.
For your issue you simply need to adjust the form settings in all documents where you will not be using the field.
It's a little work but just the way it is!
Jake -
Image UDF on Marketing Documents for Signature
Hi,
I'm using SAP B1 2007A (PL48) with B1DE 1.4
SCENARIO:
For certain Marketing Document Forms (AR Invoice, Sales Order etc) , I need to capture a physical signature via an ePad and save the resulting jpeg with the Marketing Document.
I've created a UDF on the Marketing Documents Title of type Image.
I've added a button to the form (for example AR Invoice) which lets the user capture a signature and saves it to a file.
QUESTION:
How can I programatically load the saved jpg file to the Image UDF?
Please advise.Hi Ben,
Unfortunately, because you are doing this on a system form it isn't easy. The PictureBox control is what you need to set the picture but I gave it a quick test and although I can create an instance of the PictureBox control and set it to an image UDF field, any value I set to the Picture property is not saved to the UDF.
An alternative approach:
1) Create a separate UDT. In this table you'll need columns for DocType and DocEntry (so you can link a record back to a marketing document) and an Image UDF.
2) Create a simple form that just has a PictureBox control on it. Bind the control to the image UDF on your table.
3) Add a button (in the form load event) to each of the marketing documents that need a signature.
4) Trap the event of the user clicking on the button in the marketing document form and open your new form. Use conditions in the DBDataSource to show the correct signature image.
To import the scanned image you'll need to do the following:
1) Copy the image file to the Pictures folder (as set in the General Settings path tab).
2) Add an entry to the UDT for the correct document type and entry. For the image UDF you should set just the image file name and not the full path.
Hope that all makes sense!
Kind Regards,
Owen -
UDF In Marketing Document At Title Level - Display/Activate
Can you display an UDF in a Marketing Document and if so how do you make it visible and active? I see how to do this for the rows but not the title.
Go to menu - View - User Field. Or simply CtrlShiftU.
It will be visible and active by default unless you manually uncheck the boxes under setting.
Thanks,
Gordon -
Hi Expert, Using DI transfer Marketing documents one db to another database
Hi all,
I want to transfer my all Marketing documents data from one company to another locally or remotely using DI (SAP B1) .
Please guide me .
Thanks
Rajkumar GuptaHello
You must export a document into xml file, and import it to another company.
Please check this thread, where i gave some guides how to do
This thread is about Journal entries, but the logic/method is the same
Regards
János -
Hi all visible false udf in marketing document
hi all,
i want to visible false udf in the marketing document.but field not show in the forms object.
how is possible.thanks to replr but i haven't got udf in the active form event.
If pVal.FormType = "142" Then 'Purchase Order Form
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And BubbleEvent = True And FLAG = False Then
oFormAPOrder = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
'Form = SBO_Application.Forms.ActiveForm
Dim oItem As SAPbouiCOM.Item
oItem = oForm.Items.Item("U_UIN")
oItem.Visible = False
end if
end if
i read in forum that u have to catch form with -142 then u get the udf of the form.
but i tried my problem not solved.
Regards
Rajkumar -
Limiting Authorization of one of many UDF in marketing documents
Hi
I have created a Additional Authorization Creator for limiting the user from changing the values of UDF Field and its working fine, but the issue is i need to block only one UDF which i have created.
For Eg.
There are some 5 UDF (Header Level UDF) in a marketing document, namely
UDF 1 - Transport Name
UDF 2 - Transport Type
UDF 3 - Vehicle Number
UDF 4 - Driver Number
UDF 5 - Driver Name
I need to block only the UDF 5 from changing and the other UDF's can be changed.
The Additional Authorization Creator which i created block's me from changing all the five UDF Values instead of only that UDF 5 .
What could be reason? Should i need to give any Form Number like what i give 63771 which is for Form Settings?Hi
you can open the document , open the user defined field
go to tools---customization tools ---settings
you will see the list of UDF you can just select which UDF you want to update
you can mark 4 UDF as active and the 5-th UDF as not active but visible
shachar -
Batch Nos and UDFs in Marketing Documents.
Dear Experts,
I am adding some documents like Purchase Invoice, Sales INv..etc, in SAP B1 using DI, Now the problem is I am adding some Batch information like Batch Nos, Batch Quantity etc. Now in the same table OBTN, I want to fill up some values in the UDF. How do i do this as oPurchaseInvoice.Lines.BatchNumbers.UserFields.Fields.Item("U_lsp").Value is not possible.
Thanks in advance,
Vasu Natari.Vasu,
Unfortunatelly the UserFields collection of BacthNumbers is not implemented in DI API.
You may try:
1. Create a Purchase invoice over SAP B1 GU using bacthes.
2. Enter Defining bacthes screen and fill one the UDFs
3. Issue the Purchase invoice
4. save the last issued Purchase Invoice as xml via DI API,using GetAsXml method
5. Analyze the XML File, and check how the UFD-s are handled in xml
You will see the following in the bacthes area
if you prepare your Puchase Invoice as XML File, and load it from xml, you can manage the User Defined Fields in Batches.
Regards
János -
Setting values in a disabled UDF in Row Details in Marketing Documents
Is there any way for us to be able to disable a UDF in the row details of a marketing document but the disabled UDF should also accept value or updates using SDK? We created a UDF that stores important detail and we don't want the user to edit the value. The current form settings is not possible.
Hoping for your immediate response.
Thanks
Edited by: Cecille Rabara on Jul 6, 2009 11:04 AMHi
you can get form type and item from system information. after getting this information you have to access the column for this particular item(Matrix). just set it to disable and if you have data in your database then it will display by this column at the time of navigation.
I think this will helps u -
Formatted Search - Using field index to refer to UDF in many documents
I have some UDFs in my marketing documents - say U_VALUE
I want to write a fairly complicated formatted search and use it for the same thing across all my marketing documents.
I don't want to use
$[ORDR.U_VALUE]
in my formatted search as this will only work in the sales order document.
I want to use something like
$[$4.0.0]
which brings back the cardcode independant of the form we are looking at. However
$[$U_VALUE.0.0]
will not work!
Hoping someone can help!
Edited by: Daniel Abbatt on Apr 10, 2008 6:16 PMYes you would have to have a UDF called VALUE on the marketing document for this example to run and even then it will error!
That's the point, the code above will not work, SBO only seems to be able to know about ORDR in a sales order and OINV in an invoice. So if I am in a sales order, it errors on the reference to OINV, even though the code that uses the
$[OINV.U_VALUE]
is never actually accessed by the SQL. I guess this is because SBO does the substitutions before it executes the code.
All I am basically trying to do is create a generic formatted search that will perform an action using the value of a UDF, say some formatting, the problem is I want it to work with any marketing document.
The only way I can find to access a UDF though is by having to use the
$[TABLE.U_FIELDNAME]
way, which seems to mean by definition I can only create a formatted search to access a header UDF for a single type of document. I cannot create a generic formatted search, that reverses the string for example, and use that formatted search across all marketing documents.
I know you can access normal fields also by their item reference, i.e.
$[$4.0.0]
, but this syntax does not seem to work with UDF, even though the system information shows the item reference as U_VALUE, I cannot use the
$[$U_VALUE.0.0]
which would be ideal...
Edited by: Daniel Abbatt on Apr 14, 2008 12:05 PM -
Get error when preview marketing documents by using crystal report layout
Hi experts,
I want to switch to using Crystal Report for marketing documents layout. I have import Sales Quotation u2013 Generic (CR) layout which provided by XX-1.2.b1p package. I can preview added records but it doesn't work on drafting documents and saved drafts. The system prompt u201CThe system cannot find the path specifiedu201D and u201CObject reference not set to an instance of an objectu201D. On the same server, it was working fine in our other company database. I don't think this is the problem of database location setting in Crystal Report. Can anyone give me advices, thanks!
Regards,
IvanHi! Rahul,
Thank you for your reply first. Your method doesn't work in my case. Can you tell me the steps of creating a new layout for added records and draft documents. I have created a quotation layout which work with added records only, the steps has been show below and please comments, thanks.
1. In Crystal Report > new blank report > create new connection > Choose "SAP Business One" > Select OQUT under "B1 Tables".
2. Insert "CardName" field to report > Create DocKey@ parameter and set it equal to DocEntry in select expert record function
3. Click Add-ins > SAP Business One > Save > Choose company database and input manager password.
Regards,
Ivan -
While creating the UDF in the Marketing Document ERRor
Dear to ALL
Please give me some solution to the my problem
My problem is
While i am creating the UDF in the marketing document I am getting the error message 131-183 could not able to create the data base.
Any one can help me out releated to this problem
Please .....................................................
With regards to all ........................
Gopi J N
[email protected]
[email protected]Hi JN,
There is no limit in number of UDF but in record length. This a SQL
Server 2000 limitation which establish 8060 bytes as maximum for a
record. This limitation does not exist in MSSQL 2005.
Therefore, in order to be able to add more UDFs you should reduce the
size of the existing UDFs or upgrade the system to MSSQL 2005.
Please refer to the SAP note 816387
The solution to this problem is to decrease the size of the
User Defined Fields. Either by decreasing the length or changing
the definition of "Alpahnumeric" fields to Text, or the last resort
is to remove the fields.
All these actions have to be done via the SAP Business One application.
The change of field type alphanumeric to Text might influence the
performance. -
Use User Defined Tables in a Marketing Document on Row Level
Hello All,
Is there a way to use the fields from a User Defined Table in a Marketing Document on a row level such as for example Purchase Order.
If this is not possible directly, any known work-arounds?
Thanks for your effort,
gr.
FreekThanks for your idea/workaround. To be more precize, we don't want to pull information from a UDT field into a marketing document, but from the row-level we like to write information to an UDT field.
Any idea?
gr.
Freek
Maybe you are looking for
-
my ipod classic is visible in windows but not in itunes, this happens on 2 different computers where my iphone and ipod touch work fine which leads me to think something is up with the ipod itself and i cant find any threads to help. any thoughts any
-
Yosemite is messing with my new Retina Macbook Pro's sound output, help.
I just got my new Retina Macbook Pro 2 months ago and have been noticing some audio output issues. When I try to connect an external third-party audio device to run my KRK monitors my computer does not recognize the device and will not switch the aud
-
hi, i want to know how we can use visual composer with SAP QUERY(ABAP QUERY).IF ANY ONE PROVIDE ME AN EXAMPLE THAT RELATES THE VISUAL COMPOSER AND SAP QUERY THEN IT IS GOOD. I AM NEW TO VISUAL COMPOSER,PLEASE HELP ME GURU'S.IT'S URGENT
-
WM: Openbox I have these in my conkyrc: override_utf8_locale yes use_xft yes xftfont Terminus:size=8 xftalpha 0.8 But it doesn't display the desired fonts, if launched from a terminal error is: Conky: can't load Xft font 'Pie charts for maps:size=8'
-
Startserver.sh script fails on Linux
Hello All, I am new to OBIEE installation. Installed OBIEE and OBIA successfully. Dashboards are not showing Data. I have installed Informatica 8.6.0 & HotFix 4.0 + DAC 10.1.3.4.1 on Linux. In my case Application Server and Database Server is on same