on 2005 May 18 6:45 AM
The report should run according the customer hierarchy ie Payer, Sold-to and Ship-To where the payer is the highest level.
Example:
Payer: 18037
Sold to Party: 18013
Ship to Party: 10761, 10763, 10766 and 10769.
When the selection is unit: 18037 (Payer level)
First page of the report should then be the total of the payer (including all underlying figures of the sold-tos and ship-tos)
The second page will then be the sold-to
The third page will then be the various ship-tos belonging to the sold to
The following page will then be the next sold-to..etc
The result should be that on payer level the total amount appears of all underlying levels, on sold-to level all ship-tos that belong to the sold-to.
When the selection is unit: 18013 (Sold-to level)
The first page will then be the total amount of the sold-to (inclusing all underlying figures of the ship-tos)
The second page and further will then be the various ship-tos belonging to the sold to
When the selection is unit: 10761 (Ship-to)
In this case the existing report can be used.
Hi,
From the report description, it seems using control level processing constructs like AT FIRST, AT NEW, AT LAST, AT END, etc might help you in developing the report. To generate a new page depending upon a certain condition being met, you could use NEW-PAGE command.
Please take a look at these and get back if you have further queries.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajdeep,
I hope this code will help.
DATA: BEGIN OF LINE,
CARRID TYPE SBOOK-CARRID,
CONNID TYPE SBOOK-CONNID,
FLDATE TYPE SBOOK-FLDATE,
CUSTTYPE TYPE SBOOK-CUSTTYPE,
CLASS TYPE SBOOK-CLASS,
BOOKID TYPE SBOOK-BOOKID,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY TABLE LINE.
SELECT CARRID CONNID FLDATE CUSTTYPE CLASS BOOKID
FROM SBOOK INTO CORRESPONDING FIELDS OF TABLE ITAB.
LOOP AT ITAB INTO LINE.
AT FIRST.
WRITE / 'List of Bookings'.
ULINE.
ENDAT.
AT NEW CARRID.
WRITE: / 'Carrid:', LINE-CARRID.
ENDAT.
AT NEW CONNID.
WRITE: / 'Connid:', LINE-CONNID.
ENDAT.
AT NEW FLDATE.
WRITE: / 'Fldate:', LINE-FLDATE.
ENDAT.
AT NEW CUSTTYPE.
WRITE: / 'Custtype:', LINE-CUSTTYPE.
ENDAT.
WRITE: / LINE-BOOKID, LINE-CLASS.
AT END OF CLASS.
ULINE.
ENDAT.
ENDLOOP.
regards,
Ruthra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.