‎2009 Feb 19 6:29 AM
Hello Experts,
i have 2 select options with F4 hlp.
I want to read multiple value from selection screen for both select option .
1.Either user enter from using F4 help.
2.Or enter thru keyboard.
& in second select option fetch values in F4 help acc to values in first sect option input.
Plz suggest.
Aastha.
‎2009 Feb 19 6:33 AM
PARAMETERS: Bukrs TYPE spfli-carrid,
name1 TYPE spfli-carrid.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR name1.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 50 10.
MODULE value_list OUTPUT.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
NEW-PAGE NO-TITLE.
select single bukrs from <Databasetable> into <ITAB>-BUkrs
where name1 = name1.
Write : / Itab-bukrs.
hide bukrs.
Endselect.
ENDMODULE.
AT LINE-SELECTION.
CHECK NOT name1 IS INITIAL.
LEAVE TO SCREEN 0.OR
[F4 help|https://wiki.sdn.sap.com/wiki/display/Snippets/F4helpofonefielddependsonotherfield]
Regards,
Gurpreet
‎2009 Feb 19 7:33 AM
Hello Gurpreet,
Can i read values from selection screen without any event .
Plz sugggest.
Aastha
‎2009 Feb 19 7:50 AM
Hi Aastha,
Yes you are right we can read values from selection screen without events by using search helps...
Regards,
Siddarth
‎2009 Feb 19 8:39 AM
Hi,
Yes we can read without event.
Declare the variables referring to foreign key table or referenced tables:
Example:
Parameters:
P_carrid type sflight-carrid,
p_connid type sflight-connid.
Her spfli is the parent table but SFlight is forign key table.
So here what ever value you give in Carrid and press f4 on connid
value will appear based on carrid.
Hope this resolves your issue.
Regards,
Gurpreet
‎2009 Feb 19 6:33 AM
HI,
consider this example it will solve ur problem:
If the requirement in selection screen is:
There are 2parameters in selection screen. For e.g. matnr and werks.
If I am giving matnr then respect to that matnr i should get only those plant in F4 help.
Solution:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR werks.
select the werks based on plant in internal.table
use f.m
F4IF_INT_TABLE_VALUE_REQUEST.
and pass the i.tab here in
tables
value_t = i.tabOr
Follow the psudo code below.
Note: it_matnr has only single field MATNR.
**--- Return table to handle selected field in F4 help ---**
data: it_return like ddshretval occurs 0 with header line.
parameters: p_matnr type marc-matnr,
p_werks type marc-werks.
at selection-screen on value-request for p_repnam.
select matnr
from marc
into table it_matnr
where werks eq p_werks.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'OBJ_NAME'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
callback_program = sy-cprog
tables
value_tab = it_matnr
return_tab = it_return
exceptions
parameter_error = 1
no_values_found = 2.
if sy-subrc eq 0.
loop at it_return.
clear p_repnam.
p_repnam = it_return-fieldval.
endloop.
endif.regards
rahul
‎2009 Feb 19 6:33 AM
Hi
you can do that using function module F4IF_INT_TABLE_VALUE_REQUEST
search in sdn youll find many examples on it
You can also use search help
Thanks
Viquar Iqbal
‎2009 Feb 19 6:34 AM
‎2009 Feb 19 6:34 AM
‎2009 Feb 19 6:38 AM
Hello,
refer the given below link
https://wiki.sdn.sap.com/wiki/display/Snippets/F4%20help%20of%20one%20field%20depends%20on%
Thanks
Arun
‎2009 Feb 19 8:43 AM
Hi ...
Use the Functio module 'DYNP_VALUES_READ to get the value of the section screen parameter.
Get the selection screen value dynamically
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-repid " Program name
dynumb = sy-dynnr " Screen number
tables
dynpfields = l_i_dynp
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.
Put the screen value in the select-options
read table l_i_dynp into l_wa_dynp index 1." For single value
s_prog-low = l_wa_dynp-fieldvalue.
endif.
‎2009 Feb 20 6:04 AM
Hello Subhankar,
In which event we call fm DYNP_VALUES_READ .
Aastha