2008 Apr 01 12:11 PM
following is my requirement
Designation (Mandatory, Single selection, F4 Help from Z table with all columns)
Signature (Mandatory, Single selection, F4 Help from Z table with first two columns)
how to get f4 help for the above.
2008 Apr 01 12:14 PM
HI,
Use AT Selection-screen on value-request Event..
and in that use the function module
' F4if-INT_TABLE_VALUE_REQEUST'
Reward if helpful.
RSS.
2008 Apr 01 12:16 PM
Hi,
try this FM
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'WERKS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WERKS'
window_title = 'Plant Name'
value_org = 'S'
tables
value_tab = it_werks
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.
reward if usefull
2008 Apr 01 12:18 PM
Hi,
Here is an example.
SELECT-OPTIONS : s_categ FOR ausp-atwrt , " Change Category
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_categ-low.
REFRESH t_val_categ.
CLEAR : w_dynprofld,w_characteristic.
w_characteristic = 'CHANGE_CATEGORY'.
w_dynprofld = 's_categ-low'.
Get the Change category value help
PERFORM value_request TABLES t_val_categ USING w_dynprofld
w_characteristic.
FORM value_request TABLES p_t_values
USING p_w_dynprofld
p_characteristic.
Get the Internal characteristic
REFRESH p_t_values.
CLEAR w_atinn.
CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
EXPORTING
input = p_characteristic
IMPORTING
output = w_atinn
EXCEPTIONS
OTHERS = 1.
Fetch all possible entries for Internal characteristic into an internal table
SELECT atwrt
FROM cawn
INTO TABLE p_t_values
WHERE atinn EQ w_atinn.
Pass the values to the fuction module to display Value request
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ATWRT'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = w_dynprofld
value_org = 'S'
TABLES
value_tab = p_t_values[].
ENDFORM. " value_request
Hope this helps.
Thanks,
Ahsan
2008 Apr 01 12:20 PM
hi
try this
at selection-screen on value-request for < ur field name >.
then call FM.
F4_FIELD_ON_VALUE_REQUEST.
pass the required parameter in export parameter, table parameter.
reward if uesful
regards
mano
2008 Apr 01 12:24 PM
CONSTANTS: C_STROW TYPE INT4 VALUE '10', "F4 indow position
C_STCOL TYPE INT4 VALUE '30', "F4 Window position
C_EDROW TYPE INT4 VALUE '20', "F4 Window position "height
C_EDCOL TYPE INT4 VALUE '42', "F4 Window position "width
Data : W_LINENO LIKE SY-TABIX.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR <FIELDNAME>
Select all the values from the Z table and put it in a internal table. say it_tab.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = C_EDCOL "60
ENDPOS_ROW = C_EDROW "15
STARTPOS_COL = C_STCOL "30
STARTPOS_ROW = C_STROW "05
TITLETEXT = 'Title '
IMPORTING
CHOISE = W_LINENO
TABLES
VALUETAB = it_tab
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
READ TABLE it_tab INDEX W_LINENO.
IF SY-SUBRC EQ 0.
Screen field = it_tab-value.
ENDIF.
ENDIF.
Award points if helpful.
Regards.
Gowri
2008 Apr 01 12:26 PM
Hi,
Check the below code.
parameters: p_abkrs(4) type c,
p_abkrs1(4) type c.
data it_abkrs like t549a occurs 0 with header line.
data: begin of it_abkrs1 occurs 0,
mandt type mandt,
abkrs type abkrs,
end of it_abkrs1.
at selection-screen on value-request for p_abkrs.
select * from t549a into table it_abkrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'ABKRS'
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'P_ABKRS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_abkrs
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.
at selection-screen on value-request for p_abkrs1.
select mandt abkrs from t549a into table it_abkrs1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'ABKRS'
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'P_ABKRS1'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = it_abkrs1
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.