Skip to Content
Technical Articles

Creating Custom Fields in Purchase Order Form for Poland

 

This blog post explains how to extend the custom fields in the output form of Purchase Order in Poland country solution of the SAP S/4HANA Cloud system.

The sample business scenario describes how to add three custom fields, i.e. Tax Description, PKWiU Code and PKWiU Description for Poland in extensibility.

  • Tax Description: This specifies the total amount of tax to be paid per item.
  • PKWiU Code: This is used for tax purposes to categorize goods and services sold per item in Poland.
  • PKWiU Description: This is used to specify the description of PKWiU Code.

These three custom fields are not available in MM_PUR_PURCHASE_ORDER form. However, this is achieved by using extensibility concept based on business requirements.

 

Prerequisites

You have access to Adobe LiveCycle Designer Tool and have experience in using it. Coding experience on CDS View is also necessary, since this extensibility solution requires Business Add-In (BAdI) implementation.

 

Authorizations

Business Roles Business Catalogs Catalog Description Application used
SAP_BC_CORE_EXT SAP_BC_CORE_EXT Extensibility Custom Fields and Logic

Implementation

In this section, the steps are given to implement the custom fields in the Purchase Order form for Poland.

1. Create Custom Fields

Create the following custom fields in the Custom Field & Logic app:

Custom Field Custom Field Name Business Context Type
Tax_Description yy1_xxx Procurement: Purchasing Document Item Text – char(50)
PKWiU_Code yy1_xxx Procurement: Purchasing Document Item Text – char(30)
PKWiU_Description yy1_xxx Procurement: Purchasing Document Item Text – char(50)

 

2. Implementation of BAdI

Create a BAdI implementation under BAdI Description: Modification of Purchase Order Item and Business Context: Procurement: Purchasing Document Item and implement it using the following points:

  • Tax Description: Fetch the Tax Description from CDS View I_taxcodetext based on the purchaseorderitem-taxcode and LANGUAGE.
  • PKWiU Code: Fetch the PKWiU Code from CDS View I_ProductPlant based on the
    purchaseorderitem-MATERIAL and purchaseorderitem-PLANT.
  • PKWiU Description: Fetch the PKWiU Description from CDS View I_Ae_CnsmpnTaxCtrlCodeTxt based on the above selected PKWiU Code, CountryCode and LANGUAGE.

Note: Do not forget to map the fields to the corresponding change parameter fields.

 

3. Download the Form and add the Fields

  1. Go to the Maintain Form Templates app under the tile Output Management.
  2. Click Predelivered Templates.
  3. Search for MM_PUR_PURCHASE_ORDER form and download it.
  4. Modify the layout with custom fields in the Adobe LiveCycle Designer Tool.

Add the custom fields in the line item level as per the screenshot below:

 

4. Upload Form Template

  1. Go to the Maintain Form Templates app under the tile Output Management.
  2. Click Custom Templates.
  3. Add or modify the template.

Do the necessary output parameter configuration to use the new custom form for output type.

 

5. Test the Implementation

Print the forms by using Change Purchase Order app or Display Purchase Order app. This will download the form with all three custom fields Tax Description, PKWiU Code and PKWiU Description.

 

Conclusion

By following the steps mentioned above, you can extend three custom fields i.e. Tax Description, PKWiU Code and PKWiU Description in the output form of the Purchase Order in Poland country solution of the SAP S/4HANA Cloud system.

For more information, refer SAP Note: 2955050 – Poland CE 2011 : Adding Custom Fields for Purchase Order and Sales Contract.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.