on 11-14-2012 3:20 PM
Hi experts,
We have implemented Travel Expenses (FITV) in SAP Portal. We're using ECC 6.0 with Ehp4 on SAP Portal 7.0. We are using the WD ABAP applications for creating and approving requests and expense reports. On approval POWL it is possible to add a column (attachments) where we can see the attachments submitted for each request and we want to keep it that way. We want to disable only the add option. Is it possible to do through customizing or authorizations?
Any hints?
Option add available here:
If you select either the attachment list on link (2) or option add it is possible to add a new attachment:
Many thanks in advance.
Best Regards,
AS
Hi,
If you want to customize it the quick and dirty way you can run the application in admin mode from SE80 using shift+F8. Then when you see the pop-up you can right click on the elements you want to hide and chose "settings for current configuration". You can then disable or hide for example the upload and browse buttons or the whole upload section. This can be saved as customizing and transported.
You will however still have the "Add" link. This text comes from OTR text PTRM_WEB_UI/ADD_ATTACHMENT but I would not change that as it is used multiple places.
Another more complicated approach is to enhance or modify the feeder class for this query. If you look in transaction POWL_TYPE you can see that for type FITV_POWL_TRIPSFORAPPROVAL_EXP the feeder class is CL_FITV_POWL_TRIPS_TOBEAPPROVE
In this class the method shown below contains the logic that you can consider modifying for your needs. Also this method IF_POWL_FEEDER~GET_FIELD_CATALOG might be interesting to have a look at.
You can also write a new feeder class based on this class and substitue with that in POWL_TYPE or create a new custom type in POWL_TYPE.
Yes so lots of options :-). Let us know what you decide.
BR Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jan,
Thanks for your quick response and help.
Actually by enhancing class CL_FITV_POWL_TRIPS_TOBEAPPROVE wouldn't solve my issue as if someone has previously attached a document to the trip it will appear a link to open the popup where they can add a new one or delete.
So what we did was to create a post-exit enhancement on WD component FITV_VC_TRIP_DOCUMENTS view V_ATTA method WDDOMODIFYVIEW.
We are still updating this code to hide radio button group and add button on this popup (see prt on my first post) based on the trip number REINR and PERNR, as this popup his used in every TV application, but on this code you have a fair idea how to hide them.
* Hide the options to add new attachments if it is the manager/assistant who is
* trying to approve
data lo_nd_attachments type ref to if_wd_context_node.
data lo_el_attachments type ref to if_wd_context_element.
data ls_attachments type wd_this->element_attachments.
* navigate from <CONTEXT> to <ATTACHMENTS> via lead selection
lo_nd_attachments = wd_context->get_child_node( name = wd_this->wdctx_attachments ).
* alternative access via index
lo_el_attachments = lo_nd_attachments->get_element( index = 1 ).
* @TODO handle not set lead selection
if lo_el_attachments is initial.
else.
* get all declared attributes
lo_el_attachments->get_static_attributes(
importing
static_attributes = ls_attachments ).
data: va_instid_b type sibfboriid,
va_instid_a type sibfboriid,
va_pernr type pernr,
va_trip type reinr.
concatenate ls_attachments-foltp ls_attachments-folyr
ls_attachments-folno ls_attachments-objtp
ls_attachments-objyr ls_attachments-objno into va_instid_b.
select single instid_a into va_instid_a
from srgbtbrel
where instid_b = va_instid_b and
typeid_a = 'BUS2089' and
catid_a = 'BO' and
reltype = 'ATTA'.
if sy-subrc eq 0.
va_pernr = va_instid_a+0(8).
va_trip = va_instid_a+8(10).
endif.
endif.
data: lo_text_view type ref to cl_wd_text_view.
clear lo_text_view.
lo_text_view ?= view->get_element( 'TEXT_VIEW_ADD_ATTA' ).
call method lo_text_view->set_visible( exporting value = '01' ).
data: lo_trans_cont type ref to cl_wd_transparent_container.
clear lo_trans_cont.
lo_trans_cont ?= view->get_element( 'TRC_RADIO' ).
call method lo_trans_cont->set_visible( exporting value = '01' ).
Thanks in advance.
Best Regards,
AS
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.