UDO registration through COde
Hi
I m unable to do registration of UDO through code.
I m having two tables.1. U_UDOM(Master) and the second one is U_UDOC(Child). As i add my UDO, after assigning all properties it gives me error code(-<b>50002</b>). Can u help me regarding this error???
Also i want to know these properties of SAPbobsCOM.UserObjectsMD(i mean what values we should assign to these properties)
oUserObjectMD.Code = "EMPID";
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES;
oUserObjectMD.Name = "EMPNAME";
Hi
I use this code in Vb.NET
' Definition: UDO
' Algoritm :
' Notes :
' Parameters: p_sFindColumnsList: lista delle colonne del find, separate da ';'
' p_sTableNamesList: lista delle tabelle dettaglio, separate da ';'
' Return :
Public Function AddUDO(ByVal p_sUDOCode As String, ByVal p_sUDOName As String, _
ByVal p_sTableNameTestata As String, ByVal p_enObjType As SAPbobsCOM.BoUDOObjType, _
ByVal p_sFindColumnsList As String, _
ByVal p_sTableNamesList As String, _
Optional ByVal p_CanYearTransfer As SAPbobsCOM.BoYesNoEnum = SAPbobsCOM.BoYesNoEnum.tNO, _
Optional ByVal p_CanLog As SAPbobsCOM.BoYesNoEnum = SAPbobsCOM.BoYesNoEnum.tNO) As Boolean
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
Try
oUserObjectMD = sboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
If oUserObjectMD.GetByKey(p_sUDOCode) = 0 Then
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
'oUserObjectMD.FormColumns
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
Dim l_vList() As String
Dim l_i As Integer
l_vList = Split(p_sFindColumnsList, ";")
For l_i = 0 To l_vList.Length - 1
If l_vList(l_i).Length > 0 Then
If l_i = 0 Then
oUserObjectMD.FindColumns.ColumnAlias = l_vList(l_i)
Else
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FindColumns.SetCurrentLine(l_i)
oUserObjectMD.FindColumns.ColumnAlias = l_vList(l_i)
End If
End If
Next
oUserObjectMD.CanLog = p_CanLog ' SAPbobsCOM.BoYesNoEnum.tNO
If oUserObjectMD.CanLog = tNO Then
oUserObjectMD.LogTableName = ""
Else
oUserObjectMD.LogTableName = "A" & p_sTableNameTestata
End If
oUserObjectMD.CanYearTransfer = p_CanYearTransfer
l_vList = Split(p_sTableNamesList, ";")
For l_i = 0 To l_vList.Length - 1
If l_vList(l_i).Length > 0 Then
If l_i = 0 Then
oUserObjectMD.ChildTables.TableName = l_vList(l_i)
Else
oUserObjectMD.ChildTables.Add()
oUserObjectMD.ChildTables.SetCurrentLine(l_i)
oUserObjectMD.ChildTables.TableName = l_vList(l_i)
End If
End If
Next
oUserObjectMD.ExtensionName = ""
If p_enObjType = BoUDOObjType.boud_Document Then
oUserObjectMD.ManageSeries = tYES
oUserObjectMD.CanLog = tYES
oUserObjectMD.LogTableName = "A" & p_sTableNameTestata
Else
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
End If
oUserObjectMD.Code = p_sUDOCode
oUserObjectMD.Name = p_sUDOName
oUserObjectMD.ObjectType = p_enObjType
oUserObjectMD.TableName = p_sTableNameTestata
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
sboCompany.GetLastError(ErrCode, ErrMsg)
CSetupError.AddError(CSetupError.enErrorType.enError_CreazioneUDO, "Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata, ErrMsg)
G_SboApp.SetStatusBarMessage("Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata & " - " & ErrMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
'MsgBox("Error adding UDO Data" & vbCrLf & ErrMsg)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return True
Catch ex As Exception
CSetupError.AddError(CSetupError.enErrorType.enError_CreazioneUDO, "Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata, ex.Message)
ShowError(ex)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End Try
End Function
Andrea
Similar Messages
-
Problem with UDO Registration through SDK (Default Form Option)
Hello All,
I am trying to create a UDO Registration through SDK which is done easily but the udo contain default form option.
But after creating the udo , the defualt form option is clicked in the wizard but the system is not showing that default form in SAP.
Please suggest if i am missing something for making this udo a default form .
Code which i have written is following :-
Dim oUserObjectMD1 As SAPbobsCOM.UserObjectsMD
oUserObjectMD1 = Class_Law_Main.ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
If oUserObjectMD1.GetByKey("OSL_LawStage_Master") = False Then
oUserObjectMD1.CanCancel = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD1.CanClose = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD1.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD1.FindColumns.ColumnAlias = "Code"
oUserObjectMD1.FindColumns.ColumnDescription = "Code"
oUserObjectMD1.FindColumns.Add()
oUserObjectMD1.FindColumns.ColumnAlias = "Name"
oUserObjectMD1.FindColumns.ColumnDescription = "Name"
oUserObjectMD1.FindColumns.Add()
oUserObjectMD1.FindColumns.ColumnAlias = "DocEntry"
oUserObjectMD1.FindColumns.ColumnDescription = "DocEntry"
oUserObjectMD1.FindColumns.Add()
oUserObjectMD1.FindColumns.ColumnAlias = "U_StgName"
oUserObjectMD1.FindColumns.ColumnDescription = "Stage Description"
oUserObjectMD1.FindColumns.Add()
oUserObjectMD1.FindColumns.ColumnAlias = "U_StgSeq"
oUserObjectMD1.FindColumns.ColumnDescription = "Stage Sequence"
oUserObjectMD1.FindColumns.Add()
oUserObjectMD1.FormColumns.FormColumnAlias = "Code"
oUserObjectMD1.FormColumns.FormColumnDescription = "Code"
oUserObjectMD1.FormColumns.Add()
oUserObjectMD1.FormColumns.FormColumnAlias = "U_StgName"
oUserObjectMD1.FormColumns.FormColumnDescription = "Stage Description"
oUserObjectMD1.FormColumns.Add()
oUserObjectMD1.FormColumns.FormColumnAlias = "U_StgSeq"
oUserObjectMD1.FormColumns.FormColumnDescription = "Stage Sequence"
oUserObjectMD1.FormColumns.Add()
oUserObjectMD1.CanDelete = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD1.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD1.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD1.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
'oUserObjectMD1.ChildTables.TableName =
oUserObjectMD1.Code = "OSL_LawStage_Master"
oUserObjectMD1.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD1.Name = "Law Stages Master"
oUserObjectMD1.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
oUserObjectMD1.TableName = "OSL_OLSG"
lRetCode = oUserObjectMD1.Add()
'// check for errors in the process
If lRetCode <> 0 Then
Class_Law_Main.ocompany.GetLastError(lRetCode, sErrMsg)
MsgBox(sErrMsg)
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD1)
oUserObjectMD1 = NothingHi Robert,
I recommend you do your changes in your file/XML file before you load your form. It's much quicker and easier this way
e.g
//make your changes in your xml form
SBO_Application.LoadBatchActions(ref YourXMLFileString);
Cheers, Lita -
Creating UDO through code with 1 Docment table & 4 Document Line Tables
Hi,
I need to create one Document table and four Document Line tables(child tables) and make them UDO through code. This process is working When I am creating UDO with one Document table and one Document Line table but if I add more than one Child table it is taking only one child.... Can anyone give me some solution or code example related to this problem this problem?
Regards,
Sudeshna.Hi,
Firstly Trinidad, unfortunately I could not open that link.
And secondly, the following is my code... Through this code I am trying to create an UDO with one document table and two document line tables.... here the UDO is being created but it is not taking two line table, its taking only one Document line table.... how can I create udo with more than one Document line tables?
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.ChildTables.TableName = "childSplitNew1"
oUserObjectMD.ChildTables.TableName = "childSplitNew2"
oUserObjectMD.Code = "udoSplitNew"
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.Name = "udoSplitNew"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
oUserObjectMD.TableName = "masterSplitNew"
lRetCode = oUserObjectMD.Add()
Regards,
Sudeshna. -
Cancel a record in a UDO through code
Hi.
I have created a UDO.
I have hadded a right click menu to duplicate a record, but i want to cancel de old one.
I can do it through the right click menu. but how can i do it through code.
Tks in advanceHi Nelson
In normal circumstances like if you were working with marketing docs. You would say
if Ojournal.getbykey("10") then
ojournal.close
end if
But i think you can't use the getbykey on UDO entries. -
Initilising database ,udo registration during add on connection
Hello Expert
i created addon on vb.net.now i want to create global database MEANS i want create table ,registration UDO,checking UDO registration during connection of addon with sap. how can i do sirHi vmaskey,
Download this sample.
Inside the archive you'll find a function and a xml file.
Just add the function to your code. The XML file indicates the object type (User Table, User Field or User Object) and the database fields where they will be written. Just change the properties to your needs.
I don't provide the XML samples for adding a User Permission Tree and User Keys because I don't have any example on this machine.
Call the function like this
LoadBDFromXML(oCompany, oApplication, "FULL_DIRECTORY_PATH_TO_XML_FILE", "FILE_NAME.xml")
Hope it helps,
Best regards,
Vítor Vieira -
Exception while accessing web service through code
I have a web service developed using AXIS deployed on Weblogic 8.1
Another web application cotaining GUI deployed on Weblogic 10 tries to access this web service through code.
This piece of code to invoke the web service is written in Action Class present inside web application. (Struts is used in GUI based web app)
When the code tries to invoke web service I am getting following error.
(401)Unauthorized xxx
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.invokeAx(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:243)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.callUCS77_1ProcessOfficialChangeWebService(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:173)
at com.ebv.app.web.action.UCS77_1ProcessOfficialChangeSaveDetailsAction.processAction(UCS77_1ProcessOfficialChangeSaveDetailsAction.java:133)
at com.ebv.framework.web.action.EBVAction.execute(EBVAction.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
The web service URL is as follows:
http://10.140.96.5:7808/services/ucs77_1/ProcessOfficialChangeSave77_1-v0001.soap
However
When I try to hit the webservice URL directly on browser login window appears where same username/password I provide which are passed in code to invoke the web service. I get the success page indicating that web service is invoked on hitting enter.
The method used in UCS77_1ProcessOfficialChangeSaveDetailsAction.java to invoke web service is as follows:
public String invokeAx
String xmlMessage,
String webServiceURL,
String webServiceOperation,
String username,
String password)
String xmlResponse = null;
Call webServiceCall = null;
InputStream input = new ByteArrayInputStream(xmlMessage.getBytes());
Service service = new Service();
try
webServiceCall = (Call) service.createCall();
SOAPEnvelope env = new SOAPEnvelope(input);
SOAPEnvelope resEnv = null;
webServiceCall.setTargetEndpointAddress(new URL(webServiceURL));
webServiceCall.setOperationName(new QName(webServiceOperation));
webServiceCall.setUsername(username);
webServiceCall.setPassword(password);
try
resEnv = webServiceCall.invoke(env);
catch (AxisFault e)
e.printStackTrace();
Message responseMessage = webServiceCall.getResponseMessage();
SOAPEnvelope soapXml = (SOAPEnvelope) responseMessage.getSOAPEnvelope();
xmlResponse = new String(soapXml.toString().getBytes(AppConstants.UTF8),AppConstants.UTF8);
if (xmlResponse == null)
xmlResponse = resEnv.toString();
catch (Exception e1)
e1.printStackTrace();
return xmlResponse;
Both the weblogic server reside on two different AIX machines.
Can anybody tell what's the problem while invoking web service through code?time to look into the gateway logs as stated by the fault ..
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode><faultstring>Step execution failed with an exception</faultstring><detail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
looks like the cipher step might have failed -
Changing the Updatable property of a View Object Attribute through code
Hi,
Is there a way to set the "Updatable" property of an attribute in a view object through code ?
I checked the API docs for the AttributeDef class but there is no method to set this. there is a constant (UPDATEABLE_WHILE_NEW) which gives the current value.
My requirements in short - I have a ADF editable Table. Based on a flag whether it is SET or NOT, i need to make a particular column such that the inputTextBox on this column must appear for only the new rows inserted into the table. For all the existing rows users should not be allowed to edit values on this column.
I know this can be controlled with the UPDATABLE property on the attribute in the view object by setting the value as "WHILE NEW".
Now i need to control this through code at runtime.
Please let me know on ow to do this.
JDev version: 11.1.2.3
Thanks.the method you are looking for is available in the AttributeDefImpl class which you can get from the EntityImpl like
this.mDefinitionObject.getAttributeDefImpl("YOUR_ATTRIBUTE_NAME").setUpdateableFlag(AttributeDef.UPDATEABLE_WHILE_NEW);
Timo -
Creating Business Partner Through Code
Hi Everyone
I just wanted to know if any of you knew a way to create a business partner through code.
If there is a way or a sample that anyone can provide that would greatly
apreciated.
What would mandatory fields be? I know CardCode would be one mandatory field but what else would be essential?Hi Sebastiano,
If you only need to read the BP data from the 'source' company then you shouldn't need to log in to it. The RecordSet object should be capable of sending a SQL query that references the other database.
For example:
string sSQL = "select * from " + sSourceDatabase +"..OCRD where CardCode = '" + sMyBPCode +"'"
where sSourceDatabase is the Database ID for the source company and sMyBPCode is the BP you wish to copy.
Using this you should only need to log in to the company where the BP needs to be created. So the whole process should be something like this:
1) Connect to second company
2) Run the query to collect the BP data from the first company
3) Create an instance of the BP object and use the recordset object to assign the properties
4) Add the BP
Hope this makes sense
Owen
P.S. The other option is to use XML. See this post:
Copy items between databases -
How to create a Xfdf doc. in Acrobat Pro 10 through code?
Hi All..!!!
I wanted to know whether there is a way to create an XPdf document in Acrobat Pro 10. I know that we can create a pdf document through code using the SDK.. I wanted to know whether the same can be done for XPdf documents..
Thanks!!Writing an XFDF is not that difficult; all you need is a tool allowing you to assemble text strings.
The preferred way to get a sample on how the XFDF should look like is to export one from the form concerned, and to repeat it using your code. In this case, the document knows best how the XFDF should look like.
Hope this can help.
Max Wyss. -
How to create a XPdf doc. in Acrobat Pro 10 through code?
Hi All..!!!
I wanted to know whether there is a way to create an XPdf document in Acrobat Pro 10. I know that we can create a pdf document through code using the SDK.. I wanted to know whether the same can be done for XPdf documents..
Thanks!!You're better off asking in the SDK forum:
http://forums.adobe.com/community/acrobat/acrobat_sdk -
Getting something went wrong while trying to open workbook through code?
hi,
i am getting something went wrong while trying to open workbook through code below is m code:
ES.ExcelService client = new ES.ExcelService();
client.Credentials = System.Net.CredentialCache.DefaultCredentials;
ES.Status[] status;
string sessionId = client.OpenWorkbook("http://servername/Documents/exceles.xlsx", "en-us", "en-us", out status);
i have also added modify permission to wpg_wss group but i am still getting the same error.
any help is appreciated.
thanks,
gauravHi Gaurav,
For your issue, you need to make sure the site where your workbook is stored in is a Trusted Location in Excel Service Application:
http://technet.microsoft.com/en-in/library/ff191194(v=office.14).aspx
For more information, you can have a look at the blog:
http://blogs.msdn.com/b/cumgranosalis/archive/2006/03/24/excelserviceshelloworld.aspx
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Accessing Party EDI details through code in 2013
Hi,
We are looking at options of accessing the Party EDI details from orchestration in BTS 2013 R2. But looks like the property X12Receiver belonging to the partner object Microsoft.BizTalk.Edi.PartnerAgreementManager.Partner
has been deprecated. Although, using the property does not give a compilation error, it throws exception during runtime with the below error:
System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'edi_PartnerX12InterchangeSelect'.
Any pointers on how the accessing of party EDI details through code/within orchestration can be achieved? Appreciate any help on this regards. Thanks.Refer "Custom Party Resolution" sample available in the BizTalk SDK -
http://msdn.microsoft.com/en-in/library/aa559134.aspx and pay specific attention to the code in "PartyResolutionStream.cs". This has the logic for querying the BizTalk Party database tables.
You can expose you own library/helper with this code and leverage it in the orchestration.
That having said, if you use the EDI Pipelines, the party resolution is done for you and available on the received message in the orchestration as promoted property. Refer
http://msdn.microsoft.com/en-us/library/bb226500.aspx
Regards. -
How to give acces to app to use the images in device through code
Hi,
I am writting an Iphone app, in some part of my application there is a facility to the users to upload their files , but the device is asking to give permission to the app to access files, i have to do that manually , my question is there any way to acheive that through code, In am using Xcode to create my app
Thanks.Hi Kasturi,
> not accepting the points
It worked on this and on one other thread, but this is still open: How to upload the image
> want upload the images from the client side machine
> to KM
In the thread I just referred to, I already provided information about the HTMLB upload control. With this at hand, you'll get the file from the client to the server.
At server side, get an ICollection instance where you want to store the file and create the corresponding resource. See https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/knowledge management/com/sapportals/wcm/repository/icollection.html#createresource(java.lang.String,%20com.sapportals.wcm.repository.IPropertyMap,%20com.sapportals.wcm.util.content.IContent)
Hope it helps
Detlev -
Linking to a library through code
Is it possible to link an icon to a library through code?
I need to make up heaps of audio libraries and I've managed
to import the audio files into an authorware piece but now I need
to put these into a library.
I can do this manually by dragging and dropping each icon
into a library, but I don't want to do that for 150 sound icons *
about 100 files. So I want to do it through code. Is it possible?
I had a look and I can't see how to do it.
This would be nice:
linkToLibrary("iconTitle","libraryID")
Note: I need the library link name to go into the library -
so copy and paste into the library won't work only drag and
drop.thefoxinsox wrote:
> Is it possible to link an icon to a library through
code?
> I need to make up heaps of audio libraries and I've
managed to import the
> audio files into an authorware piece but now I need to
put these into a library.
> I can do this manually by dragging and dropping each
icon into a library, but
> I don't want to do that for 150 sound icons * about 100
files. So I want to do
> it through code. Is it possible?
> I had a look and I can't see how to do it.
> This would be nice:
> linkToLibrary("iconTitle","libraryID")
>
> Note: I need the library link name to go into the
library - so copy and paste
> into the library won't work only drag and drop.
>
Libraries can only have content added by dragging icons from
the
flowline to an open library.
With audio there's always the opportunity to keep the audio
external and
to dynamically load them.
Andrew Poulos -
Purchase order service type through code
Hi Experts,
Can we create a purchase order of type service through code ?
Please give me some sample codes
Thanks in advance
Regards
ArunHello,
I think this is an userfield? Or a field that i don't know?
purchaseOrder.Lines.LocationCode = 2
For testing you must keep your code simple, first only fill the mandatory fields:
And catch you errormessage as well.
Dim purchaseOrder As SAPbobsCOM.Documents = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
'Set values to the fields
purchaseOrder.DocObjectCode = BoObjectTypes.oPurchaseOrders
purchaseOrder.CardCode = "V0001"
purchaseOrder.DocType = BoDocumentTypes.dDocument_Service
purchaseOrder.DocDate = Today
purchaseOrder.DocDueDate = Today
purchaseOrder.TaxDate = Today
purchaseOrder.Lines.ItemDescription = "TESTPO"
purchaseOrder.Lines.AccountCode = "500201"
Dim lRetCode As Integer
lRetCode = purchaseOrder.Add
If lRetCode != 0 Then
B1Connections.theAppl.SetStatusBarMessage("Error occured.", SAPbouiCOM.BoMessageTime.bmt_Short, True)
Else
B1Connections.theAppl.SetStatusBarMessage("Purchase order created.", SAPbouiCOM.BoMessageTime.bmt_Short, True)
End If
HTH Regards Teun
Edited by: Teun Aben on Oct 22, 2010 3:54 PM
Maybe you are looking for
-
FM Call in BADI during replication of BP from R/3 to CRM causes problem
Hello all; I am trying to change the BPKIND of the partner in CRM which is created in R/3 with the PARTNER_UPDATE BADI. But the FM called in the BADI causes the BP hang in SMW01 with intermediate state. May you please advice me somthing about this? M
-
Business connector installation error
Dear community, I am trying to install bc 4.8 x64 on win2008 R2 x64 std ed.server (in vmware). When I run the installer (BCServer48_x64.exe or BCServerXpt48_x64) I get an error: >business connector install could not find a java virtual machine to loa
-
We have a secure zone with email campaign opt-in as both a part of the registration form and as a stand alone form for users logged into the secure zone. We want to only show the opt-in form to users who are not already registered for the campaign, b
-
Read/write xml data from/to adobe livecycle forms (pdf)
Hello, I need some help reading xml data from pdfs created by Adobe LiveCycle and also writing xml data back to the form. The forms have been created using PROD LC 8.2 and in the future they will be created using PROD LC 9.5. I am using Visual Basic
-
The WiFi does not stop working...
Since I download the iOS 5.0.1 y notice that the WiFi connection don´t stop working when I put my 3Gs to sleep. After several minutes the phone gets hot and it´s beacuse of the wifi connection!