Skip to Content
avatar image
Former Member

Doubt in Variable substitution

Hi experts,

Can i use variable substitution for taking a part of the input filename.

My output filename contain only a part of the input filename.

Regards,

Divia

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Dec 18, 2008 at 04:53 AM

    Hi,

    Yes. You will require to store the part of the input file name in a output files structure and refer to it in the variable name.

    Thanks

    SaNv....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 18, 2008 at 04:58 AM

    Hi Divia

    Yes u can!!

    You have to use ur Variable Name in between % % and you can add other fixed values in it also.

    eg.

    %ABC%xyz.txt

    where the value of ABC will come from variable substitution while xyz.txt will remail static.

    Regards

    Raj

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 18, 2008 at 06:07 AM

    instead of variable substitution use Dynamic configuration. it is much more flexible to use.

    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

    Blog - https://blogs.sap.com/?p=41013

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 18, 2008 at 06:13 AM

    HI,

    You cannot take part of file name using variable substitution. ony full file name will be possible. You need to think for some other alternative.

    I will say that use two mappings in interface mapping. One to bring the source file name(Just 1 to 1 mapping) and, other to map trimmmed file name and also the actual mapping.

    Kulwinder

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Even the solution provided by shebarish is good. Write a UDF which should read the source file name dynamically.

      Trim the name of the file in that UDF itself and map it to the target. Then use the same field in variable substitution.

      It will solve your problem.

      Kulwinder

  • avatar image
    Former Member
    Dec 18, 2008 at 08:11 AM

    Hi all,

    Thank you very much for your answers.

    Add comment
    10|10000 characters needed characters exceeded