Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with select statement with between condition

Hi Gurus,

I apologize for not searching the forum thoroughly for for my problem . I am a SEM developer. I need to do some ABAP coding . I having this Problem :

I need to select data with a condition where

Bedat is between DATBI and DATAB . I tried this select statemnt . it is syntactically correct but not getting data ( Data is there in the tables actually)

<b>select SINGLE knumh from A016 INTO T_KNUMH

WHERE EVRTN = LS_2LIS_02_ITM-KONNR

AND EVRTP = LS_2LIS_02_ITM-EBELP

AND DATAB >= LS_2LIS_02_ITM-BEDAT.

AND DATBI < LS_2LIS_02_ITM-BEDAT</b>

When i try like this.

select SINGLE knumh from A016 INTO T_KNUMH

WHERE EVRTN = LS_2LIS_02_ITM-KONNR

AND EVRTP = LS_2LIS_02_ITM-EBELP

AND DATAB >= LS_2LIS_02_ITM-BEDAT.

  • AND DATBI < LS_2LIS_02_ITM-BEDAT.

It gets data but it fully doesnt satisfy the condition.

Any help is appreciated. Please excuse for posting a very basic question in ABAP.

Regards

satish

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question