SAP ABAP - Sample Program On Type Conversion ( Char To Curr Type).


REPORT ztest.

DATA: curr TYPE kna1-umsa1,
char(254) TYPE c.

DATA: temp TYPE p LENGTH 15 DECIMALS 2.

char = '1,405.25'.

REPLACE ALL OCCURRENCES OF '.' IN char WITH space.
REPLACE ALL OCCURRENCES OF ',' IN char WITH space.
CONDENSE char NO-GAPS.

temp = char.
curr = temp / 100.

WRITE: 'CHAR = '.
WRITE: char.
WRITE:/ 'CURR = '.
WRITE: curr.

MORE PROGRAMS ON REPORT PROGRAMMING:


- Type Conversion ( Curr To Char Type).

- Function Module To Verify Valid E-Mail Address.

- Setting Default Values In Selection Screen.

- Demonstrate Tabstrips & Subscreens In Selection Screen.

- On Using HOTSPOT Keyword In A Report Program.

- ...Back To Index On Report Programming.



Your suggestions and comments are welcome in this section.

Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.


No comments:

Post a Comment