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

Code

Former Member
0 Likes
384

Hi ,

I have a field value in the Itab like this

Itab-vbeln = 2000283

I need to add 3 characters ‘IMP’ in front of each value of this field ..How do I write the concatenate code for this requirement?

Output must be

Itab-vbeln = IMP2000283

My problem is … I cannot simply guess at what place I need to add this string.

I mean Itab-vbeln value might be 2000283 sometimes and 0020083 sometimes.

Anyone please help with the code

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
361

Hi ramana,

Do like this.

shift itab-vbeln left deleting leading '0'.

concatenate 'IMP itab-vbeln into itab-vbeln.

Regards,

Ravi

2 REPLIES 2
Read only

Former Member
0 Likes
362

Hi ramana,

Do like this.

shift itab-vbeln left deleting leading '0'.

concatenate 'IMP itab-vbeln into itab-vbeln.

Regards,

Ravi

Read only

Former Member
0 Likes
361
data : v_char(13).

Concatenate 'IMP'  Itab-vbeln  into v_char.

If you want to remove the zeroes and concatenate

use this

data : v_char(13).

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = itab-vbeln

IMPORTING

OUTPUT = itab-vbeln.

Concatenate 'IMP' Itab-vbeln into v_char.

Message was edited by:

Chandrasekhar Jagarlamudi