Adding additional tab and fields to XD01 for customer creation with GST details
The challenge: adding fields to the standard KNA1 table by appending structure. It is to be done by adding GST details while doing customer creation.
Here are a few possibilities to resolve this.
- Append the structure as ZCUSTOM with two fields GSTNO (GST number) and GSTREG (GST registration state)
- Add a new Tab in the XD01 transaction with these two fields.
- Insert the GST Registration To field by the search help that has been attached.
Option 1 – This would be one of the approaches during enhancement to add some tabs and fields for the customer creation with some extra information along with custom approaches. This will prove very efficient and effective for the developers.
Option 2 – A developer can add any number of tabs and fields. They can also add the new fields into the search help parameters, adding them to the fields to be displayed.
For reference, here is the example of append structure as ZCUSTOM in the KNA1 table I will be using. Here we are adding the GST number and GST Registration To fields.
The first thing we need to do is create the append structure of the KNA1 table as ZCUSTOM and after then create an implementation as ZVENODOR_GST1 in SE19 under this implementation check the method GET_TAXI_SCREEN for Determine Screen for Tabs.
At a high-level, these are the steps we need to take:
- Add the new fields to the KNA1 table by appending the structure as ZCUSTOM.
- Add the GST Details tabs in XD01 in which GST number and GST registration fields are there.
- Add the search help for GST registration as ZGST_REGISTER for that append structure ZCUSTOM.
Adding the new fields to the Append structure of KNA1
This step needs to be done during the enhancement of the customer Creation part to add the GST tabs including GST number and GST Registration number we had created a custom append structure for GST as ZCUSTOM along with this we have created a search help for GST Registration.
Adding Append structure
In this step we have created an Append Structure as ZCUSTOM
Adding Search Help to Append structure
Adding to the enhancement
In this step we have created an Implementation as ZVENODOR_GST1
Interface name: IF_EX_VENDOR_ADD_DATA_CS
Class name: ZCL_IM_VENODOR_GST1
Method name: GET_TAXI_SCREEN
Adding GST Details Tab to XD01
This portion informs about the Customer creation with GST details tab which contains two filed as GST number as length 15 and GST registration to as length 3. The reason for this requirement is to add the GST details for the customer. We need to define the type of field, the length, offset, the output length, and other data dictionary type criteria.
After entering all the fields entry when we save then all the details along with the custom GST details will save in the database and the Customer creation is successful.
And finally, the results!!