cancel
Showing results for 
Search instead for 
Did you mean: 

Insert bulk data using stored procedure in MII

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member202228
Active Participant
0 Kudos

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).