03-10-2010 10:58 AM
Hi,
I want to pick the Rate of Excise Duty against Chapter Id from Table j_1iexctax.
We have a problem in picking the Rate because our select query not picking the Rate with right period (means according to Valid From - Valid To)..
Please amend my query...
*SELECT rate FROM j_1iexctax INTO itab6-rate
WHERE j_1ichid = itab5-j_1ichid
AND j_1iexcind = itabc-j_1iexcicu.*
ENDSELECT.
Please insert the condition of Period in my query...
Thanks...
Edited by: Rob Burbank on Mar 10, 2010 9:42 AM
03-10-2010 11:02 AM
Hi,
<li>Try this way
Thanks
Venkat.O
SELECT rate
FROM j_1iexctax
INTO itab6-rate
WHERE j_1ichid = itab5-j_1ichid
AND j_1iexcind = itabc-j_1iexcicu
AND validfrom LE sy-datum
AND validto GE sy-datum.
ENDSELECT.
03-10-2010 11:14 AM
After insertion of this code, debugger not going on this query...
03-10-2010 11:44 AM
hi,
use for all enteries on the table.
otherwise yuo have to loop at itab5 and itabc.
and then use the select statement.
SELECT rate FROM j_1iexctax INTO itab6-rate
WHERE j_1ichid = i*tab5-j_1ichid
* AND j_1iexcind = *itabc-j_1iexcicu*.
endselect.
Edited by: Rob Burbank on Mar 10, 2010 9:43 AM
03-10-2010 12:09 PM
what is the problem in this query..
SELECT rate FROM j_1iexctax INTO itab6-rate
WHERE j_1ichid = itab5-j_1ichid
AND j_1iexcind = itabc-j_1iexcicu AND validfrom LE sy-datum AND validto GE sy-datum.
ENDSELECT.
plz guide.
Edited by: Rob Burbank on Mar 10, 2010 9:43 AM
03-10-2010 4:32 PM
Hi,
You can check this.
The data type of validfrom and validto is of inverted date.
convert the sy-datum to inverted format and try passing in the query.
data:datc type char08.
data:date type sy-datum.
date = sy-datum.
CONVERT DATE date INTO INVERTED-DATE datc.
03-10-2010 8:09 PM