cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Work Order Set Do Not Execute

karthik_snair
Participant
0 Kudos

Hi folks,

I want to set Do not Execute to Work Order.

For that there is no option given in the BAPI_ALM_ORDER_MAINTAIN.

So when i checked, while setting the Do not execute to Work Order, it is actually setting the

1) WO User Status as CNCL,

2) then setting all the WO operation System Status as TECO and

3) then WO header System Status as not Completed and

4) finally setting the  WO header User Status as closed.

So i did the same thing using the function Modules.

The Status is setting, But still the WO can be edited.

Usually once the do not execute, it will not allow any further changes to that Order.

So i want to achieve the same.

Is there any other FM to set the status as Do not execute??

Please let me know how can i achieve this.

Thanks!

Karthik.S

Accepted Solutions (1)

Accepted Solutions (1)

karthik_snair
Participant
0 Kudos

Hi Jogeswara,

I want to achieve that standard functionality that once the status are set, it should not be able to edit further.

Means while going inside IW32 itself, it should show only in display mode.

And i don't want to throw any message as you described above.

I think i need some technical advice here.technically how can i achieve this.I am debugging this.But luck yet!!

I think in standard while setting that Do not execute to WO, Along with that they are setting some flag.The same if we could update, it will come in display mode and nothing to be done with the screen restriction.

But to which flag i have to update?? that i am checking??Please suggest.

Thanks!

Karthik.S

jogeswararao_kavala
Active Contributor
0 Kudos

The above solution gives this. It gives non-editable IW32 once the desired system status is set. Probably you have gone through all the replies of the thread referred. I am referring to this part only.


A have implemented enhancement  in functiom group COIH :

 

enhancement 122  zpm_mvob_stat.    "active version

data: ls_jest type jest,

       lt_status type standard table of jstat.

field-symbols : <wa_status> like line of lt_status,

                <fs_tc10> type any.

if caufvd-auart = 'INSP' and sy-tcode = 'IW32'.

   call function 'STATUS_READ'

     exporting

*     CLIENT                 = SY-MANDT

       objnr                  = caufvd-objnr

      only_active            = 'X'

*   IMPORTING

*     OBTYP                  =

*     STSMA                  =

*     STONR                  =

    tables

      status                 = lt_status

    exceptions

      object_not_found       = 1

      others                 = 2

             .

   if sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

   endif.

   loop at lt_status assigning <wa_status> where stat = 'IWA05'.

     assign 'TC10' to <fs_tc10>.

     check sy-subrc = 0.

     tc10-trtyp = 'A'. " replace 'V' by 'A'

     message s122(zpm).

   endloop.

endif.

endenhancement.

*$*$-End:   (1 )--------------------------------------------------------------------------------$*$*

endform.                               " ABLAUF

This code in enhancement spot in SAPLCOIH program makes IW32 to Display mode. In the above code status code IWA05 will be replace by your status code i.e., I0015.

stephan_bantlin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

this now possible in EHP6 and EHP7

see SAP Note 1991913

thanks

Stephan Bantlin

karthik_snair
Participant
0 Kudos

Hi Stephan,

Thank You,I have implemented this note successfully.But still the Work Order is in editable mode even after the status is set to NCMP.

I think this Note is not working my my scenario.

Let me try what Jogeswara has suggested.

Thanks!

Karthik.S

karthik_snair
Participant
0 Kudos

Is this an implicit enhancement that i need to create or there is any explicit sports that the SAP has given?Please let me know.

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Karthik,

Sharing the picture of Enhancement spot, I tested for this effect (COIH Finction Group). As shown it is in the Include LCOIHF7R. Also attached the code I used in include Z_COIH. (This was a test which turns the Order to Display mode as soon as it gets REL status).



Note:

The message 000 of ZPM Class used above reads 'Changing to Display'



KJogeswaraRao

karthik_snair
Participant
0 Kudos

Thank You your suggestion is working!!

But i am thinking why this SAP Note 1991913 is not working?? Even though it is written, this note is used to rectify this issue?

Thanks,

Karthik.S

jogeswararao_kavala
Active Contributor
0 Kudos

I am presently unable to implement/comment on this note Karthik.

Regards

KJogeswaraRao

karthik_snair
Participant
0 Kudos

Hi Stephan,

When i am opening the WO which is closed, i am getting an message

Notification is completed -> can only be displayed

after implementation of this Note.Why this gives notification message when opening an Work Order??

And the Work Order is still in editable mode.

See i have implemented all the notes as below.

And i have executed the following reports as suggested in the Notes.

NOTE_2027834 & NOTE_2027616.

But still the functionality is not able to achieve??

Please let me know your comments on this

Thanks,

Karthik.S

stephan_bantlin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

the do not execute function is doing the same functionality like technically complete. As in technically complete you can still change you have to set the status Business complete.

This is also possible via BAPI.

thanks

Stephan

karthik_snair
Participant
0 Kudos

Hi,

How can i set the status as Business Complete??

Thanks!

Karthik.S

jogeswararao_kavala
Active Contributor
0 Kudos

It is CLSD status (code I0046). What I saw was, even after this setting through FMs the Order happens to be in editable mode.

stephan_bantlin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

In case of errors please open a Ticket. Than SAP can investigate

thanks

Stephan

Answers (3)

Answers (3)

stephan_bantlin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

please check the following:

Use SAP GUI transaction IW32. Is the order editable?

Use WebUI : Is the order editable

In both cases the order shall not be editable.

thanks

Stephan

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Karthik,

I feel, your issue can be managed like this.

1. Change the Order status to NCMP using fm STATUS_CHANGE_INTERN (Status code to be used in the fm table is I0015)

2. In combination to this you have to use Enhancement spot of program SAPLCOIH to change the editable mode of Order to Display mode because it is in NCMP status.

How to do that (Converting Order to Display mode depending upon a status), has been explained here in this discussion at the bottom of the thread by

Hope this would help you.

KJogeswaraRao

Former Member
0 Kudos

This message was moderated.

paul_meehan
Advisor
Advisor
0 Kudos

Hi,

No there is no single function module that sets 'do not execute'. It appears you have used some internal SAP functions (not released for customer use) to preform this process. This has done part of the job but probably not updated all the status values - therefore you can still change the order.

Best advice would be to not create a option to do this. Limit this feature to IW32 transaction.

-Paul