cancel
Showing results for 
Search instead for 
Did you mean: 

can anybody help me out to develop the report

Former Member
0 Kudos
130

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-to’s and ship-to’s)

The second page will then be the sold-to

The third page will then be the various ship-to’s 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-to’s 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-to’s)

The second page and further will then be the various ship-to’s belonging to the sold to

When the selection is unit: 10761 (Ship-to)

In this case the existing report can be used.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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