Skip to Content
avatar image
Former Member

AP Credit Note DIAPI

Hi,

I am trying to add AP Credit Note using DIAPI.

I need to change the account in the line level. But system is taking GL determination Account code.


ARInv.Lines.ItemCode = objRset_Details.Fields.Item("ITEM").Value
ARInv.Lines.Quantity = Qty
ARInv.Lines.Price = Rate
ARInv.Lines.TaxCode = objRset_Details.Fields.Item("TAXCODE").Value

ARInv.Lines.WarehouseCode = "DPS" ''DropShip Ware
ARInv.Lines.AccountCode = "A0030056" ''This not Accepting

ARInv.Lines.Add()
objRset_Details.MoveNext()

lretcode = ARInv.Add()

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 11, 2017 at 01:28 PM

    Hello Vibin - have you tried using the "SYS" number. It looks like A0030056 is a GL Account Number. In SAP B1 you can find the SYS number by:

    SELECT

    T0.FormatCode AS 'GL Account Formatted Code',

    T0.AcctName AS 'GL Account Description',

    T0.AcctCode AS 'SYS Account Number'

    FROM OACT T0

    Best Regards, Zal

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      A0030056 is the AcctCode in OACT; Your query result given below.

      GL Account Formatted Code : A0030056

      GL Account Description : COGS-PRICE DIFFERENCE

      SYS Account Number : A0030056

  • Oct 11, 2017 at 03:26 PM

    Hmmm Vibin - not displyaing the SYS might have something to do with Localization??? Sorry I am not much of a help here.

    Regards, Zal

    Here are my results from the SQL:

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 11, 2017 at 03:36 PM

    LOL Vibin - am I needing new glasses??? I thought you had posted that the T0.AcctCode also gave you A0030056. Did I see wrong???

    Regards, Zal

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 12, 2017 at 04:48 AM

    Hi,

    Yes, That is"A0030056" AcctCode from OACT. I think _Sys will come for segmentation accounts. This is Standard COA.

    Thank You

    Add comment
    10|10000 characters needed characters exceeded