cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in dynamic file name in File reciever adapater

Former Member
0 Kudos
617

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

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

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..

Former Member
0 Kudos

Thanks a ton

Former Member
0 Kudos

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

Former Member
0 Kudos

my problem is

i cant see the option Variable Name Substitution

though i have SP 14

is there any basis settings to be done

Thanks

Amit

bhavesh_kantilal
Active Contributor
0 Kudos

Amit,

In your Receiver File Adapter, have you give VARIABLE NAME SUBSTITUTION ENABLE??

Also, Try by Selecting the option , DISABLE SECURITY CHECKS under Varibale Name substitutiion.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Amit, recheck if you are actually on SP14. It is always possible that your JAVA and ABAP stack are on different SpP's.

We faced a smiliar issue once when our ABAP stack was on Sp14 and Java was on SP9.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Amit,

The variable substitution option, it would be something like as shown in the following weblog,

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

Check as to which SP level you are in, you can do that by logging into your XI server, from the menu choose, System --> Status --> below Component Version (click on the lens icon) --> check the level there.

Also Please check in the integration repository under SAP BASIS 6.40 under details tab. You should be able see which support package available for this software component.

XI Content contains the Adapter's metadata. It is impossible to use the new features and new parameters in integration Directory, if you do not have the new metadata for adapters.

Please follow the note 705541 and update your xi content.

Regards,

Abhy

Message was edited by: Abhy Thomas

Former Member
0 Kudos

Hi Abhy ,

Are you saying the file adapter under

http://sap.com/xi/XI/System

wht do i need to check in the metadata

Former Member
0 Kudos

Bhavesh i dont see this at all

VARIABLE NAME SUBSTITUTION ENABLE

Yes my java is on SP 14 which i can see by clicking on help , information

any idea wht is missing in the adapater

Former Member
0 Kudos

Hi Abhy,

What i meant is if you have imported the latest SAP Basis 6.4 content after upgrade ? The adapter metadata is part of this content and so make sure this has been done.

Iwould suggest you to contact your Basis team for this issue....

Regards,

Abhy

Former Member
0 Kudos

THi abhy ,

Thks 4 ur info

The varaiable substitution link is coming now

bt i am getting error in file conversion

when i give

abc= message:interface_name

i get the file name as

file_receiver_If.txt

abt when i give as

abc=

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

i get the following error in adapater

Configured at 2006-07-27 12:32:51 UTC

History:

- 2006-07-27 12:33:27 UTC: Message processing failed: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: abc

- 2006-07-27 12:33:27 UTC: Processing started

- 2006-07-27 12:33:07 UTC: Message processing failed: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: abc

- 2006-07-27 12:33:07 UTC: Processing started

wht cld be wrong now

thks

amit

bhavesh_kantilal
Active Contributor
0 Kudos

Amit,

Can you please clarify on how you go the option?

<i>

The varaiable substitution link is coming now</i>

Regards,

Bhavesh

Former Member
0 Kudos

Hi bhavesh ,

Sorry 4 the late reply .

Same thid which aby sugested

i am reposting wht he said

-


What i meant is if you have imported the latest SAP Basis 6.4 content after upgrade ? The adapter metadata is part of this content and so make sure this has been done.

Iwould suggest you to contact your Basis team for this issue....

-


in case you want specific deatils i cn get it from the basis guy in my team .

thks

amit

Former Member
0 Kudos

the basis team imported the Xi content.

former_member206604
Active Contributor
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

Hi Amit,

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

Regards,

Udo

Former Member
0 Kudos

Hi Udo ,

I have SP 14

but i can see the enabale flag

wht i can see is

Advanced Mode

Additional Parameters

Is there any issue in XI adapater engine

Thanks

Amit

udo_martens
Active Contributor
0 Kudos

Hi Amit,

you dont need advanced mode. Set the flag "Enable" in "Variable Substitution". Put the Variable Name and the Reference in the first line of the table.

Regards,

Udo

Former Member
0 Kudos
Former Member
0 Kudos

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

Former Member
0 Kudos

Hi

chk out this thread

cheers

jithesh