Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

checking for last digit change of material number

Hi friends,

I have a problem regaridng check for a material.

i have

*vbap-matnr = '000000000000000234

and now i will change material no

from 000000000000000234 to 000000000000000235

ie : only when the last digit of the number is change it should go into the if condition

code :

the old value will be there in the field

*vbap-matnr = '000000000000000234

and the change value will be in

vbap-matnr = 000000000000000235

if vbap-matnr17(1) = *vbap-matnr17(1)


if iam writing in the above way its going ito the if condition even for the last 2 digits change also instead it shouild only when last digit of the material number is change.

How can i do that.



Former Member


IF vbap-matnr+17(1) NE *vbap-matnr+17(1) AND
IF vbap-matnr(17) EQ *vbap-matnr(17).
==> only the last digit changed

hope this helps


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question