2023 Jan 31 7:52 AM
2023 Jan 31 11:41 AM
Write the select query with SELECT SINGLE * instead of writing select single with field names.
2023 Jan 31 11:52 AM
Make sure your select statement does return any data.
I'm pretty sure that it doesn't - when typing literal value for MATNR - consisting of numbers only - fill it with zeros on the left so that its 18 characters long - like this:
where MATNR = '000000001100000011'
2023 Jan 31 12:21 PM
Please look at my attachment screenshot-18.png (187.0 kB). i have given right Material No.
2023 Jan 31 1:25 PM
That's what I have already done before - you are trying to compare MATNR with a value made of ten digits.
This may look like a right material number because this is what you can see in SAP GUI - but in the database it is stored as 18-digit number filled with zeros on the left.
Just fll it with additional zeros as I say and try.
Or put the following code after your SELECT statement if you are still not convinced:
if SY-SUBRC <> 0.
WA_MARA-MATNR = 'not found !!!'.
endif.