Skip to Content
avatar image
Former Member

Problem in dynamic file name in File reciever adapater

I have given my file name as

%abc%.txt

and in the advanced mode

i have given

Additional parameters as

abc=

payload:file_reciever_mt,1,FileNameNode,1,FileName,1

while my file reciver structure is

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

<ns:file_receiver_mt xmlns:ns="urn:filetofiledemo"><recordset><data><name></name><age></age></data></recordset><FileNameNode><FileName>Amit123</FileName></FileNameNode></ns:file_receiver_mt>

My file is getting store as %abc%.txt

not as Amit123.txt

I am using SP 14 .

Any pointers wld be very helpful

Thanks

Amit

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Jul 27, 2006 at 07:37 AM

    Hi

    chk out this thread

    dynamic-file-name-in-receiver-file-adapter

    cheers

    jithesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2006 at 07:37 AM

    Hi Amit,

    Check these out..

    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

    cheers,

    Prashanth

    P.S : Please mark helpful answers

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2006 at 07:38 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 27, 2006 at 07:42 AM

    Hi Amit,

    set "enable" flag and put the variable name into the table.

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2006 at 07:44 AM

    Hi,

    Check out this URL

    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

    Check these weblogs as well...

    /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi

    Thanks,

    Prakash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2006 at 07:51 AM

    Hi Amit,

    In your filename field. just give a variable with % symbols. (eg: %file% ).

    Now, under the option Variable Name Substitution, you can give how the value has to be created.

    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.

    For the former, your give

    message:interface_name ,etc

    and for the payload part you give,

    Payload: "your element root which u wanna acecss"

    Just check this link out,

    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

    And read the contents under variable substitution and it will help you understand the concepts better.

    Apart from my previous post, you can also use Adapter Specific Identifiers in your Sender and Receiver File Adapters to copy the same file name from the source to the target.

    take a look at this blog for the same,

    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

    -- Bhavesh

    cheers,

    Prashanth

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 27, 2006 at 02:14 PM

    Hi ..

    The spelling in variable substituin is conflicting..

    Message Type: <ns:file_re<b>ceiv</b>er_mt xmlns:ns="urn:filetofiledemo">

    IN SUBSTITUIN YOU HAVE GIVEN

    payload:file_re<b>ciev</b>er_mt

    CHECK THE ORDER OF ie, it's changed..try this one..remaining everything is fine..

    Add comment
    10|10000 characters needed characters exceeded