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

Converstion routine

Former Member
0 Likes
812

Hi Experts,

Any one have Idea about the Conversation routine.

It should be conver the data into 2-2-3-3

Suppose I have data like 1010200212 it should be conver in to 10-10-200-212

If any standard Conversation routine is avilable please let me know I will use the same in ny Z domain

Thnx in Advance,

Sam.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
777

Hi,

Sorry but I can't get your requireemnt ....as these number not seems to be date or something.....bettre to write the code yourself it will be simple.

Below is the code snippet that might help you out:

Data:var1(10) type c,
        var2(2) type c,
        var3(3) type c,
        var4(3) type c,
        var5(3) type c,
        FinalResult(14) type c.

var1 = '1010200212'.
var2 = var1+0(2)
var3 = var1+2(2).
var4 = var1+4(3).
var5 = var1+7(3).
concatenate var2 '-' var3 '-' var4 '-' var5 into FinalResult.
write:/ FinalResult.

Pooja

Hi Experts,

Any one have Idea about the Conversation routine.

It should be conver the data into 2-2-3-3

Suppose I have data like 1010200212 it should be conver in to 10-10-200-212

If any standard Conversation routine is avilable please let me know I will use the same in ny Z domain

Thnx in Advance,

Sam.

4 REPLIES 4
Read only

Former Member
0 Likes
777

what is ur requirement exactly?

what are those numbers?

кu03B1ятu03B9к

Read only

Sandra_Rossi
Active Contributor
0 Likes
777

it will be much more faster to create your own CONVERSION routine (not conversation)

Read only

Former Member
0 Likes
778

Hi,

Sorry but I can't get your requireemnt ....as these number not seems to be date or something.....bettre to write the code yourself it will be simple.

Below is the code snippet that might help you out:

Data:var1(10) type c,
        var2(2) type c,
        var3(3) type c,
        var4(3) type c,
        var5(3) type c,
        FinalResult(14) type c.

var1 = '1010200212'.
var2 = var1+0(2)
var3 = var1+2(2).
var4 = var1+4(3).
var5 = var1+7(3).
concatenate var2 '-' var3 '-' var4 '-' var5 into FinalResult.
write:/ FinalResult.

Pooja

Read only

Former Member
0 Likes
777

Hi Sam,

Their are various conversion routines attached with your field at table level,

you can check them by:


-> Going to the table whose field is used,
-> Then double click on the data element of the field whose conversion routine is required,
->Then double click on the domain attached to that field,
->There in the output characteristics,there will be one parameter-Conversion routine,
->double click on it ,it will fetch you all the routines attached with your field,
->You can try using the various routines from there as per your requirement.

Hope it helps

Regrds

Mansi