‎2009 Aug 18 4:21 AM
Hi all,
In my module pool program Table control i am having 10 columns fields.
in one of the column field i have used 'PROCESS ON VALUE-REQUEST' to get the material no.
in that F4 search help list is having releated information of the material like material group, company code, description etc.
user while searching for material they will use F4 search help and in that list they will select the material .
From the list I need releated information of the materials like material group, company code, description etc
to be populated in other columns while selecting the material .( User is not ready to enter all the values for the fileds)
I appended the releated values for the material in the Table control Internal table in the Process on value-request Module.
(after selecting material by the user from F4 search help)
even then I am not getting the data in the screen.
kindly help me how to proceed to get the data in other columns.
Thanks in advance,
sharma
‎2009 Aug 18 4:58 AM
Hi,
In the Event POV in the module for the field that you are already have you can do this,follow the following steps:
1. You might be using FM F4IF_INT_TABLE_VALUE_REQUEST which will give you the index or the value the user has selected on the F4 screen.
2. Get the values of the other fields based on the index or value returned in the above step.
3. Then you need the position of the row the user has pressed F4 on use FM:DYNP_GET_STEPL this give you the current step loop
4. Then you have to use FM 'DYNP_VALUES_UPDATE' to update values to the screen like below:
DATA: dynpfields LIKE dynpread OCCURS o with header line.
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'ITAB-FACTURA'.
dynpfields-fieldvalue = itab_bsik_v-xblnr.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'ITAB-BUZEI'.
dynpfields-fieldvalue = itab_bsik_v-buzei.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid "Program name sy-cprog
dynumb = sy-dynnr "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
Regards,
Himanshu
‎2009 Aug 18 4:58 AM
Hi,
In the Event POV in the module for the field that you are already have you can do this,follow the following steps:
1. You might be using FM F4IF_INT_TABLE_VALUE_REQUEST which will give you the index or the value the user has selected on the F4 screen.
2. Get the values of the other fields based on the index or value returned in the above step.
3. Then you need the position of the row the user has pressed F4 on use FM:DYNP_GET_STEPL this give you the current step loop
4. Then you have to use FM 'DYNP_VALUES_UPDATE' to update values to the screen like below:
DATA: dynpfields LIKE dynpread OCCURS o with header line.
REFRESH dynpfields.
CLEAR dynpfields.
dynpfields-fieldname = 'ITAB-FACTURA'.
dynpfields-fieldvalue = itab_bsik_v-xblnr.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
dynpfields-fieldname = 'ITAB-BUZEI'.
dynpfields-fieldvalue = itab_bsik_v-buzei.
dynpfields-stepl = l_stepl.
APPEND dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid "Program name sy-cprog
dynumb = sy-dynnr "Screen number
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 0.
Regards,
Himanshu
‎2009 Aug 18 2:17 PM
Hi Himanshu Verma ,
Thanks for help.
I am getting the value.
I am having one more problem
while selecting from the F4 search list user is selecting Row in the F4 list.
How can I find the row or index they selected in the F4List.
sharma
Edited by: sharma on Aug 18, 2009 3:18 PM
‎2009 Aug 18 2:23 PM
Hi,
The selected value would be there returned in structure: RETURN_TAB
If you want values for other fields to be returned from the F4 help use the strucutre DYNPFLD_MAPPING
create an internal table and populate values for teh field FLDNAME with fields from the F4 help screen that you want to be returned.
Regards,
Himanshu
‎2009 Aug 18 2:57 PM
Hi Himanshu Verma ,
Thanks for fast reply.
but i tried with field names available in F4 Internal table.
even then I am not getting.
T_DYNPFLD_MAPPING-FLDNAME = ' MTART.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
T_DYNPFLD_MAPPING-FLDNAME = 'MBRSH'.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
SELECT
MATNR
MTART
MBRSH
MATKL
BISMT
MEINS
BSTME
FROM MARA
INTO TABLE INT_F4
up to 5000 rows
.
CLEAR INT_F4.
****function module to get pop-up window of f4.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATNR'
DYNPPROG = W_PROGNAME
DYNPNR = W_SCR_NUM
DYNPROFIELD = 'V_TAB-MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = INT_F4
RETURN_TAB = RETURN_VALUES
DYNPFLD_MAPPING = ITAB_DYNPFLD_MAPPING
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE .
V_TAB-matnr = RETURN_VALUES-FIELDVAL.
endif.
I have used the above code. I am not getting the field values available in ITAB_DYNPFLD_MAPPING.
kindly help me how to get the exact row for the F4 table.
Thanks in advance.
sharma
‎2009 Aug 18 3:05 PM
Hi
Try like this:
T_DYNPFLD_MAPPING-FLDNAME = ' INT_F4-MTART'.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
T_DYNPFLD_MAPPING-FLDNAME = 'INT_F4-MBRSH'.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
Regards,
Himanshu
‎2009 Aug 18 3:15 PM
Hi Himanshu Verma,
Thanks for your timely help.
Problem solved. I am getting values.
Thanks again,
sharma
‎2009 Aug 18 6:13 AM
Hello Sharma,
This is fine to get values using F4 and updating those values to internal table but you must referesh the table control to make those internal table content available to table control.
Check if this can help!
Thanks,
Augustin.
‎2009 Aug 18 6:27 AM
Hi sharma,
After getting the values from search help, you have to assign that value to your concern table control field.
The return value from DDSHRETVAL structure,you have to assign to concern table control field.
then only the selected data will come and sit into your table control field.