on 09-10-2007 11:45 AM
Is it possible To do the calculation(addition of two fields) in SAPScript
Hi,
you need to write the External perform statment, add the 2 fields in the program as Global fields, then write the perform statment as said by Tamás Nyisztor .
in the FORM routine you can get the 2 fields bu writing the seelct statment and do the caliculation then send the total value to the script using the OUTTAB
Regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes use the
/: to do the calculation in sapscript.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do calculations by calling a subroutine program in the Script using
Perform and Endperform. You can go with any calculations in the subroutine
program and pass the value to the script.
Reward points if it is useful.
Thanks,
Geeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Within SAPScript, you can PERFORM a FORM from an abap program. In your abap code, you can add the fields.
For example:
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Regards
Tamá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.