Skip to Content
avatar image
Former Member

How to spilt payload on condition in same folder

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 16, 2016 at 06:54 AM

    Hello Prabhkar,

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Evgeniy Kolmakov

      Hello Evgeniy,

      where i need to add department name in receiver channel is it in file name schema or under Advanced Tab.

      i have 4 departments so i need to give four department name sin receiver channel right.

      Thanks,

  • Nov 16, 2016 at 07:08 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 11:16 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

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