Add Record to UDO Doc and Doc Rows
Good day, people.
I have created a UDO of Document type and i also have the document rows. I have created a custom form using screen painter that is similar to say A/R invoice. Now i need to add a document and the document rows just like A/R invoice does.
How do i do this via DI API?
Hi,
In help file for UDO you have this:
Connect the user form to your UDO as follows:
Set the FormCreationParams.ObjectType property to the Unique ID of your object. Sample
To activate the navigation buttons in the application toolbar for your UDO, use the property DataBrowser.BrowseBy. Sample
To support the Add, Update, and Find services in the user form, add an item of it_BUTTON type with unique ID '1' to the form object. Sample
Best Regards.
Similar Messages
-
Hai,
I want to add records to the UDO table through vb.net coding. How to achieve it?
Thanks in advance!!!Please check the GeneralService Object in the SDK help file. For example:
Dim oGeneralService As SAPbobsCOM.GeneralService
Dim oGeneralData As SAPbobsCOM.GeneralData
Dim oChild As SAPbobsCOM.GeneralData
Dim oChildren As SAPbobsCOM.GeneralDataCollection
Dim oGeneralParams As SAPbobsCOM.GeneralDataParams
'Get GeneralService (oCmpSrv is the CompanyService)
Set oGeneralService = oCmpSrv.GetGeneralService("MainUDO")
'Create data for new row in main UDO
Set oGeneralData = oGeneralService.GetDataInterface(gsGeneralData)
oGeneralData.SetProperty "Code", "First"
oGeneralData.SetProperty "U_Data", "my data"
'Create data for a row in the child table
Set oChildren = oGeneralData.Child("ChildUDO")
Set oChild = oChildren.Add
oChild.SetProperty "U_Data", "child data"
oChild.SetProperty "U_Type", 6
'Add the new row, including children, to database
oGeneralService.Add oGeneralData
See the documentation for the GeneralService methods Add, Cancel, Close, Delete, GetByParams, GetDataInterfaceFromXMLFile, GetDataInterfaceFromXMLString, GetList, InvokeMethod and Update for more code samples -
How to add record in infotype 82 and correspondingly to infotype 2001?
Hi All,
I need to create leaves. I can do it by using "HR_INFOTYPE_OPERATION" and create records in infotype 2001.
But I also need to create corresponding records in infotype 0082.
I have the leave types as stored in infotype 2001, like PCPI, PVCL etc.
But I found that the SUBTY value stored in infty 2001 is different from that stored in infty 0082.
How can I find the relation between these two SUBTY so that I can create the records in both infotypes.
Please reply back if someone knows how to create the leaves in these 2 infotypes.Hi Ganesh,
I could get the relation between the SUBTY in infty 2001 and infty 0082 from the table T554S.
But I could not add the records to the two infotypes simultaneously. I am adding them one after another. -
UDO: Add and Remove rows to/from Matrix.
Hi all,
Yes, I know there are lots of topics about adding and removing rows but I was having trouble with these and I need some expert's opinion.
I'm working with a Document type UDO, with 1 header table (ADAT_ONR) and 1 child table (ADAT_NR1 - MatrixUID = "mtx_NR").
I add the first row when the user chooses the business partner.
If oMatrix.RowCount = 0 Then
oMatrix.AddRow()
oMatrix.AutoResizeColumns()
oMatrix.Columns.Item("V_LineId").Cells.Item(1).Specific.Value = 1
End If
Then, the user has to press the AddRow button to add new rows, and the user can only add 1 new blank row. Later I'll change the row adding behavior to mimic B1s.
If pVal.BeforeAction = False Then
Select Case pVal.ItemUID
Case "AddRow"
'ItemHandler_Click = AddRow(oCompany, oApplication, oForm, oForm.Items.Item("mtx_NR").Specific.RowCount())
oMatrix = oForm.Items.Item("mtx_NR").Specific
If oMatrix.RowCount > 0 Then
If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
oApplication.StatusBar.SetText(TranslateStr(oApplication, MustChoosePallet), BoMessageTime.bmt_Short)
Exit Function
End If
End If
ItemHandler_Click = NewLine(oCompany, oApplication, oForm)
Exit Function
Private Function NewLine(ByRef oCompany As SAPbobsCOM.Company, ByRef oApplication As SAPbouiCOM.Application, _
ByRef oForm As SAPbouiCOM.Form) As Boolean
NewLine = False
Try
oMatrix = oForm.Items.Item("mtx_NR").Specific
Dim Index As Integer = oMatrix.RowCount
With oForm.DataSources.DBDataSources.Item("@ADAT_NR1")
.Clear()
End With
oMatrix.AddRow()
oMatrix.Columns.Item("V_LineId").Cells.Item(Index + 1).Specific.Value = (Index + 1).ToString
oMatrix.FlushToDataSource()
oMatrix.LoadFromDataSource()
oForm.Refresh()
NewLine = True
Catch ex As Exception
oApplication.MessageBox("NewLine(): " & oCompany.GetLastErrorCode.ToString & ", " & ex.Message)
End Try
End Function
When I Add or Update the data, I clear the last blank row, if it exists.
'// In the Click Event
If pVal.BeforeAction = True Then
Select Case pVal.ItemUID
Case "1"
If oForm.Mode <> BoFormMode.fm_FIND_MODE Then
oMatrix = oForm.Items.Item("mtx_NR").Specific
oMatrix.FlushToDataSource()
oMatrix.LoadFromDataSource()
If Trim(oMatrix.Columns.Item("V_PltCode").Cells.Item(oMatrix.RowCount).Specific.Value) = "" Then
oForm.DataSources.DBDataSources.Item("@ADAT_NR1").RemoveRecord(oMatrix.RowCount - 1)
oMatrix.DeleteRow(oMatrix.RowCount)
'oMatrix.FlushToDataSource()
End If
End If
End Select
My question is, Is there an easier way to Add and Delete Rows??
BTW, I still have a problem so solve. With this code, when the user deletes a row the row numbering is incorrect. Example: if I have to rows in a matrix and I delete row nº1, row nº2 will hold the same number...
Any Ideas?
Thanks in advanced,
Vítor VieiraHi Victor,
there is a Form Data event which you ca use in that try to write the code for adding a row after updating and delete a row while inserting and add a row while traversing.
sample code.
Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
Try
Select Case BusinessObjectInfo.EventType
Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD, SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
If BusinessObjectInfo.BeforeAction = True Then
objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
oDBs_Detail= objForm.DataSources.DBDataSources.Item("@Line")
objMatrix = objForm.Items.Item("83").Specific
If objMatrix.VisualRowCount <> 0 Then
objMatrix.DeleteRow(objMatrix.VisualRowCount)
objMatrix.FlushToDataSource()
End If
If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD Then
End If
ElseIf BusinessObjectInfo.ActionSuccess = True Then
objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE Then
objMatrix = objForm.Items.Item("83").Specific
objMatrix.AddRow()
SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
objMatrix.FlushToDataSource()
End If
End If
Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
If BusinessObjectInfo.ActionSuccess = True Then
oDBs_Head = objForm.DataSources.DBDataSources.Item("@Header")
oDBs_Detail = objForm.DataSources.DBDataSources.Item("@Line")
objMatrix = objForm.Items.Item("83").Specific
objMatrix.AddRow()
SetNewLineCharge(objForm.UniqueID, objMatrix.VisualRowCount)
objMatrix.FlushToDataSource()
End If
End Select
End Sub
Hope this helps,
OM Prakash -
I have been sent a word doc and I need to find errors and make comments and send it back to her. I want to add a side comment. I'm using pages and not sure how to do this?
Help please?Well,
Comments will survive the export/import cycle to Word, just as Change Tracking will.
Insert > Comment
Jerry -
I had purchased Imovie today I can find the icon movie it click it but it will not open. Its shows up in docs and purchased but not apps? how do i add it to my bar and open it?!
Exactly where are you clicking, you need to be specific. For example, are you using the Dock, the Applications folder, Launchpad, etc. to attempt to start teh app? Also IOS 7.1.2 does not run on a Mac, what version of OS X is installed on your computer?
-
Hi,
I have 2 tables, and I needed to add/remove some rows from the first table to the second.
I've followed the tutorial: Link: [Add and Remove from a List|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/927d8c3c-0a01-0010-57b4-e89f505e2bff] and it works great!
But the user can add two or more times the same row, so I need to avoid that. The user should be able to add every row only once!!
I thought about some condition on button Add (for example, disable the ADD button if the same row is present in both tables, but it didnt work).
Any ideas to achieve that?
Thanks in advance!
Best Regards
Marcelo.Hi again Ahmed
I've solved my problem, but now I'm facing a new issue about the same topic.
Following your tips, I've found a solution, but now, I need to copy a complete field of a table to the data store.
For example, my table has 4 field (country, key, name and city), and I need to copy ALL the key values to the data store. So, if I have 4 rows in the table, let's say "key1", "key2", "key3", "key4"
I've reached a solution, but it involves to walk throught the entire table, selecting every row automatically (I use a spinner) and "copying" every key field of every row to the data store. When I say "copying" I mean adding it to the same virtual field of the data store, that is to say, concatenating the key values one after another.
The problem arises when the table has more than 100 records, because 100 is the top value that a spinner can reach.
Any ideas about can bypass that limit?
Thanks in advance, your help is really appreciated.
Best regards
Marcelo -
Matrix Add Row and Duplicate Row
Hi All,
Can anybody suggest me how to work on Add row and duplicate row in any document table.
Lets take one example
Sales order document
In this doc we have table format where we specify item no, item description etc. In this table when we right click on particluar row we have option for add, delete, duplicate rows..etc.
wht i would like to know is that when we click add row .....one row is added and number is incremented under # column. Hw to perform and display this auto increment/ decrement of number for these rows under this # column
thanks
harishHi,
I tried following both code, but in that i am geting value. Means i am getting .Value Why i not getting value.
matrix.Columns.Item("V_-1").Cells.Item(pVal.Row).Specific.value = matrix.RowCount
and i also tried for "AddRow",
If pVal.BeforeAction = False Then
Select Case pVal.ItemUID
Case "AddRow"
matrix = form.Items.Item("mtr").Specific
If matrix.RowCount > 0 Then
If Trim(matrix.Columns.Item("V_-1").Cells.Item(matrix.RowCount).Specific.value) = "" Then
End If
End If
End Select
End If
In both example i not getting .Value.
Plz tell y ?
Thanks -
How do I add page numbers on a Pages doc.?
How do I add page numbers on a pages doc.?
It won't work in Layout mode documents but in Word Processor documents:
1. Add a Textbox and move it to the top right, turn off Textwrap
2. Insert a page number in the box
3. Select the Textbox: Menu > Arrange > Section Master > Move Objects to Section Master/Make Master Objects Selectable
4. Insert a Section Break on each page. It has to be a Section break otherwise editing the Master Objects will repeat on previous pages.
Peter -
Clicking a link to a Word doc and it tries to open it with Adobe Acrobat
I recently upgraded to Firefox 4 on my Windows XP Pro SP3 machine. I have Microsoft Office 2007 and Adobe Acrobat 9.4.3 and Adobe Reader X (10.0.1) installed. I clicked on a link to a MS Word doc and I got a dialog box asking what I wanted to open it with. The default option is Adobe Acrobat 9.4.3, which, of course fails with an error message saying it is not a supported file type. I looked at the other options and Microsoft Word is not among them.
Save the Word document. Create your email in your normal mail application (Mail?), click on the add attachment icon (the paperclip if you are using Mail). Navigate to where you saved the Word file and select it. It should now appear as an attachment in your email. If you are sending it to a PC user and you are using Mail make sure 'Send Windows-friendly attachments' is selected in the edit menu. And if you don't want the attachment to display inline within the body of the email Control+Click on it and select 'view as icon'.
-
.pdf and .doc Attachments are downloading as .html files
Dear Forum,
I have received both .doc and .pdf attachments in my email (charter.net).
I click to download, the files then appear on the desktop as Safari files with a example.doc.html file name or example.pdf.html
Of course neither Word or Acrobat Reader can open them without them appearing as scrolling incoherient text...
Why does this happen? I assume the files should download as their true file type such as example.doc or example.pdf
Any help would be greatly appreciated.Hi WinchesterBunnyMama, what exactly is your problem. Is it this issue:
Some users are finding that an update changed the description of "Adobe Acrobat Document" to "Firefox HTML Document". The installer was supposed to add Firefox as an ADDITIONAL viewer for PDFs, not as the DEFAULT viewer. Sorry if you were affected by this glitch and hopefully they will figure out why some systems get changed this way.
You can try this fix suggested by a user in another thread:
# Open Adobe Reader / Acrobat*
# Edit->Preferences
# In the Categories column click 'General'
# Near the bottom of the page click the button marked 'Select Default PDF Handler'
# In the dialog, select 'Adobe Reader XI' (or Adobe Acrobat, as the case may be) and click 'Apply'
# A Windows Configuration screen will appear. Allow it to do its stuff (takes a few minutes), then restart your computer when prompted.
Does that work for you?
''*'' If you do not have Adobe Reader 11, you can install it from here: http://get.adobe.com/reader/ -
How do I edit the wording in file or add to wording in file or Doc.
Hoe di I edit wording in a file or doc.
Thanks but I can edit in word without Adobe defeats the purpose.
From: Sara.Forsberg <[email protected]>
To: Samuel Iglecias <[email protected]>
Sent: Monday, February 23, 2015 12:43 PM
Subject: how do I edit the wording in file or add to wording in file or Doc.
how do I edit the wording in file or add to wording in file or Doc.
created by Sara.Forsberg in Adobe Acrobat.com Services - View the full discussionHi samueli11326032, Do you have PDF file or a Word document (.doc or .docx file) that you're trying to edit? To edit a PDF, you need to use Acrobat. If you have Word doc that you converted from PDF, you can download the file from your account at https://cloud.acrobat.com, so that you can open it and edit it in Microsoft Word. If you've made that far and are having trouble selecting/editing the text in Word, try triple-clicking in the text block that you want to edit. And, if I've completely misunderstood your question, let me know a bit more about the file that you're trying to edit it, and what software you're using, and I'll do what I can to get the issue resolved. Best,Sara If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7222389#7222389 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7222389#7222389 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following" Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624. -
Need to update Enddate on Garnishment Doc and G ordr usg BDC in trans PA30
Hi
I have done the Record which changes the end date on the garnishment Doc and Garnishment Order in transaction PA30. But i need to run a program in a batch which will read the data from a flat file and update all the employees above date.
Now i got the reading from the flat file part done. But the Automatically created program from BDC is not updateing. Its looping through and every thing but the following part is not working. BTW the Auto program added lots of field and stuff. but i just need to update Enddate every thing else should be the same. so i commented out some of the lines. And I was trying to get only the employee number from the flat file. But if i need more stuff as input that can be arranged too.
So here is my code where it suppose to update the endda. Please tell me why its not working...
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RP50G-PERNR'
rec-PERNR_001.
perform bdc_field using 'RP50G-TIMR6'
rec-TIMR6_005.
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE'
'=MOD'.
perform bdc_field using 'RP50G-PERNR'
rec-PERNR_001.
perform bdc_field using 'BDC_CURSOR'
'T582S-ITEXT(04)'.
perform bdc_field using 'RP50G-SELEC(04)'
rec-SELEC_04_004.
perform bdc_field using 'RP50G-TIMR6'
rec-TIMR6_005.
perform bdc_dynpro using 'MP019400' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P0194-ENDDA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'P0194-BEGDA'
* rec-BEGDA_006.
perform bdc_field using 'P0194-ENDDA'
rec-ENDDA_007.
perform bdc_field using 'P0194-GCASE'
rec-GCASE_008.
*perform bdc_field using 'P0194-GSTAT'
* rec-GSTAT_009.
*perform bdc_field using 'P0194-RCVDD'
* rec-RCVDD_010.
*perform bdc_field using 'P0194-GPRIO'
* rec-GPRIO_011.
*perform bdc_field using 'P0194-ORIGN'
* rec-ORIGN_012.
*perform bdc_field using 'P0194-GCATE'
* rec-GCATE_013.
*perform bdc_field using 'P0194-LIFNR'
* rec-LIFNR_014.
*perform bdc_field using 'P0194-ORREG'
* rec-ORREG_015.
*perform bdc_field using 'P0194-ORCNT'
* rec-ORCNT_016.
*perform bdc_field using 'P0194-SCHID'
* rec-SCHID_017.
*perform bdc_field using 'P0194-RULNR'
* rec-RULNR_018.
perform bdc_dynpro using 'MP019400' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P0194-BEGDA'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
*perform bdc_field using 'P0194-BEGDA'
* rec-BEGDA_019.
perform bdc_field using 'P0194-ENDDA'
date.
"perform bdc_field using 'P0194-GCASE'
" rec-GCASE_021.
"perform bdc_field using 'P0194-GSTAT'
" rec-GSTAT_022.
"perform bdc_field using 'P0194-RCVDD'
" rec-RCVDD_023.
"perform bdc_field using 'P0194-GPRIO'
" rec-GPRIO_024.
"perform bdc_field using 'P0194-ORIGN'
" rec-ORIGN_025.
"perform bdc_field using 'P0194-GCATE'
" rec-GCATE_026.
"perform bdc_field using 'P0194-LIFNR'
" rec-LIFNR_027.
"perform bdc_field using 'P0194-ORREG'
" rec-ORREG_028.
"perform bdc_field using 'P0194-ORCNT'
" rec-ORCNT_029.
"perform bdc_field using 'P0194-SCHID'
" rec-SCHID_030.
"perform bdc_field using 'P0194-RULNR'
" rec-RULNR_031.
perform bdc_transaction using 'PA30'.Uncomment the Begda field ...
*perform bdc_field using 'P0194-BEGDA'
rec-BEGDA_006.
*perform bdc_field using 'P0194-BEGDA'
rec-BEGDA_019.
Also please check what are the mandatory fields that needs
to be entered ...
An alternative to writing the BDC is to USE FM
HR_INFOTYPE_OPERATION to update infotypes.... -
Smart folders and .doc files
Problem: Smart folders do not show Microsoft .doc files. I have created a smart folder to show all documents I worked on recently. The search criteria in the smart folder are
kind -> document
last opened -> within last 14 days
The folder shows now all documents I opened during the previous 14 days, EXCEPT .doc files. Any solution?Axxelerator wrote:
Somewhere must be a setting that tells spotlight which file is a document which one is not...
Actually, that information is a part of the metadata for the file. As I mentioned above, the actuall criteria used when you select Documents is the nearly all-inclusive
kMDItemContentTypeTree = public.content
You can read the metadata for any file using the Terminal. Launch Terminal, then type:
mdls
a space, then drag and drop a file into the Terminal window and hit the Return key. You'll see something like this:
NoobiX:~ francine$ mdls /Users/francine/Documents/wordocs/MyFamily.doc
kMDItemAuthors = (
"Francine Schwieder"
kMDItemContentCreationDate = 2008-08-31 12:49:48 -0700
kMDItemContentModificationDate = 2008-08-31 12:49:48 -0700
kMDItemContentType = "com.microsoft.word.doc"
kMDItemContentTypeTree = (
"com.microsoft.word.doc",
"public.data",
"public.item",
"public.composite-content",
"public.content"
kMDItemDisplayName = "MyFamily.doc"
And so on, with all the rest of the metadata displayed. The relevant entry in this case is "public.content" statement in the kMDItemContentTypeTree.
I can't imagine that that entry is changed by saving something as .doc rather than .docx, which is why the only thing I can think of that would cause the behavior you are seeing is a Spotlight plist that is somehow messed up and excluding the extension doc. But I can't imagine how THAT would happen either.
As for AND searches: you already have that setup when you click the + button to add something. Thus, in the example above, the search is for files that are Documents AND were modified in the last 3 days, but are NOT jpegs, etc.
I have difficulty with correctly setting up the OR function, I always think that an option click on the + button, then selecting "Any" and adding a criterion ought to do it, but that doesn't seem to work as expected (or at least as I expect it to!). Anyway, one OR method that would yield approximately the same results as the example search above would be to select Kind is Other and then put this into the blank space after Other:
HTML OR text OR PDF OR RTF OR archive
Trouble is that if there WERE some doc or docx files, or some other sort of text based item, it wouldn't show up. I find it easier to just exclude things I know I don't want.
Francine
Francine
Schwieder -
Please help me add items to the Pages invoice doc keeping the formulas
Please help me add items to the Pages invoice doc keeping the formulas ie that they will add together and give me a total
this is the template I am Referring to...
Maybe you are looking for
-
How to add media in the album order?
I spent some time to organize the media in Organizer album, but when I open the album to add my media, it appears to be mixed. Is there the way to keep it in the album order?
-
How to upgrade my iPad ?
-
Can someone explain to me how to use the Find/Change option? I just don't get it. Trying to change a 4/C blue to a PMS throughout my document. Whether it be text or art. I select the 4/C in the top window and the PMS in the bottom window of the Find/
-
Local copy of Wordpress blog doesn't recognize cyrillic font
I've installed LAMP using the [wiki]LAMP[/wiki] wiki page. There was no problem during the instalation and configuration, but my local Wordpress blog is not recognizing any of my blog posts that are written on cyrullic, there are only ???????? instea
-
Creative Suite 5 won't re-install, need new discs
I am trying to re-install Adobe creative suite 5 on a Mac that it was installed on previously, but i am unable to. After entering the serial number and starting the installer it stops on an "adobehelp" file and the time remaining counter starts climb