2006 Dec 19 6:39 AM
Hi All.
I have one input field like MATNR (Module pool),if i enter invalid Material no , i need error message with what we given in input field .i done it ,like
Example: This Material no 000000000204004990 does not exit in MARA.
But Now i want remove the leading zeros in the message.like
Example: This Material no 204004990 does not exit in MARA.
How can i do?
please help me.
Regards.
Raju.j
2006 Dec 19 8:14 AM
Hi,
Assign the material number to a character variable (say data v1(18)).
v1 = mat_no.
pack v1 to v1.
Then use v1 in message.
2006 Dec 19 6:42 AM
Hi ,
u can do this by using FM CONVERSION_EXIT_ALPHA_OUTPUT.
regards,
nagaraj
Message was edited by:
nagaraj kumar nishtala
Message was edited by:
nagaraj kumar nishtala
2006 Dec 19 6:43 AM
2006 Dec 19 6:43 AM
Hi Raju
Please pass the value to FM: CONVERSION_EXIT_ALPHA_OUTPUT to truncate the leading ZEROES.
Alternatively, we can use SHIFT LEFT command as well...
Eg: SHIFT <matnr> LEFT DELETING LEADING '0'.
Kind Regards
Eswar
2006 Dec 19 8:12 AM
Hi Eswar.
I want elemenate Zero's in Message. i done it in input fields.
2006 Dec 19 8:24 AM
Hi Raju
I guess you will be passing the value of material number to the message class to display the message, hence use any of the above methods to remove the leading ZEROES and then pass to the message class to get the desired output.
I guess you are using Z message class.
If you have still doubts, please post your code of displaying the message so we can be able to help you.
Kind Regards
Eswar
2006 Dec 19 6:51 AM
2006 Dec 19 8:14 AM
Hi,
Assign the material number to a character variable (say data v1(18)).
v1 = mat_no.
pack v1 to v1.
Then use v1 in message.
2006 Dec 19 9:11 AM
hi Jayanthi.
Thank you so much i solved my problem with your help.
I given 10 mark to your help.
2006 Dec 19 8:18 AM
hi raju,
do this.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = wf_matnr
IMPORTING
output = wf_matnr.Example:
input = 00000000000123
output = 123
Rgds
Anver
2006 Dec 19 8:21 AM
Define a new variable of type n, pass your screen value to it, and use it in your message.
data g_matnr(xx) type n.
.....
g_matnr = matnr ...(your screen value)
.......
message xxx(xx) with g_matnr.