2009 Jan 09 10:32 AM
hi all,
i m writing the code for inner join but its going for dump and error is. 'Error in module RSQL of the database interface.' please help me.
code: DATA : BEGIN OF itab OCCURS 0 ,
pernr LIKE pa0015-pernr , "Personel no.
subty LIKE pa0015-subty, "SUBTYPE OF INFOTYPE
endda LIKE pa0015-endda , "LTA Taken Date
betrg LIKE pa0015-betrg, "LTA Amount
ZUORD like pa0015-zuord, "Assignment number
LGA01 LIKE PA0589-LGA01,
BET01 LIKE PA0589-LGA01,
ename LIKE pa0001-ename , "Employee name
begda LIKE pa0001-begda , "Joining date
pending TYPE p DECIMALS 2, "Pending LTA amount
end of itab.
SELECT M1pernr M1subty M1endda M1betrg M1zuord M2LGA01 M2~BET01 INTO CORRESPONDING FIELDS OF TABLE itab
FROM PA0015 AS M1 INNER JOIN PA0589 AS M2
ON M1PERNR = M2PERNR
AND M1SUBTY = M2SUBTY
WHERE M1pernr IN pernr AND M1subty = '4004'.
Regards Nitin.
2009 Jan 09 10:37 AM
Hello Saurabh,
Change the declaration
BET01 LIKE PA0589-LGA01,
to
BET01 LIKE PA0589-BET01,
It will work )
BR,
Suhas
Edited by: Suhas Saha on Jan 9, 2009 11:38 AM
2009 Jan 09 10:35 AM
hi
there is some problem with this line,
WHERE M1pernr IN pernr AND M1subty = '4004'.
here what is pernr ,is it a select-option?
if not, then this is the root of your problem.
thanks
geeta
2009 Jan 09 10:38 AM
hi geeta,
thanx for reply, PERNR is of selection screen.
thats : select-options : pernr for pa00015-pernr.
regards nitin.
2009 Jan 09 10:37 AM
Hello Saurabh,
Change the declaration
BET01 LIKE PA0589-LGA01,
to
BET01 LIKE PA0589-BET01,
It will work )
BR,
Suhas
Edited by: Suhas Saha on Jan 9, 2009 11:38 AM
2009 Jan 09 10:39 AM
code: DATA : BEGIN OF itab OCCURS 0 , pernr LIKE pa0015-pernr , "Personel no. subty LIKE pa0015-subty, "SUBTYPE OF INFOTYPE endda LIKE pa0015-endda , "LTA Taken Date betrg LIKE pa0015-betrg, "LTA Amount ZUORD like pa0015-zuord, "Assignment number LGA01 LIKE PA0589-LGA01, *BET01 LIKE PA0589-LGA01,* ename LIKE pa0001-ename , "Employee name begda LIKE pa0001-begda , "Joining date
fix this
*BET01 LIKE PA0589-BET01,*
hopefully this should solve the problem
2009 Jan 09 10:42 AM
hi,
the error is related to basis.
the size of the table has a problem.
2009 Jan 09 10:55 AM
hi you only use
" into table itab"
in stead of INTO CORRESPONDING FIELDS OF TABLE itab.
if you still face problem please let me know..
Edited by: swati gupta on Jan 9, 2009 11:57 AM