cancel
Showing results for 
Search instead for 
Did you mean: 

Get WO in TECO Status using BAPI_ALM_ORDERHEAD_GET_LIST

Former Member
0 Kudos

Hi All,

I need to pull Work Order details that are in TECO status using BAPI "BAPI_ALM_ORDERHEAD_GET_LIST". Below are the inputs i am passing at IT_RANGES table.

OPTIONS_FOR_PLANPLANT I EQ Plantname

OPTIONS_FOR_FUNCLOC I EQ Functional Location name

OPTIONS_FOR_EQUIPMENT I EQ Equipment number

SHOW_COMPLETED_DOCUMENTS I EQ X

I am getting results at ET_RESULT table. But it will list Work order that are in "REL" status too. I need only "TECO" status.

Kindly help me to get.

Thanks

Rajesh.S

Accepted Solutions (1)

Accepted Solutions (1)

peter_atkin
Active Contributor
0 Kudos

What input parameters are you using?

I don't have access to a system right now, but check to see if field IPHAS is available in the input parameters.

The Domain values will tell what to enter for TECO.

PeteA

Former Member
0 Kudos

Hi,

Tested the IPHAS field in table AFIH. Teco value is 3 (Technically completed). Looks table entry is fine.

Let us know is there is any other option to proceed with.

Thanks

Rajesh.S

Former Member
0 Kudos

Hi All,

I can get TECO status from BAPI "BAPI_ALM_ORDERHEAD_GET_LIST" by passing below parameters.

SHOW_COMPLETED_DOCUMENTS I EQ X

OPTIONS_FOR_STATUS_INCLUSIVE I EQ TECO

Thanks

Rajesh.S

peter_atkin
Active Contributor
0 Kudos

Just for information. The following IT_RANGES fields map to the IW38 checkboxes at the top of the selection-screen:

SHOW_DOCUMENTS_IN_PROCESS IW38 - Outstanding (CRTD)

SHOW_OPEN_DOCUMENTS IW38 - In process (REL)

SHOW_COMPLETED_DOCUMENTS IW38 - Completed (TECO and CLSD)

SHOW_HISTORICAL_DOCUMENTS IW38 - Historical

If you want to select TECO/CLSD orders, then you would use the following in IT_RANGES:

SHOW_DOCUMENTS_IN_PROCESS I EQ

SHOW_OPEN_DOCUMENTS I EQ

SHOW_COMPLETED_DOCUMENTS I EQ X

SHOW_HISTORICAL_DOCUMENTS I EQ

As you then said, you need to filter out the CLSD statuses using:

OPTIONS_FOR_STATUS_INCLUSIVE I EQ TECO

I suspect this would be a more efficient way of selecting the data, but you'd need to check.

PeteA

Answers (0)