07-29-2008 10:24 AM
Hi All,
I have a field in the selection screen S_KUNNR as mandatory field and I need to get the F4 help for that field. For that I have implemented the below code. Its working fine after filling values in all mandatory fields. But my problem is that f4 should happen before filling all mandatory fields.
For your info, I have total 4 fields in the selection P_VKORG(1), P_VTWEG(2), P_SPART(3) and S_KUNNR(4). I am filling the values in the same order as well. After filling the P_SPART I am pressing F4 on S_KUNNR, that time its giving u2018No values foundu2019. But if I enter some values in S_KUNNR then I press F4 its displaying the F4 listu2026
As I know that we need to fill the all mandatory fields, and then only the PAI will trigger on selection-screen. Thatu2019s y the below select statement is failing initially.
Can u please suggest me, how to handle this situation.
at selection-screen on value-request for s_kunnr-low.
* select knvp~kunnr
select knvp~kunn2
kna1~name1 from knvp inner join kna1 on
knvp~kunn2 eq kna1~kunnr
into table i_knvp_data
where knvp~parvw eq 'RE' and
knvp~vkorg eq p_vkorg and
knvp~vtweg eq p_vtweg and
knvp~spart eq p_spart.
if sy-subrc eq 0.
sort i_knvp_data.
endif.
call function 'F4IF_INT_TABLE_VALUE_REQUEST' "#EC *
exporting
retfield = `KUNNR`
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = `S_KUNNR`
value_org = 'S'
tables
value_tab = i_knvp_data
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
07-29-2008 10:37 AM
07-29-2008 10:44 AM
Hi Rakesh,
I canu2019t change the obligatory additions!! And I didnu2019t understand in which we can impleetn that code in At Selection-screen Output??
Can u please provide me some snippet!!!
07-29-2008 11:21 AM
Hi,
First remove all obligatory aditions..
Then use..
AT SELECTION-SCREEN command..
Inide that write codes like this.
if S_VKORG[] is initial.
MESSAGE 'Enter value for sales organisation' Type 'E'.
endif.
Cheers,
Rakesh