on 10-12-2009 10:16 AM
Hi All,
My sender message will be like
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ZBAPI_CCN_CREATE xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<CHANGE_HEADER>
<CHANGE_NO/>
<STATUS/>
<AUTH_GROUP/>
<VALID_FROM/>
<DESCRIPT/>
<REASON_CHG/>
</CHANGE_HEADER>
</ns0:ZBAPI_CCN_CREATE>
of which, I want to bring in the CHANGE_NO as my file name. But when I m trying to do so I am getting the following error in receiver CC
Error: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1
and in my receiver CC i have defined var1 as payload: ZBAPI_CCN_CREATE,1,CHANGE_HEADER,1,CHANGE_NO,1
and my target file name as Changenumber_%var1%_.xml
let me kow how to resolve.
Regards,
Nithiyanandam
I had also stuck in the same case, and I was able to resolve through following way (just for reference for somebody who got stuck with the same issue):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithiya,
I tried checking to get variable substitution path with a namespace but was not successful.
Why dont you try this:
1. Switch on ASMA on sender channel
2. In message mapping change the Filename vaue with Node content
3. USe Dynamic Configuration in Receiver channel
Hope this will help
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithya,
Can you confirm that you are doing the Variable substitution in the Receiver File adapter?
You have said that your scenario is File-RFC-File, so you have to create two file adapters (One sender and another receiver).
In the receiver file adapter you should be doing your Variable substitution.
Regards,
Ravi
Hi Nithyanandam,
Aas other have suggested, it doesn't work for sender adapter.
You have to map it to some field in the target structure and then use that variable in your Variable substitution.
Regards,
Ravi Kanth Talagana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithiya,
Variable sustitution in Recever File adapter works on receiver payload and not sender
Regards
suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithiya,
Is this your target structure?
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZBAPI_CCN_CREATE xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <CHANGE_HEADER>
<CHANGE_NO>T090060</CHANGE_NO>
<STATUS>01</STATUS>
<VALID_FROM>17.09.2009</VALID_FROM>
<DESCRIPT>001ss</DESCRIPT>
<REASON_CHG />
</CHANGE_HEADER>
</ns0:ZBAPI_CCN_CREATE>
Can you try this when you declare var in receiver adapter:
payload: ns0:ZBAPI_CCN_CREATE,1,CHANGE_HEADER,1,CHANGE_NO,1
if this doesn't work i will suggest you to remove the namespace from the target structure and try the same combination whcih you used earlier.
BTW why the receiver (file) is also having the same rfc namesapce?
Regards
Suraj
Hi Suraj,
Still it is not working
Since I have created the external definition using the source structure of the BAPI (by copying the XSD) it has the same target structure
Its a file-RFC-FILE scenario. I am trying this at the request side
Regards,
Nithiyanandam
Edited by: Nithiyanandam A.U. on Oct 12, 2009 12:18 PM
>
> Hi All,
>
> My sender message will be like
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ns0:ZBAPI_CCN_CREATE xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
> <CHANGE_HEADER>
> <CHANGE_NO/>
> <STATUS/>
> <AUTH_GROUP/>
> <VALID_FROM/>
> <DESCRIPT/>
> <REASON_CHG/>
> </CHANGE_HEADER>
> </ns0:ZBAPI_CCN_CREATE>
>
> of which, I want to bring in the CHANGE_NO as my file name. But when I m trying to do so I am getting the following error in receiver CC
>
> Error: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var1
>
> and in my receiver CC i have defined var1 as payload: ZBAPI_CCN_CREATE,1,CHANGE_HEADER,1,CHANGE_NO,1
>
> and my target file name as Changenumber_%var1%_.xml
>
> let me kow how to resolve.
>
>
> Regards,
> Nithiyanandam
try
payload:ZBAPI_CCN_CREATE,1,CHANGE_HEADER,1,CHANGE_NO,1
dont keep any spaces between the texts. also make sure there is a value in the target field else it will fail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
At call adapter level I am getting the payload message as
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:ZBAPI_CCN_CREATE xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
- <CHANGE_HEADER>
<CHANGE_NO>T090060</CHANGE_NO>
<STATUS>01</STATUS>
<VALID_FROM>17.09.2009</VALID_FROM>
<DESCRIPT>001ss</DESCRIPT>
<REASON_CHG />
</CHANGE_HEADER>
</ns0:ZBAPI_CCN_CREATE>
Regards,
Nithiyanandam
why dont you use asma properties and set the file name - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
i suggest to use dynamic configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.