‎2007 Dec 20 9:14 PM
Hi all,
In OO programming many things are not allowed eg the keyword TABLES is not allowed.
The statement "SELECT-OPTIONS: kunnr FOR vbak-kunnr." requires statement "TABLES vbak." but in OO we can't use "tables.." so how do we declare variables which are based on/similar to elements in database tables? How would we modify the select-options statement then?
Thanks,
Charles.
‎2007 Dec 20 9:31 PM
You should do something like this
DATA: v_kunnr TYPE kunnr.
SELECT-OPTIONS s_kunnr FOR v_kunnr.
‎2007 Dec 20 9:16 PM
there is some concept called constructors
and parameters are the place where we declare the variables for a method.
‎2007 Dec 20 9:28 PM
report zars no standard page heading
line-size 170
line-count 65(4).
data : xvbeln type line of tt_vbeln.
select-options : vbeln for xvbeln.
a®
‎2007 Dec 20 9:31 PM
You should do something like this
DATA: v_kunnr TYPE kunnr.
SELECT-OPTIONS s_kunnr FOR v_kunnr.
‎2013 Dec 19 8:51 AM
Worked like a charm. Note that if you use internal tables and don't have variables for some of the select-options fields you can also refer to the fields defined in the itab. However, you can't refer to the itab directly since it lacks the (deprecated) header line so you'll have to use a work area for it instead.
TYPES:
BEGIN OF ty_vbak,
vbeln LIKE vbak-vbeln,
kunnr LIKE vbak-kunnr,
END OF ty_vbak.
DATA:
lt_vbak TYPE STANDARD TABLE OF ty_vbak,
lwa_vbak LIKE LINE OF lt_vbak.
SELECT-OPTIONS : s_kunnr FOR lwa_vbak-kunnr.
‎2014 Apr 01 5:55 AM