on 11-20-2015 10:30 AM
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!!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for a "one time report" best option run SE16N save file in EXCEL and there filter.
Regards,
JM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.