Skip to Content

Add message content to Filename in my scenario in HCI

Hi Experts,

Our scenario is IDoc to File [SFTP - CSV File] where IDoc structure to be converted to CSV file which works well. Now our requirement is to generate filename with IDoc number which is present in the input payload to HCI & my scenario is working fine with "Append Timestamp" option but could not generate File name with IDoc number present in it.

Screen shot of my iFlow:

1. Message mapping to transform to required structure.

2. Converter to convert XML to CSV.

3. Content Modifiers to add the required header value to body that got generated by previous step.

I used "Append Timestamp" option in receiver channel to generate filename , Now my requirement is generate filename that should contain IDoc number [from source payload].

My input file look like below:

Input file screen shot :

I followed Shivaram blog [https://blogs.sap.com/2016/07/10/sap-hcp-is-sap-hci-dynamic-configuration-for-sftp-adapter/] but getting confused where to use Content Modifier as suggested by Shivaram in my scenario.Please guide me to achieve this requirement.

Thanks,

Ramu.

iflow.jpg (47.4 kB)
snip.jpg (56.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jul 24, 2017 at 05:30 PM

    Hello Ramu,

    You must use your content modifier which sets the file name before your mapping (Where you are getting IDOc XML with field DOCNUM).

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 03:35 PM

    try using the content modifier before the mapping step. get the IDOC number and save it as a header / property. Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 25, 2017 at 06:26 AM

    Hi Shivaram,

    File is getting generated but only IDoc number value is not getting appended to FileName as defined in Content Modifier.

    Say for I have defined CamelFileName expression as "Invoice_${header.IDoc}.xml" only FileName is genrated as "Invoice_.xml" but something like "Invoice_000000000234321.xml" , Kindly help to resolve my issue.

    Thanks,

    Ramu.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 25, 2017 at 07:11 AM

    Hi Shivaram,

    In Content Modifier I defined Value of CamelFileName as Sample_${header.Var1}.xml like in below snippet :

    But file is getting generated as below snippet:

    File name is generated as "Sample_${header.Var1}.xml' rather than like eg: Sample_000000234385.xml . Kindly help to resolve.

    Thanks,

    Ramu.

    Add comment
    10|10000 characters needed characters exceeded