cancel
Showing results for 
Search instead for 
Did you mean: 

Sap script output display

Former Member
0 Kudos

Hi Guru's

I'm using routine to pull the customer, date, billing no etc, Here I need to display grouping customer wise sub-total need to display.

Like below example:

Customer date billing Amt

10000004 10/02/2005 148 10

10000004 10/03/2005 149 20

Sold-to total 30

10000005 10/01/2005 123 20

10000005 10/02/2005 125 20

Sold-to total 40

Please Help me How to do this...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

in the driver pgm u have to use the control break statement.

if u want to print the customer no.

first u have to sort the internal table by customer.

loop at itab.

call function 'WRITE_FORM'

element = 'X'

at last statement.

call function 'WRITE_FORM'

element = 'X1'

end at.

endloop.

in the script pgm u have to use the 2 textelement in main window. 1 for print all details

and another for print the sub tot.

regards

sathis

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Murali,

LOOP AT itab.

"Write item

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'ITEM'

window = 'MAIN'

.

AT END OF field.

SUM.

"Display Subtotal

"Write item

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'SUBTOTAL'

window = 'MAIN'

.

END AT.

ENDLOOP.

In you sapscript Main Window...

/E ITEM

/: &itab-field1&,,&itab-field2

/E SUBTOTAL

/: &itab-totalfield

/: NEW-PAGE

Regards,

Flavya

Former Member
0 Kudos

Hi Murali,

use "on change of customer" in your program.

regards,

Lokesh

Former Member
0 Kudos

Lokesh,

actually i retrive values from standard program...this situation how we can handle...

Former Member
0 Kudos

for calculation part you need to write one perform program and calculate the values and display....