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

problem with spacing of variable

Former Member
0 Likes
1,231

Hi To All,

Problem is:

if material is with less than 10 characters.. Im unable to retriving from mara table. Means for example

matnr = 12345678, remaining two charater a space.

beacuse of this sapce unable to retrive from mara table..eventhough the material is exists in Mara table.

if i remove two character space then I can retrive.

How to remove varaible space right side.

thanks you,

Anu.

Hi To All,

Problem is:

if material is with less than 10 characters.. Im unable to retriving from mara table. Means for example

matnr = 12345678, remaining two charater a space.

beacuse of this sapce unable to retrive from mara table..eventhough the material is exists in Mara table.

if i remove two character space then I can retrive.

How to remove varaible space right side.

thanks you,

Anu.

9 REPLIES 9
Read only

Former Member
0 Likes
1,201

HI,

To remove the Leading space from the variable you can use the CONDENSE statement. or leading zeros use this FM CONVERSION_EXIT_ALPHA_INPUT / CONVERSION_EXIT_MATN1_INPUT.

Read only

Former Member
0 Likes
1,201

hi

u can use

CONDENSE

Shift

statement...

Read only

Former Member
0 Likes
1,201

Hi,

Try using


shift matnr left deleting leading space.

Hope this helps.

Regards,

Dhasarathy.

Read only

Former Member
0 Likes
1,201

use FM CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

Read only

Former Member
0 Likes
1,201

Hi Anitha ,

The leading space can be deleted with the following code'

shift t_mara-matnr left deleting leading space.

Regards,

Vik

Read only

0 Likes
1,201

hi than q very much for ur replays and ..

left side space we can use condense or left deleting leading space. but i want to delete the sapce right side.

how to do that,

thank you

Read only

0 Likes
1,201

Hi,

Use


SHIFT matnr RIGHT DELETING TRAILING space.

Dhasarathy K

Read only

0 Likes
1,201

Hi ,

The right side space can be removed with the same statement using trailing.

eg: shift t_mara-matnr deleting trailing space.

regards,

Vik

Read only

Former Member
0 Likes
1,201

Hi

Use the fm CONVERSION_EXIT_MATN1_INPUT in order to convert the material code to internal format.

Max