2009 Feb 05 6:37 AM
HI all,
in the report selection screen i have one field for which F4 HELP doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .
please help how to get F4 HELP for the field
thanks in advance.
HI all,
in the report selection screen i have one field for which F4 HELP doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .
please help how to get F4 HELP for the field
thanks in advance.
2009 Feb 05 6:40 AM
Hello ,
U can create a searchhelp using SE11 and u can attaqch the same to the field on selection screen using MATCHCODE Object ADDITION .
oR
U can use AT SELECTION-SCREEN ON VALUE-REQUEST FOR <Field name >
event and then u can fill the internal tabel with all the required values to be shown in the F4 Help popup using Function moduel
F4IF_INT_TABLE_VALUE_REQUEST .
Regards
2009 Feb 05 6:40 AM
Hi Hems
create a search help in se11 and assign it to the screen field.
regards,
Madhu
2009 Feb 05 6:41 AM
Hi.. u can create search help and make available that search help to that field.
Create a search help lets ZZZZ.
Select-option: s_xxx for xxx matchcode object <zzzz>
Regards,
KP.
2009 Feb 05 6:41 AM
2009 Feb 05 6:41 AM
Hi,
Create a search help in se11 on the field.
and make your selection screen like that field on which you have created search help.
it will automatically trigger the F4 help for that field.
Or
use Field_on_Value_request FM.
hope it will help you.
Regards
Rajesh Kumar
2009 Feb 05 6:47 AM
2009 Feb 05 6:47 AM
2009 Feb 05 6:56 AM
Hi Hema,
1.You can cretae a search help in se11 and the atttach the serach help name in the table field.
Or
2 .
U can use AT SELECTION-SCREEN ON VALUE-REQUEST FOR <Field name >/<(select-options field)-low>/<(select-options field)-high>
event and then u can fill the internal tabel with all the required values to be shown in the F4 Help popup from the table and then use the Function moduel
F4IF_INT_TABLE_VALUE_REQUEST an d pass the parameters.
Thanks
2009 Feb 05 6:59 AM
Hi hema,
Kindly go through this link below:
http://sapprograms.blogspot.com/2008/04/f4-help-for-field-with-ztable.html
It might be helpful for you
Regrds
Mansi
2009 Feb 05 7:00 AM
Hi,
Its working try it.........
MODULE GET_F4_HELP INPUT.
TYPES : BEGIN OF EMPLOYEE,
EMPNO TYPE ZTG_EMP-EMPNO,
END OF EMPLOYEE.
DATA : EMPTAB TYPE STANDARD TABLE OF EMPLOYEE WITH HEADER LINE,
TB_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
PLAN_ID TYPE ZTG_HEALTH-PLAN_ID.
CLEAR: TB_DYNPFIELDS.
REFRESH: TB_DYNPFIELDS.
MOVE 'ZTG_EMP-HLTH_PLAN' TO TB_DYNPFIELDS-FIELDNAME.
APPEND TB_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = 'SAPMZTG01'
DYNUMB = '1010'
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* 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 = TB_DYNPFIELDS
* 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.
READ TABLE TB_DYNPFIELDS INDEX 1.
IF SY-SUBRC EQ 0.
PLAN_ID = TB_DYNPFIELDS-FIELDVALUE.
ENDIF.
SELECT EMPNO FROM ZTG_EMP
INTO TABLE EMPTAB
WHERE HLTH_PLAN = PLAN_ID.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'EMPNO'
* PVALKEY = ' '
DYNPPROG = 'SAPMZTG01'
DYNPNR = '1010'
DYNPROFIELD = 'TB1'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = EMPTAB
* 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.
ENDMODULE. " GET_F4_HELP INPUT
Thanks
Arun Kayal
2009 Feb 05 7:01 AM
2009 Feb 05 7:04 AM
The following are the options for F4 help
Code:
PARAMETERS: p_ccgrp LIKE rkpln-ksgru. "Cost Center Group
*Input help for Cost Center Group
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ccgrp.
TYPES: BEGIN OF ty_ccenter_group,
setname TYPE setnamenew,
descript TYPE settext,
END OF ty_ccenter_group.
DATA: it_ccenter_group TYPE TABLE OF ty_ccenter_group.
CLEAR it_ccenter_group.
SELECT a~setname
b~descript
INTO TABLE it_ccenter_group
FROM setheader AS a INNER JOIN
setheadert AS b ON
asubclass EQ bsubclass AND
asetname EQ bsetname
WHERE a~setclass EQ '0101' AND
b~langu EQ sy-langu.
CALL FUNCTION
'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ret field = 'SETNAME'
dynpprog = v_repid
dynpnr = SY-DYNR
dynprofield = 'P_CCGRP'
value_org = 'S'
TABLES
value_tab = it_ccenter_group.
F4IF_FIELD_VALUE_REQUEST:
This FM is used to display value help or input from ABAP dictionary. We have to pass the name of the structure or table (TABNAME) along with the field name (FIELDNAME). The selection can be returned to the specified screen field if three
parameters DYNPNR, DYNPPROG, DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
Getting F4 help based on other field .
Suppose if there are 2 fields on selection screen user name and Purchasing Document and the case is getting values of Purchasing Document Number based on user name
Code:
TYPES: BEGIN OF ty_match_nast,
objky TYPE na_objkey,
END OF ty_match_nast.
Data: it_match_nast TYPE STANDARD TABLE OF ty_match_nast.
Data: it_dypr_val TYPE STANDARD TABLE OF dynpread.
DATA: wa_dypr_val TYPE dynpread.
DATA: it_return TYPE STANDARD TABLE OF ddshretval.
Case when only username value is entered.
SELECT objky
FROM nast
INTO TABLE it_match_nast
WHERE kappl = c_ef
AND kschl = c_neu
AND usnam = wa_dypr_val-fieldvalue.
ENDIF.
*Read User name on selection screen field value
CLEAR wa_dypr_val.
REFRESH it_dypr_val.
wa_dypr_val-fieldname = 'P_UNAME'. "User name
APPEND wa_dypr_val TO it_dypr_val.
*FM to get the value
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = it_dypr_val_h.
*Pass the values to f4 table
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = u2018OBJKY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_EBELN'
value_org = 'P'
TABLES
value_tab = it_match_nast
return_tab = it_return.
2009 Feb 05 7:08 AM
Hi,
try like this.
types : begin of ty_itab,
field1 type dbtab-field1,
end of ty_itab.
data : it_itab type table of ty_itab.
parameters : p_field1 like dbtab-field1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field1.
select field1 from dbtab into table it_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'FIELD1'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_FIELD1'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = IT_ITAB
* 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.
2009 Feb 05 7:32 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |