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: 

User Exit to make Payment Term field non editable in item level .

former_member510894
Participant
0 Kudos

Hi all,

User wants to make the Payment Term field in sales order as non editable and Payment terms is copied from Customer Master to Sales order.

I use user exit MV45AFZZ (USEREXIT_FIELD_MODIFICATION) to make Payment Term field non editable in header level.

I am not able to do it in item level. Pl help to to make Payment Term field non editable in item level.

Thanks,

sunil

15 REPLIES 15

former_member510894
Participant
0 Kudos

Any help pl.

0 Kudos

Create screen variant for the sap. Tcode is shd0. Search sdn for screen variant

.

Nabheet

0 Kudos

Hi,

Try BADI_SD_SALES_BASIC~pbo_sapmv45a_4453

This is the PBO event for the subscreen 4453 which is GOTO->ITEMS_>Billing document where your Payment terms are at item level.

The screen field is VBKD-ZTERM. You can populate data from Customer if desired..

To make it disabled use the MAINTAIN_SCREEN method.

Hope this helps.

former_member510894
Participant
0 Kudos

I can not use this badi BADI_SD_SALES_BASIC. It is internal use only. Pl provide details how to use this badi?

0 Kudos

We can use USEREXIT_FIELD_MODIFICATION of MV45AFZZ.

The field you are looking for is VBKD-ZTERM of subscreen 4453 in program SAPMV45A.

I believe ref code is provided in the user exit itself.

kesavadas_thekkillath
Active Contributor
0 Kudos

In the routine you mentioned, have you checked it with below code


IF SCREEN-NAME = 'VBKD-ZTERM'.
    SCREEN-INPUT = 0.              
  ENDIF.

former_member510894
Participant
0 Kudos

Yes Keshav my code is same what you have provide but it only applicable to header level not to item level.

IF SCREEN-NAME = 'VBKD-ZTERM'.

SCREEN-INPUT = 0.

ENDIF

0 Kudos

My friend...the reason for providing the subscreen number as well is that you can change this based on the screen group 3.

I would have loved to give you more details on the approach barr my lack of access.

if XXX-screen_group3 = 'asd' and name = 'vbkd-zterm'.

'>>>logic

endif.

former_member510894
Participant
0 Kudos

Dear Ncvajja,

i m not able to understand the code if XXX-screen_group3 = 'asd' . Pl help me what to pass in screen_group3.

Thanks

0 Kudos

Hi Sunil,


if SCREEN-GROUP3 = '015' and SCREEN-NAME = 'VBKD-ZTERM'. '>>>> The group3 thing that you are looking for is '015'
     if  '">>>>Your logic
         SCREEN-ACTIVE = 0.
     endif.

I dont have access to a client system right now. Please test this code if the USER EXIT routine given above. Sorry this is the best I can do...

But what you are looking for is something on those lines.

former_member510894
Participant
0 Kudos

Point for helpful answer..

Edited by: SUNIL SAHOO on Feb 6, 2012 11:24 AM

former_member510894
Participant
0 Kudos

Thanks Ncvajja . i have test for all group3 still not able to do .

aromalr
Active Participant
0 Kudos

Hi,

You can try implicit enhancement in the include MV45AF0T_TCTRL_U_ERF_AUFTRAG_I

use below code.

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-ZTERM'. " Check the field name

WA_COLS-SCREEN-INPUT = 0.

WA_COLS-SCREEN-OUTPUT = 1.

MODIFY TCTRL_U_ERF_AUFTRAG-COLS FROM WA_COLS.

ENDIF.

ENDLOOP.

It better to control it via a custom authorization object.

put a authorization create a custom authorization object so that you can restrict it for a certain users.

AUTHORITY-CHECK OBJECT 'ZTERM'

ID 'ACTVT' FIELD '02'.

IF SY-SUBRC NE 0.

LOOP AT TCTRL_U_ERF_AUFTRAG-COLS INTO WA_COLS.

.......

ENDLOOP.

ENDIF.

Regards

Aromal

former_member510894
Participant
0 Kudos

Solved..

0 Kudos

Can you please let us know for future reference of all.

Regards

ncvajja