cancel
Showing results for 
Search instead for 
Did you mean: 

ROUND OFF VALUE IN SCRIPT

Former Member
0 Kudos

Hi All,

Thanks to all who replied my queries.

I have to round off the values in script itself.

For example : variable VAR passed into script

while display &VAR& value contains 10.023.

Here it should display as 11.

Even if value 9.001

It should display as 10.

Please help me in this regards

Regards

Rajkumar.K

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member480923
Active Contributor
0 Kudos

Well u want to get the Ciel Functionality in SAPScript which is NOT possible .. Do the thing in ABAP Editor by calling an external Perform routine by the following manner:

define &VAR1& := &VAR&.

Perform ZTEST_FORM In program ZTEST_SCRIPT 
                                 using &VAR&
                            changing &VAR1&
endperform.

and in the program ZTEST_SCRIPT u have to write:

form ZTEST_FORM TABLE INTAB  Structure ITCSY
                                     OUTTAB structure ITCSY. 
data: w_vari type kwmeng,
         w_varo type kwmeng. 

read table intab with key name = 'VAR'. 
if sy-subrc = 0.
w_vari = intab-value. 
w_varo = ciel( w_vari ). 
outtab-value = w_varo. 
condense outtab-value. 
modify outtab transporting value. 
endif. 
endform.

Hope That Helps

Anirban M.