Facing problem in select statement dump DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S
Hi Experts,
I am facing the problem in the select statement where it giving the short dump
DBIF_RSQL_INVALID_RSQL CX_SY_OPEN_S.
i have searched many forms, but i found that the select option s_matnr have the limitaion 2000 entreis, but i am passing same s_matnr to other select statement with more than 2000 entries but it is not giving me any short dump.
but i am facing problem with only one select statement where if i pass select option s_matnr more than 1500 entris also giving short dump.
my select statement is
SELECT * FROM bsim
INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean
FOR ALL ENTRIES IN t_bwkey WHERE bwkey = t_bwkey-bwkey
AND matnr IN matnr
AND bwtar IN bwtar
AND budat >= datum-low.
in the internal table g_t_bsim_lean internal table contain all the fields of the table bsim with 2 fields from other table.
Please let me know whether i need to change the select statement or any other solution for this.
Regards,
udupi
my select query is like this:
DATA: BEGIN OF t_bwkey OCCURS 0, "184465
bwkey LIKE bsim-bwkey, "184465
END OF t_bwkey. "184465
LOOP AT g_t_organ WHERE keytype = c_bwkey.
MOVE g_t_organ-bwkey TO t_bwkey-bwkey.
COLLECT t_bwkey. "184465
ENDLOOP. "184465
READ TABLE t_bwkey INDEX 1. "184465
CHECK sy-subrc = 0. "184465
SELECT * FROM bsim "n443935
INTO CORRESPONDING FIELDS OF TABLE g_t_bsim_lean "n443935
FOR ALL ENTRIES IN t_bwkey WHERE bwkey = t_bwkey-bwkey
AND matnr IN matnr
AND bwtar IN bwtar
AND budat >= datum-low.
Similar Messages
-
Problem with select statement using Ranges
Hi Guys,
I have used Ranges and used a select statement for selecting those ranges but I am facing a problem.
RANGES: r_doctyp for EDIDC-DOCTYP.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low = 'DEBMAS'.
append r_doctyp.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low = 'MATMAS'.
append r_doctyp.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low = 'PRICAT'.
append r_doctyp.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low = 'ORDERS'.
append r_doctyp.
r_doctyp-sign = 'I'.
r_doctyp-option = 'EQ'.
r_doctyp-low = 'INVOIC'.
append r_doctyp.
Select DOCNUM " IDoc number
DOCTYP " IDoc Type
from EDIDC into table IT_ZEDIDC
where CREDAT EQ s_credat-low
and DOCTYP EQ r_doctyp " IDOC Types
and DIRECT EQ '1'.
Here my select statement is only taking INVOIC.
But my statement should take any document type.
Thanks,
Prasad.Hi...,
Your following select statement is correct.
Select DOCNUM " IDoc number
DOCTYP " IDoc Type
from EDIDC into table IT_ZEDIDC
where CREDAT IN s_credat
and DOCTYP IN r_doctyp " IDOC Types
and DIRECT EQ '1'.
Why you are not getting result..
1. structure of the IT_ZEDIDC is having two fields DOCNUM , DOCTYP with same data lengths. If not it should be...
2. Order in the database table is must be similer to the order you maintained in the select statement.
3. As you are hard coding the input ranges make sure about every letter.
4. take a look at other where condition fields too.
5. check the table of the ranges in debugging mode.
6. why can't you declare separate work area and table for ranges...?
like .... data: r_tab type range of <field>
data: wa_tab like line of r_tab.
7. Use clear work area statement after the append statment.
--Naveen Inuganti. -
Problem with Select Statements
Hi All,
I have a performance problem for my report because of the following statements.
How can i modify the select statements for improving the performance of the report.
DATA : shkzg1h LIKE bsad-shkzg,
shkzg1s LIKE bsad-shkzg,
shkzg2h LIKE bsad-shkzg,
shkzg2s LIKE bsad-shkzg,
shkzg1hu LIKE bsad-shkzg,
shkzg1su LIKE bsad-shkzg,
shkzg2hu LIKE bsad-shkzg,
shkzg2su LIKE bsad-shkzg,
kopbal1s LIKE bsad-dmbtr,
kopbal2s LIKE bsad-dmbtr,
kopbal1h LIKE bsad-dmbtr,
kopbal2h LIKE bsad-dmbtr,
kopbal1su LIKE bsad-dmbtr,
kopbal2su LIKE bsad-dmbtr,
kopbal1hu LIKE bsad-dmbtr,
kopbal2hu LIKE bsad-dmbtr.
*These statements are in LOOP.
SELECT shkzg SUM( dmbtr )
INTO (shkzg1s , kopbal1s)
FROM bsid
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'S'
AND umskz EQ ''
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg1su , kopbal1su)
FROM bsid
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'S'
AND umskz IN zspgl
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg1h , kopbal1h)
FROM bsid
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'H'
AND umskz EQ ''
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg1hu , kopbal1hu)
FROM bsid
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'H'
AND umskz IN zspgl
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg2s , kopbal2s)
FROM bsad
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'S'
AND umskz EQ ''
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg2su , kopbal2su)
FROM bsad
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'S'
AND umskz IN zspgl
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg2h , kopbal2h)
FROM bsad
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'H'
AND umskz EQ ''
GROUP BY shkzg.
ENDSELECT.
SELECT shkzg SUM( dmbtr )
INTO (shkzg2hu , kopbal2hu)
FROM bsad
WHERE bukrs = ibukrs
AND kunnr = ktab-kunnr
AND budat < idate-low
AND shkzg = 'H'
AND umskz IN zspgl
GROUP BY shkzg.
ENDSELECT.>
Siegfried Boes wrote:
> Please stop writing answers if you understrand nothing about database SELECTS!
> All above recommendations are pure nonsense!
>
> As always with such questions, you must do an analysis before you ask! The coding itself is perfectly o.k., a SELECT with an aggregate and a GROUP BY can not be changed into a SELECT SINGLE or whatever.
>
> But your SELECTS mustr be supported by indexes!
>
> Please run SQL Trace, and tell us the results:
>
> I see 8 statements, what is the duration and the number of records coming back for each statement?
> Maybe only one statement is slow.
>
> See
> SQL trace:
> /people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
>
>
> Siegfried
Nice point there Siegfried. Instead of giving constructive suggestion, people here give a very bad suggestion on using SELECT SINGLE combined with SUM and GROUP BY.
I hope the person already look at your reply before he try using select single and wondering why he has error.
Anyway, the most important thing is how many loop expected for those select statements?
If you have like thousands of loop, you can expect a poor performance.
So, you should also look at how many times the select statement is called and not only performance for each select statement when you're doing SQL trace.
Regards,
Abraham -
Problem with Select statement.
DATA: wa_usr05 TYPE usr05.
The select statement always gives sy-subrc = 0
even if there is no entry with parid = 'ZRD'.
On successful it fills the structure wa_usr05 as
MANDT C 3 ACC
BNAME C 12 SCL
PARID C 20 X
PARVA C 18
but mandt is 310.
USR05 is a pool table and has mandt field.
SELECT SINGLE bname
parid
parva
FROM usr05
INTO wa_usr05
WHERE bname = sy-uname AND
parid = 'ZRD' AND
parva = 'x' OR parva = 'X'.
Let me know the reason and solution to the problem.SELECT SINGLE * FROM usr05
INTO wa_usr05
WHERE bname = sy-uname AND
parid = 'ZRD' AND
parva = <b>'X'</b> .
Use single * as u have defined the wa+usr05 as usr05.
Else.
DATA: i_usr05 TYPE STANDARD TABLE of usr05.
SELECT * FROM USR05
INTO TABLE usr05
WHERE bname = sy-uname AND
parid = 'ZRD' AND
parva = <b>'X'</b> .
Then loop at itab and write data.
Hope this solves ur query.
Reward points if this helps.
Message was edited by:
Judith Jessie Selvi -
Problem with SELECT statement. What is wrong with it?
Why is this query....
<cfquery datasource="manna_premier" name="kit_report">
SELECT Orders.ID,
SaleDate,
Orders.UserID,
Distributor,
DealerID,
Variable,
TerritoryManager,
US_Dealers.ID,
DealerName,
DealerAddress,
DealerCity,
DealerState,
DealerZIPCode,
(SELECT SUM(Quantity)
FROM ProductOrders PO
WHERE PO.OrderID = Orders.ID) as totalProducts,
FROM Orders, US_Dealers
WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)# AND Variable = '#Variable#'
</cfquery>
giving me this error message...
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
The error occurred in D:\Inetpub\mannapremier\kit_report2.cfm: line 20
18 : WHERE PO.OrderID = Orders.ID) as totalProducts,
19 : FROM Orders, US_Dealers
20 : WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)# AND Variable = '#Variable#'
21 : </cfquery>
22 :
SQLSTATE
42000
SQL
SELECT Orders.ID, SaleDate, Orders.UserID, Distributor, DealerID, Variable, TerritoryManager, US_Dealers.ID, DealerName, DealerAddress, DealerCity, DealerState, DealerZIPCode, (SELECT SUM(Quantity) FROM ProductOrders PO WHERE PO.OrderID = Orders.ID) as totalProducts, FROM Orders, US_Dealers WHERE US_Dealers.ID = DealerID AND SaleDate BETWEEN {d '2009-10-01'} AND {d '2009-10-31'} AND Variable = 'Chick Days pre-book'
VENDORERRORCODE
-3504
DATASOURCE
manna_premier
Resources:
I copied it from a different template where it works without error...
<cfquery name="qZVPData" datasource="manna_premier">
SELECT UserID,
TMName,
UserZone,
(SELECT COUNT(*)
FROM Sales_Calls
WHERE Sales_Calls.UserID = u.UserID) as totalCalls,
(SELECT COUNT(*)
FROM Orders
WHERE Orders.UserID = u.UserID) as totalOrders,
(SELECT SUM(Quantity)
FROM ProductOrders PO
WHERE PO.UserID = u.UserID AND PO.NewExisting = 1) as newItems,
(SELECT SUM(NewExisting)
FROM ProductOrders PO_
WHERE PO_.UserID = u.UserID) as totalNew,
SUM(totalOrders)/(totalCalls) AS closePerc
FROM Users u
WHERE UserZone = 'Central'
GROUP BY UserZone, UserID, TMName
</cfquery>
What is the problem?It's hard to say: what's your request timeout set to?
700-odd records is not much of a fetch for a decent DB, and I would not expect that to case the problem. But then you're using Access which doesn't fit the description of "decent DB" (or "fit for purpose" or "intended for purpose"), so I guess all bets are off one that one. If this query is slow when ONE request is asking for it, what is going to happen when it goes live and multiple requests are asking for it, along with all the other queries your site will want to run? Access is not designed for this. It will really struggle, and cause your site to run like a dog. One that died serveral weeks ago.
What else is on the template? I presume you're doing something with the query once you fetch it, so could it be that code that's running slowly? Have you taken any steps to isolate which part of the code is taking so long?
How does the query perform if you take the subquery out of the select line? Is there any other way of getting that data? What subquery will be running once for every row of the result set... not very nice.
Adam -
Hi,
Am getting dump with the below select statement in ECC 6.0,
where as the same select works fine in 4.7C.
SELECT distinct aebeln abukrs absart alifnr azterm aekorg aekgrp awaers awkurs akdatb akdate aunsez bebelp btxz01 bwerks blgort bbednr bmatkl bidnlf bmeins bbprme bnetpr bpeinh bknttp badrn2 csakto canln1 caufnr cgsber cps_psp_pnr detenr dlpein deindt dwemng dslfdt dmenge
INTO CORRESPONDING FIELDS OF TABLE it_output FROM
( ( ( ekko AS a INNER JOIN ekpo AS b ON aebeln = bebeln )
INNER JOIN ekkn AS c ON bebeln = cebeln and bebelp = cebelp )
INNER JOIN eket AS d ON cebeln = debeln and cebelp = debelp )
WHERE aebeln IN s_ebeln AND alifnr IN s_lifnr AND a~bukrs IN s_bukrs.
Whether I've to add anything addition for select distinct statement in ecc 6.0 or is it obsolette?
can oneone help in this regards?
Thanks,
Ponraj.s.Hi,
This is only dev.server and it consists only few records.
TYPES: BEGIN OF ty_output,
*********Header data*****************************
rectype_line1(1) TYPE c,
rectype_line2(1) TYPE c,
rectype_line3(1) TYPE c,
rectype_line4(1) TYPE c,
ebeln TYPE ebeln,
bukrs TYPE bukrs, "Company Code
bsart TYPE bsart, "Documnet Type
lifnr TYPE lifnr,
zterm TYPE dzterm,
ekorg TYPE ekorg, "Purchase Org
ekgrp TYPE ekgrp, "Purchase grp
waers TYPE waers, "Currency
wkurs TYPE wkurs, "Exchange rate
wkurs1(9) TYPE c,
kdatb TYPE kdatb,
kdate TYPE kdate, "Validity end date
unsez TYPE unsez, "Our Reference
********Line item data***************************
ebelp TYPE ebelp, "po item
txz01 TYPE txz01, "Item Text
werks TYPE werks, "Plant
lgort TYPE lgort_d, "Storage Location
bednr TYPE bednr, "Tracking No
matkl TYPE matkl, "Material group
idnlf TYPE idnlf, "Vendor Material No
meins TYPE meins, "Order unit
bprme TYPE bprme, "Order price unit
netpr TYPE netpr, "Net price
netpr1(11) TYPE c,
peinh TYPE peinh, "Price unit
peinh1(5) TYPE c,
knttp TYPE knttp, "Acc Assgnment
adrn2 TYPE adrn2,
**************G/L Account data***********************
menge2(13) TYPE c, "PO Quantity
sakto TYPE sakto, "GL Acc No
anln1 TYPE anln1, "Main Asset number
aufnr TYPE aufnr, "Order Number
gsber TYPE gsber, "Business Area
ps_psp_pnr(8) TYPE c,
**********Item schedule data*******************************
etenr TYPE etenr,
lpein TYPE lpein, "Delivery date category
eindt TYPE eindt, "Delivery date
menge TYPE menge, "Schedule Quantity
menge1(13) TYPE c,
wemng TYPE wemng,
wemng1(13) TYPE c,
slfdt TYPE slfdt, "Start of Delivery date
END OF ty_output.
DATA : it_output TYPE STANDARD TABLE OF ty_output.
This is my table declaration,pls help me in resolving this issue. -
Probelm facing in Zprogram select statements developed for PBS conversion
Hi,
Am using PBS conversion tool to convert the Report programs for Archive. In that program am having select statement for KONV table which takes KWERT and KSCHL based on KNUMV. In this case PBS conversion tool is not able to do the conversion and this where needs manual editing is necessary, becoz KNUMV and KSCHL which are used for selection are not supported as index fields.
Kindly suggest how to proceed ..
Thanks in Advance.NAME1,
STRAS,
MCOD2
MCOD3
LAND1
TELF1
TELFX
FOR KNA1
namev, name1 for knvk table
name1, street, house_num1, str_suppl1, city1, country post_code1 for adrc table
vbeln for vbak table
/cwm/pikmg, /cwm/pikme for lips table -
Where condition problem in select statement.
Hi,
I am trying to write select statement as below
SELECT objectclas objectid FROM cdhdr INTO CORRESPONDING FIELDS OF TABLE ltab_chgdocu
WHERE objectclas IN ('STUE' , 'STUE_V')
AND ( TCODE eq 'CS01u2019 or tcode eq u2019CS02u2019 or tcode eq 'C201' or tcode eq 'C202' ) .
But I am getting the error like "literals that takes up more than one line or not permitted"
Please let me know whats wrong and correct me .
Thanks,
Vinay.Hi Vinay,
Declare constants
constants : c_stue type CDOBJECTCL value 'STUE',
c_stue_v type CDOBJECTCL value 'STUE_V',
c_cs01 type sy-tcode value 'CS01',
c_cs02 type sy-tcode value 'CS02',
c_C201 type sy-tcode value 'C201',
c_C202 type sy-tcode value 'C202'.
And replace your hardcoded values with these constants in your select query.
SELECT objectclas objectid FROM cdhdr INTO CORRESPONDING FIELDS OF TABLE it_tab
WHERE objectclas IN (c_STUE , c_STUE_V)
AND ( TCODE eq c_CS01
or tcode eq c_CS02
or tcode eq c_C201
or tcode eq c_C202 ).
Thanks & Regards
- Always Leaner -
Having Problem in select statement.
Dear gurus
im having an issue in select statement.
i have written a select statement which is fetching the result as i required but it takes to much time to execute.
how to make it work fast.
SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
vbak~vtweg vbak~spart matnr matkl auart
vbap~abgru
INTO CORRESPONDING FIELDS OF TABLE so_tab
FROM vbak
JOIN vbap ON vbak~vbeln = vbap~vbeln
WHERE audat IN in_date
AND matnr IN matnr
AND ( auart = 'ZISO' OR auart = 'ZEXP' )
AND vbap~werks IN werks .
SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
lips~meins likp~kunag matnr vgbel vgpos
lfart
INTO CORRESPONDING FIELDS OF TABLE del_tab
FROM likp
JOIN lips ON likp~vbeln = lips~vbeln
FOR ALL entries IN so_tab
WHERE vgbel = so_tab-vbeln
AND vgpos = so_tab-posnr
AND lfdat IN in_date
AND likp~werks IN werks.
Regards
Saad Nisar.Hi,
I agree with sabu.
Along with these you need to do following things -
SELECT vbak~vkbur vbap~vbeln vbap~posnr vbak~audat
vbap~kwmeng vbap~meins vbak~kunnr vbak~vkorg
vbak~vtweg vbak~spart matnr matkl auart
vbap~abgru
INTO CORRESPONDING FIELDS OF TABLE so_tab
FROM vbak
JOIN vbap ON vbak~vbeln = vbap~vbeln
WHERE audat IN in_date
AND matnr IN matnr
AND ( auart = 'ZISO' OR auart = 'ZEXP' )
AND vbap~werks IN werks .
{color:green}
*if sy-subrc eq 0.*
*so_tab_tmp[] = so_tab[].*
*sort so_tab_tmp by vbeln posnr.*
*delete adjacent duplicates from so_tab_tmp by vbeln posnr.*
*if so_tab_tmp[] is not initial.*
{color:green}
SELECT lips~vbeln lips~posnr likp~lfdat lips~lfimg
lips~meins likp~kunag matnr vgbel vgpos
lfart
INTO CORRESPONDING FIELDS OF TABLE del_tab
FROM likp
JOIN lips ON likp~vbeln = lips~vbeln
FOR ALL entries IN so_tab_tmp
WHERE vgbel = so_tab_tmp-vbeln
AND vgpos = so_tab_tmp-posnr
AND lfdat IN in_date
AND likp~werks IN werks.
{color:green}
*endif.*
*endif.*
{color:green} -
Facing problem in selecting data based on the join s tatement ppls suggest
hi
cosider a sceneio as below
there are six tables table1
table2
table3 table4
table5 table6
join conditons between tables
table1-lclic (primary key) = table2-lclic
table1-lgreg = table3-lgreg (PK for table 3)
table2-pobj = table4-pobj
i have used join statment to join table 1 table 2table3
i want to select data from table5
table5-ccngn and table6-text
now condion for validation is that
table5-field1 is selected if table4-ctsex = table3-ctsty and tehre is no link between table 5 and table 3 o nly link is through table 4
table4-ctsnum=table5-ctsnum (primary keys)
can anyone suggest how to format the select statement
regards
AroraHi Nishant,
Using Table Joins for multiple tables would severely hamper the performance of the SAP system.
Instead use individual select statements for each database table, and later reconcile all the internal tables.
<b>Reward points, if helpful.</b>
Regards,
Atin -
Problem executing SELECT statement due to st_spatial column type
I am using a CachedRowSet and cache.execute() will not run because it does not support the st_spatial column type. I have been told to use the column metadata to build a select statement of column names, and check the column's type before you add it to the select clause. But, I am unsure of what to do since I can't get column names without running a select statement first... I will attach some code for you to look at, but please give me suggestions!
try{
Class.forName("com.informix.jdbc.IfxDriver");
CachedRowSet cache = new CachedRowSet();
cache.setReadOnly(true);
cache.setUrl(dbname);
cache.setUsername(user);
cache.setPassword(password);
cache.setCommand("SELECT * FROM "+table);
try{
cache.execute();
}catch(Exception e){
out.print("Can't Display");
OTHER JSP CODE THAT WORKS WITH THE RESULTS FROM ABOVE
}catch(Exception exc){
out.println(exc.toString());
} // end try-catchI honestly don't have a clue. I have no idea what the st_spatial data type is, or where it is defined, and as a result, I don't know why Java would be complaining about it. I do know that java.sql.ResultSet doesn't care about it (it would internally recognize it as a plain old object type via the getObject() method and you would have to cast it to st_spatial).
What I would check:
Is the Informix driver up to date?
Does the CachedRowSet class extend ResultSet or otherwise use it as an internal data structure? If so, does it properly create the ResultSetMetaData object and no exceptions are being trapped?
Otherwise... when copying data from the ResultSet object into its own internal data structure, does it correctly realize that the st_spatial column should NOT be copied into a String or a slot in a String array?
Does a quick and dirty command line version of your program properly use CachedRowSet to retrieve at least one record from your database?
Basically, put the JSP aside and just test the CachedRowSet to make sure it is working correctly. I have no idea what's in that class since it is not a Java standard class, so I can't really give you any additional suggestions. -
Problems with select statement
Hi,
For some reason I cannot find the solution for the following problem.
I have an internal table.
Now I like to make an select over a database table, while only rows should be selected, where the key field occurs in the internal table and in case of identical key field only the row with the lowest value in another column is selcted.
Example:
- internal table:
col1 col2 col3
1 A AA
2 B AA
3 A AC
-database table:
col1 col2 col3
1 001 CD
1 002 CF
1 003 CG
2 001 CD
2 002 CF
2 003 CG
3 002 CF
3 003 CG
4 001 CD
4 002 CF
4 003 CG
- the selected database entries should be
1 001 CD
2 001 CD
3 002 CF
explication:
- entries with 4 in the first column do not occur in the internal table, so they do not appear in the selection
- in case of more than one entry in the database table only the one with the lowest value in column two will be selected
If you have any idea how this could be solved, I would really appreciate you help.
regards
TorstenHi,
1) u have to select based on internal table 1
2) u have to filter the internal table 2 for minimum value.
select col1 col2 col3
from <any table>
into table <Internal_table_final>
for all entries in <Internal_table_1>
where col1 = Internal_table_1-col1.
sort Internal_table_final by col1 col2.
loop at Internal_table_final.
at new col1.
continue.
endat.
delete Internal_table_final.
endloop.
<b>try this</b>
Regards
<b>Mark Helpful Answers</b>
Message was edited by: Manoj Gupta -
Facing problem in selecting from table vbrk
Hi,
I have developed a simple report for calculating the total logistic cost.
That program was working fine in the development server.
Now in production, its not working.
While debugging i found that its getting stuck at a select query where its fetching data from VBRK table and is getting timed out.
What should be done for reducing the time?
Please help.
Thanks in advance
NitinHi Naren ,Seshu & Aarun
First of all thanks a lot for replying.
The structure of my select query is
START-OF-SELECTION.
SELECT cityc regiogroup bzirk INTO TABLE it_ztaluka_1
FROM ztaluka_1
WHERE regiogroup IN pregroup.
IF sy-subrc NE 0.
MESSAGE 'No records in ztaluka_1.' TYPE 'E'.
ENDIF.
I N I T I A L I S I N G IT_VBRK F R O M VBRK *******
IF NOT it_ztaluka_1[] IS INITIAL.
SELECT vbeln bzirk regio cityc zzwerks knumv
FROM vbrk
INTO TABLE it_vbrk
FOR ALL ENTRIES IN it_ztaluka_1
WHERE zzwerks IN pzzwerks
AND regio IN pregio
AND cityc = it_ztaluka_1-cityc.
IF sy-subrc NE 0.
MESSAGE 'No records in vbrk.' TYPE 'E'.
ENDIF.
SORT it_vbrk BY vbeln .
The key field is vbeln,but that not included in my where condition as its not in my selection criteria also in the previous tables which r used in the program.
i found the order in the select qusery is not in the order of vbrk table.
That i will change.But since the key field is not included it will again cause problems na?? -
HI FRNDS ..
I AM HAVING SOME ERRORS IN THE WHERE CLAUSE PLZ CORRECT IT
select DOCNO into t_DOCNO from J_1IEXCHDR
where exnum = gf_text and
status ne ( 'd' and 'r' and 'b' ).
PLZ HELP ME TO COLLECT VALU OF THE STATUS FILED WHER IT IS NOT EQUAL TO D, R AND BRANGES: R_STAT FOR J_1IEXCHDR-STATUS.
R_STAT-LOW = 'D'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
R_STAT-LOW = 'R'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
R_STAT-LOW = 'B'.
R_STAT-SIGN = 'I'.
R_STAT-OPTION = 'EQ'.
APPEND R_STAT.
CLEAR R_STAT.
DATA: T_DOCNO LIKE J_1IEXCHDR-DOCNO OCCURS 0 WITH HEADER LINE.
DATA: GF_TEXT LIKE J_1IEXCHDR-EXNUM.
SELECT DOCNO INTO TABLE T_DOCNO FROM J_1IEXCHDR
WHERE EXNUM = GF_TEXT
AND
STATUS NOT IN R_STAT.
Try to use Ranges.
Regards
vijay -
I have a select-options on my selection screen. In the database table i have different four values for this. ex EEX01, EEX02, EEX03 and EEX04.
their overall names are DE, HE, IT, TR respectively.
Now the requirement is user will enter this data like DE to TR , i am now confused how do convert these value to the values that i have in table. Because i have to use this for extracting the data from database table.
thanks in advance.hi,
what is the table name for the case.
and jsut list what are the fields .. we'll try to map the same and see if it works..
if for the field there is a check table attached then conversion routine will take care of that .
just check on the field of the domain in the dbtable
like matn1 for dataelement matnr and domain matnr in mara table.
regards,
vijay
Maybe you are looking for
-
Starting this year, Turbotax CD/download versions will not permit people to print tax forms when offline. If you try to print while not connected to the Internet, you receive the warning "There was a problem connecting to Intuit's Secure Print Servic
-
USB MAC 10.9.1 serial console help
i boaught a usb to serial cable installed driver got zterm com port USBSERIAL1 but all i get is grabage 9600 8 bit no parity 1 stop bit help. what m i doing wrong? UPDATE: using GoSerial with 115200 8 bit no parity 1 stop bit it worked
-
Hi, My SQL Query is: select RECORD_CREATED_DATE FROM ITEM_DETAIL WHERE BARCODE = '09010001638001'; This gives me the result: 29-APR-08 How do I retrieve date with complete year. Is there some conversion done by Oracle when I do the select or this is
-
BT Line product not allowing broadband
Hi, Im trying to order broadband from a company that isnt BT, but when I put my BT phone number into their internet ordering page it says my phone line has a product or service that is making my phone line incompatible. Any idea what this might be? A
-
Flash MX to Flash 8 bug??
Hello. I am trying to update a file (~5 MB) built in Flash MX using Flash 8. Everything works fine with the file until I open the actionscript window. The file totally slows down to the point the hour glass shows up everytime I pick an object in the