Application Development 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: 

question reg. concatenate

Former Member
0 Kudos

In a report, i want to concatenate:

'User requests' vbeln 'info' into a workarea and display it on the output.

(where vbeln is replaced by a sales order).

For ex: a sample output would look like:

User requests 0000012345 info

Can you give me a sample code here please?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

Use the function module CONVERSION_EXIT_ALPHA_OUTPUT with the vbeln before doing the concatenation..

DATA: V_STRING TYPE STRING.

DATA: V_VBELN TYPE VBELN.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = V_VBELN

IMPORTING

OUTPUT = V_VBELN.

CONCATENATE 'User requests ' V_VBELN 'info'

INTO V_STRING SEPARATED BY SPACE.

Thanks,

Naren

5 REPLIES 5

Former Member
0 Kudos

Concatenate 'User requests' vbeln 'info' into wa separated by space.

Former Member
0 Kudos

Hi,

Check this example..

DATA: V_STRING TYPE STRING.

DATA: V_VBELN TYPE VBELN.

CONCATENATE 'User requests ' V_VBELN 'info'

INTO V_STRING SEPARATED BY SPACE.

Thanks,

Naren

0 Kudos

what if i want to take out the leading zeros in the vbeln?

thanks a lot

0 Kudos

First convert the vbeln, you can do this using shift.

shift vbeln left deleting leading '0'.
concatenate 'User Requests' vbeln ........

Regards,

Rich Heilman

Former Member
0 Kudos

hi,

Use the function module CONVERSION_EXIT_ALPHA_OUTPUT with the vbeln before doing the concatenation..

DATA: V_STRING TYPE STRING.

DATA: V_VBELN TYPE VBELN.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = V_VBELN

IMPORTING

OUTPUT = V_VBELN.

CONCATENATE 'User requests ' V_VBELN 'info'

INTO V_STRING SEPARATED BY SPACE.

Thanks,

Naren