02-14-2007 6:12 AM
Hello everyone,
I have to add a F4 help. My scenario is on a selection screen i have two fields material no and serial no. when i press F4 on material field it should filter the values of material numbers from two tables depending on the serial number and display them to be chosen by the user. can anyone help me?
Thanks and regards,
Y Gautham.
02-14-2007 6:33 AM
02-14-2007 7:14 AM
02-14-2007 7:23 AM
Hi,
Since you are using a Ztable
create a search help and use the same in your report or assign the same to your field in the table as per your requirement
Regards
Shiva
02-15-2007 6:37 AM
Hello Gautham,
This is how u can create "Search Help" for the fields of the ztables that u have created.
SE11- Create Search Help for 1 field, "Selection Method" box put the Table name to which the field belongs to. "Dialog Type" box write: "Display Value Immediately".
Search Help Parameter is the Field name for which u want the Help. Tick Imp & Exp options and assign LPOS = 1 and Enter. , save and Activate.
SE11- Go to the table , Click on the Field that needs to be assigned a search Help....Click at the left side of the Field so that all the corresponding data Elements, Key field etc also gets selected.
Click on the "Search Help tab" just above the "Data Type " column.
Put the "Search Help" name that u just created. Mention the Field and Enter. it takes up the required values. Now Copy.
U can repeat the process for whatever fields u want to assign a Search Help.
se51- Go to Screen Painter, Select Fields from Dictionary table to which u want search help to be assigned.
Double click on the Text box of the corresponding field,......> Screen Painter Attributes.......> Search help Text box.........> Enter the name of the Search help that u created for a field.
Ok....>Save.........> Activate
Now u should be able to get the Search help for the fields that u wanted to.
Assign point in case it works
02-15-2007 7:51 AM
You can use thie function module 'F4IF_INT_TABLE_VALUE_REQUEST'
here goes the sample code
DATA:BEGIN OF I_RETTAB OCCURS 0.
INCLUDE STRUCTURE DDSHRETVAL.
DATA:END OF I_RETTAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INFSTR.
PERFORM F4_INPUT_HELP USING V_object.
FORM F4_INPUT_HELP USING VALUE(V_OBJECT) LIKE ARCH_OBJ-OBJECT.
you can gives your serial number in the where condition
SELECT ARCHINDEX
ITYPE
OTYP
OBJECT
INTO TABLE IT_STR
FROM AIND_STR1
WHERE OBJECT = V_OBJECT AND
ITYPE = 'I'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'ARCHINDEX'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'AIND_STR1-ARCHINDEX'
STEPL = 0
WINDOW_TITLE = 'Active Archive Info Structures'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = IT_STR
FIELD_TAB =
RETURN_TAB = I_RETTAB
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.
IF NOT I_RETTAB[] IS INITIAL.
READ TABLE I_RETTAB INDEX 1.
IF SY-SUBRC = 0.
AIND_STR1-ARCHINDEX = I_RETTAB-FIELDVAL.
ENDIF.
ENDIF.
ENDFORM. " F4_INPUT_HELP