2007 May 09 12:51 AM
I have implemented the search help exit for Ship to field , based upon the values of ship to field , I need to modify the Sold to field during Sales Order creation.
Can this be achieved ? If yes how ?
Ajay
2007 May 09 10:19 AM
Hi Ajay ,
1. go to ship to party data element KUNAG as below:
And assign shearch(NEW) help name: Z_KUNNR
Parameters : CUS
2. then create search helps:-
2.1. Search help name : Z_KUNNR(any name as per your standerd)
2.2. Short Text : Search Help for Kunnr.
2.3. Search Help Exit : Z_sold_to_party_F4HELP_EXIT(Fuction Module)
2.4. Other Attributes of Search help are as follows:
Search help parameters:
CUS TYPE kunnr , DESCRIPTION TYPE BEZEI40 .
SPOS (Selection Position) NA
LPOS (Listing Position) CUS -- 1,
DESCRIPTION -- 2.
Export Parameter CUS .
Import Parameter NA
Dialog Type Display Values Immediately.
Selection Method NA
2.5. 2. Create fuction module: Z_sold_to_party_F4HELP_EXIT Below are the details of the Function Module Attributes, Import , Export and Changing Parameters, Tables and global data (Goto -> Global Data )
Proceesing Type: Normal Function Module,
Start Immediate.
Edit Lock NA
Global Data TABLES: specify the table from where you are going to get the Sold to party values
Import Parameters NA
Export Parameters NA
Changing Parameters SHLP TYPE SHLP_DESCR_T,
CALLCONTROL LIKE DDSHF4CTRL,
Pass value (Check Box ) Checked for both Parameters.
Tables SHLP_TAB TYPE SHLP_DESCR_TAB_T,
RECORD_TAB LIKE SEAHLPRES,
2.6.
2.7. Source code Logic Implementation :-
Select the sold to party value from table into struct_record_tab-string .
Aftere that goto user exit FORM USEREXIT_MOVE_FIELD_TO_VBAK or
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
And add logic to assign sold to party value to the value to ship to party
Thanks and Regards,
Pavan
I have implemented the search help exit for Ship to field , based upon the values of ship to field , I need to modify the Sold to field during Sales Order creation.
Can this be achieved ? If yes how ?
Ajay
2007 May 09 10:19 AM
Hi Ajay ,
1. go to ship to party data element KUNAG as below:
And assign shearch(NEW) help name: Z_KUNNR
Parameters : CUS
2. then create search helps:-
2.1. Search help name : Z_KUNNR(any name as per your standerd)
2.2. Short Text : Search Help for Kunnr.
2.3. Search Help Exit : Z_sold_to_party_F4HELP_EXIT(Fuction Module)
2.4. Other Attributes of Search help are as follows:
Search help parameters:
CUS TYPE kunnr , DESCRIPTION TYPE BEZEI40 .
SPOS (Selection Position) NA
LPOS (Listing Position) CUS -- 1,
DESCRIPTION -- 2.
Export Parameter CUS .
Import Parameter NA
Dialog Type Display Values Immediately.
Selection Method NA
2.5. 2. Create fuction module: Z_sold_to_party_F4HELP_EXIT Below are the details of the Function Module Attributes, Import , Export and Changing Parameters, Tables and global data (Goto -> Global Data )
Proceesing Type: Normal Function Module,
Start Immediate.
Edit Lock NA
Global Data TABLES: specify the table from where you are going to get the Sold to party values
Import Parameters NA
Export Parameters NA
Changing Parameters SHLP TYPE SHLP_DESCR_T,
CALLCONTROL LIKE DDSHF4CTRL,
Pass value (Check Box ) Checked for both Parameters.
Tables SHLP_TAB TYPE SHLP_DESCR_TAB_T,
RECORD_TAB LIKE SEAHLPRES,
2.6.
2.7. Source code Logic Implementation :-
Select the sold to party value from table into struct_record_tab-string .
Aftere that goto user exit FORM USEREXIT_MOVE_FIELD_TO_VBAK or
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
And add logic to assign sold to party value to the value to ship to party
Thanks and Regards,
Pavan
2007 May 09 11:33 AM
But this will change the sold to party while saving the document with the retrieved values, User will not be able to see the value in the sold to party before saving it? Correct me if I am wrong.
Ajay.
2007 May 14 2:18 PM
using the search help exit you assign the value to sold to party it will be visible at the time of entry but to assign the sold to party value to ship to party you have to use the user exit.
Thanks and Regards,
Pavankumar.
2007 May 14 2:48 PM
sorry i thouht you want assign search help exit to sold to party field. create search help exit to ship to party feild as mentioned above just change sold to party to ship to party were ever i have mentioned .
and to assign ship to party value to sold to party using the user exit.
Thanks and Regards,
pavan