I know that there are already solution descriptions, but they don’t help me.
I have a DT with three columns. The middle “material” is a string, the other two are an INT.
I have to compare the “material” afterwards with another table where I only have INT everywhere.
The “material” number has a maximum of 7 digits. In the string, this is filled with zeros at the beginning (e.g. 0012345). Now I can’t compare that to the other table because it says 12345.
comparing seven correct diggits works beautifully (e.g. 7654321). I only have problems with the zeros.
What do I have to do so that I can convert the “Material” column in a DT like this.
For each row? but with which Assigne command?
Please describe the command in detail so that I understand it too
Thanks in advance !
VariableToCompare is a new string varible which hold material value coming from excel.
VariableToCompare is 7 digit string. so you can compare with other other table value.
As @Gokul_Jayakumar mentioned , if you convert this VariableToCompare into int type then again it lose its leading zero.
so you can use if condition
with 777777 and 1111111 it works wonderfully. BUT not when I compare 0012345 and 12345 or 0654321 with 654321.
What’s important is that I don’t need this “0” at the beginning! Those must be removed
but be careful, there can also be a “0” somewhere in the middle or at the end. Of course it has to stay.
is it better to understand now?