Skip to Content
0

Insert bulk data using stored procedure in MII

Dec 05, 2017 at 11:31 AM

55

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Paul Radulescu Jan 12 at 09:42 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded