This discussion is archived
4 Replies Latest reply: Feb 14, 2013 1:58 AM by SH RSS

Import (datapump) Script

vnm Newbie
Currently Being Moderated
I'm trying to import data file which is in csv format in that i have four column "Account", "Entity", "Cost Center", "Debit total bal." and "Credit total bal". In debit and credit column if debit is "o" there there is value for credit and vice versa both are not zero at same time . when i import it i got only values from debit column and that is also only non zero (avoid zero values for debit too ) . I cant understand why its avoiding credit values ?

In CSV file format how we can use DRCRSplit ? Is it possible through Import(DataPump) Script ?

Expected Result is = In amount column there should be value which is non zero either it is debit or credit.

Edited by: vnm on Feb 12, 2013 11:27 PM
  • 1. Re: Import (datapump) Script
    SH Guru
    Currently Being Moderated
    Yes, you can do this with an import script. Place it on the Amount field and when the debit field evaluates to 0 return the credit field value in its place.
  • 2. Re: Import (datapump) Script
    vnm Newbie
    Currently Being Moderated
    Hi, SH

    Can you plz show me sample script for this ?

    Thanking you in advance .
  • 3. Re: Import (datapump) Script
    vnm Newbie
    Currently Being Moderated
    Function AddDRCR(strField, strRecord)
    '------------------------------------------------------------------
    'Oracle Hyperion FDM DataPump Import Script:
    '
    'Created By: admin
    'Date Created: 2/12/2013 8:05:08 AM
    '
    'Purpose:
    '
    '------------------------------------------------------------------
    Dim Dr,Cr,tot

    Dr=DW.Utilities.fParseString(strRecord,5,4,",")

    Cr=DW.Utilities.fParseString(strRecord,5,5,",")

    Dr1 = CDbl(Dr)

    Cr1 = CDbl(Cr)

    tot=Dr1+Cr1

    MsgBox (tot)

    AddDRCR=tot

    End Function

    This is I'm trying plz suggest me where im going wrong in this script ?

    Edited by: vnm on Feb 13, 2013 10:42 PM

    Edited by: vnm on Feb 14, 2013 12:53 AM
  • 4. Re: Import (datapump) Script
    SH Guru
    Currently Being Moderated
    Whet error is this script generating? Is it attached the Amount field in the import format?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points