cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Discount percent in Goods receipt PO

Former Member
0 Kudos

Hello Friends,

I am Trying to add an Goods Receipt PO document line

using oPurchaseDeliveryNotes object . It is taking all values of line except discount percent.

I want to ask is there any method to asign the discount through oPurchaseDeliveryNotes object.

I did in following way

GrPODoc.Lines.DiscountPercent=RS.Fields.Item("U_Disc").Value

Thanks & Regards,

Mithun.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

please send us a little more code

to see what is happening

best regards

Gabriela

Former Member
0 Kudos

Hi Gabriela,

This is my Code where RS is my recordset from which I am reading the values and putting it in Object

it takes all values except the Discount Percent.

GrPODoc = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)

GrPODoc.CardCode = GrVendorcode

GrPODoc.DocDate = Now

GrPODoc.DocDueDate = Now

GrPODoc.TaxDate = Now

GrPODoc.Lines.ItemCode = RS.Fields.Item("U_ItemCode").Value

GrPODoc.Lines.DiscountPercent = RS.Fields.Item("U_Disc").Value

GrPODoc.Lines.AccountCode = RS.Fields.Item("U_GLAccNo").Value

GrPODoc.Lines.WarehouseCode = RS.Fields.Item("U_SubWhrs").Value

GrPODoc.Lines.Quantity = (Struct_GRCHRGITM1(j).ReqQtyfor_OnePiece * GRMatQty)

GrPODoc.Lines.Price = RS.Fields.Item("U_UnitPrc").Value

GrPODoc.Lines.TaxCode = RS.Fields.Item("U_TaxCode").Value

Dim ErrCode As Long

Dim ErrMsg As String

Dim val As Int32 = GrPODoc.Add

If val <> 0 Then

ocompany.GetLastError(ErrCode, ErrMsg)

SBOApplication.MessageBox(ErrCode & "," & ErrMsg)

End If

Former Member
0 Kudos

Hello friends

I have the same problem I cannot add discount to Goods receipt PO lines when adding through DI API ...

but from SBO i can give discount to line item also

Plz Clarify ....

Thanks,

Atul

Former Member
0 Kudos

hi Friends solved the problem

actually i was taking price instead of items unitprice

update your code accordingly

Kind Regards,

Atul

Answers (0)