SAP S/4HANA Cloud key user extensibility allows adapting standard functionalities to user requirements without the need for any external tools. Whether you want to apply small changes, such as hiding standard fields for specific user groups or including some business logic, SAP S/4HANA Cloud offers a variety of tools covering diverse extensibility needs. Here's an overview of the things you can do using key user extensibility tools:
Business requirement:
The requirement is to have custom fields like Cost center and Profit center in the Free Form payment and it is expected that the system should be good enough to handle below scenario.
Scenario 1.
We are posting to an account that has a cost center AND profit center
Scenario 2.
We are posting to an account that has only profit center
Note: This blog is focused on S/4 HANA Cloud version, but this could be same for S/4 HANA premise
I will be covering below topics in details
1.Custom field (Code list based on CDS view).
2.Custom logic
3.Adapt the custom fields in the Free form payment app
4.Transport the changes in Software collection and migrate the changes to production.
1.Custom Field (Code list based on CDS view).
In actual ECC, we usually create custom field in transaction SE11 and then it would be leveraged in tables, program, reports. Whereas in cloud version of S4 HANA, it comes handy just with the help of app called “Custom Fields”.
Login to Fiori Launchpad and search for Custom fields app
Click on ‘+’ icon on top right corner of the application
Select the relevant business context, in this case it would be “Payment Request”
Give a meaningful Label which would be title of your object and mention unique identifier
Now the important selection for the field type would be “Code list based on CDS View “
If it is just a text field, then choosing type Text will be enough whereas the type “Code list based on CDS view” is search help (F4) assigned to the custom field and so the end user has the option to choose the value out of list by clicking the search help.
Now click “Create” to generate the new custom field YY1_F4_COSTCENTER
To get relevant cost center value, it is necessary to select equivalent CDS available in the value help view. In this case, the cost center value is available in I_CostCenterStdVH
At last, it is required to update key fields at the bottom section with meaningful field names and then publish the custom field.
2.Custom Logic:
Once after custom field is published, the logic to be updated and for that search for custom logic in search bar.
Click on ‘+’ and give the same business context “Payment Request “that was given for Custom logic here as well.
Give Badi Description “Payment Request Accounting Document” choosing the drop dox box and you notice the implementation id is being picked up automatically as YY1_COSTCENTER.
Give a description for the implementation
Now it is time to open the code editor and implement the logic. As discussed above, the requirement is to pass the value from the custom field into FI document once the free form payment request is saved and released.
Click on open code editor and implement the logic as like below for the following parameters.
Data item_field type fins_payt_req_posting_field.
if not i_payment_request-YY1_F4_COSTCENTERCC00_PRQ is initial.
item_field-field_name = 'COBL-KOSTL'.
item_field-field_value = i_payment_request-YY1_F4_COSTCENTERCC00_PRQ.
append item_field to c_payee_items.
endif.
if not i_payment_request-YY1_PROFITCENTERPP00_PRQ is initial.
item_field-field_name = 'COBL-PRCTR'.
item_field-field_value = i_payment_request-YY1_PROFITCENTERPP00_PRQ.
append item_field to c_payee_items.
endif.
Click save and publish the custom logic YY1_COSTCENTER.
Now we are entering the final phase of implementation to adapt the custom fields YY1_COSTCENTER and YY1_PROFITCENTER in the free form payment app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 25 | |
| 24 | |
| 19 | |
| 14 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 11 |