‎2010 Aug 09 9:59 PM
Hi Experts
Can Any one tell me ,
Is there anything wrong in this select query, As per my knoledge everything is Fine, But Still i am getting SY-SUBRC = 4 for this Query,
Its a Warehouse Management table LQUA i have Used.
TABLES:mara,lqua.
*Internal Table And Work Area Declearation
DATA: it_lqua1 TYPE TABLE OF lqua WITH HEADER LINE.
DATA: wa_tmp_lqua TYPE lqua.
CONSTANTS: c_x TYPE char1 VALUE 'X',
c_t TYPE char1 VALUE 'Q'.
----
*Selection Screen
----
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS:P_HLDR TYPE lqua-Z_HLDREF1.
SELECT-OPTIONS:s_matnr FOR mara-matnr,
s_date FOR sy-datum DEFAULT sy-datum,
s_mfgt FOR sy-uzeit DEFAULT sy-uzeit,
s_CHARG FOR lqua-CHARG.
SELECTION-SCREEN END OF BLOCK blk1.
START-OF-SELECTION.
Select * from LQUA
into table IT_LQUA1
where MATNR in S_MATNR
and BDATU in S_DATE
and Z_MFGTIM in S_MFGT
AND CHARG IN S_CHARG.
After Debuging Above Query I am Getting SY-SUBRC = 4.
Same data is availabe In LQUA Table For Selection Criteria..
Please help me if anyone has worked on WM LQUA Table
‎2010 Aug 10 6:01 AM
Hi
as per your code you are mentioning S_DATE and S_MFGT which is system date and username.
i beleive you do not have data for this user name and this date in your table LQUA. that why you are getting sy-subrc = 4
because all this is in the where condition with AND operator. So all the conditions should be matched otherwise you will not find any data.
so check your table once again for the given values, like your system date and the current user name.
Thanks
Lalit Gupta
‎2010 Aug 10 7:02 AM
Hi lalit ,
Thanks for the reply, but I am changing SY-UZIT and SY-DATUM On screen as per the table, And Problem is by Field CHARG,
Because of that i am getting SY-SUBRC = 4.
‎2010 Aug 10 7:07 AM
Hello
Try to pass charg into select-options with leading zeros.
‎2010 Sep 08 12:56 PM