‎2006 Jun 20 8:28 AM
Hi All!
I Have two fields on a screen in which one is a parameter and the other is select -options field.The fields are as below.
Plant
Location
Now if user enters one value with f4 help on the Plant field the locations corresponding to that plant should appear as input f4 help to the location field.
How to get this.Please advise
Regards
Pavan
‎2006 Jun 20 8:32 AM
Hi kumar,
1. Simple.
2. This will be automaitcally taken care of.
3. just copy paste.
4.
report abc.
tables : t001l.
parameters : werks like t001l-werks.
select-options : lgort for t001l-lg
regards,
amit m.
‎2006 Jun 20 8:32 AM
Hi kumar,
1. Simple.
2. This will be automaitcally taken care of.
3. just copy paste.
4.
report abc.
tables : t001l.
parameters : werks like t001l-werks.
select-options : lgort for t001l-lg
regards,
amit m.
‎2006 Jun 20 8:38 AM
Hi Amit,
Similarly for Company code and Plant.Both are parameter fields.
Regards
Pavan
‎2006 Jun 20 8:41 AM
Hi Kumar,
REPORT ZTEST_BU .
parameters: p_bukrs like t001-bukrs,
p_werks like T001W-werks.Regards
vijay
‎2006 Jun 20 8:35 AM
hi
use the select query and fill the internal table accordingly and then use F4IF_INT_TABLE_VALUE_REQUEST and pass the internal table.
for second field
at selection-screen on value-request for s_loc-low.
perform pop_up.
and their u again fill up some Internal table using select query, where clause will have dbtab-fieldname = p_plant.
declare
select-option: p_plant for dbtab-fieldname no extension no intervals.
Reward points if it helps
regards
Gunjan
‎2006 Jun 20 8:36 AM
Pavan,
Use the declaration from the same table. ie
PARAMETERS : p_werks LIKE t001l-werks.
SELECT-OPTIONS : s_lgort FOR t001l-lgort.rgds,
TM.
‎2006 Jun 20 8:37 AM
Hi
There is 2 ways of solving:
a) if there is no F4 help avialable then use Fm F4IF_FIELD_VALUE_REQUEST in teh F4 event for the parameter
b)if you want to get the values automatically in to the second paramater when you enter the values in the first parameter use the FM DYNP_VALUES_READ in the on value request event of the 2nd parameter.
Hope This Helps
Anirban
‎2006 Jun 20 8:37 AM
Hi,
If search help is not maintained at data element level
then programitically you can do as this sample program
REPORT YUP_F4HELP .
*---Report with selection screen and to display the list of
possible entries for field 'POSNR' as per the value in field 'VBELN'.
PARAMETERS: P_VBELN TYPE VBAK-VBELN,
P_POSNR TYPE VBAP-POSNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_POSNR.
DATA: BEGIN OF HELP_ITEM OCCURS 0,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
ARKTX TYPE VBAP-ARKTX,
END OF HELP_ITEM.
DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
DYNFIELDS-FIELDNAME = 'P_VBELN'.
APPEND DYNFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = DYNFIELDS
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.
READ TABLE DYNFIELDS WITH KEY FIELDNAME = 'P_VBELN'.
P_VBELN = DYNFIELDS-FIELDVALUE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_VBELN
IMPORTING
OUTPUT = P_VBELN.
SELECT POSNR MATNR ARKTX INTO TABLE HELP_ITEM
FROM VBAP
WHERE VBELN = P_VBELN.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'POSNR'
DYNPROFIELD = 'P_POSNR'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
VALUE_ORG = 'S'
TABLES
VALUE_TAB = HELP_ITEM.
Thanks,
Pramod