‎2009 Aug 05 8:11 AM
SELECT matnr
charg
CUOBJ_BM
from mch1
INTO TABLE it_mch1
FOR ALL ENTRIES IN it_resb
WHERE matnr = it_resb-matnr
AND charg = it_resb-charg.
IF NOT it_mch1 is INITIAL.
SELECT OBJEK
ATINN
ATWRT
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_mch1
WHERE objek eq V_OBJNR
AND Atinn = 'BIN_LOCATION'.in the above code how i can link between MCH1 and AUSP table....
i tried using OBJEK and CUOBJ_BM but there lengths are different so it is giving error...
can any body help me to get ATWRT value?
‎2009 Aug 05 8:22 AM
Hi,
Try the following,
data: begin of it_mch1 occurs 0,
charg like mch1-charg,
CUOBJ_BM(50) type c,
end of it_mch1.
SELECT matnr
charg
CUOBJ_BM
from mch1
INTO TABLE it_mch1
FOR ALL ENTRIES IN it_resb
WHERE matnr = it_resb-matnr
AND charg = it_resb-charg.
IF NOT it_mch1 is INITIAL.
SELECT OBJEK
ATINN
ATWRT
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_mch1
WHERE objek eq it_mch1-CUOBJ_BM
AND Atinn = 'BIN_LOCATION'.
Regards,
Vik
‎2009 Aug 05 8:17 AM
data:ra_objek type range of ausp-objek.
data:wa_objek like line of ra_objek.
wa_objek-sign = 'I'.
wa_objek-sign = 'EQ'.
loop at it_mch1 into wa_mch1.
wa_objek-low = wa_mch1-CUOBJ_BM.
collect wa_objek into ra_objek .
endloop.
SELECT OBJEK ATINN ATWRT FROM ausp
INTO TABLE it_ausp
WHERE objek in ra_objek
AND Atinn = 'BIN_LOCATION'.
‎2009 Aug 05 8:22 AM
Hi,
Try the following,
data: begin of it_mch1 occurs 0,
charg like mch1-charg,
CUOBJ_BM(50) type c,
end of it_mch1.
SELECT matnr
charg
CUOBJ_BM
from mch1
INTO TABLE it_mch1
FOR ALL ENTRIES IN it_resb
WHERE matnr = it_resb-matnr
AND charg = it_resb-charg.
IF NOT it_mch1 is INITIAL.
SELECT OBJEK
ATINN
ATWRT
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_mch1
WHERE objek eq it_mch1-CUOBJ_BM
AND Atinn = 'BIN_LOCATION'.
Regards,
Vik
‎2009 Aug 05 9:25 AM
hi
i tried as u told...
but im not getting values to it_ausp...
can u help me on this?
Regards
Smitha
‎2009 Aug 05 10:02 AM
Hi ,
I checked in my system and its fetching values for ATWRT
data: begin of it_mch1 occurs 0,
charg like mch1-charg,
CUOBJ_BM(50) type c,
end of it_mch1.
data: begin of it_ausp occurs 0,
OBJEK(50) type c,
ATINN like ausp-atinn,
ATWRT like ausp-atwrt,
end of it_ausp.
SELECT matnr
charg
CUOBJ_BM
from mch1
INTO TABLE it_mch1
FOR ALL ENTRIES IN it_resb
WHERE matnr = it_resb-matnr
AND charg = it_resb-charg.
IF NOT it_mch1 is INITIAL.
SELECT OBJEK
ATINN
ATWRT
FROM ausp
INTO TABLE it_ausp
FOR ALL ENTRIES IN it_mch1
WHERE objek eq it_mch1-CUOBJ_BM
AND Atinn = 'BIN_LOCATION'.
define both OBJEK and CUOBJ_BM as char of length 50 in the internal tables.
Even then if it_ausp is not getting populated, then the other where condition must not been satisfied. Try this and check if valid values are there in the database for Atinn = 'BIN_LOCATION'.
Regards,
Vik
‎2009 Aug 05 8:27 AM
Hi smitha,
why dont you try in the second query where
OBJEK=it_MCH-CUOBJ_BM.
I think this should solve your problem.
Regards
Sunil
‎2009 Aug 05 8:36 AM
You can try out LKENZ field in AUSP & LVORM in MCH1..
I hope this helps...
Regards,
Anupam.
‎2009 Aug 05 9:01 AM
Hi,
If you have Class, Classtype and Object(Matnr), then you can get the values with the below FM
CLAF_CLASSIFICATION_OF_OBJECTS
a. Call the function module CLAF_CLASSIFICATION_OF_OBJECTS with the following input parameters
Class =
Class Type =
Object = (Matnr)
b. Read the table T_OBJECTDATA
Atnam = characteristic name as mentioned in the file format
Ausp1 = read the value and assign the value to the respective field in the output
Regards
Bala Krishna
Edited by: Bala Krishna on Aug 5, 2009 1:35 PM
‎2015 Mar 19 3:21 PM
but i want to know that if our structure is declared with type then what will be the solution for such problem.
pls reply me