08-10-2015 3:42 PM
Hi at all,
I want to write a programm that can delete a complete Web Dynpro Component for ABAP only by typing the component name.
In my research I've found the class CL_WDY_WB_COMPONENT and the Method DELETE but I think it don't delete all of the parts of the component.
For other objects I've found some really easy understanding function modules like
- RS_FUNCTION_POOL_DELETE
- OO_CLASS_DELETE
- RS_DELETE_PROGRAM
But I couldn't find something for a Web Dynpro Component and all parts of it.
So please help me.
08-10-2015 4:24 PM
try this,
DATA: lo_component TYPE REF TO cl_wdy_wb_component,
lo_request TYPE REF TO cl_wb_request,
li_state TYPE REF TO if_wb_program_state,
lv_object_name TYPE seu_objkey.
CREATE OBJECT lo_component.
lv_object_name = 'ZASDF'.
CREATE OBJECT lo_request
EXPORTING
p_object_type = 'YC'
p_object_name = lv_object_name
p_operation = swbm_c_op_delete_no_dialog.
lo_component->if_wb_program~process_wb_request(
p_wb_request = lo_request
p_wb_program_state = li_state ).
08-10-2015 4:09 PM
Hi,
Why are you going to delete WD component??
I think you can not do this by a face less component.By default WD component having view and window.
Regards,
Srini.
08-10-2015 4:16 PM
I'm working in a company that is training new employees. To do this we have a lot of created exercises for example one in Web Dynpro. In every year we get new trainees and we don't want to reset the SAP system everytime, so we have decided to create a report to delete the results of the exercises from the past year..
08-10-2015 4:24 PM
try this,
DATA: lo_component TYPE REF TO cl_wdy_wb_component,
lo_request TYPE REF TO cl_wb_request,
li_state TYPE REF TO if_wb_program_state,
lv_object_name TYPE seu_objkey.
CREATE OBJECT lo_component.
lv_object_name = 'ZASDF'.
CREATE OBJECT lo_request
EXPORTING
p_object_type = 'YC'
p_object_name = lv_object_name
p_operation = swbm_c_op_delete_no_dialog.
lo_component->if_wb_program~process_wb_request(
p_wb_request = lo_request
p_wb_program_state = li_state ).
08-10-2015 4:27 PM
At the first look, it is the perfect answer .... Thank you very much ...