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

reports

Former Member
0 Likes
1,075

formula to convert a given number into decimal number system and hexadecimal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,050

hi,

* Converting type n to type p
DATA: SNP(6) TYPE N VALUE '012345',
      T1NP(10) TYPE P,
      T2NP(2) TYPE P.
MOVE  SNP TO T1NP.

Regards

Reshma

9 REPLIES 9
Read only

Former Member
0 Likes
1,050

Hi,

U can do type casting instead... this is the easiest and most efficient way of doing this..!!

Read only

0 Likes
1,050

type casting is for data types i think so.

Conversion from one number system to another.

Can u explain it with an example pls

Read only

Former Member
0 Likes
1,051

hi,

* Converting type n to type p
DATA: SNP(6) TYPE N VALUE '012345',
      T1NP(10) TYPE P,
      T2NP(2) TYPE P.
MOVE  SNP TO T1NP.

Regards

Reshma

Read only

Former Member
0 Likes
1,050

can u explain it

Read only

Former Member
0 Likes
1,050

Hi ........

go through the fn module

CRM_ET_KB_CONV_DEC_TO_HEX.

Read only

0 Likes
1,050

its saying function module doesnt exists.Is it in abap or crm.

I need in abap

Read only

0 Likes
1,050

Hi,

Try this, <b>EI not ET</b>

<b>CRM_EI_KB_CONV_DEC_TO_HEX

</b>

Read only

Former Member
0 Likes
1,050

Hi,

LOOK AT THE FOLLOWING FUNCTION MODULE.

CRM_EI_KB_CONV_DEC_TO_HEX

Regards

Sandhya

Read only

Former Member
0 Likes
1,050

hi

DATA:

W_HEX(20) TYPE C VALUE 'Hexadecimal value',

W_DEC(20) TYPE C VALUE 'Decimal equivalent',

W_X1(2) TYPE X,

W_X2(2) TYPE X,

W_X3(3) TYPE X,

W_X4(2) TYPE X,

W_Decimal1 TYPE I VALUE '984601',

W_Decimal2 TYPE I VALUE '21589',

W_Decimal3 TYPE I VALUE '2642345',

W_Decimal4 TYPE I VALUE '15680'.

MOVE W_Decimal1 TO W_X1.

MOVE W_Decimal2 TO W_X2.

MOVE W_Decimal3 TO W_X3.

MOVE W_Decimal4 TO W_X4.

WRITE:

10 W_DEC,

40 W_HEX,/.

ULINE AT 10(40).

WRITE:

/ w_Decimal1 UNDER W_DEC,

W_X1 UNDER W_HEX,

/ w_Decimal2 UNDER W_DEC,

W_X2 UNDER W_HEX,

/ w_Decimal3 UNDER W_DEC,

W_X3 UNDER W_HEX,

/ w_Decimal4 UNDER W_DEC,

W_X4 UNDER W_HEX.

reward if helpful.

regards,

kiran kumar k