If you use the ADT wizard to generate a business configuration maintenance object, the transport selection bar for SAP Fiori elements is enabled by default as of release 2408.
Compared to the previous transport selection mode, there are three advantages:
This blog shows you how to migrate an existing maintenance object to the new transport selection mode. If you prefer the previous transport selection mode, you can simply deselect the option "Enable Transport Selection Strip" in the wizard when generating a new maintenance object.
This blog is relevant for
Further reading:
Set the option “Show Transport Selection Strip” to “Yes”.
In the metadata extension object of the singleton entity, remove the #FOR_ACTION annotation object from the TransportRequestID field.
@ui.identification: [ {
position: 2 ,
importance: #HIGH
}
// ,
// {
// type: #FOR_ACTION,
// dataAction: 'SelectCustomizingTransptReq',
// label: 'Select Transport'
// }
]
TransportRequestID;
In the behavior implementation class, modify the MODIFY ENTITIES statement in the SelectCustomizingTransptReq method. Remove both usages of the field "HideTransport".
MODIFY ENTITIES OF ZI_Cubco1_S IN LOCAL MODE
ENTITY Cubco1All
UPDATE FIELDS ( TransportRequestID
" HideTransport
)
WITH VALUE #( FOR key IN keys
( %TKY = key-%TKY
TransportRequestID = key-%PARAM-transportrequestid
" HideTransport = abap_false
) ).
In the singleton entity, annotate the field TransportRequestID with "features : instance" and, if necessary, remove the annotation "readonly".
field ( features : instance )
TransportRequestID;
In the implementation of method GET_INSTANCE_FEATURES of the singleton entity, add the following to the result statement:
%field-transportrequestid = COND #( WHEN lhc_rap_tdat_cts=>get( )->is_transport_mandatory( ) = abap_false THEN if_abap_behv=>fc-f-unrestricted ELSE if_abap_behv=>fc-f-mandatory ).
If the method IS_TRANSPORT_MANDATORY is not available because you do not use a transport object, use the following source code instead. Prior to release 2402, the ADT wizard did not generate a transport object by default.
%field-transportrequestid = if_abap_behv=>fc-f-mandatory.
Add association to I_ABAPTransportRequestText in the CDS definition of the entity where the Transport Request field is defined:
association [0..*] to I_ABAPTransportRequestText as _ABAPTransportRequestText on $projection.TransportRequestID = _ABAPTransportRequestText.TransportRequestID
If you have a projection layer, use the following annotation for the Transport Request field in the projection CDS view:
@ObjectModel.text.element: [ 'TransportRequestDescription' ]
TransportRequestID,
@UI.hidden: true
_ABAPTransportRequestText.TransportRequestDescription : localized,
If you don't have a projection layer, use the following annotation for the Transport Request field in the CDS view:
@ObjectModel.text.association: '_ABAPTransportRequestText'
cast( '' as sxco_transport) as TransportRequestID,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |