‎2007 Jun 29 11:11 PM
Hi,
The matnr exists in the table and it should pull something in, however, the following code is not pulling the matrn:
SELECT SINGLE MATNR FROM MARC
INTO LV_MATNR
WHERE MATNR = XVBAP-MATNR
AND WERKS = XVBAP-WERKS
AND ZZLIFNR = LV_ZZLIFNR.
LV_MATNR is type MARC-MATNR.
The other variables exist and i checked in the table for a record, but it does pull it up.
Thanks,
John
‎2007 Jun 29 11:16 PM
Hi John,
Please check in debugging ,are you getting values from XVBAP-MATNR
XVBAP-WERKS ,LV_ZZLIFNR ?
if so use matnr value - 18 char in query and see the results.
I hope problem might be matnr -> it will have less than 18 char
Thanks
Seshu
‎2007 Jun 29 11:19 PM
Nope, doesn't work. I hardcoded the values in a test program:
data: lv_matnr like marc-matnr.
SELECT single MATNR FROM MARC
INTO LV_MATNR
WHERE MATNR = '000000000001275148'
AND WERKS = '1020'
AND ZZLIFNR = '300276'.
The record exits, but its not pulling a thing.
‎2007 Jun 29 11:22 PM
what is the length of ZZLIFNR -> give all zero's infront of 300276
and see the results
Thanks
Seshu
‎2007 Jun 29 11:24 PM
Hi,
Give the variable values/constant values with correct length so that it would fetch the data. Go to SE11 and check the length and display the data and give the same in condition if there are no conversion exits. Else use conversion exits.
Regards,
Srilatha.
‎2007 Jun 30 1:39 AM
Just looking at ZZLIFNR i assume that it must be a 10 chracter field, to which you should pass a 10 character value(Padded with enouh 0s).
on a side note, you do not need to restrict based on ZZLIFNR at all because, the key for mara is MATNR and WERKS only..
select * from marc into lv_matnr where
matnr = <material> and werks = <Plant>.
if marc-zzlifnr <> <Value you want to compare>.
do some thing.
else.
do something else.
endif.
‎2007 Jun 30 2:00 AM
Hi John,
You should change the values of LIFNR as 0000300276 and check the result.
Regards,
Atish