Skip to Content
author's profile photo Former Member
Former Member

DBDataSource binding and matrix

Hello SBO programmers

It is the idea to fill up the field(s) of the business partner menu identified by debug info as follows:

Send to [Form=134 Item=178 Column=1 Row=1 Variable=14 CRD1,Address]

(Column=45,44,2 and so on ...)

As far as I know is, that an item of class matrix

has to be accessed with using datasources.

Now I have the idea, that the table CRD1 is

such a datasource.

{

Dim oForm As SAPbouiCOM.Form

Dim oDBDataSource As SAPbouiCOM.DBDataSource

Dim sNewValue, sActualValue As String

Dim i As Integer

oForm = SboAppl.Forms.GetFormByTypeAndCount(134, FormTypeCount)

oDBDataSource = oForm.DataSources.DBDataSources.Item("CRD1")

i = oDBDataSource.Size

i = i - 1

' with this statement the value "Send to " results

sActualValue = oDBDataSource.GetValue("Address", i)

' -> sActualValue == "Send to "

sNewValue = "Send to another address"

' <i>but this following statement is not executed, the program runs out</i>

oDBDataSource.SetValue("Address", i, sNewValue)

}

WHY is the address not overwritable ?

Is it the right way or must be choosed another way ?

Thank You very much for feedback.

Best regards

Guido Baumeler

IVM Engineering AG

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2005 at 04:30 AM

    Hi there,

    Why don't you use recordset.doquery to search for your record and use recordset.update to do an update?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2005 at 06:52 AM

    Hi Guido,

    The CRD1 is the system datasouce of the system form. So you can't operate with it as you wish. There are some restrictions for working with datasources of the system forms.

    Regards,

    Mark

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Guido,

      In order to add addresses to the Business Partners, use the BusinessPartner.BPAddresses.Add method.

      From the DI API help:

      Description

      BPAddresses is a business object that represents the addresses list of a specific business partner. This object is part of the Business Partner module of the SAP Business One application.

      You can retrieve or set this object by using the Addresses property of the BusinessPartners object.

      This object enables you to add the address details of a business partner.

      Source table: CRD1.

      Hope helps,

      Ibai Peñ

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.