cancel
Showing results for 
Search instead for 
Did you mean: 

'Query' method of class '/SCWM/CL_DLV_MANAGEMENT_PRD'

rahul5791
Explorer
0 Kudos

Hello Experts,

We have a report which will give us all Outbound delivery which are 'Packed'.i.e. DPC status is '9'

Also we have refresh button in Report so that if any delivery gets packed it will be updated in List after pressing refresh.

Im using  'Query' method of class '/SCWM/CL_DLV_MANAGEMENT_PRD' to get the Outbound delivery status.

Lets take example

When I run the report It gives me '5' deliveries which are packed.Now I open new window and Packs new delivery.

So when I press refresh button it should update the list with new delivery but this is not happening.

I further analyzed and I found that the packing status of delivery which is newly packed is still '1'(I.e. DPC is '1'). This status returned by the 'Query' Method of  '/SCWM/CL_DLV_MANAGEMENT_PRD'.

And Also when I come back from the report and re-run again it is updating the list with '6' deliveries,as Packing status returened by Method is '9' for that delivery.

So what parameter needs to send to method so that it will fetch updated Packing status.

please help to solve this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member230160
Active Participant

Hi Rahul,

this is due to internal buffering. For performance reason several buffers are used so that the data not always has to be read from the database and/or (if transient data) has to be calculated.

This is something normal which will happen to you in most secenarios.

The buffer is cleared/refreshed if:

- you lock the corresponding delivery (as then of course you need up to date data)

- you refresh the buffer (e.g. by /SCWM/CL_TM=>CLEANUP ).

- you start a new mode (basically you leave your transaction and restart it but this is probably not what you are looking for)

But please note that /SCWM/CL_TM=>CLEANUP will not only clear this buffer but ALL buffers. So if you are in a transactional process where you have changed data that you did not save then you should not do this.


Best regards

Markus

m-haefele
Explorer
0 Kudos

Had a similar issue this week. Calling the cleanup method worked fine. Thanks for this, even this post is 7 years old.