Symptom
You can enable the custom fields for the SOAP API Purchase Order – Send, Update, Cancel (OrderRequest_Out). These custom fields can be added through the app Custom Fields and Logic
Find the guide below with the detailed steps
“ Custom fields and logic” app updated to two different apps – Custom Fields and Custom Logic from CE2105
Environment
SAP S/4HANA Cloud Public Edition
Resolution
1. Log on to the SAP Fiori launch pad as an administrator.
2. Open the app Custom Fields and Logic
3. Choose the “+” icon to create a new custom field.
4. Select the following as Business Context:
- Business Context for Header: Procurement: Purchasing Document.
- Business Context for Item: Procurement: Purchasing Document Item.
5. Enter Label for the custom field.
6. Select Type as per your requirement.
Please note:
Currently the following data types have been tested:
7. In the section UIs and Reports enable usage for the following UIs and reports which you want the field to be displayed:
Example :
If the UI and Report: Purchase Order GUI Application is enabled for this custom field, the field would be available in the app “Create Purchase Order Advanced”
If the UI and Report: Manage Purchase Order is enabled for this custom field, the field would be available from the app “Manage Purchase Order”.
8.Go to the section SOAP API as shown below and enable usage for the custom field for the APIs that is required.
Example: Service Interface : OrderRequest_Out is used in the example given in this article.
9.Save and publish the custom field.
10. Create an example purchase order with a given value to the newly added field. Save the PO. The value of the new field should appear in the outbound API message for OrderRequest_Out. The same can be validated with the app “AIF message dashboard” with the following steps.
a. Go to the tile message monitoring – App “Assign Recipients to users”
b. Click on Add (+)
c. Add the user name which is used to check the payload
d. Add the interface name - /MMEDI Recipient name – EDI_MM_ORDER_RECIPIENT and click on Assign.
e. Go to the app – Message Dashboard
Give the date and time parameters and click on Search.
Click on /MMEDI – OrderRequest_Out
Click on the PO that was created by you with the value of the custom field output_trigger_hdr as ‘X’.
The value of the field in the payload should be set to X.
Example:
In the examples below, a custom field has been added in both “Create Purchase Order Advanced” and “Manage Purchase Order” apps.
To validate the successful addition, we will have to create a PO having this field value = X via both the apps and check the payload via the AIF Message dashboard as explained in the main section.
- Suppose you publish the below custom field for the app “Create Purchase Order Advanced”
Once the field gets published, the field will appear in the custom fields tab of the “Create Purchase Order Advanced” app under the tab “Custom Fields” in header section.
Item level
2. Suppose you would like to add the custom field for “Manage Purchase Order” app.
- a. Login to the Fiori Launch pad of the S4 HANA system and Go to “Manage PO” app.
- b. Click on the top right corner where there is the user icon and click on “Adapt UI”
2. c. Now place the cursor on any section of the UI where you would like to add the new field. Click on the add (+)button
2.d.This will give a list of the fields that are available to be added to this app. Choose one/more fields and click on Ok
Please note: This step would make the custom field available publicly for every user in this app.
We can now see that the new custom field added is available in the “Manage PO” app for usage.
Important Note:
Custom fields should be added to Manage Purchase Order application only if it is needed from a functionality perspective. Also, it is best to always use Adapt UI functionality only to add a new custom field where as not to affect/modify the functionality of an existing field.
Keywords
KBA , MM-PUR-GF-EDI , Electronic Data Interchange , How To