cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the Table in extractor ?

Former Member
0 Kudos

Hi experts,

I would like to know how to find out the table involved for extraction for a datasource which is being extracted by function module?

In this case i would like to know Table involved in FM BWSM_PM_GET_ORDCST?

Thanks in advance

arun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Explaination given was really good. I understood the COSS and COSP has the same structure and COSP is the main table for PM extraction. Is that right?

I just want to understand how the key figures for 16 periods are aggregated.

In the Base FM "BWOM_RS_GET_ORDCST",

APPEND_FIELDLIST: 'OBJNR',

'GJAHR',

'WRTTP',

'VERSN',

'KSTAR',

'VRGNG',

'BEKNZ',

'TWAER',

'PERBL',

'MEINH',

'WTG+++',

'WOG+++',

'WKG+++',

'MEG+++',

'PAROB',

'BELTP',

'HRKFT'.

...get data...........................................................

GET_DATA.

But in the actual extract structure i have only one amount key figure. Based on what i can extract only the Value CO Currency amount "WKG+++" data?

Is there any document available to explain Order cost and allocation extraction?

Thank you

arun

Message was edited by: Arun Prasad

Former Member
0 Kudos

COSS is for costs from intra company business, e.g. activites from cost centers.

COSP is for primary costs like external materials you needed to purchase.

The logic is the following:

In COSS and COSP you have 48 fields 'WKG++', WOG++ and WTG+++. In BW you get up to 48 lines out of one line in COSS or COSP. The +++ is filled into 0FISCPER3 and the field group is filled into the currency type 0CURTYPE.

WKG = 0CURTYPE 20

WOG = 10

WTG = 0

Hope this helps.

GET_DATA btw is a macro. You can do a double click on it to get to the coding.

Best regards

Dirk

Answers (8)

Answers (8)

Former Member
0 Kudos

I had a similar problem in trying to research the documentation. Since there was no definitive answer, I asked SAP, after all they should provide this information as apart of delivery of business content....their response:

Dear Customer,

Please find the developer reply for your query.

**************

0PM_OM_OPA_1 uses the same extract structure as 0CO_OM_OPA_1.

Fields in the extract structure comes from the same tables as

0CO_OM_OPA_1. Therefore you can look at documentation of 0CO_OM_OPA_1

after these fields.

******************

Hope this helps.

Former Member
0 Kudos

Hi,

Both 0PM_OM_OPA_1(PM order) and 0CO_OM_OPA_1(Internal Order) internally access "BWOM_RS_GET_ORDCST".Also the extract structure is same "ICORDCST"

How will both have the same extractor and structure?

How to find out the data is extracted for PM order or Internal order?

can someone answer this question? Have someone done Order : Cost and allocation analysis?

Thank you

arun

Former Member
0 Kudos

Hi Arun,

both PM orders and CO orders are stored in the tables COSS and COSP in the field OBJNR (CO object number). the same gost for cost centers, activity types, business processes etc. The extractor identifies the orders by the prefix OR followed by the order number. To distict CO orders from PM orders there is the field order category in the table AUFK. R/3 uses this field to separate the orders.

You don't enhance these extractors via LO cockpit but directly in the post-processing of data sources.

Best regards

Dirk

Former Member
0 Kudos

Hi Dirk Herzog,

I just want to understand how this cost and allocation analysis is done for all kinds of Orders. As you have specified they access the same COSS and COSP tables for all kind of orders.

I don't think this two tables have details about PM Maintenance order 0PM_ORDER, 0EQUIPMENT etc. From which table this details will be extracted.

One more question where do i modify the extract structure for this cost and allocation datasource? It doesn't come with LO cockpit.

Thank you

arun

Message was edited by: Arun Prasad

Former Member
0 Kudos

Hello Arun

This is the problem - the data is extracted by the ABAP code, therefore it may not be a "simple" select as we are used in a custom extractor (which involves only one table)

But if you find a better way, please share that information - it would be very interesting

Good luck and regards

Ioan

Former Member
0 Kudos

Hi,

I already have the extractor name. In this case it is "BWSM_PM_GET_ORDCST". The code is really drilleddown confusing to find out the select statement which exactly provides the data for PM Order : Cost and allocation.

Is there any other way to find out the table or someone let me know for me?

Thanks in advance

arun

Former Member
0 Kudos

Hi Arun,

the data is extracted from the tables COSS (Secondary costs) and COSP (primary costs).

Best regards

Dirk

Former Member
0 Kudos

Hello Arun

The only way I see:

- go to SE16 and key in ROOSOURCE as table name

- browse the table for you extractor name and OBJVERS = "A" (you should get only one record)

- you can then get the name of the abap program triggered by the extractor in the column "EXTRACTOR"

You can then check the code of this program to see the tables involved. May be hard though as usually delivered extractors use "generic" code

Good luck

Ioan

Former Member
0 Kudos

Hi,

I meant about the actual table from which the Cost data for this PM Extractor is extracted from.Is there any way to find out the tables It looks like lot of tables COSP, COSS,COST etc. FM really drillsdown to lot of levels and it is really confusing to find the actual select statement for the involved table.

I didn't mean the Table structures involved in the Function module

Can someone help in this?

Thanks in advance

arun

mstrein
Active Participant
0 Kudos

Hi Arun,

go to se37 enter the FM and display the code.

*" TABLES

*" I_T_SELECT TYPE SBIWA_T_SELECT OPTIONAL

*" I_T_SELECTED_FIELDS TYPE SBIWA_T_FIELDS OPTIONAL

*" E_T_ICORDCST STRUCTURE ICORDCST OPTIONAL

hope that helped,

Michael