‎2006 Aug 04 11:53 AM
hi friends,
Could u please send me the details how can we write this type query
Select the Characteristic Value (AUSP-ATWRT), where the Internal characteristic(AUSP-ATINN) equals AVE_TABLET_WEIGHT, the Class type (AUSP-KLART) equals 023, and the Object(AUSP-OBJEK) = the material numbers Finished product material number(MARA-MATNR).
To find this, remove the last 3 digits from the material number.
Ex.
0378-0457-01-C1
0378-0457-01
Regards
srinu
‎2006 Aug 04 11:58 AM
hi ,
to remove last 3 digits do like this:
data : x type i,
matnr1 type mara-matnr.
x = strlen (mara-matnr).
x = x - 3.
matnr1 = mara-matnr + 0(X).
select atwrt
from ausp
into v_atwrt
where atinn = 'AVE_TABLET_WEIGHT and
klart = '023'
objek = matnr1.
endselect.
Regards
Ashok P
‎2006 Aug 04 11:58 AM
hi ,
to remove last 3 digits do like this:
data : x type i,
matnr1 type mara-matnr.
x = strlen (mara-matnr).
x = x - 3.
matnr1 = mara-matnr + 0(X).
select atwrt
from ausp
into v_atwrt
where atinn = 'AVE_TABLET_WEIGHT and
klart = '023'
objek = matnr1.
endselect.
Regards
Ashok P
‎2006 Aug 04 11:59 AM
DATA : V_ATWRT TYPE AUSP-ATWRT,
V_MATNR TYPE MARA-MATNR,
V_STRLEN TYPE I.
*-This code is to fetch the material no (except the last 3 characters)
v_strlen = strlen( MARA-MATNR ).
v_strlen = v_strlen - 3.
v_matnr = mara-matnr+0(v_strlen).
*--here V_MATNR Will have material no except the last 3 characters.
select SINGLE ATWRT
INTO V_ATWRT
FROM AUSP
WHERE ATINN = AVE_TABLET_WEIGHT
AND KLART = '023'
AND OBJEK = V_MATNR.
IF SY-SUBRC = 0.
WRITE 😕 V_ATWRT.
ENDIF.
check this code, & let us know, if you need any help further.
regards
srikanth
Message was edited by: Srikanth Kidambi
Message was edited by: Srikanth Kidambi