Skip to Content
0

How to spilt payload on condition in same folder

Nov 16, 2016 at 06:42 AM

39

avatar image

Hello All,

i have urgent requirement , how to spilt payload based on condition in same receiver folder.

I convert Fcc file to xml format. my payload having five fields(emp id,department,designation,experiance,salary) data.based on department field i need to spilt the data.

In Receiver channel how can put folder path for different departments.

ex: departments(Abap,hr,fico,pi) based each department i need to spilt the pyload.

How can put conditon in Receievr communication channel levl.

Please its urgent help me.

Thanks,

s.k.prabhakar.

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

3 Answers

Raghuraman S Nov 16, 2016 at 06:54 AM
0

Hello Prabhkar,

Split the file and configure 2 file channels pointing to different files and file names.

Show 10 Share
10 |10000 characters needed characters left characters exceeded

Hello Raghuraman,

Thanks for reply, by using ASMA parametrs how can we do by using one receiver channel.

Thanks,

0

Hello Prabhkar,

Is the folder same for all the files?

0

Hello raghuraman,

same folder for all files based on department i need to spilt payload separtly.

is it poosible by using asma parametrs.

please suggest me.

Thanks,

0

If you use split mapping (1:N messages) - you can't use ASMA in message mapping. You should develop adapter module or use existing one for setting ASMA values.

Regards, Evgeniy.

0

Hello Evgeniy,

I am not able to understand what will ido.

This is my input file data.

101 PI Developer 100 4
102 ABAP Developer 100 4
103 PI Developer 300 4

Based on different department i need to spilt payload to different files. I heard we can achive file name runtime by using ASMA PARAMETRS.

How can i configure my receiver channel.

Thanks,

0

What is your exact requirement?

1. Do you need to place files with same names to different target folders (according to department)?

2. Do you need to place the files to the same folder with different names (according to department)?

3. Do you need to place the files to different folders with different file names?

Regards, Evgeniy.

0

hello evgeniy,

I need to place the files to the same folder with different names (according to department).

Based on department in same folder i nedd to spilt payload.

Thanks,

0

Can you use department name as file name?

0

I mean, department name from payload?

0
Show more comments
Evgeniy Kolmakov Nov 16, 2016 at 07:08 AM
0

Hi Prabhakar!

If you can use department name as your target folder's name, you can just use Variable Substitution in adapter settings for folder name:

Regards, Evgeniy.


Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Nov 16, 2016 at 11:16 AM
0

Hi Prabhakar!

First, you should use split mapping to receive multi-message structure with one message for each of your departments.

Than you can use "Variable Substitution" option on "Advanced" tab: set the name for variable, for example, "fname" and reference to payload value - payload:Message_Name, [index], Element, [index], Element[index],.... , representing the path to element, containing value that you need.

After that, use this variable in file name schema - for example, File_for dep_%fname%.xml

Regards, Evgeniy.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Evgeniy,

I created all senarion but now only pending is spilting payload based on department in same folder only.

I created my Receiver channel variable substitution under Advanced tab like this. I gave here element names is Department Names.

But it is not working here element names means dapartment names or my 5 field names.

Thanks,

i7ux0.png (3.3 kB)
ro2qc.png (4.5 kB)
0

No, it defines the element path in structure with needed value

Example:

<MT_Message>
<emp>
<emp_info>
<dep>ABAP</dep>
</emp_info>
</emp>
</MT_Message>

Path:

payload:MT_Message,1,emp,1,emp_info,1,dep,1

It means: first "MT_Message" element, first "emp" element, first "emp_info" element, first "dep" element.

Regards, Evgeniy.

0