Skip to Content
0

Failed to distribute inbound delivery to EWM in Background task

May 27, 2017 at 10:26 PM

429

avatar image

Hi All,

All settings are correct because transaction VL06i is working properly.

We developed a custom program where we do some processing to the inbound deliveries and then we have to distribute them to EWM.

I debugged VL06i and I see that standard SAP is using function module /SCWM/INB_DLV_SAVEREPLICA. So I took that FM to use it in our custom program like below image (Same way as VL06i). I'm also passing to the FM the same data as VL06i.

I'm calling BAPI_TRANSACTION_COMMIT after the FM to execute it.

The problem is that INB delivery is not getting distributed to EWM. If I check the queue (SMQ1 and SMQ2) on ERP side, I cannot find it. Then if I check table ARFCSSTATE for my execution, I see the entry is with status SYSFAIL with the following message: EWM delivery for (delnum) from (DEVSYS) was found.

Then If I check transaction /SCWM/PRDI I find the delivery but with in an error state. Distribution status of the delivery is still D(planned for distribution) on ERP side.

Any clues on what might the problem be?

Thanks in advance!

Regards!!

Emanuel.

image1.jpg (12.4 kB)
image2.jpg (73.0 kB)
image3.jpg (47.3 kB)
image3.jpg (76.9 kB)
10 |10000 characters needed characters left characters exceeded

Hi,

what you are callign is not a qRFC therefore it will not appear at all in SMQ1 or SMQ2. What you are doing is calling it as a tRFC.

You should be familar with qRFC API, e.g.

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/48/9c47422ab0062fe10000000a42189d/content.htm

But independant you should be very careful if you are using

/SCWM/INB_DLV_SAVEREPLICA as it has a broad interface and you should really know what you are doing...

Best regards

Markus

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Ajit Routray May 28, 2017 at 05:47 AM
0

Hi Emanuel,

Can you please try below alternative instead of BAPI ?

Schedule the VL06I Program via background job via selection screen delivery no.

Hope It will work for you.

Please let me know if you have further queries.

Kind Regards,

Ajit

Just demo code below

FM "JOB_OPEN"
EXPORTING
jobname = jobname IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
SUBMIT WS_MONITOR_INB_DEL_DIST VIA  JOBNAME ( PASS SELECTION SCREEN DELIVERY NO )
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = jobname
strtimmed = 'X' " IMMEDIATE
EXCEPTIONS
invalid_startdate = 1
jobname_missing = 2
job_close_failed = 3
job_nosteps = 4
job_notex = 5
lock_failed = 6
OTHERS = 7.
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Ajit! this is a good alternative option.

regards!!

0