on 09-06-2006 12:56 PM
In the OSS note 672960..
Search criteria
You can also use user-defined fields as search criteria. To do this, you have to set fields XINPUT and XDISPLAY to 'X' in table ET_FIELDS for the fields you want to use in BADI BBP_CUF_BADI_2 in method MODIFY_SCREEN. The so
The fields defined this way are displayed if you choose the 'Extended search' link.
I have created 3 fieldsin the structures INCL_EEW_PD_ACC_CSF and in tables BBP_C_ACC_F and BBP_C_ACCFD..
But my fields are not displayed in SRM WEB screen...do i need to changes the settings in SPRO???
And also how to create search help for these 3 fields???
what BADI to use for implementation??
1. Fields will be displayed, once you have configured that in SPRO
2. BADI changes , do as suggested in earlier post
BADI is BBP_CUF_BADI_2 Method : MODIFY_SCREEN
3. You have to develop your individual searchhelps fo each custom fields. If the fields values are available in SRM tables, its fine , otherwise u may need to create search help exits and use RFC_READ_TABLE to fetch the data from backend.
Regards
Alok Pathak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alok,
Thanks for u reply.
I have created 3 fields in the SRM structure and configured in SPRO..now the fields are displayed correctly...
But my question is now to BADI BBP_CUF_BADI_2 Method : MODIFY_SCREEN how to implement this...If i implement this BADI will i able to see the search help and will it get data from R/3..as my fields will be getting data from R/3..
VJ
first you need to create the search helps.And then you will have to attch them to in the appended structure..where u created the new fields.
Once you hav done this, then only you can see the search help in ITS.
As the data is available in R/3, you need to include the retrieval code in a search help exit. Which is justa function module that encapsulates the extraction logic.
Do like this ..
FUNCTION zf4if_shlp_exit_new_field.
*"----
""Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----
DATA : ls_data TYPE tab512,
lt_data TYPE TABLE OF tab512,
ls_options TYPE rfc_db_opt,
lt_options TYPE TABLE OF rfc_db_opt,
ls_fields TYPE rfc_db_fld,
lt_fields TYPE TABLE OF rfc_db_fld,
DATA : l_spras TYPE sy-langu,
l_client TYPE mandt,
this will hold the records that needs to be displayed
DATA : BEGIN OF ls_r3field,
include the R/3 fields
END OF ls_r3field,
lt_ls_r3field LIKE TABLE OF ls_r3field.
IF callcontrol-step = 'SELECT'.
CALL FUNCTION 'RFC_READ_TABLE' DESTINATION DEST
EXPORTING
query_table = tablenema
delimiter = '#'
TABLES
OPTIONS = lt_options
fields = lt_fields
data = lt_data
EXCEPTIONS
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
OTHERS = 7.
IF sy-subrc EQ 0.
**************************
lt_data internal table will have the records from backend
you need to logically seperate the fields as per requirement and put that in lt_r3_fields internal table
***************************
Map the Results
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = lt_r3_fields
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
IF sy-subrc <> 0.
callcontrol-step = 'EXIT'.
EXIT.
ENDIF.
callcontrol-step = 'DISP'.
EXIT.
ENDIF.
ENDFUNCTION.
thank you very much...
I have created 3 fields : Territory Type (BU)(ZZTERTP),Territory Code(ZZTERCD),Market Code(ZZMKTCD) in the structure INCL_EEW_PD_ACC_CSF.I am able to see the fields in cost assignment tab..
and i have done implementation for BADI BBP_CUF_BADI_2 and method MODIFY_SCREEN i have written the code as :
method IF_EX_BBP_CUF_BADI_2~MODIFY_SCREEN.
DATA: WA_FIELDS TYPE BBPS_CUF_DISPLAY,
P_INDEX TYPE SY-TABIX,
P_RETURN.
IMPORT P_RETURN TO P_RETURN FROM MEMORY ID 'RETURN'.
IF NOT ET_FIELDS[] IS INITIAL.
CLEAR: WA_FIELDS, P_INDEX.
LOOP AT ET_FIELDS INTO WA_FIELDS.
P_INDEX = SY-TABIX.
IF WA_FIELDS-FIELDNAME = 'ZZTERTP' AND
WA_FIELDS-STRUCTURE_TYPE EQ 'ITEM' .
WA_FIELDS-XDISPLAY = 'X'.
WA_FIELDS-XINPUT = 'X'.
ENDIF.
IF WA_FIELDS-FIELDNAME = 'ZZTERCD' AND
WA_FIELDS-STRUCTURE_TYPE EQ 'ITEM'.
WA_FIELDS-XDISPLAY = 'X'.
WA_FIELDS-XINPUT = ''.
ENDIF.
IF WA_FIELDS-FIELDNAME = 'ZZMKTCD' AND
WA_FIELDS-STRUCTURE_TYPE EQ 'ITEM'.
WA_FIELDS-XDISPLAY = 'X'.
WA_FIELDS-XINPUT = ''.
ENDIF.
MODIFY ET_FIELDS INDEX P_INDEX FROM WA_FIELDS.
ENDLOOP.
ENDIF.
endmethod.
can u tell me what else i have to do for search criteria for theses 3 fields to be displayed...
Thanks in advance...
Message was edited by: vj bb
Message was edited by: vj bb
Hi,
The statement given in the note is for displaying custom fields in the Selection screen after clicking the Extended Search help link.
So its not creating search help for these user-defined fields but displaying the Custom fields in Selection screen for Search help.
BR,
Disha.
Pls reward points for helpful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.