‎2007 Oct 01 10:30 PM
Hi Guys,
I have to retrieve the data from SAP data abse table based on Select-Options Values.MATNR ,PLANT , GJAHR , Quantity STR Type and Period are created as Selection options .These declared based on CKMLMV003 table.I have to retriev some fields based on these selection Options.The logic which i wrote is blow.
Select WERKS
MATNR
MISCH_VERH
KALNR_BAL
GJAHR
PERIO
MGTYP
from CKMLMV003
into table i_CKMLMV003_out
Where ( MATNr in S_MATNR and
WERKS in s_WERKS and
GJAHR in s_GJAHR and
PERIO in s_PERIO and
MGTYP = p_MGTYP ).
In the select options if i write only one Material Number in the selectio Options of MATNr i am noty gtting any data even the Material Number is in SAP DAT abse table of CKMLMV003 table.
Can anybody tell me how to write the logic " when the user writes only one material Number ibn the selection Option and 2 Material Numbers in S_MATNR-LOW and HIGH.Does the logic changes are not?If i wrote one MATNr i am not getting output and also if i put the MATNR condition i am not gwetting the output in acorrect way?
Thanks,
Gopi.
‎2007 Oct 01 10:35 PM
‎2007 Oct 01 10:35 PM
Try using
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR
NO INTERVALS
NO-EXTENSION.
Sri
‎2007 Oct 01 10:46 PM
Hi Guys,
Th problem got solved.I am havingother quick Q'n.How to check the Validity of GJAHR filed in CKMLMV003 for Selection Options .?I have to check the validity of s_GJAHR field in Selection-Options
Thanks,
Gopi.
‎2007 Oct 01 10:51 PM
Use event AT SELECTION SCREEN
or AT SELECTION-SCREEN ON FIELD
Eg:
AT SELECTION-SCREEN.
Check if the Directory Exists, If not display Error
gv_unproc = p_unproc.
IF cl_gui_frontend_services=>directory_exist( gv_path ) <> 'X'.
message text-e01 type 'E'. "Directory doesnt exist
EXIT.
ENDIF.
Sri
Message was edited by:
Sri Tayi
‎2007 Oct 02 6:22 AM
If you just want to do a "plausibility" check, then something like this should suffice...
data:
l_ff(2) type n,
l_tt(2) type n.
l_ff = p_gjahr+0(2).
l_tt = p_gjahr+2(2).
add 1 to l_ff.
if not l_ff = l_tt.
message e398(00) with 'Invalid financial year!'
p_gjahr space space.
endif.Jonathan