SAP ABAP provides standard functionality of search help to display possible values of a screen field.While creating or changing sales order, there is need of search help for customer material number that should come up with ship-to-number instead of sold-to-number. Also, customer field in search help should populate with default ship-to-number.
How to add new search help
Step1: Find out the search help attached to customer material number in SAP – Press F1 help. Under Field data, find the fieldname. Then keeping cursor on the fieldname click navigate button. Now, select the fieldname and click on search help button. For customer material number, search help attachment is VMCVA.
Step2: Add custom elementary search help– Go to collective search help VMCVA. Under Included search helps tab, you will find elementary search help VMCVA_E. Add custom elementary search help ‘ZSHLP’ with desired fields in it or copy it from the existing elementary search help VMCVA_E. New search help is added and can be seen in VA01/VA02/VA03.
Steps to fetch default ship-to-number
Step1: Since ship to party standard data element KUNWE does not contain parameter id. Therefore, create one custom data element ZKUNWE similar to KUNWE. Create parameter id ZKUN and assign to it. Save and activate.
Step2: Go to search help ZSHLP which was created under VMCVA. Pass parameter id ZKUN to field KUNNR in ‘default value’ column.
Step3: Now, we have to populate parameter id ZKUN with ship-to-number. Do implicit enhancement in include MV45AFZB. In form USEREXIT_CHECK_VBAK, write code to populate parameter id ZKUN with ship-to-number.
Step4: Create custom function module ZSHLP_EXIT. This function module should have ‘CHANGING’ and ‘TABLES’ parameters similar to standard function module ‘F4IF_SHLP_EXIT_EXAMPLE’ or we can say should have same interface. In source code, write code to fetch the value in parameter id. CALLCONTROL is the control of the F4 Process. Code needs to be written under time point ‘PRESEL1’ as shown below:
***Write code here****
Step5: Finally, go to search help ZSHLP and enter function module name ZSHLP_EXIT in Search help exit.
Note: Search help exit is a function module used to customize input help process. Like in this case we have done logic to retrieve the value of ship-to-number using parameter id.
Save and activate it.
Step6: Check the desired result in VA01/VA02/VA03.
In case you need assistance on SAP Retail, please contact us. Please send us your questions, comments or assistance request, and our team would be glad to assist you.
By Yashpal Mote. (on behalf of SAP Consulting Team)
SAP :: Streamlined
We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP Development, SAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.
Have a question on SAP? Write to our SAP Architect : AskTheArchitect@Apprisia.com
(We promise a no-obligation consulting reply)