cancel
Showing results for 
Search instead for 
Did you mean: 

IW32 validation in for tab "Operation"

Former Member
0 Kudos

I want a validation in the action of removing the transaction "IW32" tab "operations" have tested different user exit however nothing meets my need, all I tested are not executed at the time of removal.
Any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

For the record, I got a resolution to the issue. It was necessary to create an "enhancement" in LCODTU03 include used by this transaction, in last place, with the code below.


DATA: BEGIN OF WL_EKPO,
         EREKZ TYPE EKPO-EREKZ,
         ELIKZ TYPE EKPO-ELIKZ,
         BNFPO TYPE EKPO-BNFPO,
         BANFN TYPE BANFN,
       END OF WL_EKPO,

       BEGIN OF WL_EBAN,
         BANFN TYPE EBAN-BANFN,
         EBELN TYPE EBAN-EBELN,
         FRGZU TYPE EBAN-FRGZU,
         BNFPO TYPE EBAN-BNFPO,
       END OF WL_EBAN.

   DATA: VMSG    TYPE BAPI_MSG.

   IF ( SY-TCODE EQ 'IW32' )
   AND ( SY-UCOMM EQ 'OPT1' )
   AND ( AFVGD-BANFN IS NOT INITIAL ).
     SELECT SINGLE BANFN EBELN FRGZU BNFPO
       FROM EBAN
       INTO CORRESPONDING FIELDS OF WL_EBAN
       WHERE BANFN = AFVGD-BANFN
        AND  BNFPO = AFVGD-VORNR.

     CHECK SY-SUBRC IS INITIAL.

     IF WL_EBAN-FRGZU = 'X'.
       SELECT SINGLE EREKZ ELIKZ BNFPO BANFN
         FROM EKPO
         INTO CORRESPONDING FIELDS OF WL_EKPO
         WHERE BANFN = WL_EBAN-BANFN
          AND  BNFPO = WL_EBAN-BNFPO.

       IF SY-SUBRC IS INITIAL.
         CONCATENATE 'Existem requisição aprovada (' WL_EBAN-BANFN '), pedido (' WL_EBAN-EBELN ') para o componente ('WL_EBAN-BNFPO').' INTO VMSG.
         MESSAGE VMSG TYPE 'I'.
         SUBRC = 4.
         MESSAGE E398(00) WITH 'Não foi possível eliminar o item.'.
       ELSE.
         CONCATENATE 'Existem requisição aprovada (' WL_EBAN-BANFN ') para o componente ('WL_EBAN-BNFPO').' INTO VMSG.
         MESSAGE VMSG TYPE 'I'.
         SUBRC = 4.
         MESSAGE E398(00) WITH 'Não foi possível eliminar o item.'.
       ENDIF.
     ENDIF.
   ENDIF.


Grateful for everyone's help;

Answers (6)

Answers (6)

peter_atkin
Active Contributor
0 Kudos

Marcos,

Useful info:

It looks like you will need to develop a solution as there doesn't appear to be an authorisation-check when deleting operations.

This check could be performed at SAVE via user-exit IWO10009 (see transaction SMOD).

PeteA

Former Member
0 Kudos

what I need is a validation when you click this button, check that the request open for this operation, if there is stop the process there. I tried some user exit as did the Components tab, but I could not anything.

peter_atkin
Active Contributor
0 Kudos

Marcos,

Have a look at user-exit IWO10006 (Fcode exclusion through cust. enhancement) via transaction SMOD.

PeteA

Former Member
0 Kudos

Okay, had found this exit however it can not determine that the selected item in the grid above. Is there any way?

peter_atkin
Active Contributor
0 Kudos

Marcos,

It looks like you need to add value "LOEA" to the exclusion table FCODE_EXC_CUST.

And by using a customer-specific Authorisation-Object you will then hide this button for specific users.

PeteA

Former Member
0 Kudos

But for my case it is necessary to lock in a specific situation and not to specific users.

Former Member
0 Kudos

Hi,

Below given suggesting is not your answer but i want to give you suggestion,

You can use Screen variants for this to Hide Deletion flag frow IW32.

Go to "SHD0"

Use T-code as "IW32"

and for Screen "ZIW32_3010" make Deletion field as "invisible" (you can check with Technical name as - BTN_LOEA for delection flag.

and check.


Regards,

Chaitanya Parchure

peter_atkin
Active Contributor
0 Kudos

All,

Be very careful when using Transaction Variants, especially when referencing the SAP standard transactions.

These settings can be active for all orders types, planning plants, etc.

If you do decide to use Transaction Variants, then create a new "Z" transaction..

PeteA

rakesh_mane
Active Contributor
0 Kudos

Hello

Please use Authorization Object

I_VORG_ORD PM: Business Operation for Orders  

Or

I_TCODE    PM: Transaction Code   


Br

Rakesh

jogeswararao_kavala
Active Contributor
0 Kudos

OK Marcos

Former Member
0 Kudos


Hi Marcos,

Can you please elaborate on your requirement ?

Regards,

Joydeep..

jogeswararao_kavala
Active Contributor
0 Kudos

If you are talking about preventing Operation removal in IW32, it should be possible with User-Exit IWO10009.  Correct code, though allows the removal of operations, would not allow the Saving of the Order. so no changes will be done in Operations. I haven't tested this. May try with your ABAPer

KJogeswaraRao

Former Member
0 Kudos

You would not be useful to me, since I tested it. I need something at just the right moment to click the delete button located below the grid flap operation.

peter_atkin
Active Contributor
0 Kudos

Marcos,

Can you send a screen-shot highlighting your requirement, then we can be 100% sure of what you are describing..

PeteA

Former Member
0 Kudos