Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select-Options Processing

Hi All,

I have a Select-Option: SF_KOSTL for CSKS-KOSTL.

I have a ZTable with two fields:

Username and KOSTL.

I need to determine if an entry Exists for Every SF_KOSTL (in the Select-option ) in the ZTable for username SY-UNAME.

IF there is one particular KOSTL, that doesn't have an entry in Ztable, I should ignore that from the SF_KOSTL Select-Options which is used in several other select statements.

How to overcome this.

Thanks in Advance...!

Former Member

Oh ok. I see what you need to do now. Try something like this. Here you are getting all of the kostl in your range and looping at the internal table and checking against your ztable.

report zrich_0001 .

data: icsks type table of csks with header line.

select-options: s_kostl for icsks-kostl.

at selection-screen.

  clear icsks.  refresh icsks.
  select * into table icsks from csks
                where kostl in s_kostl.

  loop at icsks.

* Check against your table here
* select Single * from ztable
*            where uname = sy-uname
*              and kostl = icsks-kostl.
* if sy-subrc <> 0.
*   message w001(00) with 'Kostl will be ignored'.
* endif.



Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question