Skip to Content

How can we make a preliminary document?

Feb 28 at 10:57 PM


avatar image
Former Member

Good people, who can help me, I need to create a preliminary document for exits, entries and credit notes, that has seen all the document objects of the SAP SDK for there are no words for the Draft project that is the one that would indicate that the document would be created as a draft but for exits, entry and credit notes I do not see that I have this word, will it be done from another point of view?

Buenas gente, sera que alguien me pueda ayudar, necesito crear un documento preliminar para salidas , entradas y notas de credito , he visto que no todos los objetos de documentos del SDK de SAP para no trae la palabras Draft que es la que indicaria que el documento se crearia como borrador pero para salidas , entradsa y notas de credito no veo que tenga esta palabra , sera que se haga de otra menera?

10 |10000 characters needed characters left characters exceeded

Hi Luis,
Based on the code you provided, I've changed the tag to SAP Business One SDK.

This is not SAP BI Platform SDK code.


* Please Login or Register to Answer, Follow or Comment.

1 Answer

Daniel Paulsen
Mar 23 at 10:12 PM

Hola Luis,

What SAP product are you using?
I believe your question is not about BusinessObjects SDKs but rather a different SAP SDK, so your Tag will need to be changed in order to get answered.

If you can tell me the name of the product, I can try and move this post to the correct Tag.


Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Don't worry i already did with this code in, but i don't know how create a Credit Note for purchase do you know how can i do that? or what is the difference with the Credit Note for a cliente? this code only create a Credit Note for a client but i neet to create a Credit Note for purchase

Public Function reaNotaCreditoBorradorDesLigada(ByVal Tbl_Ecabezado As DataTable, ByVal Tbl_Detalle As DataTable, ByVal vCompany As SAPbobsCOM.Company, SQL_Comman4 As SqlCommand)
            Dim RetVal As Long
            Dim ErrCode As Long
            Dim ErrMsg As String
            Dim nErr As Long
            Dim cont As Long

            Dim oNotaCredito As SAPbobsCOM.Documents = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts) 'esta linea indica que creara el documento como preliminar
            oNotaCredito.DocObjectCode = (SAPbobsCOM.BoObjectTypes.oCreditNotes) 'esta linea indica cual es el documento a crear

            oNotaCredito.DocType = BoDocumentTypes.dDocument_Items

            oNotaCredito.CardCode = Tbl_Ecabezado.Rows(0).Item("CodProveedor").ToString()

            For Each row As DataRow In Tbl_Detalle.Rows
                If cont > 0 Then
                    'Invoice Lines - Set values to the second line  
                End If

                oNotaCredito.Lines.ItemCode = Tbl_Detalle.Rows(cont).Item("ItemCode").ToString()
                oNotaCredito.Lines.Quantity = CInt(Tbl_Detalle.Rows(cont).Item("Quantity").ToString())
                oNotaCredito.Lines.Currency = "COL"
                oNotaCredito.Lines.DiscountPercent = Val(Tbl_Detalle.Rows(cont).Item("Discount").ToString())

                cont += 1

            RetVal = oNotaCredito.Add()

            'Check the result  
            If RetVal <> 0 Then
                vCompany.GetLastError(ErrCode, ErrMsg)

                Dim CodError As String = Mid(ErrMsg, 1, 8)
            End If
        Catch ex As Exception

        End Try

    End Function

Former Member

and i uses Sap Bussines one 8.82

Former Member

and i uses Sap Bussines one 8.82