Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select Options?

Former Member
0 Likes
569

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.

5 REPLIES 5
Read only

Former Member
0 Likes
535

Is there something in p_MGTYP for the material you want?

Rob

Read only

Former Member
0 Likes
535

Try using

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR

NO INTERVALS

NO-EXTENSION.

Sri

Read only

0 Likes
535

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.

Read only

0 Likes
535

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

Read only

0 Likes
535

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