‎2007 Nov 29 6:24 AM
hello pls look at thuis statement its thrwoing dump,
select single yygdatum yygdebitor yygvertrnr yygnachtnr yygpreisab yygpreisbi FROM
ygvabbv_30 INTO wa_ygvabbv_30_new
WHERE yygdebitor = wa_veda-yygdebitor AND
yygvertpos IN r1_vertpos.
since the value in ranges is 0,
can anybody suggest me wht 2 do?
thnkx
bhanu
‎2007 Nov 29 6:27 AM
Try this..
as you are using IN ranges should not be a problem.
select single yygdatum yygdebitor yygvertrnr yygnachtnr yygpreisab yygpreisbi FROM
ygvabbv_30 INTO CORRESPONDING FIELDS OF wa_ygvabbv_30_new
WHERE yygdebitor = wa_veda-yygdebitor AND
yygvertpos IN r1_vertpos.
‎2007 Nov 29 6:29 AM
Hi Bhanu,
Purpose of 'select single' is fetching single row and for that it is recomendable to provide values with '=' of primery keys.
Here, you are using range, so it has chance to fetch more than one rows at a time;
and which is not applicable in 'select single'.
So here you use:
Select <filed names> up to 1 rows......
endselect.
Hope it will solve ur problem.
Regards
Krishnendu
‎2007 Nov 29 6:30 AM
My problem is i am not getting any value in ranges thats y its throwing dump!
can anybody suggest me for that?
‎2007 Nov 29 6:32 AM
Hi,
we use range table like this..cehck how u have done
Ranges: bukrs for zstock-bukrs.
The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low & bukrs-high all manually.
Some tips:
Sign is always I (for Include) or E (for Exclude)
Option can be a whole range, which includes:
EQ (Equal)
BT (Between))
CP (Contain Pattern)
So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow:
ranges: bukrs for zstock-bukrs.
bukrs-sign = 'E'. "Exclude
bukrs-option = 'CP'. "Pattern
bukrs-low = 'AB*'. "Low Value
bukrs-high = ''. "High Value
append bukrs.
Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line.
Declare the workarea wa_ygvabbv_30_new with the sequence in which u have selected from the fields from the table....Now u won't get any dump..
Regards,
nagaraj
‎2007 Nov 29 6:37 AM
Hi,
If you want the code not to be executed if the ranges doesn't have any value,
use the statements as below.
if not r1_vertpos[] is initial.
select single yygdatum yygdebitor yygvertrnr yygnachtnr yygpreisab yygpreisbi FROM
ygvabbv_30 INTO wa_ygvabbv_30_new
WHERE yygdebitor = wa_veda-yygdebitor AND
yygvertpos IN r1_vertpos.
endif.
But I don't think the dump is coming because there is no value in range.Check the statements you used for populating ranges are correct.
You should have used sign,option,high and low in that properly.
Example:
r1_vertpos-sign = 'I'.
r1_vertpos-option = 'EQ'.
....
append r1_vertpos.
‎2007 Nov 29 6:41 AM
Hello Bhanu,
Can u please paste the DUMP Text and the Data Declaration of wa_ygvabbv_30_new ?
Reagrds
Saekt Sharma
‎2007 Nov 29 7:17 AM
i have declared the ranges correctly
dump is coming for this select itself.
???
‎2007 Nov 29 7:20 AM
DUMP TEXT--->CNT ACCEPT ' ' IN RANGES
THAT IS VALUE IN DUMP IS COMING NULL