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: 

How to judge the Inspection lot is closed?

Former Member
0 Kudos

hi, I want to use a BAPI do to results recording in QE51, but when the inspection lot is closed, there will post a error message, but how can I judge whether the Inspection lot is closed?Many thanks!~

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please refer to bapi "BAPI_INSPLOT_GETSTATUS" for populating status of inspection lot.

ISTAT SPRAS TXT04 TXT30

I0046 EN CLSD Closed

I0135 EN CLOS Closed (Standard WBS)

I0452 EN CL Closed

I5618 EN GMCX Closed

I6001 EN Rcp1 Processing Closed

I8902 EN WACS WA-PRO: Closed

Hope that helps.

Regards

Mr Kapadia

***Assigning points is the way to say thanks in SDN.***

Message was edited by:

Mr Kapadia

8 REPLIES 8

Former Member
0 Kudos

check the status of that inspection lot.

Regards

Prabhu

Former Member
0 Kudos

Hi,

Please refer to bapi "BAPI_INSPLOT_GETSTATUS" for populating status of inspection lot.

ISTAT SPRAS TXT04 TXT30

I0046 EN CLSD Closed

I0135 EN CLOS Closed (Standard WBS)

I0452 EN CL Closed

I5618 EN GMCX Closed

I6001 EN Rcp1 Processing Closed

I8902 EN WACS WA-PRO: Closed

Hope that helps.

Regards

Mr Kapadia

***Assigning points is the way to say thanks in SDN.***

Message was edited by:

Mr Kapadia

0 Kudos

hi Mr Kapadia,

Would you please give me more explanation on BAPI "BAPI_INSPLOT_GETSTATUS" ? Many thanks!

0 Kudos

Hi Yu Huali,

Call this as it is a normal function module .

Following is a sample call to it . We dont have qm module implemented now , so sending you a pseudo code and not exact abap code..

data : lv_lot like BAPI2045D_IL0-INSPLOT,
       ls_langu like BAPI2045LA,
       ls_return like BAPIRETURN1,
       lt_sys_stat like BAPI2045SS,
       lt_usr_stat like BAPI2045US.

CALL FUNCTION 'BAPI_INSPLOT_GETSTATUS'
  EXPORTING
    NUMBER              = lv_lot        "insp lot number.
    LANGUAGE            = ls_langu "language parameters 
 IMPORTING
   RETURN              = ls_Return    "return parameter to see any errors
  TABLES
    SYSTEM_STATUS       = lt_sys_stat "Either of these 2 tables should 
    USER_STATUS         = lt_usr_stat.   "Have status closed 

read table lt_sys_stat with key SYS_STATUS = Closed status
if sy-subrc eq 0.
 skip record from the BDC/BAPI
endif.

Hope that helps.

Regards

Mr Kapadia

***Assigning points is the way to say thanks in SDN.***

0 Kudos

Hi Mr Kapadia,

But how do I know that the inspection lot is closed?

From the following, I know that when SYS_S = 'I0218', it means the Usage decision has been made. But which value means the inspection lot is 'closed'?

Many many thanks!

SYS_S SY_S SY_ST_DSCR

I0203 SPRQ Quantity posting required

I0205 PASG Plan/specification assigned

I0206 CCTD Insp. characteristics created

I0207 CALC Sample calculated

I0210 PRSI Sample drawing instr. printed

I0211 PRII Inspection instruction printe

I0216 STIC Short-term insp. completed

I0217 ICCO All inspections completed

I0218 UD Usage decision has been made

I0220 SPCO Stock posting completed

I0221 STUP Statistics updated

Former Member
0 Kudos

Hi,

You can simply get the Inspection Lot Status from JEST table .

Pass the field QALS-OBJNR to the table JEST and get the status.

See the Status Texts in TJ02T table,

reward if sueful

regards,

Anji

Former Member
0 Kudos

Hello,

you can use the function module BAPI_INSPOPER_GETDETAIL.

You need the inspection lot number, operation.

Tick the checkkbox 'read_char_results'.

in table char_results you will get back entries. if the operation is already closed, char_results-close is set to 'X'.

Kind regards,

JP

Former Member
0 Kudos

I'm hitchhiking on this thread.

I need to know not only that the inspection lot is cancelled (I get this on JEST table), but also when it was cancelled. For ex. on monday night I loaded from QM to BW an inspection lot that was registered during the day. This lot was cancelled for ex. on thursday. At the night load I have to identify it and load the lot to BW, to maintain is as cancelled also in BW.

What I discovered until now:

- The OBJNR on QALS is the constant "QL" plus the lot number (prueflos).

- On JEST table I have all my lots (from QALS), with the correct status. The cancelled lots have STAT = I0224. But the table doesn't have the cancelling date.

- JCDS table seems to be a good chance, it has status and date fields. But my lots (from QALS) are not there. And, curious, I didn't find any I0224 status.

Everything on the project is OK, this is the only unsolved question, so I'll appreciate any quick answer.

César