Skip to Content
avatar image
Former Member

Create File

Hi guys,

I have a proxy to file scenario.

First what do I need to change to get a TXT file like this:

EmpNo = 11

EmpName = Toto

Because at the moment it's creating an XML file with tags like that

<?xml version="1.0" encoding="utf-8"?>

<EmpNo >11</EmpNo>

<EmpName >Toto</EmpName>

Thanks,

Regards,

Murai

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 26, 2007 at 02:08 PM

    One method would be to use two tags in ur data type and do a custom mapping.

    I mean for 1st tag, value = "EmpNo = " + (input from source message type tag value)

    And finally, You need to use file content conversion

    Thanks

    Varun

    Add comment
    10|10000 characters needed characters exceeded

    • Murai,

      Sorry for the late reply. Ok, u want the payload Filename to be ur receiver comm.channel File name scheme right?

      Do u have any mapping program?If yes then please see the below logic to achieve the same.

      Create simple UDF with single input parameter.

      DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

      DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

      conf.put(key,<b>yourinputparameter</b>);

      return "";

      The mapping logic is

      According to your XML structure given above.

      Filename[Source]---- >UDF --


      > Root Node[Target]

      Click the checkbox of Adapter Specific Message Attributes- Filename in both Sender/Receiver comm.channel.

      If you don't want the above UDF and if you want only variable substitution , then do reply back.

      Best regards,

      raj.

  • Jun 26, 2007 at 01:54 PM

    Murai,

    Create Data type,Message Type, Inbound Asynch Message Interface

    <Details> 0..Unbounded

    <Empno/> 0..1

    <Empname/> 0..1

    </Details>

    Best regards,

    raj.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 28, 2007 at 08:50 AM

    Any idea?

    Add comment
    10|10000 characters needed characters exceeded