on 09-03-2009 9:03 AM
Hello Friends,
I cannot see adapter specific message attributes in receiver adapter XI (abap proxy) for enabling. I want to use these properties for getting a file name dynamically in a receiver structure.
I had seen a blog by Mr.Michal but that gives details for file to file. Here my target is abap proxy so I cannot see advance tab properties in XI adapter used communication channel.
Clearly my interface is file to ecc (using proxy), where i will have to read a file name which my interface picks and has to update in ecc.
I have enabled the sender side File adapter - ASMessage attributes but am not able to find the attributes in receiver side. Does it make any diffrence if am not enable the attributes at receiver adapter.
Thanks very much.
At last, with the help of all these experts my requirment is fulfilled. I can see file name in XML tags too.
Thanks much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that there is no ASMA for the receiver XI adapter.
in your case you can use the ASMA at the sender side, get the file name using the code
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
u201Chttp://sap.com/xi/XI/System/Fileu201D,
u201CFileNameu201D);
String inputFilename = conf.get(key);
and pass the value in the string inputFilename to the proxy structure in the mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and pass the value in the string inputFilename to the proxy structure in the mapping
Ok. That's fine. So what I will have to do is to add a field in a target structure and created UDF to be mapped directly to the field.
Or else UDF to be mapped directly to structure.
Also am not doing any modification in code Just created UDF with out argument and pasted the code in it. Do I need to return file name in the code.
return Filename;
Many thanks.
Hello Shabarish,
I am not able to map UDF to file_ name field in the target strucutre. Even I tried to map to the top node still not works.
My structure looks as
Sender Receiver
Record_details Record_details
Field1 FileName
Field2 Field1
Field2
UDF to be mapped to Topnode or second Node or to FileName.
Thanks much.
Hpppss....
Hello Shabarish,
I am not able to map UDF to file_ name field in the target strucutre. Even I tried to map to the top node still not works.
My structure looks as
Sender -
-
Receiver
-
Record_details -
Record_details
-
Field1----
Field1
-
Field2----
Field2
-
FileName ()
UDF to be mapped to Topnode or second Node or to FileName.
Thanks much.
Try with this code in your UDF..
try
{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String MyFILE = conf.get(key);
return MyFILE;
}
catch (Exception e)
{
String exception = e.toString();
return exception;
}
Also make sure if you have done mapping for all fields including root nodes.
Yes Survesh.
Having a problem with the mapping. Its not much complex mapping in my scenario. What all I did is -- added a field called Get_file in sub node along with other receiver fields. Trying to map UDF to Get_file. Mapping becomes yellow and when I check it says mapping not sufficient.
Thanks much.
Now I am sure that you have not deleted the default argument (a) from your UDF.
What you can do is, open your UDF then press the edit button (pencile icon) then click on the arugment (a) and then clikc then delete icon (red color icon).
Do this and I am sure your mapping will be ok.
Regards,
Sarvesh
> I have enabled the sender side File adapter - ASMessage attributes but am not able to find the attributes in receiver side. Does it make any diffrence if am not enable the attributes at receiver adapter.
No, it does not make any difference untill you are going to write the same file name by using Receiver CC. So if you have done ASMA in Sender CC then it's ok to read the file name in your mapping by using the UDF as given in Michal's blog.
See the similar kind of requirement in this thread (see my last answer)
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Swarna,
in your scenario in order to have the file name updated on ecc, you must:
1. Set the ASMA properties on sender channel
2. Read the property in mapping and put the value in a custom field on the proxy structure. Create an UD like this:
-
UD
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String onixdataset = conf.get(key);
--- END UD
3. Manage the filename in the proxy class with your requirements
Regards,
Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.