Application Development and Automation 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: 
Read only

report

Former Member
0 Likes
398

Hi all,

I have one requirement.

I am dealing with VA02.

if anybody wants to change the payment terms it has show the message 'you are not authorised to change'.

for this i have written the code like this

DATA : BEGIN OF t_vbkd OCCURS 100,

vbeln LIKE vbkd-vbeln,

posnr LIKE vbkd-posnr,

zterm LIKE vbkd-zterm,

END OF t_vbkd.

CALL FUNCTION 'Z_0CS_USEREXIT_CHECK'

EXPORTING

p_include = 'ZEGVI_MV45AFZZ_PAYMENT_TERMS'

p_form = 'USEREXIT_MOVE_FIELD_TO_VBKD'

p_key1 = sy-tcode

  • P_KEY2 =

  • P_KEY3 =

p_val1 = 'VA02'

  • P_VAL2 =

  • P_VAL3 =

EXCEPTIONS

not_active = 1

OTHERS = 2 .

IF sy-subrc = 0.

SELECT vbeln posnr zterm

FROM vbkd

into table t_vbkd

WHERE vbeln EQ vbak-vbeln.

ENDIF.

Now the problem is after select query i have to compare the old value of zterm

( meanst_vbkd-zterm) with the newly changed value of zterm if the user enters the SAVE after changing zterm on VA02.

Please tell me how to write code for this.

1 ACCEPTED SOLUTION
Read only

srinivas_akiri
Active Participant
0 Likes
369

Hi

Use the exit include MV45AFZZ to write your code.

i.e. in this include write code to compare the values of t_vbkd-zterm and VBKD-ZTERM( or use the related screen field name) values and raise the appropriate error message.

Regards

Srini

3 REPLIES 3
Read only

srinivas_akiri
Active Participant
0 Likes
370

Hi

Use the exit include MV45AFZZ to write your code.

i.e. in this include write code to compare the values of t_vbkd-zterm and VBKD-ZTERM( or use the related screen field name) values and raise the appropriate error message.

Regards

Srini

Read only

Former Member
0 Likes
369

1.Check out if there is any parameter id assigned to that field

2.If it is there then try with

GET PARAMETER ID 'XXX' field v_var.

now ur v_var will contain the old value

Read only

Former Member
0 Likes
369

thanks to all