SAP TM Collaboration Portal --- Adding Custom Fields on Table
SAP TM collaboration portal for collaboration between you and your business partners.
This document from Jan Rumig provides an overview of which extensions are possible and how to create them.
SAP TM Collaboration Portal - Customer Extensions
I have tried the option to provide customer-specific fields for existing functionality.
These are steps which can be followed to achieved this. I have tried with Tendering --- Quotation View
Step 1:--
Add a new field in include <CI_QUOTATION> for Structure /SCMTMS/S_GW_TEND_QUOTATION.
The fields must start with ZZ or YY.
Step 2:-- Activate the structure.
Step 3 :--Open the Enhancement Spot /SCMTMS/ES_GW_CUST_ENH.
Step 4:-- Provide a BAdI implementation for BAdI /SCMTMS/BADI_GW_CUST_ENH which is contained in enhancement spot
/SCMTMS/ES_GW_CUST_ENH. The BAdI has to implement the interface /SCMTMS/IF_GW_CUST_ENH.
These are the five methods which we have to implement.
Step 5:- In method /SCMTMS/IF_GW_CUST_ENH~ADD_PROPERTIES
This method is used to add new Properties to gateway entity.
DATA:
lo_property TYPE REF TO /iwbep/if_mgw_odata_property,
lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ.
CASE iv_service_name.
WHEN '/SCMTMS/TENDERING'.
lo_entity_type = io_model->get_entity_type( iv_entity_name = 'Quotation' ).
lo_property = lo_entity_type->create_property( iv_property_name = 'ZZCustomerBoolean' iv_abap_fieldname = 'ZZBOOLE' ).
lo_property->set_type_edm_boolean( ).
lo_property->set_creatable( abap_false ).
lo_property->set_updatable( abap_false ).
lo_property->set_nullable( abap_true ).
lo_property->set_filterable( abap_false ).
lo_property = lo_entity_type->create_property( iv_property_name = 'YYCustomerText' iv_abap_fieldname = 'YYTEST' ).
lo_property->set_type_edm_string( ).
lo_property->set_maxlength( iv_max_length = 20 ).
lo_property->set_creatable( abap_false ).
lo_property->set_updatable( abap_false ).
lo_property->set_nullable( abap_true ).
lo_property->set_filterable( abap_true ).
ENDCASE.
Step 6:-- In method /SCMTMS/IF_GW_CUST_ENH~MAP_DATA_TO_PROPERTIES
This method is used to add new data to the added property entities.
DATA:
lv_boolean TYPE boolean,
lv_text TYPE char10.
FIELD-SYMBOLS:
<ls_data> TYPE any,
<lv_boolean> TYPE boolean,
<lv_text> TYPE char20.
CASE iv_service_name.
WHEN '/SCMTMS/TENDERING'.
LOOP AT ct_result ASSIGNING <ls_data>.
ASSIGN COMPONENT 'ZZBOOLE' OF STRUCTURE <ls_data> TO <lv_boolean>.
ASSIGN COMPONENT 'YYTEST' OF STRUCTURE <ls_data> TO <lv_text>.
lv_boolean = abap_true.
<lv_boolean> = lv_boolean.
lv_text = sy-tabix.
CONCATENATE 'TEXT' lv_text INTO <lv_text> SEPARATED BY space.
CONDENSE <lv_text>.
ENDLOOP.
ENDCASE.
Step 7:- In the method /SCMTMS/IF_GW_CUST_ENH~SET_LAST_MODIFIED
Sets the last modified time for gateway service.
rv_last_modified = '20141031120025'.
Step 8: -- Activate the class
Step 9: --- Lunch the portal application.
IN the end of table once you scroll, you will see these added columns.
Best regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |