2006 May 24 5:22 PM
Guy's
pls help me, when i go to table plko
and pass data to following field (plnty,plnnr,plnal,
werks) ,i get status value ,but when i execute
following statement
SELECT SINGLE * FROM PLKO
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '15294' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2001'. "CAUFVD-WERKS .
write PLKO-STATU.
i am not getting status value,why?
2006 May 24 5:26 PM
DID you check the table PLKO in SE11 and SE16 with same combination you`re passing in Select . Does it has data ?
2006 May 24 5:28 PM
try to give plnnr value = '00015294'
if the fetching is succesful, with the above value of PLNNR, then use conversion exit for this field before sending the value to SELECT Statement.
regards
srikanth
Message was edited by: Srikanth Kidambi
2006 May 24 5:29 PM
Precede the PLNNR with 0's, so you might want to try with '00015294' and execute the query. Normally SAP performs coversion before it selects the output for SE16, in your case since you are passing string literals, its unable to find the record.
Hope it helps.
Sunil Achyut
2006 May 24 5:31 PM
Hi Sanju,
try this.
SELECT * FROM PLKO
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '15294' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2001'. "CAUFVD-WERKS .
ENDSELECT.
Regards,
Vicky
2006 May 24 5:35 PM
Guy's
i tried using FM CONVERSION_EXIT_ALPHA_INPUT,FOR field
plnnr,and plnal but no use
2006 May 24 5:40 PM
Try this and see if it works
SELECT SINGLE * FROM PLKO INTO L_WA_PLKO
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '00015294' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2001'. "CAUFVD-WERKS .
Write 😕 L_WA_PLKO-STATU.
2006 May 24 6:49 PM
Hi Sanju,
When i tried using the same select statement, I am getting the status displayed.
I tried both ways and it looks fine.
tables: plko.
data: l_wa_plko type table of plko with header line.
SELECT SINGLE * FROM PLKO INTO L_WA_PLKO
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '00000005' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2000'. "CAUFVD-WERKS .
Write 😕 L_WA_PLKO-STATU.
<b>OR</b>
tables: plko.
SELECT SINGLE * FROM PLKO
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '00000005' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2000'. "CAUFVD-WERKS .
write PLKO-STATU.
check your code one more time as it works for me.
Regards,
Vicky
2006 May 24 5:32 PM
use the conversion exit CONVERSION_EXIT_ALPHA_INPUT to convert the field plnnr before you pass it to the select
2006 May 24 5:33 PM
hi,
the dataelement of PLNNR has conversion exit. so there should be leading zeros. use a variable and the conversion exit FM , you will get result.
Sudheer.A
2006 May 24 5:46 PM
pass this data into a work area of type plko
and then check out
e.g select * into wa_plko
from plko
WHERE PLNTY = 'N' "CAUFVD-PLNTY
AND PLNNR = '00015294' "CAUFVD-PLNNR
AND PLNAL = '01' "CAUFVD-PLNAL
AND WERKS = '2001'. "CAUFVD-WERKS .