Introduction of GOS (Generic Object Services)
SAP introduced GOS (Generic Object Services) mechanism to handle attachments with latest Fiori applications. In certain scenarios where supporting attachments are required at line item level GOS won't work as GOS attachments are stored at request header level.
What is HDM (Harmonized Document Management)
However, we can still activate archiving link document types in required applications. For this we need to enable HDM functionality and route the attachment type configuration from GOS to archive link or DMS mechanism. In this blog I have explained how to gather required parameters and configure HDM.
Enabling Archiving Link Document Types Through HDM
In this example I am explaining how to overwrite GOS configuration with archive link through Harmonized Document Management mechanism and create different document types (custom document types) for travel expense request.
Available document types in travel expense request before implementing Harmonized Document Management:
Available document types before HDM configuration
Identifying linked SAP Object Type & BO (BOR) type with the application
To identify which SAP object type is used for the application to link document types keep a break point in the class "
CL_BO_DOC_TYPE_HELPER" and method "
GET_ATTACHMENT_OBJTYPE_INFO"
Setting Breakpoint in the class
Now execute the transaction/application to trigger the debugger. Check values of below fields
iv_bo_type
iv_object_node_type
Debug-Screen
With the IV_BO_TYPE value "
TravelExpense" check the config table
SAO_TYPE_DEF as below.
SAO_TYPE_DEF
SAO_TYPE_DEF-TravelExpense
If the search didn't return with any results configure in the view table
V_AO_TYPE_DEF - Define Attachment Object Types through SM30 or T-Code
AO_TYPE_DEF - Maintain Attachment Objects
V_AO_TYPE_DEF
Note: This is cross client table & Make sure that you have checked HDM adopted flag.
Configure document types for BO (in this case BUS2089)
Define Content Repositories:
Configure a repository as per your requirement
SPRO path: SAP Customizing Implementation Guide --> ABAP Platform --> Application Server --> Basis Services --> ArchiveLink --> Basic Customizing --> Define Content Repositories
T-Code: OAC0
Sample Repository
Edit Document Types:
Configure required document types as per requirement. In this case I am configuring ZHCM_TEST for testing.
SPRO path: SAP Customizing Implementation Guide --> ABAP Platform --> Application Server --> Basis Services --> ArchiveLink --> Basic Customizing --> Edit Document Types
Document Type
Assign document type(s) to BO:
Assign the document type created above with BO (BUS2089)
SPRO path: SAP Customizing Implementation Guide --> ABAP Platform --> Application Server --> Basis Services --> ArchiveLink --> Basic Customizing --> Edit Links
T-Code: OAC3
Document-BO Assignment
Perform HDM (Harmonized Document Management) configuration:
SPRO path: SAP Customizing Implementation Guide --> ABAP Platform --> Application Server --> Basis Services --> Harmonized Document Management --> Activate HDM for Attachment Object Type
T-Code: HDM_CUST
Activate HDM for Attachment Object Types:
Configure the Attachment Type defined in the view V_AO_TYPE_DEF
Attachment Object Types
Activate Document Frameworks-1
Activate Document Frameworks-2
Maintain Default and Restricted Document Types
Maintain Default and Restricted Document Types-1
In the above step the document types assigned in OAC3 will populate automatically.
Checking the document appearance in dropdown:
Open the transaction/Fiori app and go to attachment dropdown section to view the configured document type.
Checking Document types in transaction/Fiori