Skip to Content

Insert bulk data using stored procedure in MII

Hi all,

I am trying to load a csv file having many records in a oracle table using stored procedure

How can I pass the file as Param to stored procedure in sap mii?

how to write the stored procedure in mii?

Kindly suggest some solution.

Thanks,

Anjali

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 12 at 09:42 PM

    You pass only the file location, not the contents. Just save the file first somewhere where Oracle can see it.

    BULK INSERT <TableName>
    FROM 'c:\import.csv'
    WITH
    (
    FIRSTROW = 2,
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )
    GO

    will become in the MII SQL template as

    BULK INSERT <TableName>
    FROM '[Param.1]'
    WITH
    (
    FIRSTROW = 2,
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
    )
    GO

    where '[Param.1]' will take the value 'c:\import.csv' at runtime (assigned via Links).

    Add comment
    10|10000 characters needed characters exceeded