cancel
Showing results for 
Search instead for 
Did you mean: 

smart form continuous output for many customer

Former Member
0 Kudos

Hi,

At my selection screen there is customer range.

now if i give customer no range at selection screen, it gives the output like blow:

cust 001

address of cust 001

line items if all customers i.e 001 to 00n.

total amount of all customers.

<b><b>but my requirement is like that:</b></b>

Cust 001

address of cust 001

line item of cust 001 only.

total amount of cust 001 only.

<u>in new page but continuous print.</u>

cust 002.

address of cust 002

line item of cust 002 only.

total amount of cust 002 only.

.....................................................................................

................same for n no of customers.............................

.....................................................................................

<b>it should be in new page but continuous print for different customer.</b>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Use the control break statements of internal tables to print like this.

sort itab by kunnr.

loop at itab

at new kunnr.

new-page.

endat.

........<print the data of one customer>

at end of kunnr.

sum.

< print the totals for that kunnr>

endat.

endloop.

see the sample code

DATA: sflight_tab TYPE SORTED TABLE OF sflight

WITH UNIQUE KEY carrid connid fldate,

sflight_wa LIKE LINE OF sflight_tab.

SELECT *

FROM sflight

INTO TABLE sflight_tab.

LOOP AT sflight_tab INTO sflight_wa.

AT NEW connid.

WRITE: / sflight_wa-carrid,

sflight_wa-connid.

ULINE.

ENDAT.

WRITE: / sflight_wa-fldate,

sflight_wa-seatsocc.

AT END OF connid.

SUM.

ULINE.

WRITE: / 'Sum',

sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

SKIP.

ENDAT.

AT END OF carrid.

SUM.

ULINE.

WRITE: / 'Carrier Sum',

sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

NEW-PAGE.

ENDAT.

AT LAST.

SUM.

WRITE: / 'Overall Sum',

sflight_wa-seatsocc UNDER sflight_wa-seatsocc.

ENDAT.

ENDLOOP.

<b>Reward points for useful Answers</b>

Regards

Anji