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

Extraction/Loading depedencies

Former Member
0 Likes
1,607

Hi,

I need to laod object dependencies in to new system 5.0.

I would like to know from which tables object dependencies data/values should be taken.

and how do we load these object dependencies..?can I load through LSMW..?

Any inputs would be appreciated.

Best Regards,

Satish

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,189

As I mentioned in your other post, you can get the dependencies from the DB in the following fashion.

<i>You can make the link from your BOM items by linking STPO field KNOBJ to CUOB-KNOBJ. You will use "STPO" for the KNTAB field. Then go to CUKB to get the dependency name.

Here is a quick and dirty sample.</i>



 report zrich_0001.

 data: xmast type mast.
 data: xstpo type stpo.
 data: xcuob type cuob.
 data: xcukb type cukb.

 parameters: p_matnr type mast-matnr,
             p_werks type mast-werks,
             p_idnrk type stpo-idnrk.


 clear xmast.
 select single * from mast into xmast
           where matnr = p_matnr
             and werks = p_werks.


 clear xstpo.
 select single * from stpo into xstpo
        where stlty = 'M'
          and stlnr = xmast-stlnr
          and idnrk = p_idnrk.

 clear xcuob.
 select single * from cuob into xcuob
           where kntab = 'STPO'
             and knobj = xstpo-knobj.

 clear xcukb.
 select single * from cukb into xcukb
           where knnum = xcuob-knnum.


 write:/ xmast-matnr, xmast-werks, xstpo-idnrk, xcukb-knnam.

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,190

As I mentioned in your other post, you can get the dependencies from the DB in the following fashion.

<i>You can make the link from your BOM items by linking STPO field KNOBJ to CUOB-KNOBJ. You will use "STPO" for the KNTAB field. Then go to CUKB to get the dependency name.

Here is a quick and dirty sample.</i>



 report zrich_0001.

 data: xmast type mast.
 data: xstpo type stpo.
 data: xcuob type cuob.
 data: xcukb type cukb.

 parameters: p_matnr type mast-matnr,
             p_werks type mast-werks,
             p_idnrk type stpo-idnrk.


 clear xmast.
 select single * from mast into xmast
           where matnr = p_matnr
             and werks = p_werks.


 clear xstpo.
 select single * from stpo into xstpo
        where stlty = 'M'
          and stlnr = xmast-stlnr
          and idnrk = p_idnrk.

 clear xcuob.
 select single * from cuob into xcuob
           where kntab = 'STPO'
             and knobj = xstpo-knobj.

 clear xcukb.
 select single * from cukb into xcukb
           where knnum = xcuob-knnum.


 write:/ xmast-matnr, xmast-werks, xstpo-idnrk, xcukb-knnam.

Regards,

Rich Heilman

Read only

0 Likes
1,189

Maybe you can do a BDC over tranaction CU01. Not sure if it will work good or not.

Regards,

Rich Heilman

Read only

0 Likes
1,189

Maybe you could get away with using the function module CUKD_API_DEP_MAINTAIN

Regards,

Rich heilman

Read only

0 Likes
1,189

You can read existing dependencies using the function module CUKD_API_DEP_READ

Regards,

Rich Heilman