‎2007 Dec 17 7:24 AM
Hi experts,
Can neone plz send me the code for linking the two tables CABN n AUSP so dat i want to fetch the data from AUSP according to the Internal Character of CABN.
The data is stored in AUSP abt d classification of a particular material.
n i want to fetch these classification acc. to the material code stored in VBAP-MATNR.
Thanks n Regards,
Purva
‎2007 Dec 18 4:09 PM
steps:
1. suppose all materials are in the table GT_vbap.
2. select all Internal object numbers corresponding to the material in GT_vbap table from MARA.
SELECT matnr cuobf
FROM mara
INTO TABLE gt_mara
for all entries in gt_vbap
WHERE matnr = gt_vbap-matnr.
3. modify the gt_mara to overcome the type conflict for further steps.
LOOP AT gt_mara into wa_mara.
MOVE wa_mara-cuobf TO wa_mara-objek(of type cabn-objek).
modify gt_mara from wa_mara transporting objek.
ENDLOOP.
4. get the characteristic value from the CABN table:
select atinn
from cabn
into gv_atinn
where atnam = give the characterstic value
5. select data from AUSP
SELECT objek atinn atwrt
FROM ausp
INTO TABLE gt_ausp
FOR ALL ENTRIES IN gt_mara
WHERE objek = gt_mara-objek
AND atinn = gv_atinn(characteristic name ) .
populate final internal tables based on all these tables.
‎2007 Dec 19 6:31 AM
Hi,
I used d code dat u gave.
But d prob is it does not move the value of cuobf into objek.
Even if the value gets updated in d objek, den cn u plz tel me how cm dis piece of code vil b useful 4 me?????
because i want to print all the classifications regarding all the materials in d sales order.
n each material has got about 7 classifications which r stored in d same field dat is ausp-atwrt.
The value of cubof in the mara table is 0 for all the materials.
Plz help me to solve my doubts.Its urgent.
Thanks.
‎2008 Jan 04 5:37 AM
Hi purva ,
If you have solved this problem please send me the code because i need to solve same type problem
Regards
Ahaypandey
mail: itsajaypandey@yahoo.co.in