Posting Routine problem

aliennavaliennav Member Posts: 449
Guys!
There's a problem.
I have added a field(Decimal) in the sales line table.While making sales order I am inserting some thing in that field.Now I want that field to get reflected in G/L Entry.

Any suggesstions?
Early response is solicited.
Thanx in advance

Comments

  • ufukufuk Member Posts: 514
    Create the same field in Gen. Jnl. Line and then search for "Post sales and VAT to G/L entries from posting buffer" description in Sales-Post codeunit. You will see assignments from Sales Header to Gen. Jnl. Line. You can add your assignment there.
    Ufuk Asci
    Pargesoft
  • krikikriki Member, Moderator Posts: 9,110
    And you also need to create the same field in T17.

    And in codeunit 12, you need to transfer the field from T83:"G/L Journal Line" to T17:"G/L Entry".
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • aliennavaliennav Member Posts: 449
    kriki wrote:
    And you also need to create the same field in T17.

    And in codeunit 12, you need to transfer the field from T83:"G/L Journal Line" to T17:"G/L Entry".


    Can u please explain the last step.
    ie. How to transfer the field.Where should be the code written??(And whatcode)
  • ufukufuk Member Posts: 514
    aliennav wrote:
    Can u please explain the last step.
    ie. How to transfer the field.Where should be the code written??(And whatcode)

    On InitGLEntry

    GLEntry.YourField := GenJnlLine.YourField;
    Ufuk Asci
    Pargesoft
  • krikikriki Member, Moderator Posts: 9,110
    ufuk wrote:
    aliennav wrote:
    Can u please explain the last step.
    ie. How to transfer the field.Where should be the code written??(And whatcode)

    On InitGLEntry

    GLEntry.YourField := GenJnlLine.YourField;
    Easier than this is difficult.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • prudaypruday Member Posts: 11
    if you have only one sales line, sound ok to record it in g/l entry.
    But in first place why g/l entry?

    say if you have 10 sales lines, how do you record these in g/l entry? and why?
    Uday
  • ufukufuk Member Posts: 514
    kriki wrote:

    Easier than this is difficult.

    I didn't understand :D What do you mean?
    Ufuk Asci
    Pargesoft
  • krikikriki Member, Moderator Posts: 9,110
    ufuk wrote:
    kriki wrote:

    Easier than this is difficult.

    I didn't understand :D What do you mean?
    The code needed to add a field to be transferred is very easy. It is difficult (but not impossible) to invent code that makes it even easier to add such a field.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DenSterDenSter Member Posts: 8,305
    You'll definately need to add the field (I'd suggest with the same field number) to all tables involved. Then instead of directly in the posting routines I would add the actual transfer to the "Transfer Custom Fields" codeunit, which is created specifically for this purpose. There are functions in there to transfer fields from journal to ledger, from one ledger to another, etc.

    It looks like this is a US localization though, so I don't know if it is available elsewhere.
  • ufukufuk Member Posts: 514
    pruday wrote:
    if you have only one sales line, sound ok to record it in g/l entry.
    But in first place why g/l entry?

    say if you have 10 sales lines, how do you record these in g/l entry? and why?

    If you want to sum line amounts , I think basically you can add a flowfield to SalesHeader which sums the sales lines amount. Then you can transfer this amount to G/L Entry in CU12.
    Ufuk Asci
    Pargesoft
  • aliennavaliennav Member Posts: 449
    kriki wrote:
    And you also need to create the same field in T17.

    And in codeunit 12, you need to transfer the field from T83:"G/L Journal Line" to T17:"G/L Entry".
    Got the solution.Code was simple.But I am getting the value only in the credit side.Suppose I want it in the debit line also.Wat 2 do 4 dat?/
  • krikikriki Member, Moderator Posts: 9,110
    aliennav wrote:
    kriki wrote:
    And you also need to create the same field in T17.

    And in codeunit 12, you need to transfer the field from T83:"G/L Journal Line" to T17:"G/L Entry".
    Got the solution.Code was simple.But I am getting the value only in the credit side.Suppose I want it in the debit line also.Wat 2 do 4 dat?/
    Add the code you put into Codeunit 80 also in codeunit 90.

    DenSter wrote:
    You'll definately need to add the field (I'd suggest with the same field number) to all tables involved. Then instead of directly in the posting routines I would add the actual transfer to the "Transfer Custom Fields" codeunit, which is created specifically for this purpose. There are functions in there to transfer fields from journal to ledger, from one ledger to another, etc.

    It looks like this is a US localization though, so I don't know if it is available elsewhere.
    It is a US localization, the W1,BE,IT-db's don't have it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • aliennavaliennav Member Posts: 449
    guys I acheived it but now I am getting the value only in the credit line(entry) and not in the debit entry.Like other values such as description etc.I want to get this value(added one) in both the lines.

    Till now I have added the code in trigger named "InitGLEntry(GLAccNo : Code[20];Amount : Decimal;AmountAddCurr : Decimal;UseAmountAddCurr : Boolean;SystemCreatedEntry : Boolean)"

    where this code ws written."
    GLEntry.INIT;
    GLEntry."Posting Date" := GenJnlLine."Posting Date";
    GLEntry."Document Date" := GenJnlLine."Document Date";
    GLEntry."Document Type" := GenJnlLine."Document Type";


    Now what to do for debit entry??
  • krikikriki Member, Moderator Posts: 9,110
    aliennav wrote:
    Now what to do for debit entry??
    Do you mean the purchase with this? Or something else?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • aliennavaliennav Member Posts: 449
    kriki wrote:
    aliennav wrote:
    Now what to do for debit entry??
    Do you mean the purchase with this? Or something else?


    I didn't mean purchase entry.
    When there is a transaction ,2 entries go in G/L Entry table.1 for debit ,other for credit in 2 different accounts.I am talking bout that 2nd transaction(Debit one)
  • krikikriki Member, Moderator Posts: 9,110
    Search for "GLEntry.INSERT;" and put your code just before the statement.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.