Skip to Content
avatar image
Former Member

Variable Substitution with timestamp in between

Hi,

I can get the file names %filetext%%fileseq%Timestamp.txt using Variable Substitution and timestamp in the Communication Channel.
but if i want it as %filetext%Timestamp%fileseq%.txt how do I do it? appriciate your help.

Thanks.

Prema Boodi

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 06, 2012 at 08:14 PM

    Hi,

    This is not possible with Variable Substitution, as far as I know, unless you have that desired timestamp in the target message payload. You can only append the timestamp directly before the file extension (so at the end of file name) with File Construction Mode.

    Using Dynamic Configuration and Adapter-Specific Message Attributes seems to be the only solution to your problem. See here for more details: http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407.

    Hope this helps,

    Greg

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2012 at 08:35 PM

    Please refer the below link about handling the filename appending values via three options using Adapter Module, Dynamic configuration and Variable Substitution. You need to have through some way from the payload and reference the same In AE module or using Dynamic configuration with ASMA. So you can reference the value in Variable Substitution.

    You might have to slightly tweak your design to incorporate the timestamp as Greg said using Dynamic configuration. That might be simpler solution.

    http://scn.sap.com/people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 07, 2012 at 03:38 PM

    Hi,

    >>but if i want it as %filetext%Timestamp%fileseq%.txt how do I do it? appriciate your help.

    If i correlate this post with ur previous ones which talks about multimapping and all....then above req cant be achieved with variable substitution with an assumption that timestamp is not coming in the payload but you can check below link which talks about DC with multimapping (u need some basic java and abap expertise)

    http://scn.sap.com/people/praveen.gujjeti/blog/2011/03/29/multi-mapping-assigning-asmas-for-child-messages-using-custom-adapter-module-and-fm

    And if in case this is a different requirement😊 then u have already been provided with a solution by Greg and Baskar.

    Thanks

    Amit Srivastava

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2012 at 05:03 AM

    hi , that is very possiable by usig Dynamic configuration and Run Operating System Command only because yiu need to add time stamp between text and not possiable with Variable subtution

    pls refer below link it's might be helpful:

    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407

    Add comment
    10|10000 characters needed characters exceeded