XD03 - Search help on Name1
Program Name SAPLSZA1
Screen Number 0201
Program Name SAPLSZA1
Status ADDR0200
Table Name ADDR1_DATA
Field Name NAME1
Data Element AD_NAME1
DE Supplement 0
Screen Field ADDR1_DATA-NAME1
This is the screen detail. I would like to know how to proceed with creating a search help for this field. Can someone please explain with a sample scenario and tell me the steps one would have to take to achieve this.
Hi,
look search help USCOMPANY_ADDR - it's a simple example
and here: <a href="http://help.sap.com/saphelp_47x200/helpdata/en/8b/415d363640933fe10000009b38f839/frameset.htm">search help</a>
Andreas
Similar Messages
-
Dear Experts,
I want to add f4 help for name1 in kna1 table how to achieve it...
Thanks and Regards,
Thirukumaran. R
tables : kna1.
DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL with header line.
parameter : p_kunnr type kna1-kunnr,
p_name1 type kna1-name1.
data : begin of it_kna1 occurs 0,
kunnr type kna1-kunnr,
name1 type kna1-name1,
end of it_kna1.
select kunnr name1 into table it_kna1 from kna1 where kunnr eq p_kunnr and name1 eq p_name1.
at selection-screen on value-request for p_name1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'NAME1'
DYNPPROG = SY-REPID
DYNPNR = '1000'
DYNPROFIELD = 'P-NAME1'
VALUE_ORG = 'C'
tables
value_tab = IT_KNA1
RETURN_TAB = T_RETURN.
loop at it_kna1.
write : / it_kna1-kunnr,
it_kna1-name1.
endloop.Hi..
You need to create a search help exit and associate with the field.
You need to create a function module which u will give in the search help exit.
Function Module Code:
*DATA DECLARATION
types: begin of t_bukrs,
bukrs type bukrs,
end of t_bukrs.
types: t_bukrs_tab type standard table of t_bukrs.
DATA : l_wa_bukrs TYPE t_bukrs, " Company Code
lit_bukrs type t_bukrs_tab.
l_v_record TYPE astmo. " Variable to store company code value.
*CONSTANT DECLARATION
CONSTANTS: l_c_bukr TYPE astmo VALUE 'CO_CODE', " Constant for Memory ID
l_c_no TYPE flag VALUE '1', " Constant To limit no of entries to be displayed
l_c_step_val TYPE bukrs VALUE 'DISP', " Constant For display when F4
l_c_app_str TYPE clsrt VALUE '123'. " Constant for prefix wehn appending value in F4 help.
IF sy-subrc EQ 0.
callcontrol-maxrecords = l_c_no.
IF callcontrol-step = l_c_step_val.
REFRESH record_tab.
*FETCH VALUE FROM CHECK TABLE T001 FOR COMPANY CODE ENTERED IN THE SELECTION-SCREEN.
SELECT bukrs FROM t001
INTO l_it_bukrs. "TABLE record_tab
IF sy-subrc = 0.
loop at l_it_bukrs into lwa_bukrs.
CONCATENATE l_c_app_str l_wa_bukrs-bukrs INTO l_v_record.
record_tab = l_v_record.
*APPEND COMPANY CODE TO TABLE FOR F4 HELP.
APPEND record_tab.
ENDIF.
ENDIF.
ENDIF.
ENDFUNCTION.
In the above code i am having a search help exit for company code.
Hope this helps. -
How to display our own selected data in a search help using a exit
Hello,
I had created a Search Help Exit to restrict the values to be displayed in the search help. This code was written under the event 'DISP' in the exit. But it is not giving the desired result. So I want to replace the RECORD_TAB of the exit with my own selected data. For this I had written code for selection under the event 'SELECT'. But when I try to overwrite RECORD_TAB with this, this create errors.
What should I do to overwrite the values of the RECORD_TAB field with my own values?
Regards,
AbijithHi,
This is how we implemented the code modify the values in search help exit.
Check if display process button is pressed
IF callcontrol-step = 'DISP'.
Read the parameter ID for company code.
GET PARAMETER ID 'BUK' FIELD lv_bukrs.
IF sy-subrc EQ 0.
lwa_bukrs-sign = 'I'.
lwa_bukrs-option = 'EQ'.
lwa_bukrs-low = lv_bukrs.
APPEND lwa_bukrs TO lr_bukrs.
ENDIF.
Check if any entry is made in Test account/Testity account name
LOOP AT shlp-selopt INTO lwa_selopt.
CASE lwa_selopt-shlpfield.
WHEN 'ZZTEST'.
lwa_roy-sign = lwa_selopt-sign.
lwa_roy-option = lwa_selopt-option.
lwa_roy-low = lwa_selopt-low.
APPEND lwa_roy TO lr_roy.
WHEN 'ZZTEST_NAME'.
lwa_roy_name-sign = lwa_selopt-sign.
lwa_roy_name-option = lwa_selopt-option.
lwa_roy_name-low = lwa_selopt-low.
APPEND lwa_roy_name TO lr_roy_name.
ENDCASE.
ENDLOOP.
Get customer in entered for a company code
SELECT kunnr
bukrs
FROM knb1
INTO TABLE lt_knb1
WHERE kunnr IN lr_roy
AND bukrs IN lr_bukrs.
IF sy-subrc EQ 0.
SORT lt_knb1 BY kunnr.
Get customer name for the customer.
SELECT kunnr
name1
FROM kna1
INTO TABLE lt_kna1
FOR ALL ENTRIES IN lt_knb1
WHERE kunnr EQ lt_knb1-kunnr
AND mcod1 IN lr_roy_name.
IF sy-subrc EQ 0.
SORT lt_kna1 BY kunnr.
ENDIF.
ENDIF.
Get Values for Testty account selected by standard search help
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
parameter = 'Ztest'
fieldname = 'Ztest' " Reference to search help parameter
TABLES
shlp_tab = shlp_tab " Reference to field of Seatinfo
record_tab = record_tab
results_tab = lt_test_help
CHANGING
shlp = shlp
callcontrol = callcontrol.
Get Values for Testty account Name selected by standard search help
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
parameter = 'Ztest1'
fieldname = 'Ztest1' " Reference to search help parameter
TABLES
shlp_tab = shlp_tab " Reference to field of Seatinfo
record_tab = record_tab
results_tab = lt_roy_help
CHANGING
shlp = shlp
callcontrol = callcontrol.
LOOP AT lt_knb1 INTO lwa_knb1.
CLEAR lwa_kna1.
READ TABLE lt_kna1
INTO lwa_kna1
WITH KEY kunnr = lwa_knb1-kunnr
BINARY SEARCH.
IF sy-subrc EQ 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lwa_kna1-kunnr
IMPORTING
output = lv_kunnr.
lwa_roy_help-ztest1 = lv_kunnr.
lwa_roy_help-ztest = lwa_kna1-name1.
APPEND lwa_roy_help TO lt_roy_help .
ENDIF.
ENDLOOP.
SORT lt_ztest_help.
DELETE ADJACENT DUPLICATES FROM lt_roy_help COMPARING ZTEST1.
Finally transport the computed numbers into the search help data.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
parameter = 'ZTEST1'
fieldname = 'ZTEST1'" Reference to search help parameter
TABLES
shlp_tab = shlp_tab " Reference to field of Seatinfo
record_tab = record_tab
source_tab = lt_roy_help
CHANGING
shlp = shlp
callcontrol = callcontrol.
Finally transport the computed numbers into the search help data.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
parameter = 'ZTEST''
fieldname = 'ZTEST'' " Reference to search help parameter
TABLES
shlp_tab = shlp_tab " Reference to field of Seatinfo
record_tab = record_tab
source_tab = lt_roy_help
CHANGING
shlp = shlp
callcontrol = callcontrol.
ENDIF.
Nabheet -
hi experts,
Consider a scenario where my selection screen has got three parameter box :
werks - plant
lgort - storage location
matnr - material no
In search help of material,i have selected plant-warehouse-storage location tab, if i select a material then not only material should get fill up but the corresponding warehouse and plant should also get fill up in their respective input box.
How can we do the same???
Thanks and regards,
GauravHi Gaurav,
Check this sample code
REPORT zvenkat_head MESSAGE-ID zmsg .
TABLES :marc.
DATA: BEGIN OF i_t001w OCCURS 0,
werks TYPE t001w-werks,
name1 TYPE t001w-name1,
END OF i_t001w.
DATA : i_return_tab LIKE ddshretval OCCURS 0 ,
return_wa LIKE ddshretval .
*& SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.
*& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
PERFORM f4_help_for_palant.
*& Form f4_help_for_palant
FORM f4_help_for_palant.
DATA:
w_dynpfields TYPE dynpread,
i_dynpfields LIKE STANDARD TABLE OF dynpread.
SELECT werks name1
FROM t001w
INTO TABLE i_t001w.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'WERKS'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_WERKS'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = i_t001w
* FIELD_TAB =
return_tab = i_return_tab
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE i_return_tab INTO return_wa INDEX 1.
p_werks = return_wa-fieldval.
READ TABLE i_t001w WITH KEY werks = p_werks.
IF sy-subrc = 0.
w_dynpfields-fieldname = 'P_NAME1'.
w_dynpfields-fieldvalue = i_t001w-name1.
APPEND w_dynpfields TO i_dynpfields.
CLEAR w_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = i_dynpfields
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.
ENDIF.
ENDFORM. " f4_help_for_palant -
How to set column names in OVS search help of ALV EDIT
Hi All,
I have a OVS search help for my ALV EDIT column.This OVS will have two columns,I need to give the names(name1 , name2) to the columns.
I am writing the below codo in phase 0.
ls_text-name = 'Column1'.
ls_text-value = 'name1'.
INSERT ls_text INTO TABLE lt_column_texts.
ls_text-name = 'Column2'.
ls_text-value = 'name2'.
INSERT ls_text INTO TABLE lt_column_texts.
ovs_callback_object->set_configuration(
label_texts = lt_label_texts
column_texts = lt_column_texts
group_header = lv_group_header
window_title = lv_window_title
table_header = lv_table_header
col_count = 2
row_count = 20 ).
Below code in Phase 3.
Assign ovs_callback_object->selection->* to <ls_selection>.
if <ls_selection> is assigned.
ovs_callback_object->context_element->set_attribute(
name = `ATR1`
value = <ls_selection>-Column1 ).
endif.
But,the column names are not getting set.Please provide your inputs.
Regards,
Salmahi,
About your requirement, i don't know why you need to code in "Phase 3" of OVS.
"Phase 3" is used for transporting your selected value to Your ALV.
I think, the reason why you loose the result table including your customized column title, is that you loose the "Phase 2".
Generally, in the past i used OVS as the following code simply.Just one example:
* declare data structures for the fields to be displayed and
* for the table columns of the selection list, if necessary
types:
begin of lty_stru_input,
* add fields for the display of your search input here
carrid type string,
connid type string,
end of lty_stru_input.
types:
begin of lty_stru_list,
* add fields for the selection list here
carrid type string,
connid type string,
text type string,
end of lty_stru_list.
data: ls_search_input type lty_stru_input,
lt_select_list type standard table of lty_stru_list,
ls_text type wdr_name_value,
lt_label_texts type wdr_name_value_list,
lt_column_texts type wdr_name_value_list,
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0. "configuration phase, may be omitted
* in this phase you have the possibility to define the texts,
* if you do not want to use the defaults (DDIC-texts)
ls_text-name = 'CARRID'. "must match a field name of search
ls_text-value = 'Search Field-Carrid'.
insert ls_text into table lt_label_texts.
ls_text-name = 'CONNID'. "must match a field name of search
ls_text-value = 'Search Field-Connid'.
insert ls_text into table lt_label_texts.
ls_text-name = 'CARRID'. "must match a field in list structure
ls_text-value = 'Result-Carrid'.
insert ls_text into table lt_column_texts.
ls_text-name = 'CONNID'. "must match a field in list structure
ls_text-value = 'Result-Connid'.
insert ls_text into table lt_column_texts.
ls_text-name = 'TEXT'. "must match a field in list structure
ls_text-value = 'Result-Text'.
insert ls_text into table lt_column_texts.
lv_group_header = 'Group Header'.
lv_window_title = 'Window Title'.
lv_table_header = 'Table Header'.
ovs_callback_object->set_configuration(
label_texts = lt_label_texts
column_texts = lt_column_texts
group_header = lv_group_header
window_title = lv_window_title
table_header = lv_table_header
col_count = 3
row_count = 8 ).
when if_wd_ovs=>co_phase_2.
* If phase 1 is implemented, use the field input for the
* selection of the table.
* If phase 1 is omitted, use values from your own context.
if ovs_callback_object->query_parameters is not bound.
******** TODO exception handling
endif.
assign ovs_callback_object->query_parameters->*
to <ls_query_params>.
SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM ZTABLE_FLIGHT
WHERE CARRID LIKE lw_carrid
AND CONNID LIKE lw_connid
*ovs_callback_object->set_output_table( output = lt_select_list ).*
Hope it can help.
Best wishes. -
Search help in table control using attributes window in layout
Hi.
I am trying to use search help for my table control fields. the table control basically displays product details.
I have a name field, description field and price field. I have named my field to match the the structure of my search help (stProducts-name, stProducts-description and stProducts-price respectfully). then for each i entered shProducts (my search help) in the search help field.
However, upon running the program, in the name, description and price field, by clicking f4 the name of the product is displayed in the field irrespective to which column I am selecting. Also the values in the other fields are not affected.
Any help would be appreciated
Thank youHi Charla,
<li> Here is a sample program how to update other fields when you select f4 help for one field.
<li> Need to apply in module pool program..
REPORT zvenkat_f4_for_parameters MESSAGE-ID zmsg .
TYPES:
BEGIN OF t_t001w,
werks TYPE t001w-werks,
name1 TYPE t001w-name1,
END OF t_t001w,
t_return_tab TYPE ddshretval.
DATA:w_t001w TYPE t_t001w,
w_return_tab TYPE t_return_tab.
DATA:i_t001w TYPE STANDARD TABLE OF t_t001w,
i_return_tab TYPE STANDARD TABLE OF t_return_tab.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.
" AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
PERFORM f4_help_for_palant.
*& Form f4_help_for_palant
FORM f4_help_for_palant.
DATA:
w_dynpfields TYPE dynpread,
i_dynpfields LIKE STANDARD TABLE OF dynpread.
IF i_t001w[] IS INITIAL.
SELECT werks name1
FROM t001w
INTO TABLE i_t001w.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_WERKS'
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = i_return_tab.
READ TABLE i_return_tab INTO w_return_tab INDEX 1.
p_werks = w_return_tab-fieldval.
READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
IF sy-subrc = 0.
w_dynpfields-fieldname = 'P_NAME1'.
w_dynpfields-fieldvalue = w_t001w-name1.
APPEND w_dynpfields TO i_dynpfields.
CLEAR w_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = i_dynpfields.
ENDIF.
ENDFORM. " f4_help_for_palant
Thanks
Venkat.O -
Has anyone used ALV as a search help presentation/selection method. I'm thinking, in a simplistic sense, it would be just creating an itab and presenting it on a grid in a container on a new screen called by an exit....
Probably too simple, huh? Pointers to any snippets that implement this would be welcome.
(additionally, might have a need to save user layouts of this info as well)
Thoughts, comments, pitfalls.... ?
Thanks...
...MikeHey Michael a working example I just made for some1
thought u might be interested
Q. i_checkbox_fieldname = 'CHECKBOX'
A. If the table output in the popup has checkboxes at the beginning of the rows (e.g. for multiple selection), the internal table must contain a field containing the value of the checkbox.
Assign the name of this field to the parameter I_CHECKBOX_FIELDNAME.
Q. i_tabname = 'TLINE'
A. This is the name of ur input help internal table
Q. it_fieldcat = fieldcat[]
A The table u gonna display has to have a fieldcat.
Q. it_excluding = extab[].
A. In case u wanna exclude some functions.
Below is a working example, paste it in se38 and activate.
!!! Warning SAVE IT AS A LOCAL OBJECT !!!
report ztests1.
type-pools: slis.
data: index type i.
data: l_kunnr like kna1-kunnr.
data: input(10) type c,
text(4) type c,
text1(5) type c.
data: begin of itab occurs 10,
kunnr like kna1-kunnr,
name1 like kna1-name1,
end of itab.
data: e_exit.
data: fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
parameter: p_kunnr(10) type c.
at selection-screen on value-request for p_kunnr.
select kunnr name1 up to 10 rows
from kna1
into table itab.
fieldcat-tabname = 'ITAB'.
fieldcat-fieldname = 'KUNNR'.
fieldcat-seltext_m = 'Cust'.
fieldcat-ddictxt = 'M'.
fieldcat-outputlen = 10.
APPEND fieldcat.
CLEAR fieldcat.
fieldcat-tabname = 'ITAB'.
fieldcat-fieldname = 'NAME1'.
fieldcat-seltext_m = 'Cust Name'.
fieldcat-ddictxt = 'M'.
fieldcat-outputlen = 30.
APPEND fieldcat.
CLEAR fieldcat.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
I_TITLE = 'Customer Selection'
I_SELECTION = 'X'
I_ALLOW_NO_SELECTION =
I_ZEBRA = ' '
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_CHECKBOX_FIELDNAME =
I_LINEMARK_FIELDNAME =
I_SCROLL_TO_SEL_LINE = 'X'
i_tabname = 'ITAB'
I_STRUCTURE_NAME =
IT_FIELDCAT = fieldcat[]
IT_EXCLUDING =
I_CALLBACK_PROGRAM =
I_CALLBACK_USER_COMMAND =
IS_PRIVATE =
IMPORTING
ES_SELFIELD =
E_EXIT = e_exit
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Special characters in search help
Hello Everybody
I am having a problem with an SAP standard search help in polish language. As an example in transaction XD03 I use the F4 button to start a search and then use the register "Customers (general)". Of course I am logged in with PL (polish) as language. In the field "City" I enter "SUPRAŚL" and begin the search. I am sure there are entries with this exact name in the city field and this information is also replicated to field MCOD3. Can anybody tell me why I receive no results and also why the letter Ś is returned to the search help as a normal S ? The character "Ś" is reset to a normal S even if I only move out of the field and back again. This behavior seems strange. If I list the customers using other search criteria the name SUPRAŚL is output correctly on screen and printouts.
Thanks for any input on this problem.
HarryHi.
Maybe my question makes no sense, but I did't know where to look for this information. I'm still looking for an answer, but close my question.
Regards
Michal
Edited by: Michal Pluta on Apr 19, 2010 3:28 PM -
Search help F4IF_SHLP_EXIT_EXAMPLE
I have a requirement regarding F4 help. When I click on the zoom button for vendor code, the list of values according to the coding given in serach help exit should get displayed with only company code as input.
The list of vendors is picked from LFa1 table as per the foll. code:
SELECT LIFNR BUKRS FROM LFB1 CLIENT SPECIFIED
INTO TABLE IT_LFB1
WHERE MANDT = SY-MANDT
AND BUKRS = M_BUKRS.
SELECT LIFNR NAME1 FROM LFA1 CLIENT SPECIFIED
INTO TABLE IT_LFA1 FOR ALL ENTRIES IN IT_LFB1
WHERE MANDT = SY-MANDT
AND LIFNR = IT_LFB1-LIFNR
AND ( KTOKK LIKE '%07' OR KTOKK LIKE '%06' )
AND SPRAS = 'E'
AND LZONE = '0000000002'.
How do I put this coding in the search help exit program ?
Please help.
Regards,
Tom Jerry.Hi,
No you can't get import parameters from screen while you are using search help exit,
Because everything is limited to parameters of exit function.
There is another way to limit the range of search help hit list
you should use on the VALUE-REQUEST event of your screen.
Check this code :
DATA: lv_shelp_name TYPE shlpname,
ls_shelp TYPE shlp_descr,
ls_selopt TYPE ddshselopt,
ls_rc LIKE sy-subrc,
lt_return_values TYPE TABLE OF ddshretval,
ls_return_values TYPE ddshretval,
ls_interface LIKE LINE OF ls_shelp-interface,
lw_field_ranges LIKE LINE OF ip_field_ranges.
lv_shelp_name = f4help_name.
* get description for search help
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
shlpname = lv_shelp_name
IMPORTING
shlp = ls_shelp.
* set range for search help field :
ls_selopt-shlpname = lv_shelp_name.
ls_selopt-shlpfield = 'BUKRS'.
ls_selopt-sign = 'I'.
ls_selopt-option = 'BT'.
ls_selopt-low = lv_company_code
COLLECT ls_selopt INTO ls_shelp-selopt.
ls_interface-valfield = 'X'.
ls_interface-valtabname = 'X'.
MODIFY ls_shelp-interface FROM ls_interface
TRANSPORTING valtabname valfield
WHERE shlpfield = ip_ret_fieldname.
* call F4 dialog
CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
EXPORTING
shlp = ls_shelp
IMPORTING
rc = ls_rc
TABLES
return_values = lt_return_values.
I hope it can be useful for u -
Addtional field display in search help for plant in MM01/MM02/MM03
Hi Experts,
my requirment is that when see search values of ( F4) plant field in MM01/MM02/MM03 t.codes only avilable plant and name1 values . i need to display name2 values also. How i can search help of plant field should be enhanced.
Regards
JayaHi,
You need to:
1/ append ALV grid structure PLM_ALV_116 with field (in SE11)
2/ in form WERKS_LISTE in include LMATEFLI you need to implement following modyfication selecting NAME2 for all the plants which are to be shown:
FORM werks_liste.
* convert into ALV list
DATA: c_structure_name TYPE tabname VALUE 'PLM_ALV_116'.
DATA: status_set TYPE slis_formname VALUE 'ALV_PF_STATUS1' .
DATA: et_list TYPE TABLE OF gs_list_type_06 .
DATA: l_et_list LIKE LINE OF et_list .
DATA: l_seqwerk LIKE LINE OF seqwerk .
* Prapering data to be display
* SET TITLEBAR 'TIT' WITH text-003. Note 821186
G_titlebar = text-003.
LOOP AT seqwerk INTO l_seqwerk .
MOVE-CORRESPONDING l_seqwerk TO l_et_list .
APPEND l_et_list TO et_list .
ENDLOOP .
"-------->INSERT
SELECT name2 FROM t001W
INTO CORRESPONDING-FIELDS OF TABLE et_list
FOR ALL ENTRIES IN et_list
WHERE werks EQ et_list-werks.
"<--------
* Praper fields for ALV Disply
PERFORM alv_list_fieldcat_create
USING lt_fieldcat c_structure_name .
* Diplay ALV list
PERFORM alv_list_display TABLES et_list[]
USING c_structure_name
status_set
space.
ENDFORM. "WERKS_LISTE
Regards,
Marcin -
Hi !
I need to create a new matchcode for transaction XD03 which is directly a clone of search help DEBIX with additions of two fields i.e street 4 and street 5(STR_SUPPL3 & LOCATION). When I do that by copying and adding the two fields somehow I was not getting theright thing and it was taking me through the DEBIX , probably due to teh fact that I was using the same FM used in DEBIX. SO i created another database view table and put the required fields needed in it, but still I am not getting the result.
Can anyone help me in creating this new search help which will be similar to DEBIX and the two fields added to it.
Thanks> i created another database view table and put the required fields needed in it, but still I am not getting >the result.
> Can anyone help me in creating this new search help which will be similar to DEBIX and the two fields >added to it.
Are those fields are from the smae table or they are from same table. what is happening when you go to view and check the entries, are those fields populated or not.
May be inside the function they are populating the search help values with some coding manually , which don't include the Fields which you added recently.
For time being, just to test remove the Exit function and check it once , are you getting values in those fields are not.. -
How can I create a parameter on the selection screen for lifnr that will allow the user to search for the correct vendor and then display the vendor name on the screen when a vendor is chosen?
Should I use search help or value-request or a combination?
Any examples would be very appreciated.
Thanks,
JanetThanks. This is great.
I am having a problem that my program is not hitting the AT selection-screen. Any ideas?
selection-screen end of block invoice.
parameter: p_lifnr like lfa1-lifnr,
p_name like lfa1-name1.
*Initialize variables
initialization.
set pf-status 'MAIN'.
at selection-screen.
IF NOT P_LIFNR IS INITIAL.
SELECT SINGLE NAME1
INTO P_NAME
FROM LFA1
WHERE LIFNR = P_LIFNR.
ENDIF.
start-of-selection. -
Hi all! this time i need a simple thing. I have two parameters p_vblnr and p_chect.The firstone has a Search help that i did with se11 and the second one has a standard search help for chects. I want to create a search help for p_chect that only visualice the values related to p_vblnr parameter and <b>replace the standard search help for that field</b>.
Ej: if p_vblnr is '10021562' i want the search help to visualice the chects related to that vblnr.
is this possible??????
i promise rewards points for help!!!!
thank in advance!Andrew,
Try following sample code.
CLEAR: t_dynp_flds,
t_dynp_flds[].
t_dynp_flds-fieldname = 'LFA1-STCD1'. " ur first parameter
APPEND t_dynp_flds.
CLEAR t_dynp_flds.
*--- Read screen field values before PAI field transport
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'ZFFI'
dynumb = '1000'
TABLES
dynpfields = t_dynp_flds
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
READ TABLE t_dynp_flds WITH KEY fieldname = 'LFA1-STCD1'.
IF sy-subrc EQ 0.
MOVE t_dynp_flds-fieldvalue TO lfa1-stcd1.
ENDIF.
ENDIF.
IF NOT lfa1-stcd1 IS INITIAL.
g_stcd = lfa1-stcd1.
Clear fields
CLEAR : t_taxid1,
t_taxid1[].
t_taxid1-gap2 = space.
Select vendor and taxids from Vendor Master table
SELECT lifnr
name1
FROM lfa1
INTO (t_taxid1-lifnr, t_taxid1-name1)
WHERE stcd1 <> g_stcd AND
stcd2 <> g_stcd AND
stcd3 <> g_stcd.
APPEND t_taxid1.
CLEAR t_taxid1.
ENDSELECT.
IF sy-subrc NE 0.
No table entries found
MESSAGE s001(zffi).
EXIT.
ENDIF.
SORT t_taxid1 BY lifnr.
DELETE ADJACENT DUPLICATES FROM t_taxid1 COMPARING lifnr.
CLEAR : g_pop_idx.
Function module to get Tax code values
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
endpos_col = 85
endpos_row = 20
startpos_col = 20
startpos_row = 10
titletext = 'List of Assign Vendors'(t11)
IMPORTING
choise = g_pop_idx
TABLES
valuetab = t_taxid1
EXCEPTIONS
break_off = 1
OTHERS = 2.
IF sy-subrc EQ 0.
READ TABLE t_taxid1 INDEX g_pop_idx.
IF sy-subrc EQ 0.
CLEAR : t_dynp_flds,
t_dynp_flds[].
Append screen values
t_dynp_flds-fieldname = 'G_LIFNR'.
t_dynp_flds-fieldvalue = t_taxid1-lifnr.
APPEND t_dynp_flds.
CLEAR t_dynp_flds.
Change screen field contents w/o PBO
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'ZFFI'
dynumb = '1000'
TABLES
dynpfields = t_dynp_flds
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 NE 0.
CLEAR : t_dynp_flds,
t_dynp_flds[],
lfa1-lifnr,
lfa1-stcd1,
lfa1-name1.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
-Anu -
hi,
I need to create a matchcode for the field kunnr whose search help is DEBI.
1. In the transaction FBL5N (Customer Line Item Display) include a new match code Active Account with Balance.
2. The search parameters will be similar to match code Customers(By Company Code) / Customers per sales group.
3. When the search is made by entering the name in the name field , the program logic would be as:
a. The table KNB1 will be used to search the customer based on company code.
a. The list of customers obtained will be queried in the table KNA1(General Data in Customer Master) to get the list of customers with name 1, postal code , city etc.
b. This list of corresponding customers is queried in the Table BSID (Accounting: Secondary Index for Customers) to check if the customers have an open item.
c. If there is an open item for any customers then they are considered as Active customers.
d. Display only the list of active customers for the name search with the details Name1, city, Postal code, Customer No. , company Code etc.
My query is in the view which i am gonna create, what would be the join condition for the above logic.Is this related to BSP? Are you needing help creating the SQL statement for the logic you described? I guess I'm not sure what you are asking for and how it is related to BSP.
-
Can AUTHORITY_CHECK effect in search help result list
For example ,authorizaiton objid a value 1,2,the user only have authorization a = 1,but in F4 for search help ,the user can see value 1 and 2 for a .Can i do someting to make the user only can see value 1 for a?
i have an idea using search_help_exit and authority_check,is there any other way to do this ?Hi,
I need to perform authority check on the field NAME1 present in the standard screen - customer master ( T.Code-XD02). Only certain users should be allowed to edit the field and others should be restricted.
I have created a field exit FIELD_EXIT_AD_NAME1 for the ADRC-NAME1 field.
Now inside this field exit i need to write the authority-check code.
I have created the authorisation object Z_KNA1_NAM for the field NAME1 using the SU20 and SU21.
For this scenario how do i write the authority-check code in my field exit?
Below is my field exit code,is that correct?
FUNCTION FIELD_EXIT_AD_NAME1.
""Local Interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
AUTHORITY-CHECK OBJECT 'Z_KNA1_NAM'
ID 'NAME1' FIELD SY-UNAME
ID 'ACTVT' FIELD '03'.
IF SY-SUBRC = 0.
MESSAGE 'Not Allowed to Edit the Name 1 Field' TYPE 'E'.
ENDIF.
ENDFUNCTION.
In the above code i have given SY-UNAME in the code line 2 - ID 'NAME1' FIELD SY-UNAME ,is that correct? what should i give there?
Please help me on this issue.
Cheers,
P.S.Chitra
Maybe you are looking for
-
I copied my recent session with HP Chat so people may see how inadequate out-sourcing to other countries is. After nearly an hour, this professional tech agent thought it would be helpful to have me create a file in my C: drive to see if it got ther
-
Ssrs 2012 export to comma delimited (csv) file problem
In an ssrs 2012 report, I want to be able to export all the data to a csv (comma delimited) file that only contains the detailed row information. I do not want to export any rows that contain header data information. Right now the export contains hea
-
How do i repair a bad atom in mp4
The movie will play in Quicktime but iMovie will not import it because of a bad atom. Help please!
-
Defining the purpose of use in the DTAUS
I would like to contribute a suggestion for improvement on behalf of our clients. This would be happy to set the SAP Business One, as the purpose of his DTAUS files are built. Currently, the SAP Business One version 8.81 is installed PL05. Sincerely,
-
Hello i have installed above CC and without my knowledge the machine has now adobe cc and cc 2014 how can i remove the CC and move the lug ins to the new CC 2014