IMPORT PAYMENT_VCH EXCEL TO TALLY

Discussion in 'Tally Developer' started by Gurpreet Singh, Jul 23, 2012.

    
Thread Status:
Not open for further replies.
  1. Gurpreet Singh

    Gurpreet Singh New Member


    PLEASE RESOLVED ERROR



    Code:
    [Function : Import payment]
    001 : Call :  Import Of Payment Voucher
     
    [Function : Import Of Payment Voucher]
    Variable : Counter : Number
     
        00 : SET : Counter : 0
        01 : START PROGRESS : ($$NumItems:PaymentInfo) : "Vouchers Importing " : @@CmpMailName : "PaymentVCH Importing ..."
        02 : WALK COLLECTION : Payment Info
        03  :  SET            : SVViewName        : $$SysName:AcctgVchView
        04    :    NEW OBJECT        : Voucher
        05    :    SET VALUE        : Date                : $DSDDATE
        06    :    SET VALUE        : VoucherTypeName    : $$VchTypePayment
     
        07    :    NEW OBJECT        : LedgerEntries
        08    :    SET TARGET        : LedgerEntries
        09    :    SET VALUE        : LedgerName        : $DSDLedgerNameDr
        10    :    SET VALUE        : Amount            : $DSDAmountdr
        20    :    SET VALUE        : Is Deemed Positive: "Yes"
        30    :    SET TARGET        : ..
     
        40    :    NEW OBJECT            : LedgerEntries
        50    :    SET TARGET        : LedgerEntries
        60    :    SET VALUE        : LedgerName        : $DSDLedgerNameCr
        70    :    SET VALUE        : Amount            : $DSDAmountcr
        80    :    SET VALUE        : Is Deemed Positive: "No"
        90    :    SET TARGET        : ..
        100 :  SET VALUE      : PersistedView    : ##SVViewName
        110    :  SET VALUE        : NARRATION :$DSDNarration
        120 : CALL : Save Target Payment
        130 : INCREMENT : Counter
        140 : SHOW PROGRESS : ##Counter
        150 : END WALK
        160 : END PROGRESS
        170 : RETURN
     
     
    [Function: Save Target Payment]
    02 : ACCEPT ALTER
    03 : ELSE :
    04 : Save Target
    05 : END IF
     
     
    ;; Constructing a collection Through ODBC
     
    [Collection: Payment Info]
     
    ODBC : "Driver={Microsoft Excel Driver (*.xls)};Dbq=" + @@MaterODBCExcelPath+""
    SQL : "Select * from ["+@@MaterODBCExcelSheet+"$]"
     
    SQLObject : Payment Info Obj
     
    [Object : Payment Info Obj]
     
     
     
    DSDDATE: $_1
    DSDLedgerNameDr : $_2
    DSDLedgerNameCr    : $_3
    DSDAmountdr : $_4
    DSDAmountcr : $_5
    DSDNarration :$_6
     
     
    [System : Formula]
    Mater ODBC Excel Path : "C:\Tally.ERP9\ImportVouchers.xls" ;; The Excel Sheet Path
    Mater ODBC Excel Sheet : "PaymentVCH" ;; Sheet name in That Excel File
     
    ;;End-of-File
     

    Attached Files:

    • a.JPG
      a.JPG
      File size:
      67.2 KB
      Views:
      149


  2. admin

    admin Administrator Staff Member


    [Function: Save Target Payment]
    02 : ACCEPT ALTER
    03 : ELSE :
    04 : Save Target
    05 : END IF


    In the above what is that Else and End IF????
     


  3. Gurpreet Singh

    Gurpreet Singh New Member


    this snippet for trying to save transactions row by row.
     


  4. admin

    admin Administrator Staff Member


    [Function: Save Target Payment]
    04 : Save Target
     


  5. Gurpreet Singh

    Gurpreet Singh New Member


    thanx for reply:)

    help on this errors...............:(
    FUNCTION: 'Import Of Payment Voucher' LABEL: 01 : Invalid number of steps:eek:
    FUNCTION: 'Import Of Payment Voucher' LABEL: 01 : Action execution failed!:eek:
    FUNCTION: 'Import payment' LABEL: 001 : Action execution failed!:eek:
     


  6. admin

    admin Administrator Staff Member


    FUNCTION: 'Import Of Payment Voucher' LABEL: 01 : Invalid number of steps

    This error encounters, if the Collection does not contains any records.
    Please check this. 1. Is you File name path correct? and Sheet name too?
     


  7. Gurpreet Singh

    Gurpreet Singh New Member


    thanx for reply

    file name path and sheet name is also corrected,,,,, but why this errors popup again again
     


  8. admin

    admin Administrator Staff Member


    please attach excel sheet and code which u have written
     


  9. Gurpreet Singh

    Gurpreet Singh New Member


    thanx for reply:)

    kindly refer attachments.
     

    Attached Files:



  10. Vikram

    Vikram Member


    Dear gurpreet,

    you missed the following :
    1.Date formatting has to be converted as seen in the attachment
    2.you should have used insert collection object instead of new object
    3.use ALLLEDGER ENTRIES instead of LEDGER ENTRIES

    ;;Replace the Word NEW with INSERTCOLLECTION

    07:NEW OBJECT: All LedgerEntries ;; You used NEW OBJECT
    08:SET TARGET: LedgerEntries
    09:SET VALUE: LedgerName: $DSDLedgerNameDr
    10:SET VALUE: Amount: $DSDAmountdr
    20:SET VALUE: Is Deemed Positive: "Yes"
    30:SET TARGET: ..

    40:NEW OBJECT: ALlLedgerEntries
    50:SET TARGET: LedgerEntries
    60:SET VALUE: LedgerName: $DSDLedgerNameCr
    70:SET VALUE: Amount: $DSDAmountcr
    80:SET VALUE: Is Deemed Positive: "No"
    90:SET TARGET: ..

     

    Attached Files:

    Mansur Kalyankar and Manoharan like this.


  11. Vikram

    Vikram Member


    Thank you for the comments.

    Dear Gurpreet,

    on this occassion , i thank The admin for creating such a great forum and helping our developers fellows to help each other.
    infront of admin i am just a beginner.

    any ways thank you admin and thanks gurpreet!!
     
    Manoharan and Mitesh Surwale like this.


  12. admin

    admin Administrator Staff Member


    You
    You are most welcome dear!!!

    Out motto is that, the struggle what we have undergone in the beginning of our career in TDL should not be faced by others. And makes us to start this forum..
    We are really thankful for the ppl like you who will give full participation and helping others.
    Thans a lot.

    Regards,

    Admin
     
    Mitesh Surwale likes this.


  13. skumar

    skumar New Member


    Nice admin
     


Thread Status:
Not open for further replies.

Share This Page