cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a one time report for Single Line item deliveries?

Former Member
0 Kudos

I need to generate a report for Deliveries having only single line items from beginning of the year to end date.

I tried using LIPS table but i could not filter the Deliveries with only single line items.

Please let me know how this can be done.

Thanks in advance!!

Accepted Solutions (0)

Answers (6)

Answers (6)

michael_kozlowski
Active Contributor
0 Kudos

Create a small report like this:

TABLES:

  lips.

TYPE-POOLS:

  slis.

TYPES:

  BEGIN OF tty_count,

    cnt   TYPE sy-dbcnt,

    vbeln TYPE vbeln,

  END OF tty_count.

DATA:

  it_count TYPE STANDARD TABLE OF tty_count,

  wa_count TYPE tty_count,

  it_fieldcat TYPE slis_t_fieldcat_alv,

  wa_fieldcat TYPE slis_fieldcat_alv.

SELECT-OPTIONS:

so_erdat FOR lips-erdat.

SELECT COUNT( DISTINCT posnr )

lips~vbeln

FROM lips

INTO TABLE it_count

WHERE erdat IN so_erdat

GROUP BY vbeln.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'VBELN'.

wa_fieldcat-ref_tabname = 'LIPS'.

wa_fieldcat-ref_fieldname = 'VBELN'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'CNT'.

wa_fieldcat-ref_tabname = 'SYST'.

wa_fieldcat-ref_fieldname = 'DBCNT'.

wa_fieldcat-seltext_s = 'PosCount'.

wa_fieldcat-seltext_m = 'PosCount'.

wa_fieldcat-seltext_l = 'PosCount'.

APPEND wa_fieldcat TO it_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

  EXPORTING

    IT_FIELDCAT = it_fieldcat

  TABLES

    T_OUTTAB    = it_count.

Alternatively you can create an InfoSet-Query use trx SQ02 (create InfoSet for table LIPS), trx SQ01 (create Query) and use counting field for LIPS-POSNR inside the query.

0 Kudos

Hi Abhilash,

Follow this

1.go to se16 and get the deliveries for this year with line item 10 and load them to excel.

2. get the list of deliveries same as above for line item 20 and store them in other sheet.

3. Now remove the deliveries which are there in your 2nd sheet from 1st sheet.

Now you ll be left with deliveries which have only one line item.

PS: provided you do not have any missed line item numbers. In case if you do you might need to remove the deliveries which has line item 30.

As you need this for one time this is the best option.

Regards,

Venkateshwarlu

Former Member
0 Kudos

Hi Abhilash,

what Mario told was a great idea ask your programmer  to write a logic " where it should check all the deliveries where the  second line item is blank or the quantities are zero and i that case take the first line item and show them in report. any way you have to make a "z" report".

Former Member
0 Kudos

Hi,

for a "one time report" best option run SE16N save file in EXCEL and there filter.

Regards,

JM

Former Member
0 Kudos

Hi Abhilash,

In the transaction SE16N with the LIPS table, you can filter with the field "item" POSNR with the value for exapmple "10" or your firs position in deliveries, and it will show only 1 line per delivery.

Regards.    

Former Member
0 Kudos

Hi Mario,

That does not work as it will also show the deliveries having multiple line items but it will display only Line item 0010 details of that particular delivery. I need the report of deliveries having only one line item

Former Member
0 Kudos

Hi Abhilash,

This is very difficult . can you please explain me the reason why do you want that report.

Do you want to filter only one line  item with 1 quantity  or only one line item which may or may not have one or more quantity. 

Former Member
0 Kudos

Hi Sriraj,

Business has requested to provide this report. I want to filter the deliveries having only one line item which may or may not have one or more quantity, i.e., Deliveries without multiple line items.