04-18-2014 8:54 AM
Hello All
My question is related to Sarch Help in SE11.
I have created a Search Help and implemented a Search help Exit.In My search help i have PLANT and LGORT(storage loc.).
and i have taken the Search help of PLANT and LGORT from T001L table( H_T001W and H_T001L).
Now on the SELECTION SCREEN of SEARCH HELP ,based on PLANT selected, the Storage Location should come with filtered records based PLANT.
A kind of Dependent Seach help.
I have Checked that in TABLE T001L, when i do F4 on PLANT and then if i do F4 on LGORT it comes with the filtered records.
Kindly Help.
Points will be Awarded.
04-18-2014 9:49 AM
Hi Bhardwaj,
Post your mail id, I will forward search help exit doc.
Regards,
Abbas.
04-18-2014 10:04 AM
Hello Abbas,
Thanks for Reply.My Email id: <personal info is not allowed>
I did Search Help exit.
My problem is :-
Before Displaying values of Search help exit i implemented ,
when user put some Data in selection screen of Search Help say PLANT and he also want to put LGORT so LGORT should display filtered as per PLANT.See above Image(I hope it makes you clear).
Now ,PLANT = 0101, Now on clicking Storage Loc. It should Display values filtered on PLANT.
Message was edited by: Suhas Saha
04-18-2014 10:53 AM
Hi Lav,
Can you please check the search help import and export parameters?
For your scenario, both fields should be marked as import & export parameters.
Regards,
Sudeesh Soni
04-18-2014 10:58 AM
Hello Sudesh,
I tried it already but NO LUCK ..
Thanks,
Lav Bharadwaj
04-18-2014 11:08 AM
04-18-2014 11:27 AM
*Below is the Code:-
IF callcontrol-step <> gc_selone AND "SELONE
callcontrol-step <> gc_select AND "SELECT
callcontrol-step <> gc_disp AND "DISP
callcontrol-step <> gc_presel. "PRESEL
EXIT.
ENDIF.
"Checking Call Control Step is "PRESEL" For doing Validation and
"changing the field Label before displaying the Scren.
IF callcontrol-step = gc_presel."'PRESEL'.
ASSIGN shlp TO <fs_shlp1> .
READ TABLE <fs_shlp1>-interface ASSIGNING <fs_shlp2> WITH KEY f4field = gc_x."X
IF sy-subrc = 0.
<fs_shlp2>-f4field = gc_space."' '.
ENDIF.
*Renaming Internal Characteristic to Characteristics Name
LOOP AT <fs_shlp1>-fielddescr ASSIGNING <fs_shlp3>.
IF <fs_shlp3>-fieldname = gc_flag."Renaming "FLAG" to "NO ZERO STOCK BATCH"
<fs_shlp3>-fieldtext = text-001.
<fs_shlp3>-reptext = text-001.
<fs_shlp3>-scrtext_s = text-002.
<fs_shlp3>-scrtext_m = text-001.
<fs_shlp3>-scrtext_l = text-001.
ELSEIF <fs_shlp3>-fieldname = gc_lgort."Renaming "STORAGE LOCATION".
<fs_shlp3>-fieldtext = text-005.
<fs_shlp3>-reptext = text-005.
<fs_shlp3>-scrtext_s = text-006.
<fs_shlp3>-scrtext_m = text-005.
<fs_shlp3>-scrtext_l = text-005.
ENDIF.
ENDLOOP.*Validation for PLANT
CALL FUNCTION 'F4UT_PARAMETER_REQUIRED'
EXPORTING
parameter_required = gc_werks "Field to be mandatory('WERKS')
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
CHANGING
shlp = shlp
callcontrol = callcontrol.
ENDIF.
IF callcontrol-step = gc_select. "SELECT*Reading all the Values given at screen.
PERFORM read_shlp USING shlp.
IF ( r_atwrt IS NOT INITIAL OR r_atinn IS NOT INITIAL ).*If user has only given CHARACTERISTICS and VALUE as selection criteria.
PERFORM char_value_fetch.
ELSEIF r_matnr IS NOT INITIAL OR r_werks IS NOT INITIAL OR r_lgort IS NOT INITIAL.*If user has only given any value other than CHARACTERISTICS and VALUE as selection criteria.
PERFORM fetch_other_details.
IF gv_flag = gc_x. "'X'
DELETE gt_final WHERE clabs = gc_labst.
DELETE gt_final WHERE cinsm = gc_labst.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.*Prepare Final Table
ENDIF.
IF callcontrol-step = gc_disp. "DISP*Refreshing the RECORD_TAB and Populating it with values of GT_FINAL
REFRESH:record_tab.
callcontrol-maxexceed = gc_x. "X*This Method Fills the RECORD_TAB from GT_FINAL to display.
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = gt_final
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
IF sy-subrc <> 0.* Implement suitable error handling here
ENDIF.*Refreshing GT_FINAL
REFRESH: gt_final,r_matnr,r_atwrt,r_atinn,r_klart,r_werks,r_lgort,shlp_tab,gt_mchb,gt_mara,gt_makt,gt_ausp,gt_mcha.
CLEAR:gv_flag.
ENDIF.
04-18-2014 11:34 AM
Can you tell me that in Table T001L (AS IN SCREEN SHOT) when iam Clicking on PLANT and giving a value... and then iam Clicking on LGORT...PLANT value automatically filters the data.
Search help used in these two Data Elements are : - ( H_T001W and H_T001L).I have also used the same.
04-18-2014 12:30 PM
Hi Lav,
For Field-LGORT & WERKS, checked the export parameter.
Retest it.
Regards,
Sudeesh
04-18-2014 1:46 PM
Hello Sudesh,
I did try it again,But doesnt make any difference.
Thanks,
Lav Bharadwaj
04-20-2014 11:13 AM
After displaying the search help values, when CALLCONTROL-STEP = ‘RETURN’ we need to call the function module ‘DYNP_UPDATE_FIELDS’.
IF callcontrol-step = 'RETURN'.
DATA : i_dynp TYPE STANDARD TABLE OF dynpread.
DATA : w_dynp TYPE dynpread.
w_dynp-fieldname = 'S_POSNR-LOW'.
w_dynp-fieldvalue = gv_posnr.
APPEND w_dynp TO i_dynp.
CLEAR : w_dynp.
CALL FUNCTION 'DYNP_UPDATE_FIELDS'
EXPORTING
dyname = 'SAPMZKLIM_HUREPORT'
dynumb = '0300'
request = 'A'
TABLES
dynpfields = i_dynp
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EXIT.
ENDIF.