on 03-12-2009 8:03 AM
Dear All,
I have requirement to use the filename's name in the mapping to the target message.
e.g: Filename is Victor.303, i need to take this 303 and map it to the target message.
I understand i can get that value using dynamic configuration in Adapter-Specific Attributes.
But all the samples are using Java code used in UDF.
How to do the same in ABAP Mapping?
I tried:
record = dynamic_configuration->get_record( namespace = 'http://sap.com/xi/XI/System/File'
name = 'FileName').
But record-value return blank.
Best Regards,
Victor.
You will find the required code here
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Prateek,
I changed my code with:
DATA: record TYPE mpp_dynamic.
CALL METHOD dynamic_configuration->get_record
EXPORTING
namespace = 'http://sap.com/xi/XI/System/File'
name = 'FileName'
RECEIVING
record = record.
but record-value still return as blank.
I have doubt in this, do i need to populate the FileName in the dynamic configuration (in the graphical mapping) first before i can get the value in the ABAP mapping? or System should filled it and i just can use it directly in the ABAP mapping?
How we know what is the available name and namespace in that dynamic configuration-->get record??
(e.g: my case is FileName, and in the link that you gave is ERROR.)
Any link for this?
Best Regards,
Victor.
Hello,
Use the below UDF in graphical maping and pass the FileName coming from source side in any field to the UDF.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,a);
return "";
hi,
>>I have doubt in this, do i need to populate the FileName in the dynamic configuration (in the graphical mapping) first before i can get the value in the ABAP mapping?
of course not
>>or System should filled it and i just can use it directly in the ABAP mapping?
this is the way it works but!
you need to select - adapter specific attributes use
in your communication channel did you do that??
>>How we know what is the available name and namespace in that dynamic configuration-->get record??
you can see it in SXI_MONITOR in your message in dynamic_configuration section of your message
Regards,
Michal Krawczyk
Dear All,
My problem was solved.
FYI for my query:
I have doubt in this, do i need to populate the FileName in the dynamic configuration (in the graphical mapping) first before i can get the value in the ABAP mapping? or System should filled it and i just can use it directly in the ABAP mapping?
The answer is NO need, system will fill it for us.
We just need to tick the "Set Adapter-Specific Message Attributes" and "FileName"
in the advanced tab in the File Adapter.
Best Regards,
Victor.
Hi Michal,
Last question
DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/ERROR", "ERROR");
Can i create my own key for that dynamic configuration? And i populate the value by myself?
maybe like :
DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Victor", "Victor");
Best Regards,
Victor.
User | Count |
---|---|
86 | |
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.