2016 Feb 10 5:42 AM
Hi All
My requirement is as follows :
i have a report where LABST (unrestricted stock) displays stock of all storage locations for all sales order nos..
but report has to restrict to INRE storage location(LGORT); stock should not show the values containing INRE storage locations.
Now., I have got almost done., stock is not showing INRE values (storage location)., but it is also deleting SALES ORDER no..it is just displaying the sals order no which is having stock., sales order no which do not have Storge location with INRE is not being displayed..
eg:
1) material no Unrestricted stock Sales order doc no
0000-003-3001-00 3115 009234345
0000-003-3001-00 3115 009234359
2) material no Unrestricted stock Sales order doc no
0000-003-3001-00 3115 009234359
Eg2 is right., but the other line has to be displayed with unrestricted stock Zero for that particular sales order no..
(Have used delete adjacent duplicates from it_final comparing matnr werks labst)
Could anyone help on this..?please
?
Thanks and Regards
Shashi
Hi All
My requirement is as follows :
i have a report where LABST (unrestricted stock) displays stock of all storage locations for all sales order nos..
but report has to restrict to INRE storage location(LGORT); stock should not show the values containing INRE storage locations.
Now., I have got almost done., stock is not showing INRE values (storage location)., but it is also deleting SALES ORDER no..it is just displaying the sals order no which is having stock., sales order no which do not have Storge location with INRE is not being displayed..
eg:
1) material no Unrestricted stock Sales order doc no
0000-003-3001-00 3115 009234345
0000-003-3001-00 3115 009234359
2) material no Unrestricted stock Sales order doc no
0000-003-3001-00 3115 009234359
Eg2 is right., but the other line has to be displayed with unrestricted stock Zero for that particular sales order no..
(Have used delete adjacent duplicates from it_final comparing matnr werks labst)
Could anyone help on this..?please
?
Thanks and Regards
Shashi
2016 Feb 10 5:59 AM
hi,
make use of field symbols.
loop your final internal table and set LABST = 0 if LGORT = 'INRE'.
and delete adjacent duplicates from it_final comparing matnr werks labst, this will delete all the entries which have same matnr werks labst except one that's why your entries got deleted.
thanks!!
2016 Feb 10 6:15 AM
Hi Adi
Many Thanks for the reply.,
I used loop at final itab., and set labst = 0 and lgort = 'INRE'.
But still it id displaying only one line., the other line is still not being displayed.
Thanks & regards
Shashi
2016 Feb 10 6:16 AM
either write properly OR remove your delete adjacent duplicate statement..
2016 Feb 10 10:41 AM
i did remove adjacent duplicates syntax., but stil it was not working.,
I had to use control break statements within loop and modify..It worked..
Thank you.
2016 Feb 10 6:06 AM
Instead of using DELETE ADJACENT DUPLICATES,
you can LOOP the internal table
add a IF statement which matches your condition
and DELETE the row which doesnt matched your condition
2016 Feb 10 6:16 AM
I think we do not use DELETE statement inside the loop..
instead of that make use of FLAG field.. using loop mark 'X' to the records which you want to delete.
then after LOOP , DELETE <ITAB> where Flag = 'X'.
2016 Feb 10 6:21 AM
Using INDEX addition for the DELETE statement won't affect the performance much.
2016 Feb 10 10:39 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |