on 03-20-2009 2:19 PM
Hi,
I wish to get the file name (or full path name) of the source xml file that I need to parse. I can save the name of the file into container before launching the step of abap mapping.
I found in this forum this java source code.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
Since I am using Abap O.O. is there a possibility to get the file name?
I receive this error message.
Statement "DYNAMICCONFIGURATION" is not defined. Check your spelling.
Any help will be well appreciated.
Thanks.
Giovanni
Very good!
Many thanks for your reply.
Now, my last question. In my context I wish to receive only the file name from the dynamic configuration environment.
More exactly, if I try in this way:
DATA: ls_dynamic_conf TYPE MPP_DYNAMIC.
ls_dynamic_conf = dynamic_configuration->get_record(
namespace = 'http://sap.com/xi/XI/System/File'
name = 'FileName' )
I receive "no syntax errors found" after the check.
Without the "namespace" parameter I receive the following error message after the check.
The obligatory parameter "NAMESPACE" had no value assigned to it.
Any idea?
Is there a solution or I must keep the namespace value within my abap mapping?
Thanks in advance.
Regards,
Giovanni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the IF_MAPPING_DYNAMIC_CONFIGURATION interface
METHOD if_mapping~execute.
DATA l_record type mpp_dynamic.
* copy payload
result = source.
* add an adapter specific attribute
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'FileName'.
l_record-value = 'youfilenamehere'.
dynamic_configuration->add_record( l_record ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.