2010 Jun 11 7:52 AM
Dear All,
I am facing the problem in module pool programing .I created the new z table in that table i have the code fields and also the code text fields . i have to fetch the code and text for that i created the search help when am selecting the code from the search help i need to populate the code text also in other input field am not able to do that .
Kindly give me idea how to do this .
thanks
Moderator message: please use more descriptive subject lines from now on.
Edited by: Thomas Zloch on Jun 11, 2010 9:34 AM
2010 Jun 11 8:18 AM
Hi,
You can proceed as follows:
1. Get all the data to be displayed in search help into an internal table.
2. Use the following code in a POV module as follows:
in the screen add the following:
PROCESS ON VALUE-REQUEST.
FIELD GV_SCR_FIELD MODULE UCIA_PROJID_0700.
*GV_SCR_FIELD is the screen field for which you have to display search help.
In the module call a function module to display search help providing the mapping of screen fields. See below code:
DATA: lv_retfield TYPE fieldname,
lt_dyn_map TYPE STANDARD TABLE OF dselc,
ls_dyn_map TYPE dselc.
lv_retfield = 'PROJECT_ID'.
ls_dyn_map-fldname = 'F0002'.
ls_dyn_map-dyfldname = 'GV_SCR_FIELD02'.
APPEND ls_dyn_map TO lt_dyn_map.
CLEAR ls_dyn_map.
SORT gt_prj_list BY status project_id.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = lv_retfield
* PVALKEY = ' '
dynpprog = 'your program name'
dynpnr = '0700'
dynprofield = 'GV_SCR_FIELD'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
TABLES
value_tab = gt_prj_list
* FIELD_TAB =
* RETURN_TAB =
dynpfld_mapping = lt_dyn_map
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.
* ELSE.
* PERFORM get_prj_description.
ENDIF.
Here, gt_prj_list is the internal table containing the search help data to be displayed.
LV_RETFIELD is the fiedname of the internal table field whoe value is to be retured to screen field GV_SCR_FIELD.
it_dyn_map contains the field mapping for the second screen field where the valuse is to be populated.
ls_dyn_map-fldname = 'F0002' is to be provided as the field number of the second field in the internal table.
If the field to be returned to the second screen field is at 3rd position in your internal table, provide F0003.
In this way, you can populate any number of fields on the screen based on entry selected in search help.
Regards,
Jayesh
2010 Jun 11 8:33 AM
in your search help you can SET the Description and in module Pool in Screen attributs you can set the parameter id for the text.....!
2010 Jun 11 8:33 AM
in your search help you can SET the Description and in module Pool in Screen attributs you can set the parameter id for the text.....!
2010 Jun 11 10:15 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id ........
in my search help text is coming .....
2010 Jun 11 10:17 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id .....
2010 Jun 11 10:22 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id .....
2010 Jun 11 10:42 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id .....
2010 Jun 11 11:26 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id .....
2010 Jun 11 11:26 AM
Dear Anup ,
Can you little bit ellaborate your ans means where in screen atrribute i havee to set the parameter id .....
2010 Jun 11 8:21 AM
Hi,
In POV module after getting code, based on the code select code text
from ur Z table and move this code text to ur field.
feel free to ask, if u have any questions.
Regards,
S.Senthilkumar
2010 Jun 11 1:24 PM
Dear Senthil ,
I wrote this code bt still problem is same .....
PROCESS BEFORE OUTPUT.
MODULE MODIFY_SUBSCREEN.
MODULE MODULE_PBO_0001.
MODULE HIDDEN_DATA_SUBSCREEN.
PROCESS AFTER INPUT.
CHAIN.
FIELD P0001-ZZLTEXT.
FIELD P0001-ZZLOCATION.
FIELD P0001-ZZSUPERVISORIS.
FIELD P0001-ZZSUPERVISORID.
FIELD P0001-ZZBADGE.
MODULE INPUT_STATUS_SUBSCREEN ON CHAIN-REQUEST.
ENDCHAIN.
MODULE MODULE_PAI_0001.
PROCESS ON VALUE-REQUEST.
FIELD P0001-ZZLTEXT MODULE Location1.
DATA: BEGIN OF itab_location occurs 0 ,
ZLOCAT type ZDT_LOCATION-ZLOCAT,
ZLTEXT type ZDT_LOCATION-ZLTEXT,
END OF itab_location.
Select ZLOCAT ZLTEXT from ZDT_LOCATION INTO TABLE itab_location where ZLOCAT eq 'GH0A' .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZLTEXT'
dynpprog = Sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = itab_location
*return_tab = get_selected_return_code
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
2010 Jun 11 1:24 PM
Dear Senthil ,
I wrote this code bt still problem is same .....
PROCESS BEFORE OUTPUT.
MODULE MODIFY_SUBSCREEN.
MODULE MODULE_PBO_0001.
MODULE HIDDEN_DATA_SUBSCREEN.
PROCESS AFTER INPUT.
CHAIN.
FIELD P0001-ZZLTEXT.
FIELD P0001-ZZLOCATION.
FIELD P0001-ZZSUPERVISORIS.
FIELD P0001-ZZSUPERVISORID.
FIELD P0001-ZZBADGE.
MODULE INPUT_STATUS_SUBSCREEN ON CHAIN-REQUEST.
ENDCHAIN.
MODULE MODULE_PAI_0001.
PROCESS ON VALUE-REQUEST.
FIELD P0001-ZZLTEXT MODULE Location1.
DATA: BEGIN OF itab_location occurs 0 ,
ZLOCAT type ZDT_LOCATION-ZLOCAT,
ZLTEXT type ZDT_LOCATION-ZLTEXT,
END OF itab_location.
Select ZLOCAT ZLTEXT from ZDT_LOCATION INTO TABLE itab_location where ZLOCAT eq 'GH0A' .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZLTEXT'
dynpprog = Sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = itab_location
*return_tab = get_selected_return_code
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
2010 Jun 11 9:20 AM
Hi,
In that screen make the event pov for the field. In that module write the code for the field . For this there is no need of the search help. what we are doing here is we are creating the search help for that field in the POV .
If you have created the search help just assign that search help to that field in the field attributes of that field in the screen painter.
Hope this might solve your problem.
With Regards,
Sumodh.P
2010 Jun 11 1:15 PM
Dear Sumodh,
I am not creating the the search help for other fields .I will tell you in detail i have two fields one is for code and second is for description.
For my first fields i created the Search help and attch in that field...now when the user select the code from the search help at that time i have to show the description of that code also in other fields .
PROCESS AFTER INPUT.
CHAIN.
FIELD P0001-ZZLTEXT.
FIELD P0001-ZZLOCATION.
MODULE INPUT_STATUS_SUBSCREEN ON CHAIN-REQUEST.
ENDCHAIN.
MODULE MODULE_PAI_0001.
PROCESS ON VALUE-REQUEST.
FIELD P0001-ZZLTEXT MODULE Location1.
DATA: BEGIN OF itab_location occurs 0 ,
ZLOCAT type ZDT_LOCATION-ZLOCAT,
ZLTEXT type ZDT_LOCATION-ZLTEXT,
END OF itab_location.
Select ZLOCAT ZLTEXT from ZDT_LOCATION INTO TABLE itab_location where ZLOCAT eq 'GH0A' .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZLTEXT'
dynpprog = Sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = itab_location
*return_tab = get_selected_return_code
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
2010 Jun 14 12:10 PM