Introduction
In PLM Web UI the default directory for adding originals is the directory where NWBC was installed, that is assuming NWBC is used to access PLM Web UI. File browsing, upload and download in PLM Web UI is handled by the ACF component AcfUpDownload requiring a Java runtime on the client. In order to change the default directory for adding originals in PLM Web UI, a enhancement is required.
Environment
PLM 7.02 of ERP 6.0 EHP6 SPS04 was used while writing this document.
Solution
Open Web Dynpro component /PLMU/WDC_DIR and view V_DIR_ORIGINAL_ADD. Press Enhance icon on the toolbar, enter name and description for your enhancement. Select the Methods tab and scroll to the right and press on the create Overwrite Exit icon on row ONACTIONBROWSE. Only one line needs to be changed in the original source code:
method ONACTIONBROWSE .
try.
wd_this->acf_method_handler->IF_WD_ACFUPDOWNLOAD_SWFS~CHOOSE_FILE(
EXPORTING
window_title = 'Choose file'
start_directory = 'C:\' " <-- default directory
default_file = ''
filter = ''
filter_description = ''
directory_only = abap_false
context_attribute = wd_this->CONTEXT_ATTR_RES_PTR ).
catch cx_wd_acf_exception.
* get message manager
DATA: l_current_controller TYPEREFTO if_wd_controller,
l_message_manager TYPEREFTO if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api().
CALLMETHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
* report message
CALLMETHOD l_message_manager->report_success
EXPORTING
message_text = 'Problem with paramcall'. "#EC NOTEXT
ENDTRY.
endmethod.
Conclusion
SAP should make the default directory configurable.
Acknowledgements
ABAP source code in this document was formatted using the ABAP code lighter for SCN by George Shlyahov.