‎2008 Dec 26 9:24 AM
Hi folks,
I have created a Screen in Module pool. I have to attach a F4 help for a field. I did that using the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST'. Its working fine, but the when i click the value in the window, correct field value is not coming to the screen field. I have to get the value of first field in that window, but the value of the last field is coming to the screen. I have cheked the return table in debugging. It getting the value of last field, but not the first field. I have given the correct field value in the retfield parameter. Can any body suggest me why its not coming..
Thanks and Regards,
Shyam.
‎2008 Dec 26 9:26 AM
HI.
sort out the internal table before passing value to F4 help.
Regards.
Jay
‎2008 Dec 26 9:28 AM
HI
Did you pass
VALUE_ORG = 'S' in the FM that you used. if so please post your code for the F4 Event.
Regards
Ramchander Rao.K
‎2008 Dec 26 9:52 AM
Hi Ramachander,
I have already passed 'S' to value_org.
Please find my source code below.
MODULE set_hodf4 INPUT.
MOVE 'IT_HODF4-DEPTID' TO iretfield.
REFRESH it_hodf4.
SELECT DISTINCT deptid
bukrs
werks FROM zmm_ktph_hodmail INTO TABLE it_hodf4.
DESCRIBE TABLE it_hodf4 LINES my-tfill.
CASE my-tfill.
WHEN '0'.
* No & entries found.
MESSAGE i005.
WHEN OTHERS. "Get F4 help
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = iretfield
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
window_title = c_hod
value_org = 'S'
display = 'F'
* IMPORTING
* USER_RESET =
TABLES
value_tab = it_hodf4
return_tab = f4_hod
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF NOT f4_hod[] IS INITIAL.
MOVE f4_hod-fieldval TO zmm_ktph_hodmail-deptid.
ENDIF.
ENDCASE.
ENDMODULE. " set_HODf4 INPUT
Thanks,
Shyam.
Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:33 AM
‎2008 Dec 26 10:00 AM
Hi Prasad,
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = iretfield
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = " pass your screen field name in Single quotes
window_title = c_hod
value_org = 'S'
display = 'F'
‎2008 Dec 26 10:03 AM
Hi,
You have to pass retfield, Dynnprog, Dynnr and value org. Try with this
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'Field Name'
dynpprog = ws_repid (Sy-repid)
dynpnr = sy-dynnr (sy-dynnr)
value_org = 'S'
TABLES
value_tab = i_zmodel_map
return_tab = v_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Regards
sasi
‎2008 Dec 26 10:34 AM
Hi Shyam,
Please remove IT_HODF4 while assigning the iretfield.
MOVE 'DEPTID' TO iretfield.
Also you could remove display = 'F' parameter from FM
Assign program and dynpro through sy-repid and sy-dynnr.
Your FM should work well.
Revert with results.
‎2008 Dec 27 9:47 AM
Hi all,
Thanks for your suggestions.Its working now.
I have just moved 'DEPTID' TO iretfield and passed the DYNPRO and DYNNR values.
Regards,
Shyam.
‎2008 Dec 26 9:31 AM
Hi,
check this link...
http://www.saptechies.com/how-to-add-f4-help-to-a-field-on-screen-module-pool/
it would be useful.
‎2008 Dec 26 9:32 AM
hi
please Check return field of FM .. F4_IF.........
Regards.
Raju Mummidi
‎2008 Dec 26 9:33 AM
1. VALUE_ORG = 'S' (Structure)
This option should be used for new developments (despite other default values).
Regards
Sasi
‎2008 Dec 26 9:37 AM
Hi Shyam,
Do a quick Checklist if the following has been given correctly.....
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'FIELD_TO_BE_DISPLAYED/RETURNED' -> in capital letter/single quotes
dynpprog = 'CURRENT_PGM_NAME' "sy-repid
dynpnr = 'CURRENT SCREEN' "sy-dynnr
dynprofield = 'FIELD NAME OF SCREEN WHICH WILL ACCEPT VALUE FROM F4'
-> in capital letter/single quotes
value_org = 'S' -> in capital letter/single quotes
tables
value_tab = INTERNAL TABLE WITH DATA.
Regards
Byju
‎2008 Dec 26 9:40 AM
If despite giving the correct field in retfield parameter you are not getting the right field then could you please post the code of your FM alongwith the data definitions.
That would help us to suggest you something more.