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

Doubt in message class.

Former Member
0 Likes
710

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 have done it this way. Example: This Material no 000000000204004990 does not exit in MARA.

But Now i want remove the leading zero’s in the message.like Example: This Material no 204004990 does not exit in MARA

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
684

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = wf_matnr

IMPORTING

output = wf_matnr.

Example:

input = 00000000000123

output = 123

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 have done it this way. Example: This Material no 000000000204004990 does not exit in MARA.

But Now i want remove the leading zero’s in the message.like Example: This Material no 204004990 does not exit in MARA

5 REPLIES 5
Read only

Former Member
0 Likes
684

Assign the material number to a character variable (say data v1(18)).

v1 = mat_no.

pack v1 to v1.

Then use v1 in message

Read only

Former Member
0 Likes
684

Hi,

Convert material number to character format. Use conversion_exit_aplha_output function module. Pass material no to this function module.

Ashven.

Read only

Former Member
0 Likes
684

Hi,

You can also use the shift command..

Example..

-


DATA: V_MATNR TYPE MATNR.

V_MATNR = '0000TESTMATERIAL'.

SHIFT V_MATNR LEFT DELETING LEADING '0'.

WRITE: / V_MATNR.

Thanks,

Naren

Read only

Former Member
0 Likes
684

Hi ramudu ,

Use the function module

CONVERSION_EXIT_ALPHA_OUTPUT.

Pls. reward points for useful answers

Read only

Former Member
0 Likes
685

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = wf_matnr

IMPORTING

output = wf_matnr.

Example:

input = 00000000000123

output = 123