Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delivery does not exist when calling WS_REVERSE_GOODS_ISSUE

Former Member
0 Likes
3,733

I have a dialog program with 2 screens. Screen 2001 calls FM WS_DELIVERY_UPDATE and screen 3000 calls FM WS_REVERSE_GOODS_ISSUE. They both work independently, however, when I call WS_REVERSE_GOODS_ISSUE after calling WS_DELIVERY_UPDATE i get the following error: "Delivery does not exist".

This works:

1. ZTEST (transaction for dialog program)

2. call WS_DELIVERY_UPDATE

3. /nZTEST

4. call WS_REVERSE_GOODS_ISSUE

However, this does not work:

1. ZTEST (transaction for dialog program)

2. call WS_DELIVERY_UPDATE

3. set screen 3000. leave screen.

4. call WS_REVERSE_GOODS_ISSUE

If there some other FM that I need to call to flush out memory or something?

Thank you,

I have a dialog program with 2 screens. Screen 2001 calls FM WS_DELIVERY_UPDATE and screen 3000 calls FM WS_REVERSE_GOODS_ISSUE. They both work independently, however, when I call WS_REVERSE_GOODS_ISSUE after calling WS_DELIVERY_UPDATE i get the following error: "Delivery does not exist".

This works:

1. ZTEST (transaction for dialog program)

2. call WS_DELIVERY_UPDATE

3. /nZTEST

4. call WS_REVERSE_GOODS_ISSUE

However, this does not work:

1. ZTEST (transaction for dialog program)

2. call WS_DELIVERY_UPDATE

3. set screen 3000. leave screen.

4. call WS_REVERSE_GOODS_ISSUE

If there some other FM that I need to call to flush out memory or something?

Thank you,

7 REPLIES 7
Read only

former_member191735
Active Contributor
0 Likes
1,976

Try issuing commit work after WS_DELIVERY_UPDATE and check again.

if that doesnt work use wait up to 2 seconds after the WS_DELIVERY_UPDATE FM.

Read only

0 Likes
1,976

I should have mentioned that I am calling COMMIT WORK after each the the FM's.

Read only

Former Member
0 Likes
1,976

Hi,

I think you can also do this by giving as cal screen instead of set screen after WS_DELIVERY_UPDATE.

Thank You,

Ravi kanth Yechuri.

Read only

0 Likes
1,976

I changed the logic to be as follows and it still throws an error.

1. ZTEST (transaction for dialog program)

2. call WS_DELIVERY_UPDATE

3. call screen 3000.

4. call WS_REVERSE_GOODS_ISSUE

I don't think it is a timing issue because the user controls when WS_REVERSE_GOODS_ISSUE gets called. I can wait 5 minutes before I click the button that calls WS_REVERSE_GOODS_ISSUE and it still throws the error.

- t

Read only

0 Likes
1,976

Hi,

You didn't say in which version of SAP you are in. Most of the WS* FMs are obsolete and the FM you are using is not released by SAP for customer use (You can check this in the attributes of the FM). Instead of this you use BAPI BAPI_GOODSMVT_CANCEL along with BAPI_TRANSACTION_COMMIT.

Place COMMIT WORK AND WAIT after the first FM. If you still face the issue, call FM DEQUEUE_ALL after the

COMMIT WORK.

Thanks,

Vinod.

Read only

0 Likes
1,976

Version of SAP is 7100.3.11.1042

In the attributes of FM its written Changed On 18.08.2010

I had been using the COMMIT WORK just before called this FM.

Thanks

Sunoj

Read only

sunojmichael1
Explorer
0 Likes
1,976

Hi

Tony Raimo

Please checkout this link

He wrote the funtion module WS_REVERSE_GOODS_ISSUE. in another Z program and called that program from the current using the SUBMIT statement. You can use the EXPORT MEMORY ID for passing value of delivery no.

Another solution suggested was to use a BDC for VL09 .

I dont find any better solution.

If you find a better one please do reply in the tread... Me too having the same problem

Regards

Sunoj