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

Create a program, based on a report painter query

Former Member
0 Likes
2,227

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á

1 ACCEPTED SOLUTION
Read only

GauthamV
Active Contributor
0 Likes
1,532

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.

8 REPLIES 8
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,532

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

Read only

0 Likes
1,532

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.

Read only

0 Likes
1,532

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.

Read only

0 Likes
1,532

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

Read only

0 Likes
1,532

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

Read only

GauthamV
Active Contributor
0 Likes
1,533

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.

Read only

Former Member
0 Likes
1,532

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

Read only

Former Member
0 Likes
1,532

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