可以在之前先把数据取到内表,在LOOP中用READ TABLE WITH KEY ... BINARY SEARCH.进行读取对应的数据。 ④ 用SORT代替ORDER BY。 ⑤ 使用二分查找法。READ TABLE的之前使用SORT TABLE BY对内表进行排序, 然后使用READ TABLE WITH KEY ...BINARY SEARCH. ⑥ 避免使用SELECT DISTINCT语句。在抽取数据到内表后用...
If the addition FOR ALL ENTRIES is specified in front of the language element WHERE of the statement SELECT of a main query, the components comp of the internal table itab specified here can be used within sql_cond on the right side of comparisons of a relational operator in comparisons ...
like the sy-subrc after each select query to make sure the result is right coz ur next select query shd only execute when ur 1st select query in successful with soem values in the internal table , otherwise the 2nd select query will give u wrong results ... Reply Former Member In re...
SAP Managed Tags: ABAP Development It is easy to perorm this requirement on an internal table, get the entire data into an internal table, get the string length of the field value YBILL_INDEX using command STRLEN into a variable v_count v_count = v_count - 1. c2 = v_count(1) ...
SAP Managed Tags: ABAP Development Hi, Can anybody help me in writing select query to pull out the following fields in PS module. POSID, POST1,AUFNRD, VORNR,ARBPL,KOSTL,LARNT,LTXA1,ARBEI,ISMNW,NTANF,NTEND,ISDD, IEDD , AUERU based on the <b>input values in the fields</b> ...
这里就可以使用/sap/opu/odata/sap/ZSALE_SRV/ZTSALE_H(Gjahr=’2016′,Zsaleid=’1002′).的查询方式查询出数据了。 更详细学习ODATA请参看:SAP Press – OData and SAP NetWeaver Gateway 后面将说明Query Options更多的查询选项$select,$filter, Hop , $skip , $in li necou...
Specifies an internal table itab, whose name must be prefixed with the @ character, as a data source of a query. The SELECT statement handles the internal table of the AS ABAP like a database table on the database. The ABAP types of the columns in the internal table are mapped to ...
Here, the filter is applied on mara table and the returned result set is saved in a variable to use further. Now the ABAP side. data : l_matnr type matnr, lt_tab type TABLE OF zdemo_sel_opt, L_WHERE TYPE STRING. SELECT-OPTIONS : s_matnr for l_matnr. START-OF-SELECTION. L_WHER...
from (v_tablename) into v_name1 where ( v_keyfield = p_kunnr ). only problem i am facing is in the dynamic where clause , as its not accepting a variable in it. And throws a dump for dynamic declaration. I have read a lot of discussions on dynamic internal table, but they don...
U may use 'E' here to exclude these values, when u r using the range in a SELECT query. Reply Former Member 2007 Jun 11 8:12 AM 0 Kudos 636 SAP Managed Tags: ABAP Development Hi sai This statement defines an internal table sel with a fixed structure which consists of the...