on 11-15-2010 11:05 PM
Hello, I want to add package information via DI API, but I don't know how start.
Thanks
David Muñoz
Hi David,
I think what you need is the DocumentPackages object in the DI API. This is a child object of the Documents object and allows you to add and edit the packaging information on a marketing document.
There is sample code in the SDK if you look at the DocumentPackages object in the DI API reference.
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
You should find the sample by selecting the DocumentPackages object in the DI API reference. The SDK docs I checked were for build 800.171 (ie earlier than patch 47) so the object should be available to you.
I've copied the sample from the SDK below:
Dim Delivery As SAPbobsCOM.Documents
Dim Line As SAPbobsCOM.Document_Lines
Dim Pack As SAPbobsCOM.DocumentPackages
Dim Item As SAPbobsCOM.DocumentPackageItems
'Add a delivery with Package
'Delivery header
Delivery = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
Delivery.CardCode = "C20000"
Line = Delivery.Lines
'Delivery lines
Line.ItemCode = "A00001"
Line.Quantity = 1
Line.Add()
Line.ItemCode = "A00002"
Line.Quantity = 2
'Package settings
Pack = Delivery.Packages
Pack.Number = 1
Pack.Type = "Box"
'Package Content
Item = Pack.Items
Item.ItemCode = "A00001"
Item.Quantity = 1
Item.Add()
Item.ItemCode = "A00002"
Item.Quantity = 1
'Adding Delivery with package
Delivery.Add()
'Get and Update a Package
Delivery.GetByKey(1) ' Get a delivery by it's Document Number
Pack = Delivery.Packages ' Get the Packages of the Delivery
Pack.Type = "Container" ' Change the type of the Package to Container
Delivery.Update() ' Update the Delivery
'Delete a Package
Delivery.GetByKey(1) ' Get a delivery by it's Document Number
Pack = Delivery.Packages ' Get the Packages of the Delivery
Pack.Delete() ' Delete the package
Delivery.Update() ' Update the Delivery Document
Kind Regards,
Owen
Hi Owen Slater
How to add Sales BOM to a Delivery Note?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David Muñoz,
What kind of package info are you looking for?
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.