06-14-2011 1:57 PM
Hi,
I have a requirement to deactivate(display only) item category field in VA01 table item for certain order type . I tried the user exit MV45AFZZ(USEREXIT_FIELD_MODIFICATION). This is working only if the table item has a value. i.e I could able to enter an item category first and then enter the material and quantity.
So please suggest any alternative how to make the item category field(VBAP-PSTYV) column display only for centrain order type.
Regards
Aromal R
06-14-2011 3:23 PM
Hi Aromal,
Can you paste the logic you have tried for this issue.
I tried below option in debugging at it is working fine.
Table Control name used for item details in VA01 screen is TCTRL_U_ERF_GUTLAST. You have to modify this table control
screen structure for field VBAP-PSTYV. In TCTRL_U_ERF_GUTLAST-cols[ ] you will get the all the fileds of the table control
and TCTRL_U_ERF_GUTLAST-cols[ ]-screen will have screen details.I modified TCTRL_U_ERF_GUTLAST-cols[9]-screen-INPUT = '0' and VBAP-PSTYV was made output field only.Please try this and check.
Thanks,
Pawan
06-14-2011 3:23 PM
Hi Aromal,
Can you paste the logic you have tried for this issue.
I tried below option in debugging at it is working fine.
Table Control name used for item details in VA01 screen is TCTRL_U_ERF_GUTLAST. You have to modify this table control
screen structure for field VBAP-PSTYV. In TCTRL_U_ERF_GUTLAST-cols[ ] you will get the all the fileds of the table control
and TCTRL_U_ERF_GUTLAST-cols[ ]-screen will have screen details.I modified TCTRL_U_ERF_GUTLAST-cols[9]-screen-INPUT = '0' and VBAP-PSTYV was made output field only.Please try this and check.
Thanks,
Pawan
06-15-2011 5:10 AM
HI,
in the exit USEREXIT_FIELD_MODIFICATION(MV45AFZZ)
I have tried
if vbak-auart = 'ZEKE'.
CASE SCREEN-NAME.
when 'VBAP-PSTYV'.
screen-output = 1.
screen-input = 0.
endcase.
endif.
This will work only if table control has a value.
Regards
Aromal R
06-15-2011 5:35 AM
IMO this userexit will not work with table controls where the records are yet to be populated. This user exit will execute at item level only when the value is entered against any of the columns (in table control).
Regards, Vinod
06-15-2011 8:55 AM
Hi,
In your code you have missed one important statement MODIFY SCREEN after screen-output = 1.
screen-input = 0. Anyway have you tried what I mentioned earlier.
Thanks,
Pawan
06-15-2011 11:54 AM
Hi,
MODIFY SCREEN is not need in this exit.
I have resolved the issue with implicit enhancement.
thread is closed.
Thank you all.
Regards
Aromal R
08-13-2012 9:21 AM
08-13-2012 1:24 PM
Hi,
Create a Custom Authorization Object so that you can control it for certain users. 2. Write implicit enhancement spot in the include TCS MV45AF0T_TCTRL_U_ERF_AUFTRAG_I,
FORM TCTRL_U_ERF_AUFTRAG_INIT
AUTHORITY-CHECK OBJECT 'ZITMCAT'
ID 'ACTVT' FIELD '02'.
IF SY-SUBRC NE 0.
* DATA: WA_COLS LIKE LINE OF TCTRL_U_ERF_AUFTRAG-COLS.
LOOP AT TCTRL_U_ERF_AUFTRAG-COLS INTO WA_COLS.
IF WA_COLS-SCREEN-NAME = 'VBAP-PSTYV'.
WA_COLS-SCREEN-INPUT = 0.
WA_COLS-SCREEN-OUTPUT = 1.
MODIFY TCTRL_U_ERF_AUFTRAG-COLS FROM WA_COLS.
ENDIF.
ENDLOOP.
ENDIF.
Regards
Aromal R
09-26-2013 2:45 PM
I used this code in USEREXIT_FIELD_MODIFICATION(MV45AFZZ) with other field and it worked ok.