‎2008 Aug 14 9:42 AM
Hi!
I would like to create a program, which contains the same data, what I can get from a report, which is made by report painter in transaction GRR2. The given report is for checking the service orders.
This report has a key (order number) and additional columns, like material cost, personal cost, external service cost, money income, etc...
I would like to know, how can I identify the tables, columns and table entries, where these values come from?
How can I retrieve from the SAP, for example the material cost of the service orders?
And of course with the less hard-coding.
Thank you
Tamá
‎2008 Aug 14 9:55 AM
hi,
the standard library for service orders in GRR1 is 6CR.
Goto GRR2, click on 6CR ,right click and give create report.
there give ur zname for report,double click on any row it will show u available fields in the library for service orders ,select them and create ur own report.
mostly all the tables used in report painter r related to controlling only.
‎2008 Aug 14 9:47 AM
You could try to launch the generated report under SE30, then analyze the result which give you the database table read from and the function modules used.
You could also use trace ST05, but this will give you only the tables?
Or you could duplicate the program, but it will not be easily maintained.
For the costs look at table PMCO. (or at the CO tables COSS and COSP)
Regards
‎2008 Aug 14 9:57 AM
Thanks, for the info.
I used ST05, but it gave me only the COSP table, which can be useful, but not enough. It contains only the costart (KSTAR) and I don't know, which costarts can be attached to the material costs, which costart to the services, etc...
PMCO seems good also, there's a field, called ACPOS, but of course I don't know, where can I find a table, which contains the description of it's values.
‎2008 Aug 14 10:12 AM
COSP table contains only the costart (KSTAR) and I don't know, which costarts can be attached to the material costs, which costarts to the services, which costarts belong to the money income, etc...
PMCO is - unfortunately - not enough.
‎2008 Aug 14 10:34 AM
How to find the cost element to filter
- Ask your FI-CO team.
- Analyze the Customizing (IMG): "Materials Management", "Valuation and Account Assignment", "Account Determination" to find the cost element/account used for MM. go to "Account Determination Without Wizard", "Configure Automatic Postings"
- Look at table T030 which links Operation/Transaction key and Account, and filter KTOSL on Operation Group T030A-GRUP = 'RMK' for MM.
Ask also the CO team if they maintain a hierarchy of cost element that you could use in your report.
Also use SE30, when analysing the result you could find the way used by the generated program to spread the cost elements in column.
Regards
‎2008 Aug 14 10:50 AM
Field ACPOS is in table TPIR2 "Value Categories", text table TPIR2T "Texts for Value Categories"
This table is maintained in IMG : Plant Maintenance and Customer Service, Maintenance and Service Processing, Basic Settings, Settings for Display of Costs, Maintain Value Categories(V_TPIR2_PM).and Assign Cost Elements to Value Categories (V_TPIK3) so you can even use it with COSP/COSS.
Regards
‎2008 Aug 14 9:55 AM
hi,
the standard library for service orders in GRR1 is 6CR.
Goto GRR2, click on 6CR ,right click and give create report.
there give ur zname for report,double click on any row it will show u available fields in the library for service orders ,select them and create ur own report.
mostly all the tables used in report painter r related to controlling only.
‎2008 Aug 14 9:58 AM
Hi,
After you have copied your program from GRR2 , execute it.
Then go to the System -->Status.
Here you can find SAP Data block and there you can see the Program.
Copy that program name and goto SE38 and display that program.
U can find all your tables used in the program
Thanks,
Bhupal
‎2008 Aug 14 1:42 PM
They are called sets and they can be found in the following tables: SETHEADER, SETNODE, SETLEAF.
They can be maintained in KAH3 transaction
And of course there is a good FM to retrieve them: K_HIERARCHY_TABLES_READ
Thank you Tamás, you helped me a lot