cancel
Showing results for 
Search instead for 
Did you mean: 

Script - total prininting

Former Member
0 Kudos

Hi,

Any one can help me to print total amount &'$'REGUD-WRBTR(C)&,, by adding &'$'REGUD-SWABZ(C)&,,&'$'REGUD-SWRBT(C)& in scripts.

Detailed coding.

Thanks,

donald

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Ramesh,

I tried in that way also, iam not able to do.

Thanks,

Donald

Former Member
0 Kudos

Hi!

This is a working example from SAP. Shows you how can you exactly call a FORM from your SAPScript. You just change your variables and make the summing within your program.

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á

Former Member
0 Kudos

Use SUMMING option....

SUMMING &'$'REGUD-SWABZ(C)& &'$'REGUD-SWRBT(C)& INTO &'$'REGUD-WRBTR(C)&...

Use this in the main window before all the statements...

this should be the first statement... in the window. (before all the text elements)

and &'$'REGUD-WRBTR(C)& should be printed onli once per 1 iteration of the whole script.

reward if it helps u.....

sai ramesh.

use &REGUD-WRBTR& &REGUD-SWRBT& INTO &REGUD-WRBTR&...

dont use symbols in summing statement.. while printing those use symbols and textssss.....

try this ..

waiting for repliiii....

Message was edited by:

sai ramesh

Former Member
0 Kudos

Hi,

I tried it, it is givng Invalid sybol.

Thanks,

Donald

Former Member
0 Kudos

i hav changed my previous message check that!!

i hope u got the correct result...

reward if it helps u...

sai ramesh

just paste ur script code....

u should get that.. i dont know why.. u r not getting!!!

Message was edited by:

sai ramesh

Former Member
0 Kudos

call a program this way ...

[code]

perform <perform name> in program ZTEST using &'$'REGUD-SWABZ(C)& ,&'$'REGUD-SWRBT(C)& changing v&'$'REGUD-WRBTR(C)&

[/code]

in that perform do the addition operation ..

Regards,

Santosh

Message was edited by:

Santosh Kumar Patha