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

Converting NUM TO STRING -- URGENT

Former Member
0 Likes
1,650

I need an example to Convert the NUM (sy-tabix) to String do I need a Write statement or what might be the other possibility ??

Loop at IT_XYZ. " IT_Xyz is an INTERNAL table

1 '/' 2000 'rows'

2 '/' 2000 'rows'

ENDLOOP.

HOW can I use the output is it possible with Write statements if YES pleas give an EXAMPLE..

  • 1 is sy-tabix '/' is String & rows is String

  • 2 is sy-tabix '/' is String & rows is String and so on

Thanx in advance..

PREETHAM

Message was edited by: Preetham Kumar B.V.

I need an example to Convert the NUM (sy-tabix) to String do I need a Write statement or what might be the other possibility ??

Loop at IT_XYZ. " IT_Xyz is an INTERNAL table

1 '/' 2000 'rows'

2 '/' 2000 'rows'

ENDLOOP.

HOW can I use the output is it possible with Write statements if YES pleas give an EXAMPLE..

  • 1 is sy-tabix '/' is String & rows is String

  • 2 is sy-tabix '/' is String & rows is String and so on

Thanx in advance..

PREETHAM

Message was edited by: Preetham Kumar B.V.

9 REPLIES 9
Read only

athavanraja
Active Contributor
0 Likes
1,238

data: string variable type string .

data: tabix type string .

move: sy-tabix to tabix .

concatenate tabix '/' <string> <string> into string_variable.

Is this what you want?

Regards

Raja

is there any special reason for not marking this as a question?

Read only

0 Likes
1,238

Thanx for the REPLY...

2000 is the DESCRIBE from my Internal table..

ANY OTHER EXAMPLE PLEASE...

no special reason not to mark it as a QUESTION...WAS in a HURRY thats it..

PRETHAM..

Loop at IT_XYZ. " IT_Xyz is an INTERNAL table

1 '/' 2000 'rows'

2 '/' 2000 'rows'

ENDLOOP.

HOW can I use the output is it possible with Write statements if YES pleas give an EXAMPLE..

  • 1 is sy-tabix '/' is String & rows is String

  • 2 is sy-tabix '/' is String & rows is String and so on

Read only

0 Likes
1,238

sorry, couldnt understand.

what is the expected result on the screen.

is it

1 / 2000 rows ?

if yes

write:/ sy-tabix , '/', '2000' , rows

or

you wanted the result of 1/2000

.0005

Regards

Raja

Now you can edit the original post and mark it as question.

Read only

0 Likes
1,238

This is a request from my PL and he has a Problem ..

he wants the OUTPUT in the SAP GUI PROGRESS OR Process of his task (Which I dont know)

he wanted an example to convert a Num to String which he was getting some prob he asked me a question should this be thru WRITE statement or anyother possibility ...

he said he has an Internal table which is being looped..

Loop at IT_XYZ. " IT_Xyz is an INTERNAL table

1 '/' '2000' 'rows'

2 '/' '2000' 'rows'

ENDLOOP.

where as

1 is the SY-TABIX

'/' is the String

'2000' is Describe

'rows' is like ROWS..

1/2000 is like 1 OF 2000 ROWS..

2 of 2000 rows...

and so on..

PS: i have tried to make it as a Question I couldnt find where to EDIT this..? pls help ...

Read only

0 Likes
1,238

ok. in that case

use this.

data: string variable type string .

data: tabix type string .

Loop at IT_XYZ. " IT_Xyz is an INTERNAL table

clear: tabix , string_variable.

move: sy-tabix to tabix .

concatenate tabix '/' '2000' 'rows' into string_variable separated by ' ' .

  • now the string_variable will be " 1 / 2000 rows", ...

ENDLOOP.

Regards

Raja

for making at a question, go to your first post for this subject, click on the pencil icon, below the text box you will see a check box for marking at as question.

Read only

0 Likes
1,238

Community Forums Error

Welcome, Preetham Kumar B.V.

Your Control Panel

Your Reward Points

Help

Error:

Rewarding the message failed.

Read only

0 Likes
1,238

just mail the link to this post and the error to [email protected]

is your problem solved?

Regards

Raja

Read only

former_member182371
Active Contributor
0 Likes
1,238

Hi,

try with FM 'HRCM_STRING_TO_AMOUNT_CONVERT'.

Best regards.

Read only

former_member182371
Active Contributor
0 Likes
1,238

Sorry,

try with FM 'HRCM_AMOUNT_TO_STRING_CONVERT'

Best regards.