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

String problem

Former Member
0 Likes
1,561

Dear all,

I have an variable like Spell-amount which is 160 character long.

Now i want to print this variable in two line.

like this,

spell-amount(40) in first line

spell-amount+40(120) in second Line

one crore thirty five lakhs twenty two th

ousand eight hundered sixty three.

Now the question is i want to print these two line like this:

one crore thirty five lakhs twenty two

thousand eight hundered sixty three.

how can i do this??????????????

i want to avoid to cut the word.

Help me

16 REPLIES 16
Read only

Former Member
0 Likes
1,524

Hi,

Use FM RKD_WORD_WRAP in a form and call that form from your script.

SEARCH SCN for sample codes.

Regards

Karthik D

Read only

0 Likes
1,524

Dear Sir,

Thanx for your reply.

till now my 50 % problem is solved.

but one problem is that.

after using RKD_WORD_WRAP function now my data is stored look like this:

OUT_LINE1 = One Crore Thirty Five Lakh Twenty Two

OUT_LINE2 = Thousand Eight Hundred AND Sixty Three

OUT_LINE3 = Only

now i store data in two string for two line printing.

AMT1 = One Crore Thirty Five Lakh Twenty Two

AMT2 = Thousand Eight Hundred AND Sixty Three Only

now the problem is,

in script form i m passing the amount in words through spell-word structure.

first line spell-word(40)

second line spell-word+40(120)

means pass one varible

now how can i pass the value of amt1 & amt2 to spell-word structure

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Hi,

Declare two variables in Script and use that in the changing option of the perform. Now you can print those two variables.

Regards

Karthik D

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Hi,

"Only" is a constant string. You need not pass it to the script. You can hard code the value in script or append it to the OUT_LINE2 and then pass it to the script. It should work fine. Don't you think so?

Regards,

Anand Patil

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

HI,

WHERE I DESCRIBE THE VARIABLE IN SAP SCRIPT??????????

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Hi,

Check the below link;

SEARCH SCN with Perform in script you will find lots of sample codes.

Regards

Karthik D

Read only

0 Likes
1,524

Repeated !

Read only

0 Likes
1,524

Repeated !

Read only

sravya_ch
Participant
0 Likes
1,524

Hi Shalini

I have solved the same sort of problem in my programming you use the function module RKD_WORD_WRAP so with this half of our problem is solved na .Now in script you have declared the first variable .check exactly down to that in next line u declare this variable then your problem will be solved .

Note Suggestion: when giving a space to the second line make sure go with tab space in script .

If you have any doubt let me know clearly .

HAVE A NICE DAY