Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Programmin querry

Former Member
0 Likes
480

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

3 REPLIES 3
Read only

Former Member
0 Likes
458

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.

Read only

0 Likes
458

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.

Read only

Former Member
0 Likes
458

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