Application Development 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: 

PM_ORDER_DATA_READ running too long

Former Member
0 Kudos

I'm using the FM - PM_ORDER_DATA_READ to extract workorder data for divestiture. But the program execution time is running over few days due to the

LOOP AT icaufv-aufnr.

Another thing I have noticed - Unless the FM is run as a backgroud job for large data, SAP errors 'out of memory'.

Can anyone suggest how to extract all workorder info and quicken the execution time?

Thanks

G

5 REPLIES 5

Former Member
0 Kudos

Instead of using the FM, select the data directly from <b>AUFK - Order master data</b> table.

This problem is due the long execution time.

Basis people will set the execution time for the program, say 10 minutes or 20 minutes. If it exceeds it will through the error.

If the table AUFK doesn't contain all the data, chek the FM in debugging mode and see what are all the tables/ select queries SAP is using and get the data from those tables.

If u directly selecting the data table u can directly use <b>for all entries</b> in the select query.

Regards,

Prakash.

Former Member
0 Kudos

The required fields are all not in AUFK.

Here is the list of fields -

caufv-aufnr

caufv-werks

caufv-plnty

caufv-plnnr

caufv-plnal

caufv-aufpl

caufv-rsnum

caufv-gltrp

caufv-gstrp

caufv-gltrs

caufv-gstrs

caufv-gltri

caufv-gstri

caufv-auart

caufv-ktext

[???]-priok

[???]-equnr

[???]-bautl

[???]-iloan

[???]-iwerk

[???]-ingpr

[???]-gewrk

[???]-ilart

[???]-vawrk

[???]-vaplz

From which tables can I select the [???]-fields, satisfying the werks = <..>and aufnr = <..> conditions?

0 Kudos

I am not sure of this table Ganadeep. But what u can do is execute the FM in debugging mode by giving the aufnr keep break point like this Breakpoint -> Breakpoints at -> Type <b>Select</b> and press enter. Now press F8 it will stop at all the select queries, so check what are the tables they are using to get the data.

Hope it is useful.

Regards,

Prakash.

Former Member
0 Kudos

Have you checked OSS notes? Look at 399420.

Rob

Former Member
0 Kudos

Thanks a lot guys.

I'm looking into the OSS notes.

The db tables for [???]-fields are AFIH and HIKO. This solves the problem for now as now I can extract same results without the FM.