DI Api Sap B1 9.1 PL 10

Estimados buenas tardes,

Les quería pedir de su ayuda, estamos generando documentos (facturas de venta) por medio de la DI API de SAP, pero se me presenta un problema al momento de indicar la ubicación, el mensaje que me indica es "1470000341 - El artículo ““585117510405V019"” no está completamente asignado a la ubicación”. Les menciono que tengo dos artículos iguales , pero en diferentes ubicaciones ( el área comercial los carga de esa manera). Favor de su ayuda para poder solucionar mi inconveniente.

Muchas gracias de antemano

Saludos,

Hola @Sebastian_San
Este mensaje esta asociado a que existen articulos donde la ubicacion asignada, no tiene el 100% de lo especificado en linea del detalle de la factura. Realmente no es un error de desarrollo, prueba crea el documento de manera manual desde SAP.

Andres Ramirez Jaramillo :colombia:

Muchas gracias por la respuesta, pero el documento lo realice de manera manual y funciono sin problemas. No se donde esta el problema. De todas maneras adjunto codigo

Boleta = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)  'Generar Facturas oInvoices oDeliveryNotes
                    Boleta.Series = "1744"
                    Boleta.DocumentSubType = 3
                    Boleta.Lines.SetCurrentLine(suma)
                    Boleta.DocDate = Date.Now
                    Boleta.DocDueDate = Date.Now
                    For for_2 = 0 To DtgBol.Rows.Count - 2
                        Boleta.CardCode = DtgBol.Rows(0).Cells(1).Value.ToString
                        If DtgBol.Rows(0).Cells(1).Value.ToString = "T006-C" Then
                            Boleta.UserFields.Fields.Item("U_imprime").Value = "logistica"
                        End If
                        If DtgBol.Rows(0).Cells(1).Value.ToString = "T015-C" Then
                            Boleta.UserFields.Fields.Item("U_imprime").Value = "boletaweb"
                        End If
                        suma = suma + 1
                        Boleta.Lines.ItemCode = DtgBol.Rows(for_2).Cells(3).Value.ToString
                        If DtgBol.Rows(for_2).Cells(3).Value.ToString <> "CDCHE001" Then
                            Boleta.Lines.Quantity = DtgBol.Rows(for_2).Cells(4).Value.ToString
                        Else
                            Boleta.Lines.Quantity = "1"
                        End If
                        Boleta.Lines.BaseEntry = DtgBol.Rows(for_2).Cells(0).Value.ToString
                        Boleta.Lines.BaseType = 17
                        Boleta.Lines.BaseLine = DtgBol.Rows(for_2).Cells(5).Value.ToString
                        If DtgBol.Rows(for_2).Cells(3).Value.ToString <> "CDCHE001" Then
                            For for_3 = 0 To DtgUbiacion.Rows.Count - 2
                                If DtgUbiacion.Rows(for_3).Cells(6).Value.ToString = DtgBol.Rows(for_2).Cells(5).Value.ToString And DtgUbiacion.Rows(for_3).Cells(4).Value.ToString = DtgBol.Rows(for_2).Cells(3).Value.ToString Then
                                    Boleta.Lines.BinAllocations.BinAbsEntry = DtgUbiacion.Rows(for_3).Cells(3).Value.ToString
                                    Boleta.Lines.BinAllocations.Quantity = DtgUbiacion.Rows(for_3).Cells(5).Value.ToString
                                    Boleta.Lines.BinAllocations.Add()
                                End If
                            Next
                        End If
                        Boleta.Lines.Add()
                    Next
                    iErrorSBO = Boleta.Add

Gracias por tu tu ayuda.

Saludos,

Este tema se cerró automáticamente 91 días después del último post. No se permiten nuevas respuestas.