on 05-23-2011 8:49 AM
Hi,
In a web dynpro abap application, I am using a business graphic. there is a attribute called 'customizing' present in the BG UI elem.
I want to set the value of customizing at runtime. I have uploaded few XML files in the Mimes folder of my web dynpro abap application. I want to change the property 'Customizing'(which takes a xml file as its value) at runtime. I want to take the xml file form the files uploaded in the mimes folder already. How do we do this programatically.
I have already done the following things.
data : lr_bg TYPE REF to cl_wd_Business_Graphics,
lr_bg_method_handler type ref to IF_WD_BUSIN_GRAPHICS_MTD_HNDL.
lr_bg ?= view->get_element( id = 'BGR_REMINQ' ).
lr_bg_method_handler ?= lr_bg->_method_handler.
CALL METHOD LR_BG_METHOD_HANDLER->CLEAR_DIRECT_CUSTOMIZING.
CALL METHOD LR_BG_METHOD_HANDLER->ADD_DIRECT_CUSTOMIZING
EXPORTING I_CUSTOMIZING = 'EUR.xml'.
In the above code, I am passing 'EUR.xml' to I_CUSTOMIZING property of the BG but the system is giving a error saying "The Literal 'EUR.xml' is not type compatible with formal parameter I_CUSTOMIZING". how to get rid of this error. how to reference a mime xml file in line 'EXPORTING I_CUSTOMIZING = 'EUR.xml'.
Regards
seventyros
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi seventyros,
Expected parameter for method add_direct_customizing must be an object of type IF_IXML_DOCUMENT.
You must instantiate an object of this type using your 'EUR.xml'.
For doing so :
1/ Create an object from class CL_XML_DOCUMENT.
2/ Use method IMPORT_FROM_FILE to instantiate it from your 'EUR.xml' file if it is on your desktop or a similar one to load it from the bds (load could work).
3/ then access public attribute M_DOCUMENT which is type ref to IF_IXML_DOCUMENT.
4/ Pass this object to your method add_direct_customizing.
Job should be done.
Hope this helps,
Regards,
Mathieu.
Edited by: Mathieu Chenu on May 23, 2011 12:02 PM
Hi,
I tried to do what you wrote.
I wrote following lines of code.
data : DOCUMENT TYPE REF TO CL_xml_document.
create OBJECT DOCUMENT.
DOCUMENT->IMPORT_FROM_FILE( filename = 'EUR.xml').
M_DOCUMENT = DOCUMENT->M_DOCUMENT.
CALL METHOD LR_BG_METHOD_HANDLER->CLEAR_DIRECT_CUSTOMIZING.
CALL METHOD LR_BG_METHOD_HANDLER->ADD_DIRECT_CUSTOMIZING
EXPORTING I_CUSTOMIZING = M_DOCUMENT.
at line where I am creating a object of class CL_xml_document ie at line create OBJECT DOCUMENT, program throws a dump saying "NOT_SUPPORTED_BY_GUI".
any suggestions on how to resolve this. I wrote the avove code in wddomodify() method.
regards
seventyros
hi,
and moreover, in your point no. 3, we are trying to upload the file from the desktop. I don't want to upload it from the desktop niether do I want to upload it using BDC etc. I have this XML file in the MIMEs objects of my web dynpro component. how do I get it from there?
regards
seventyros
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.