data : max type i , min type i. * maximum 9 values can be passed max = nmax( val1 = 10 val2 = 12 val3 = 14 val4 = 16 val5 = 18 val6 = 20 val7 = 25 val8 = 7 val9 = 3 ). min = nmin( val1 = 10 val2 = 12 val3 = 14 val4 = 16 val5 = 18 val6 = 20 val7 = 25 val8 = 7 val9 = 3 ). WRITE : / ‘Maximum :’, max. WRITE : / ‘Minimum :’, min.
Category: Uncategorized
ABAP Numerical Funtioncs
DATA n TYPE decfloat16. DATA m TYPE decfloat16 VALUE ‘-3.58’. WRITE : / ‘Original value :’, m. n = abs( m ). WRITE ‘Absolute Value :’, n. n = sign( m ). WRITE
‘Sign :’, n. n = ceil( m ). WRITE
‘Ceil Value :’, n. n = floor( m ). WRITE
‘Floor Value :’, n. n = trunc( m ). WRITE
‘Truncate Value :’, n. n = frac( m ). WRITE
‘Fraction Value :’, n.
Function Module to get USER Details
SAP standard provides FM- SUSR_SHOW_USER_DETAILS to get the details of a USER. Go to – Tx- SE37 and test the FM. This is Tx- SU01 and
Function Module ‘POPUP_WITH_2_BUTTONS_TO_CHOOSE’ to show POP UP with TWO Buttons!
DATA : lv_answer . CALL FUNCTION ‘POPUP_WITH_2_BUTTONS_TO_CHOOSE’ EXPORTING diagnosetext1 = ‘Please Choose Option’ textline1 = space textline2 = space text_option1 = ‘YES’ text_option2 = ‘NO’ titel = ‘Check’ IMPORTING answer = lv_answer. CASE lv_answer. WHEN ‘1’. WRITE ‘Yes is selected, proceeding…’. ” continue logic WHEN ‘2’. WRITE
‘No is selected, retruning …’. ” return logic WHEN OTHERS. ENDCASE. Execute the program. Output :
Function Module ‘POPUP_WITH_WARNING’ to display a POP UP
CALL FUNCTION ‘POPUP_WITH_WARNING’ EXPORTING textline1 = ‘Some Important Info Missing’ textline2 = ‘Still Want to Continue’ titel = ‘Warning’. WRITE ‘proceed after warning popup’. Execute the program. Here is the pop up. After continue.
Accessing one program data in another program easily without export and import / Set and Get
The first program sets a table record LT and calls subroutine of the second program and it doesn’t pass the table to the subroutine. Hers