‎2008 Jun 20 7:43 AM
hello
experts i have a requirement .the scenario is like this i have three select-options in my screen
comp code ,
sales org,
distribtion channel
now suppose if comp code 9000 is selected the sales org and dist chnl will be reduced to only 9000 company code in the search help
plz help
‎2008 Jun 20 7:47 AM
HI,
Use explicit F4 help, according to the criteria select the data and call the F4 help for the wanted field, with the data you got.
You can use the below function module to build the dialog box for F4 help on the filed.
--> F4IF_INT_TABLE_VALUE_REQUEST
Edited by: Ravi Kumar on Jun 20, 2008 8:47 AM
‎2008 Jun 20 7:47 AM
HI,
Use explicit F4 help, according to the criteria select the data and call the F4 help for the wanted field, with the data you got.
You can use the below function module to build the dialog box for F4 help on the filed.
--> F4IF_INT_TABLE_VALUE_REQUEST
Edited by: Ravi Kumar on Jun 20, 2008 8:47 AM
‎2008 Jun 20 7:50 AM
ok
can u plz give me a sample code for that
it will help me a lot
plz
‎2008 Jun 20 7:50 AM
Hi,
I had the same requirement.You have to create dynamic search help.Refer the sample code below:
wa_dynpread-fieldname = 'ZCAN_HDR-PLANT'.
APPEND wa_dynpread TO it_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
* TRANSLATE_TO_UPPER = ' '
* request = 'A'
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
dynpfields = it_dynpread
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 <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR wa_dynpread.
READ TABLE it_dynpread INTO wa_dynpread WITH KEY fieldname = 'ZCAN_HDR-PLANT'.
IF sy-subrc = 0.
SELECT hawb_bl_no plant exbond_no doc_type cha_agent
FROM zcan_cha INTO TABLE it_hawb
WHERE plant = wa_dynpread-fieldvalue.
ENDIF.
REFRESH it_dynpread.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'HAWB_BL_NO'
* PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'ZCAN_HDR-HAWB_BL_NO'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = it_hawb
* FIELD_TAB =
* 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.
‎2008 Jun 20 7:59 AM
hello
thanx for giving the code but i am unable to understand the code
if possible plz tell me step by step so that i can understand
and can achive the same
thanx in advance
‎2008 Jun 20 8:01 AM
hello
thanx for giving the code but i am unable to understand the code
if possible plz tell me step by step so that i can understand
and can achive the same
and can i use this for select -options ??
thanx in advance