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

table relation

Former Member
0 Likes
2,365

Hi all,

can anyone tell tell me the table which would relate

ausp-atwrt and COAS-AUFNR i.e internal order number

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,890

You may want to use a function module to get your characterisitcs instead. COAS is just a db view over the transpart table AUFK, take the AUFNR from this table and hit AFPO also, here you can get the internal object number CUOBJ. Pass this number to the function module below and you will have the characteristics.



* Internal Table for Characteristic Data
  data: ichar type table of comw with header line.

* Retrieve Characteristics.
  call function 'CUD0_GET_VAL_FROM_INSTANCE'
       exporting
            instance           = afpo-cuobj
       tables
            attributes         = ichar
       exceptions
            instance_not_found = 1.

Regards,

Rich Heilman

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,891

You may want to use a function module to get your characterisitcs instead. COAS is just a db view over the transpart table AUFK, take the AUFNR from this table and hit AFPO also, here you can get the internal object number CUOBJ. Pass this number to the function module below and you will have the characteristics.



* Internal Table for Characteristic Data
  data: ichar type table of comw with header line.

* Retrieve Characteristics.
  call function 'CUD0_GET_VAL_FROM_INSTANCE'
       exporting
            instance           = afpo-cuobj
       tables
            attributes         = ichar
       exceptions
            instance_not_found = 1.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,890

It's been a while and my current company doesn't use VC, so I will try to get you started. COAS is a view on AUFK. AUFK will get you to AFPO. AFPO contains a field CUOBJ which is your link into the configuration area. Another way to get to CUOBJ is to look at table INOB with OBTAB = 'AFPO' and OBJEK = <order number>. Remember to include the leading zeroes.

Once you have CUOBJ, go to AUSP with OBJEK = CUOBJ and you will get the current configuration values. The following tables are useful:

CABN - Characteristics

CABNT - Characteristic texts

CAWN - Characteristic Values

CAWNT - Value texts

Read only

0 Likes
1,890

Hi Rich and Michael,

Thanks for your reply's.

Now i have an idea what iam heading to.I checked everything as you guys said.

i could not locate afpo-cuobj for my aufk-aufnr.

But i could find a value in ausp my objek.

Is there any way those two are related,

aufnr from aufk relates to AFPO-CUOBJ AND THEN

AFPO-CUOBJ RELATES TO AUSP-ATWRT.

I dont any data in TABLE AFPO.

I COULD FIND THE VALUE IN AUSP TABLE.

objek field is like FMAREA+FUND.

SO YOU GUYS SUGGEST TO CONCANTENATE AND DIRECTLY HIT ausp table rathering than going to AFPO table.

thanks

waiting for your valuable replies.

Read only

0 Likes
1,890

Sorry, I started you down the production order route. I haven't seen the OBJEK field derived in that fashion. For me, it has always been a an internally generated number. But if that's what you are seeing, go for it. One thing you might want to do is run a performance trace (ST05) as you navigate into the configuration area of your order. That way you can verify the route SAP takes to get to the characteristic values.

Read only

0 Likes
1,890

Hi Michael,

But iam not sure whether OBJEK IAS ALWAYS A COMBINATION OF FM AREA AND FUND.

wHAT IS YOUR SUGGESTIION.iS THIS THE RUGHT WAY.

i HAVE ONE MORE QUESTION WHEN DOES THE AFPO TABLE GET UPDATED ,DOES IT GET UPDATED AS SOON AS AS YOU CREATE AN INTERNAL ORDER in KO01.

i WAS CHECKING THE T CODE FM5S IN WHICH I GIVE FM AREA AND FUND AS MY INPUT AND WHEN I CLICK ENTER AND THE CLASSIFICATION BUTTON ,I CAN THE CHARACTERSTIC VALUE.

wHEN I TRIED TO DEBUG SO AS TO KNOW FROM WHERE HE IS GETTING DATA BUT I COULDN'T FIGURE IT OUT.

lET ME KNOW YOUR SUGGESTIONS

Read only

0 Likes
1,890

I was suggesting performance trace, not debug. That way you can see the order in which SAP accesses the tables as well as what selection criteria is used. Either way, I was able to confirm what you were seeing. You should be able to access the characteristics from AUSP using OBJEK = OR<order number>. Specifically, my trace should the selection as follows:

SELECT * FROM AUSP

WHERE MAFID = 'O'

AND KLART = '013'

AND OBJEK = 'OR000000600000'

Read only

0 Likes
1,890

hi Michael,

Thanks for your time and valuable advice.

I HAVE 2 QUESTIONS

QUESTION 1) WHAT DOES KLART 013 REFER TO.

QUESTION 2) MY REQUIREMENT IS TO DISPLAY AUSP-ATWRT IN THE REPORT GENERATED BY KOK5.

The data from kok5 report is being taken from aufk table.

what i am trying to do is while creating interal order, i would read the ausp-atwrt field and insert it into aufk (user field )field and save it in aufk table.

when executing kok5 for report ,it reads aufk table and displays in my report and i would just change the label for user field so that it would with new label.

My question the objeck field whick is present in ausp table gets data during creation of internal order or when does the the table ausp gets data ,because if its get data during creation of internal order then its meaning less right?

Have a look at t code FM5S ,in which we give the fund and fm area as input and its gives the value of ausp-atwrt in classifcation tab.

Thanks in advance

Read only

0 Likes
1,890

hi

Any advice on this

Thanks

Read only

0 Likes
1,890

KLART is the class type which can be found in table TCLA. The description is "Roll up classes for orders." This should be standard for what you are looking at.

Unfortunately, AUSP wouldn't be updated until after the order is created, so you may need to go with a custom report based on KOK5.