cancel
Showing results for 
Search instead for 
Did you mean: 

To fetch archived data

Former Member
0 Kudos

Hi experts,

I need to fetch the repair cost of workorder which is archived.I am able to fetch the workorder which is archived by replaceing the select query with /N/PBS/SELECT_INTO_TABLE FM.but unable to replace the select query

SELECT * FROM pmco

INTO TABLE i_pmco

FOR ALL ENTRIES IN i_objnr

WHERE objnr = i_objnr-objnr

AND cocur = 'USD'

AND beltp = '1'

AND wrttp = '04'

AND versn = '000'.

through which the repair cost is generating if anybody knows how to replace this query or any other FM to replace this query and fetch the repair cost.Let me know about it.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

i found the solution to resolve this issue, i used some functionality from the standard program /pbs/cpmo_read_sample_ih0 which is reading the arch_idx-object,arch_idx-offset,arch_idx-archivekey, for archived workorders and fetching it to a intenal table.after that i am reading this from archived data and populating the repair cost from there.

Thanks

Former Member
0 Kudos

Hi experts,

I need to fetch the repair cost of workorder which is archived.I am able to fetch the workorder which is archived by replaceing the select query with /N/PBS/SELECT_INTO_TABLE FM.but unable to replace the select query

SELECT * FROM pmco

INTO TABLE i_pmco

FOR ALL ENTRIES IN i_objnr

WHERE objnr = i_objnr-objnr

AND cocur = 'USD'

AND beltp = '1'

AND wrttp = '04'

AND versn = '000'.

through which the repair cost is generating if anybody knows how to replace this query or any other FM to replace this query and fetch the repair cost.Let me know about it.

Thanks

Former Member
0 Kudos

HI,

Not really sure what you mean.

/N/PBS/SELECT_INTO_TABLE is not a transaction, this is a function and can be called using se37 using /PBS/SELECT_INTO_TABLE. This is a general call function to get archived data.

What I don't understand is what this has to do with the select? The select is not part of the call function.

The call function should be called after the select to get the archived data from PM_ORDER.

regards

Mark

Edited by: Mark Wright on Jun 19, 2009 11:15 AM

Former Member
0 Kudos

Hi,

I want to fetch the repair cost of archived work order.The select query is fetching the repair cost of online workorder not the archived workorder.Through that FM we can retrive but this FM is not working for PMCO table.So i need some different way to retrive the repair cost. I am aware of PM_ORDER object through which we are archiving workorders. But i need a way through which i can retrive the repair cost of archived workorder.

Former Member
0 Kudos

Hi,

As you had mentioned the PBS call function /PBS/Select_into_table, I am assuming that you want to read archivied data in the PBS archive and not in th estandard SAP archives.

Try using the call function /PBS/CPMO_SELECT_INTO_TABLE to get your archived data.

Regards

mark