cancel
Showing results for 
Search instead for 
Did you mean: 

splitting file without BPM

Former Member
0 Kudos

Hi,

I have an input file shown below.

US16DCUSAJ05061UC010007042

US16DCUSAY90011UB010007057

US16 USB490011UC010007059

US16DCUSAJ06061UC010007068

US16HQUSAY90011UB010007099

We have to split the fixed length file based on the field from 7th to 10th character of each line (ie USAJ,USAY,USB4) and place them in separate folders.

These characters are dynamic.

We do not want to use BPM.

Can anyone please suggest an alternative way to split accordingly.

thanks

Pratichi

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

You can split the file using java code, i writen one java map for my interface to split based on one ID input data, You can develop java code

but u have to expertise in java

Former Member
0 Kudos

Hi,

Thanks for your reply.

Could you please pass me that java code of yours..

I will use it as a reference to my scenario.

Thanks in advance,

Pratichi

rajasekhar_reddy14
Active Contributor
0 Kudos

send one test mail to rajasekhar84 at gmail dot com,i wil send code,bcz when i am trtying to paste the code its showing some error

regards,

raj

MichalKrawczyk
Active Contributor
0 Kudos

hi,

please don't send content in mails on the forum

you can create a txt file with code and append to your post so everyone will be able to download it

thank you,

Regards,

Michal Krawczyk

Former Member
0 Kudos

hi,

I need to split the fixed length file into batches of 1000 records.

Could you plz suggest how to do it?

Thanks.

Regards,

Indu Khurana

Former Member
0 Kudos

write a udf that will add context change after every 1000 records.

in the udf there will be 2 inputs. one for input string, the other for a constant-splitvalue in this case 1000.

Answers (2)

Answers (2)

prasad_ulagappan2
Contributor
0 Kudos

One way is that you can have a shell script to do this.

Or create a java proxy in the receiver side to do this.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

there are two ways you can try:

1. Multi-Mapping without BPM - Yes, itu2019s possible!

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

2. you can create an adapter module that will do the split on any conditions and then

use standard conditions in directory to show to which folder the file needs to go

(sap does not recommend message splitting on adapter module but it's possible and works if done correctly)

Regards,

Michal Krawczyk