Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3184

How to add line and set the value in DI Server?

$
0
0

Hi Experts,

 

My requirement is posting the Sales Order data to Delivery Order and for example if i have 2 items in sales order,so i taken two lines in the below code ,Its is posting with only with single item. i dont know whats the reason please help me how to over come this.

 

MyDlyOrder = New DeliveryOrder.DeliveryNotesService

             Dim myDeliveryOrder As DeliveryOrder.Document = New DeliveryOrder.Document

 

            Dim msgHeaders As DeliveryOrder.MsgHeader = New DeliveryOrder.MsgHeader()

            msgHeaders.SessionID = l_sessID

            msgHeaders.ServiceName = DeliveryOrder.MsgHeaderServiceName.DeliveryNotesService

            msgHeaders.ServiceNameSpecified = True

            MyDlyOrder.MsgHeaderValue = msgHeaders

 

            Dim myDocParams As DeliveryOrder.DocumentParams = Nothing

 

            myDeliveryOrder.CardCode = "SH001"

            myDeliveryOrder.CardName = "Scanner & Scanner"

            myDeliveryOrder.DocDate = Now

 

            myDeliveryOrder.Series = 139

            myDeliveryOrder.SeriesSpecified = True

            'myDeliveryOrder.DocType = DeliveryOrder.DocumentDocType.dDocument_Service

            'myDeliveryOrder.DocTotal = 1.0

            'myDeliveryOrder.DocTotalSpecified = False

            'myDeliveryOrder.DocTotalFc = 12.0

 

 

            myDeliveryOrder.DocumentLines = New DeliveryOrder.DocumentDocumentLine(2) {}

 

            Dim objDocumentLines As DeliveryOrder.DocumentDocumentLine = New DeliveryOrder.DocumentDocumentLine()

 

            objDocumentLines.BaseEntry = "4"

            objDocumentLines.BaseEntrySpecified = True

            objDocumentLines.BaseLine = 0

            objDocumentLines.BaseLineSpecified = True

               objDocumentLines.BaseType = "17"

            objDocumentLines.BaseTypeSpecified = True

 

            myDeliveryOrder.DocumentLines.SetValue(objDocumentLines, 0)

 

            objDocumentLines.BaseEntry = "4"

            objDocumentLines.BaseEntrySpecified = True

            objDocumentLines.BaseLine = 1

            objDocumentLines.BaseLineSpecified = True

                   objDocumentLines.BaseType = "17"

            objDocumentLines.BaseTypeSpecified = True

 

            myDeliveryOrder.DocumentLines.SetValue(objDocumentLines, 1)

         

            myDocParams = MyDlyOrder.Add(myDeliveryOrder)

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 3184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>