UDO type Document, Add lines
Hi All,
I have a problem with a User Defined Object of type Document/Document Lines.
I have a custom form for the UDO. I can add new Documents with one or more Document Lines. These are stored in the database as expected, both Father table and Child table is updated. I can also update existing entries through the UDO, but I can NOT add new Document Lines to an existing Document.
I can add the lines in the matrix of the form, but they are not written to the Child table when I press Update. There is no error messages or anything, the new lines are just not written.
Any suggestions?
Best regards
Jesper Carstensen
When you add a line to the matrix did you increase the size of the datasource as well?
A sample of code to add line:
dbMOR1.InsertRecord dbMOR1.Size
dbMOR1.Offset = dbMOR1.Size - 1
m_oMatrix.AddRow 1
(dbMOR1 is the satasource of the child table that is bound to the matrix columns).
Similar Messages
-
I have a type document UDO i want to duplicate an entry. How can I do it ?
Hello
Please give further background?
What is the purpose???
Best regards -
How to insert a row in UDO of type document with document line using DIAPI
Does somebody knows if there is a way to insert a new row in a UDO of type document and document lines using the DI API?
I tried it by using <i>oCompany.UserTables.Item( "PMX_DOC" )</i> but this was not working.
Thanks for the help.
Regards,
JeffreyWe have to insert the row in a server process so it is not possible to use the UIAPI.
I wanted to do it by writing SQL statements to do the insert/update/deletes but it seems that we are not allowed to do this if you want to certify your addon. Does somebody knows how we can get an addon certified but also updating our own UDO using DIAPI?
Thanks.
Regards,
Jeffrey -
Linking the UDO of type document to user defined field
I created the user defined field and i need to link the UDO of type document to that user defined field. How to link the UDO to user defined field.
Dear
do you mean to add a user defined field to an document type UDO? if this is the case,
1. create the UDT
2. go to Tools-> customization tools->User Defined Fields-Management, expand User Tables, add the udf to the UDT
3. register the UDT as UDO.
best regards,
xiaodan an -
Table to link FI document number, line item and pricing condition type
Hi,
I am looking for tables to link the FI document number, line item and PO pricing condition type.
Appreciate any help on this.
Thanks.For any PO in ME23n in which Goods receipt has happened, you can check in the itemdetails->Po history tab in ME23n.
Here you will find the material document number. Just click on the material document, it will take you to anpther screen here you will find a button for FI document.
Click that button for FI document. In PO history istelf you can see the Condition types.
Hope this helps. -
RWIN to automatically add line items in FI document
Hi all!
I wish to know if is possible to automatically add line items in a FI document via RWIN and how.
My final goal is the following:
A user try to create an FI document with FB01 transaction.
He/She insert the appropriate line items manually.
He/She press the "Simulation" button
In simulation screen there are user's line items, PLUS some more that are necessary in some circumstances.
Is it possible to achieve this scenario?Hi Marinos,
i think it's possible via table <b>TRWPR</b> and an
appropriate function module but it's hold for a modification by SAP.
other possible solutions:
- user exit ?
- interface ( e.g. Intranet-appl. / excel)
and posting via RFBIBL00 / BAPI
regards Andreas -
Is there a way to add line numbers in the margin?
Is there a way to automatically add line numbers in the margin of a document?
Hi Brian,
If you go with Peter's suggestion, there are some details that since I've got a minute here, I'll mention...
Set your Line Spacing for the document text to "Exactly" before you begin adjusting your table, otherwise you will have registration problems.
Your Table will have to be a Floating object. Otherwise you won't be able to slide it into the margin. And, speaking of the margin, stay out of the gray area with the numbers if you want to print them. The gray border around your document is the area that the printer driver says is non-printable.
In the Table Inspector, set Columns to 1 and Rows to 20 or whatever you prefer for your document. Set the number of Header Rows to 0.
To apply the numbering, use the Fill feature: Type 1 in the first cell, type 2 in the second cell. Select both cells. Grab the Fill Handle in the lower right corner of the selection and drag it down to add a series of numbers to the rest of the column. (Easier than typing.)
Decide how you want to justify the numbering. The Text Inspector has both vertical and horizontal justification controls for this. Just select the entire table and make the settings.
Set the cell height to match the text line spacing. You can get close with the table row height, and maybe closer with a minor line spacing adjustment. Don't expect perfection, but you can get pretty close.
You probably don't want the cell borders to show, so with the entire table selected, go to the Graphic Inspector and set Stroke to None.
Lastly, cause the table to appear on every page by doing: Format > Advanced > Move Object to Section Master.
Regards,
Jerry -
Updating user table (type document) via api
hi!
i need to update an user table that is of type document.
that table is also used as the client table in an udo.
i have tried the following code, but that of course doesn't work as the table is not a plain table but is of document type:
Dim objUserTable As SAPbobsCOM.UserTable
Set objUserTable = objCom.UserTables.Item("MP_TABLE_LINE")
If objUserTable.GetByKey(objMatrix.Columns.Item("U_MP_BEnt").Cells.Item(lngRow).Specific.Value) Then
objUserTable.UserFields.Fields.Item("U_Qty").Value = _
objUserTable.UserFields.Fields.Item("U_Qty").Value - dblDiff
If Not objUserTable.Update() <> 0 Then
Call objApp.SetStatusBarMessage(objCom.GetLastErrorDescription())
Call objApp.MessageBox(objCom.GetLastErrorDescription())
Else
objMatrix.Columns.Item("U_MP_BQty").Cells.Item(lngRow).Specific.String = _
objMatrix.Columns.Item("11").Cells.Item(lngRow).Specific.String
End If
End If
Set objUserTable = Nothing
then i tried to use a dbdatasource which i would expect to work:
Dim objDataSource As DBDataSource
Set objDataSource = objForm.DataSources.DBDataSources.Item("@MP_TABLE_LINE")
Dim objConditions As New SAPbouiCOM.Conditions
Dim objCond As SAPbouiCOM.Condition
<just setting up conditions here>
Call objDataSource.Query(objConditions)
Call objDataSource.SetValue("U_Qty", 0, objDataSource.GetValue("U_Qty", 0) - dblDiff)
but this only results in an error code "-7006", message:
"Item - The item is not a user defined item"
how can the update be done?
regards,
thomasHi Thomas,
U are using UserTabel Obejct , just try to Use UserTabelMD object
i am sending to how to create the User Table,
Hope it will help to
oUTb = mobjCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
If Not oUTb.GetByKey("SPH_FORMS") Then
oUTb.TableName = "SPH_FORMS"
oUTb.TableDescription = "Activity Forms"
oUTb.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData
If oUTb.Add <> 0 Then
mobjCompany.GetLastError(lRet, sErrMsg)
Else
oUTb = Nothing
end if
be carefull before using MD object , bcoz at a time only one MD object should be in memory else it will give to Error
Thanks
Ankush Vachher -
Insert data in UDT of type Document/Document_line
hi all
i am in great need to insert data in a UDT of type Document/Document_line through code. i have created a UDO of my tables and now want to insert data in these tables through code.
how to achieve this, plz do reply me as soon as possible
thanks.Dim userTable As SAPbobsCOM.UserTable
'Use the user table we added before
userTable = oCompany.UserTables.Item("YourTableName")
'Add a first row in the table
userTable.Code = "A1"
userTable.Name = "A.1"
userTable.UserFields.Fields.Item("U_Your1stField").Value = "First value"
userTable.UserFields.Fields.Item("U_Your2ndField").Value = "2nd Value"
userTable.Add()
'Second row in the @TB1300 table
userTable.Code = "A2"
userTable.Name = "A.2"
userTable.UserFields.Fields.Item("U_Your1stField").Value = "Second value"
userTable.Add()
userTable.UserFields.Fields.Item("U_Your2ndField").Value = "Row 2 UDF 2"
userTable = Nothing -
UDO implementation DLL: Add base method
Does anyone have any sample code on how to add data to object using the Add base method of the cSBOBusinessObject in C++?
Message was edited by: Frank Moebius
...made the subject "a bit" more specific...SBOErr CLogisticsMasterDataObject::OnAdd ()
/*e.g. call OnAdd of base class first (could do it later though...)*/
SBOErr sboErr = CSboBusinessObject::OnAdd();
if (sboErr != noErr)
return sboErr;
/* "FOM_UDO2" is the 2nd UDO here... - type Master Data*/
CSboBusinessObject *pObject = CSboBusinessObject::CreateBusinessObject (_T("FOM_UDO2"));
pObject->SetValue((_bstr_t)"Code", (_bstr_t)"4");
pObject->SetValue((_bstr_t)"Name", (_bstr_t)"4");
/* Add the new record for the 2nd UDO... */
sboErr = pObject->Add();
if (sboErr != noErr)
return sboErr;
/* "SM_BLK" is the 3rd UDO here... - type Document*/
CSboBusinessObject *pObject = CSboBusinessObject::CreateBusinessObject (_T("SM_BLK"));
/* no key required since generated automatically (remember that this is a Document!*/
/* "Add()" would be just enough ;-) */
/*//pObject->SetValue((_bstr_t)"U_BPCode", (_bstr_t)"C20000");*/
/*//pObject->SetValue((_bstr_t)"U_BPName", (_bstr_t)"Customer with Blanket Agreement");*/
/* Add the new record for the 3rd UDO...*/
sboErr = pObject->Add();
return sboErr;
"error"
As said in the reply before:
"Please note that the entire OnAdd runs inside a global transaction (like you do it in DI API with StartTransaction/EndTransaction)..."
Please take a look at the E-learning material:
https://www.sdn.sap.com/irj/sdn/businessone-elearning
This flashbook should answer your question - even though it is focussing on DI API...:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d4f9bdf9-0901-0010-d798-ac79d485348e
HTH
Message was edited by: Frank Moebius -
Urjent-how to add line items in tcode-FBL3N
Hi Experts,
How to add line items customer, customer name, vendor and vendor name in FBL3N.
Thanks in advance.
mahe
Moderator message - Please do not use words like "urjent". Please ask a specific question. Please search the forum. This question has been asked and answered before. Post locked
Edited by: Rob Burbank on Apr 29, 2009 11:27 AM
Edited by: Rob Burbank on Apr 29, 2009 11:28 AMHi,
Check the BTE's:
00001020 POST DOCUMENT: Prior to final checks SAMPLE_INTERFACE_00001020
00001025 POST DOCUMENT: Final checks completed SAMPLE_INTERFACE_00001025
00001030 POST DOCUMENT: Posting of standard data SAMPLE_INTERFACE_00001030
00001050 POST DOCUMENT: Accounting interface SAMPLE_INTERFACE_00001050
Thanks & Regards,
Harish -
Content type "Link to a Document" to content type Document SET
Hello,
Could you please assist.
I have a customized document sets.
I added the content type "Link to a Document” to content type Document SET.
I uploaded several documents to each document set. There are several identical documents in different document sets.
How can I arrange for uploading just a link to the documents, but not the additional documents?
In other words, how to arrange for convenience for users to download a link?
I mean them not to enter
http://server/files ,
but a certain “dropdown” appeared, a kind of menu with a choice of downloaded documents.
Suppose, I added to each file its own attribute link and this link. I want to present in form of creation “Link to a Document”
There are 2 forms of creation. The first one is where we point a link. The second one is where we point the attributes.
For example:
I have two document sets: Project 1 and Project 2.
There are 2 documents “instruction.doc” and “invoice.xls” uploaded to Project 1. Each document has a field – link (a link to this very document).
I want to add a link to “invoice.xls” in Project 2.
I want to do it in that way a user could choose a list of links from a dropdown menu.
ThanksLookup column is the attribute of file. Attribute can not be upload! . Did you try to use the content type of link to document? If yes, you can understand my question. I want to change uploaded.aspx ( link of document) and add lookup column to this form.
Standart scenario: User create link to docunent. 1. Prees button start. 2. Input text link to upload.aspx form 3. Set attributes new. Aspx I want: 1. Press button. 2. User press dropdawn menu and choise neddeng link. 3. Set attributes Plese read my question
again. Sorry for my not good english -
PO PLD Add line text....
Respected All,
In Purchase order PLD in item description i want to add line Text in same table of item description how i can do this.
Regards
MangeshHi
Please kindly check the following tips to see if this can be helpful to some extend:
1) Enlarge repetitive area to 40 for example and tick box u201CHeight Adjustmentu201D
2) Create a calculation field on the very left side in the new row of the repetitive area => Line No.
Create appropriate boarders as well
3) Create a data field for the text :
Tables:Purchase Order-rows
Column:text
Note: On the u201CFormatu201D tab in the parameter u201CLine Breaku201D Choose u201CDivide into rowsu201D
4) Create a text field and call up the tab u201CVariableu201D and select variable 157 and write u201CTypeu201D in the text field. In the u201CGeneralu201D tab un-tick the u201Cvisibleu201D tick box
5) Create another text field and give the value u201CTu201D and un-tick as well the u201Cvisibleu201D tick box on the u201CGeneralu201D tab. In the u201CGeneralu201D tab un-tick the u201Cvisibleu201D tick box
6) Create a calculation field
Type: Formula
Field 1: the variable field from point 4)
Operation: Not Equal
Field 2: the text field created in step 5)
Un-tick the u201Cvisibleu201D checkbox on the u201CGeneralu201D tab
7) Link the u201CGeneral Rowu201D number field of the u201Ctext rowu201D to the calculation field from step 6)
Locate the exclusive number of the calculation field either via the field index table or from the u201CGeneralu201D tab of the field properties of the calculation field.
8) Create a calculation field
Type: Formula
Field 1: the variable field from point 4)
Operation: Equal
Field 2: the text field created in step 5)
Un-tick the u201Cvisibleu201D checkbox on the u201CGeneralu201D tab
9) Link the u201CGeneral Rowu201D number field of the u201Citem rowu201D to the calculation field from step 8)
Locate the exclusive number of the calculation field either via the field index table or from the u201CGeneralu201D tab of the field properties of the calculation field.
10) Link each filed, except the u201CGeneral Row No.u201D field, of the item and the text line to itself.e.g. use the index to locate these.
These fields should be: quantity /item no/price/total etc.
And link as well the data field created in step 3) to itself.
Best Regards
Helen Sun
SAP Business One Forums Team -
Adobe Acrobat XI add line numbering on left hand side
In Adobe Acrobat XI were is the option to add line numbering on the left hand side of the page for documents?
If it is a Word document that you used to create the PDF, Then Word has the ability to show line numbers.
Two methods:
Layout Tab on Ribbon click in Line Numbers.
From Main Menu choose format Menu > Document > Layout. Click Linember button and set up as desired.
Then create your PDF.
Note this is shown using a Mac. But the same thing is in The PC version as well. -
BAPI_PR_CHANGE : Add line items
I've read some contradicting posts regarding bapi: BAPI_PR_CHANGE. I was under the impression you could add line items to a requisition using this BAPI? Can it be said for certain it can not be done? The documentation is rather lacking.
Thanks!
Enrique Leonit's very easy to do this with this BAPI.
If you have experiences with BAPI_PO_CHANGE you have done this within some minutes.
Here's some sample-coding. Maybe this will help you:
LOOP AT it_change_pr INTO wa_change_pr.
ADD 10 TO lv_pr_counter.
wa_pritem-preq_item = lv_pr_counter. "Item Number of Purchase Requisition
wa_pritem-material = wa_change_pr-orig_matnr. "Materialnumber
wa_pritem-plant = lv_plant. "Plant
wa_pritem-pur_group = lv_pur_group. "Purchasing Group
wa_pritem-store_loc = lv_store_loc. "Storage Location
wa_pritem-quantity = wa_change_pr-menge. "Purchase Requisition Quantity
wa_pritem-unit = wa_change_pr-meins. "Purchase Requisition Unit of Measure
wa_pritem-del_datcat_ext = lv_del_datcat. "Date type (day, week, month, interval)
wa_pritem-deliv_date = lv_deliv_date. "Item Delivery Date
wa_pritem-fixed_vend = wa_change_pr-lifnr. "Fixed Vendor
CLEAR: temp_matnr.
CONCATENATE '0000000000' wa_change_pr-matnr INTO temp_matnr.
SELECT SINGLE * FROM mbew
WHERE matnr = temp_matnr
AND bwkey = wa_change_pr-werks.
IF sy-subrc = 0.
wa_pritem-preq_price = mbew-stprs. "Price in purchase requisition
wa_pritem-price_unit = mbew-peinh. "Price Unit
ENDIF.
wa_pritem-purch_org = lv_purch_org. "Purchasing Organization
** wa_pritem-po_unit = wa_change_pr-meins. "Purchase Order Unit of Measure
wa_pritem-vend_mat = wa_change_pr-matnr. "Material number used by vendor
wa_pritemx-preq_item = lv_pr_counter.
wa_pritemx-preq_itemx = 'X'.
wa_pritemx-material = 'X'.
wa_pritemx-plant = 'X'.
wa_pritemx-store_loc = 'X'.
wa_pritemx-pur_group = 'X'.
wa_pritemx-quantity = 'X'.
wa_pritemx-unit = 'X'.
wa_pritemx-del_datcat_ext = 'X'.
wa_pritemx-deliv_date = 'X'.
wa_pritemx-fixed_vend = 'X'.
wa_pritemx-preq_price = 'X'.
wa_pritemx-price_unit = 'X'.
wa_pritemx-purch_org = 'X'.
wa_pritemx-vend_mat = 'X'.
APPEND wa_pritemx TO it_pritemx.
APPEND wa_pritem TO it_pritem.
ENDLOOP.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = lv_banfn
* PRHEADER =
* PRHEADERX =
* TESTRUN =
* IMPORTING
* PRHEADEREXP =
TABLES
return = it_change_return
pritem = it_pritem
pritemx = it_pritemx
* PRITEMEXP =
* PRITEMSOURCE =
* PRACCOUNT =
* PRACCOUNTPROITSEGMENT =
* PRACCOUNTX =
* PRADDRDELIVERY =
* PRITEMTEXT =
* PRHEADERTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
Maybe you are looking for
-
IPod Video 5G Not recognized on MacBook Pro 17 Intel
My Ipod video 5G is not showing in iTunes or on my desktop. Not showing in System Profiler either. The ipod does charge however. I'm frustrated and stumped. I've tried the 5Rs a number of times but can't even get to the "Restore" portion. iPod works
-
Another iPod Mini showing in XP but not iTunes.
I think the subject pretty much says it all. Up until this week, my Ipod was connecting into iTunes without problem, then all of a sudden it is being picked up by windows but iTunes doesn't see anything, nor does the auto updater. (At least I can kee
-
"Error When Creating the form" in "Salary Statement"-Benefits and Payments
hi When I enter the option "Salary Statement" (in "Benefits and Payment") shows me the error "Error When Creating the form" http://img571.imageshack.us/img571/9986/payroll1.jpg (in "Salary Statement") http://img153.imageshack.us/img153/3007/payroll2
-
MY APPLE ID HAS BEEN DISABLED WHAT DO I DO?
Hello, please help, how do I enable my apple ID?
-
Integrating drop ship products with BC Ecommerce
I wanted to let the Business Catalyst community know about our new integration with the BC Ecommerce platform for automatically loading and updating products from most major drop ship distributors in North America (and some European based ones as wel