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)