cancel
Showing results for 
Search instead for 
Did you mean: 

Loading Multiple Flat File in to BI System with one InfoPackage

Former Member
0 Kudos

Greetings,

i have developed a routine to Load Multiple Flate File in one InfoPackage, but it doesn't work. Only the Last File are loaded. Who can Help me?

Loading 'R:\Verzeichnis \ing_wan_b_002.fall.csv' to 'R:\Verzeichnis \ing_wan_b_240*.fall.csv'

Routine:

DATA: VerzUndDateiname TYPE string value 'R:\Verzeichnis \ing_wan_b_000.fall.csv',

VerzUndDateinameKomplett TYPE string,

count TYPE i value 2,

countN(3) TYPE n.

*************************************************************************************

WHILE count <= 240.

countN = count.

VerzUndDateinameKomplett = VerzUndDateiname.

REPLACE '000' WITH zaehlerN

INTO VerzUndDateinameKomplett.

p_filename = VerzUndDateinameKomplett.

count = count + 1.

ENDWHILE.

Best Regards

Jens

Edited by: JB6493 on May 18, 2009 1:03 PM

Edited by: JB6493 on May 18, 2009 1:07 PM

Accepted Solutions (1)

Accepted Solutions (1)

christoph_reuter
Discoverer
0 Kudos

Hello Jens,

you have to process the InfoPackage 239 times. Your routine would be executed once during one processing of the InfoPackage. This would run the WHILE statement and end up with the last filename after 239 iterations.

Either try to concatenate the files you want to load (if possible) and load them in one go. Alternatively you could try to use a process chain to run the InfoPackage 239 times.

Kind regards,

Christoph

former_member184494
Active Contributor
0 Kudos

If you are on UNIX then have an OS command to concatenate the files together using a CAT command. Call this command in your process chain before the infopackage and then load one file.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thats true the infopackage is ready for load only one file, if you want to load many files you can doit using a routine for dynamic names in infopackage....here you can set up a routine for the sequence of names that the request will load...check that i think is better than create a routine for load many files in one step...

Regards

Former Member
0 Kudos

Hi,

When u write a routine for flat file upload one form is created which is system generated

i.e. form compute_flat_file_filename

and ur p_filename = VerzUndDateinameKomplett.

should be there

and for that this "VerzUndDateinameKomplett" should be a global variable.

plz check it where it's usable to u or not.

FCI
Active Contributor
0 Kudos

An infoPackage can only load one file at a time. If you want to load multiple files you will have to create some additional IP or execute multiple times your IP.

Regards,

Fred