cancel
Showing results for 
Search instead for 
Did you mean: 

To add 2 files in one and overwrite at the same time

Former Member
0 Kudos

Hi experts,

          I have one scenario in which ECC will trigger 2 files as per scheduled Batch Job for 2 Plants with 2 different data.

My requirement is to add these two files and place it as one single .CSV file on target folder.

However when the batch job runs again it should overwrite the previous data and add the new 2 files and send them again.

Can you suggest how this can be achieved?

Thanks in Advance!!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member183908
Active Contributor
0 Kudos

i will go with Mark on this for option 1.please use ccBPM/BPM for merging the two files based on key field as correlation and create file adding time stamp to filename i think this will be the best option.you can use fork step and configure two receivers and maintain correlation between these receivers.Please search for blogs in SDN for merging of two files

Thanks

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Chandrabhan,


I have one scenario in which ECC will trigger 2 files as per scheduled Batch Job for 2 Plants with 2 different data.

My requirement is to add these two files and place it as one single .CSV file on target folder.

However when the batch job runs again it should overwrite the previous data and add the new 2 files and send them again.

Can you suggest how this can be achieved?

The main problem here would be as to how you would merge the 2 files with different plants and data.

There are lots of approaches:

1. BPM -> correlation between the two data and combine the output

2. Abap proxy with attachments -> one file for first plant, attachment is for the other plant. Merge by using either UDF or Java Mapping

3. Encode the two files as base64 and place in an RFC or Abap proxy field

Once you have decided which approach to take, overwriting the files should be easy. Just make sure the filenames are the same and the overwrite existing file option is checked in ID.

Regards,

Mark

maheswarareddykonda
Active Contributor
0 Kudos

Hi Chandrabhan,

you can handle this requirement depends on that interface frequency.

if that data should be overwritten per day once and with in the day ECC triigers twice PI need to append  then you can handle below way

1.create dynamic configuraion UDF with filename with date ex:customer08072015.txt

2.in receiver channel proccessmode should be append mode.