on 03-17-2008 12:50 PM
Hi,
i am having One requirement that need to create f4 functionality on selection screen.
please give me solution on that
Hi
i am sending the code for adding f4 functionality on selection screen.
tables: kna1.
data: begin of itab occurs 1,
kunnr type kna1-kunnr,
end of itab.
data: kunnr type kunnr.
select-options: cust for kunnr .
at selection-screen on value-request for cust-low.
select kunnr from kna1 into table itab .
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ''
retfield = 'KUNNR'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = ''
STEPL = 0
WINDOW_TITLE =
value = 'CUST-LOW'
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'X'
callback_program = sy-cprog
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = itab[]
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
if sy-subrc eq 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
for getting f4 for a fields u can use two function modules.for example if u want the f4 of matnr in table mara.use FM
f4if_field_value_request
give the tablename as mara,
fieldname as matnr.
f4if_field_value_request.
f4if_int_table_value_request.
reward points if useful.
thanks and regards,
rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
parameters: p_file type rlgrap-filename.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
importing
file_name = p_file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try out The Sample Code
TYPES: BEGIN OF t_reques,
lgnum TYPE lgnum,
END OF t_reques.
DATA:i_reques TYPE STANDARD TABLE OF t_reques.
SELECTION-SCREEN: BEGIN OF BLOCK b1.
PARAMETER: p_ware TYPE lgnum OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ware.
SELECT lgnum
FROM T301
INTO TABLE i_reques.
PERFORM f4_help USING i_reques CHANGING p_ware. "SUBROUTINE FOR F4 HELP.
*&---------------------------------------------------------------------*
* SUBROUTINE FOR F4 HELP. *
*----------------------------------------------------------------------*
* -->P_I_REQUES text
* <--P_P_WARE text
*----------------------------------------------------------------------*
FORM f4_help USING p_i_reques
CHANGING p_p_ware.
************************************************************************
* CALLING FM F4IF_INT_TABLE_VALUE_REQUEST FOR F4 HELP. *
************************************************************************
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'LINK'
retfield = 'LGNUM'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_P_WARE'
callback_program = 'ZTEST' <<Your Program Name
TABLES
value_tab = i_reques
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i006(zmm_ab).
ENDIF.
ENDFORM. " F4_HELP
Regards
Sandipan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you refer your selection screen element to a data element which has a F4 option, then it gives you a F4 help automatically.
If not try using match code objects.
Refer to the below related threads
Matchcodes are defined in two stages in Abap/4 Dictionary:
1) The revelant table and fields are stipulated in matchcode object. A matchcode object describes the set of all possible search paths for a search item.
2) One or more matchcode ID can be defined for a matchcode object. A matchcode ID describes a special search path for a search term.The fields or combination of fields via which the search is to take place is defined in the matchcode ID.
In the initial screen of Data Dictionary,
Enter a name for your new object, click on the Matchcode radio button, and press the Create button.
Enter descriptive text as you enter your primary table on the Attributes screen and press the Save button.
The primary table represents the primary source table for the subsequent field search. Secondary tables can also be maintained at this point by double-clicking on the primary table or pressing the Tables button. These tables must link to the primary table through foreign keys.
The Maintain Matchcode Object attributes screen.
At this point you have the option of creating the matchcode as a local object or attaching it to a transport request. After you have done this, click on the Save button
The Create Object Catalog Entry screen.
As the status bar reflects, the mandatory key fields are transferred automatically .If you want, you can press the Fields button and maintain any selection fields you want. At this point you need to click on the green arrow to go back to the Maintain Attributes screen.
The Maintain Matchcode Object (Fields) screen.
The next step in the creation process is to activate the matchcode object. The status of the object is New and Saved .
The matchcode attributes prior to activation.
The status is now set to Active and Saved. Next you need to create a matchcode ID or your object will be incomplete.
To do this, click the Matchcode IDs button.
The matchcode attributes after activation.
The system will prompt you to create a new ID if one does not exist To do this, click on the Yes button.
A prompt to Create Object.
On the Create Matchcode ID screen , specify a matchcode ID number, valid input ranges from all of the alphabet, and any number. You can also click on the down arrow to view a range of valid entries.
The Create Matchcode ID dialog box.
Let's view some possible entries this list window shows a number of matchcode IDs and a short description of each. Choose one and click on the green arrow.
A Matchcode hit list.
Follow these steps we learned to maintain selection fields for this matchcode ID, be sure to enter an Update type, and click on Save . At this point, you can enter further selection criteria by pushing the Selection Criteria button.
Maintenance of matchcode attributes.
In the Maintain Selection Conditions screen, you can enter and maintain fields and selection criteria for your matchcode IDs. Here is an example of a requirement of a Material Number not greater than the value of 8888 .When finished, click Save and the green arrow to go back.
The Maintenance Selection Conditions dialog box.
Now all you have to do is activate your matchcode ID and your new object is ready to use
Generate and use the matchcode.
Reward if helpful.
Regards,
Narendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.