2006 Jan 25 2:53 PM
can i do 1+1 or 2-1 in layouts?
2006 Jan 25 2:55 PM
2006 Jan 25 2:58 PM
Hi Lil,
You can't do arthamatic calculation in SAP Script. But you can include your calculations in print program and then pass the results to script.
Lanka
2006 Jan 25 2:59 PM
Hi liat,
you can do using performs.
this perform can be inside another program.
/: PERFORM GET_SUM IN PROGRAM ZSUM
/: USING &SUM&
/: ENDPERFORM
REPORT zget_master .
.
FORM get_sum TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy.
CLEAR v_sum.
...
endform.
2006 Jan 25 3:00 PM
hi liat,
you can do all your arithmetic operations in your Program itself and pass it on to LAYOUT.
IF the number is generated dynamically in your layoutyou can use the format /E for example..
in program if the variable
TOTAL = 1+1.
CALL FUNCTION 'WRITE_FORM'
IMPORTING
ELEMENT = TOTAL
..........
in the script you can do
/E TOTAL
&TOTAL&
hope this is helpful
ps:reward points if helpful
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |