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

Internal table null characters

Former Member
0 Likes
998

Hi all,

I have internal table which has field data(char256).I am storing the data line by line...in some cases the line may be 5 characters or 50 or 150 char...but at the end when i view that table i have many null characters at the begin and end of the line of the internal table...how can i remove those null characters...condense is not working here...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
909

Hi

What do you mean?

If you don't fill fully a line, it's normal to have null chararters on the right and you can't delete them

Max

8 REPLIES 8
Read only

Former Member
0 Likes
910

Hi

What do you mean?

If you don't fill fully a line, it's normal to have null chararters on the right and you can't delete them

Max

Read only

Former Member
0 Likes
909

Hi,

As Max said this is normal when using char field... If this is an issue, you should use a string type.

Kr,

Manu.

Read only

0 Likes
909

when i use string type..the format is getting changed...so i am using character type...Is there any other way to delete the spaces??

Read only

0 Likes
909

Hi ,

Use Do loop and shift the characters to the left by ignoring the spaces.Move the new values to the result variable.

Read only

0 Likes
909

How to move those values to left side...can u pls send some samplecode..thanks

Read only

Former Member
0 Likes
909

Hi,

Do your process in following steps,

1. Call a Do.. ENDLOOP.

2. Inside the loop , 1st call FM CONVERSION_EXIT_ALPHA_OUTPUT and pass your input value, The output will

remove all the spaces from left and output will have left bound value.

3. Append the output of step 2 into your internal tables.

Regards,

Anirban

Read only

Former Member
0 Likes
909

hi,

if you want to delete the tralining and leading spaces for the single field you can use the piece of code. for eg

Shift name left deleting leading space.

Shift name1 right leading trailing space.

Hope it should solve your issue

Regards,

Ahamed.

Read only

Former Member
0 Likes
909

hi,

if you want to delete the tralining and leading spaces for the single field you can use the piece of code. for eg

Shift name left deleting leading space.

Shift name1 right leading trailing space.

Hope it should solve your issue

Regards,

Ahamed.