‎2007 May 28 11:53 AM
Hi Guru's
I have requirement ,
Take Purchase Req. date from User and then have to calculate, how many of them converted into PO.
For example : if i am entered PR date : 31.01.2006 to 10.02.2006
then it will select all the PR in this range and how many converted into PO
Now my problem begins here
INDATE: Select-Option for BADAT ( Req date)
**LFDAT is Delivered date
SELECT * FROM EBAN WHERE STATU = 'B' AND BADAT IN INDATE
AND FRGKZ = 'B'
AND FRGZU = 'XX'
AND MATNR NE ' '
AND BANPR = '05'
AND EBAKZ NE 'X'
AND ( LOEKZ NE 'L' OR LOEKZ NE 'X' ).
IF EBAN-BADAT0(6) = INDATE0(6) AND EBAN-LFDAT0(6) = INDATE0(6).
ITAB_PR-BANFN = EBAN-BANFN.
ITAB_PR-MATNR = EBAN-MATNR.
ITAB_PR-MENGE = EBAN-MENGE.
ITAB_PR-EBELN = EBAN-EBELN.
APPEND ITAB_PR.
CLEAR ITAB_PR.
CLEAR EBAN.
ENDIF.
ENDSELECT.
but this code is not working at all ,its giving dump error ".Unable to interpret " IBT200" as number .it has some problem in passing Date ..but i am not able to decode the problem...correct the query
thanks
Subham Arya
‎2007 May 28 11:58 AM
You cannot use select-options like you did in your IF statement.. pl change it to compare with either the low or high date as below.
IF EBAN-BADAT+0(6) = INDATE-high+0(6)
AND EBAN-LFDAT+0(6) = INDATE-high+0(6).
~Suresh
‎2007 May 28 11:58 AM
You cannot use select-options like you did in your IF statement.. pl change it to compare with either the low or high date as below.
IF EBAN-BADAT+0(6) = INDATE-high+0(6)
AND EBAN-LFDAT+0(6) = INDATE-high+0(6).
~Suresh
‎2007 May 28 12:05 PM
Hi,
This error mainly caused by your selection-condition structure, for select-options, the structure is not the same as parameter, so yoiu should check this kind of structure to code(Ranges structue, yoiu can refer range in your abap editor using F1 key).
In the range structure, there'are maily four fields, sign, option, low, and high, so if you want point to your input in the screen , please exactly indicate the low field or high field.
Hope this helps
Bob
‎2007 May 28 12:09 PM
i think this is because of your select-option handling.
by default select-option contain the data like this.
SELECT-OPTIONS : S_OP LIKE SY-DATUM.
suppose you have givaen a range 01.01.2006 to 31.03.2006
(1) (2) (8) (8)
SIGN OPTION LOW HIGH
I BT 20060101 20060331
SO WHEN YOU ARE WRITTING
IF EBAN-BADAT+0(6) = INDATE+0(6) AND EBAN-LFDAT+0(6) = INDATE+0(6).
IT IS BY DEFAULT TAKING FIRST 6 CHAR I.E. IBT200 SO YOU HAVE TO REFFER EITHER S_OP-LOW+0(6) OR S_OP-HIGH+0(6).
REGARDS
SHIBA DUTTA