Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
25 views2 pages

Program

The document is an ABAP report that performs basic arithmetic operations based on user input from radio buttons. It allows the user to select between addition, subtraction, multiplication, and division of two integers, with results displayed as messages. The report includes a welcome message and a selection screen for user interaction.

Uploaded by

navi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Program

The document is an ABAP report that performs basic arithmetic operations based on user input from radio buttons. It allows the user to select between addition, subtraction, multiplication, and division of two integers, with results displayed as messages. The report includes a welcome message and a selection screen for user interaction.

Uploaded by

navi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

text key product.

REPORT ZTEST011.
*
**WRITE 'welcome to abap'.new-line.
*PARAMETERS name(10) TYPE c.
*data display(30) TYPE c.
*data sleep(30) TYPE c.
*
*
*sleep = 'fun with abap'.
*MOVE 'abap developer' to display.
*write:/ display, sleep.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS p_x TYPE i DEFAULT 10 OBLIGATORY.
PARAMETERS p_y TYPE i DEFAULT 20 OBLIGATORY.
SELECTION-SCREEN end of BLOCK b1.
data p_z type i.
data lv_type type string.
data lv_length type string.
data lv_count type string.
data lv_fun type string.
data lv_text type string.
data lv_len type string.

PARAMETERS p1 TYPE c RADIOBUTTON GROUP g1 USER-COMMAND u1.


PARAMETERS p2 TYPE c RADIOBUTTON GROUP g1 .
PARAMETERS p3 TYPE c RADIOBUTTON GROUP g1 .
PARAMETERS p4 TYPE c RADIOBUTTON GROUP g1 .
PARAMETERS p5 TYPE c RADIOBUTTON GROUP g1 DEFAULT 'X'.

at SELECTION-SCREEN ON RADIOBUTTON GROUP g1.


case sy-ucomm.
when 'U1'.
IF P1 = 'X'.
p_z = p_x + p_y.
lv_length = P_Z.
CONCATENATE 'the addition of above two values is' lv_length into lv_type SEPARATED
BY ''.
MESSAGE lv_type TYPE 'I'.
ELSEIF P2 = 'X'.
p_z = p_x - p_y.

lv_length = P_Z.
IF P_Z <= 0.
CONCATENATE 'the DIFFRENCE of above two values is' lv_length into lv_type
SEPARATED BY ''.
lv_count = strlen( lv_type ).
lv_fun = lv_count - 1.
lv_len = lv_text+0(lv_fun).
MESSAGE lv_len TYPE 'I'.
***CONCATENATE 'the addition of above two values is' lv_length INTO lv_value.
*ELSE.
*WRITE:/ 'the DIFFRENCE of above two values is ' ,p_z LEFT-JUSTIFIED.
endif.
ENDIF.
*
*ELSEIF P3 = 'X'.
*p_z = p_x * p_y.
*WRITE:/ 'the product of above two values is',p_z.
*ELSEIF P4 = 'X'.
*p_z = p_x / p_y.
*WRITE:/ 'the DIVISION of above two values is',p_z.
*ELSEIF P5 = 'X'.
*MESSAGE 'SELECT ANY ONE OF OPERATION' TYPE 'E'.
*ENDIF.
.ENDCASE.

You might also like