cancel
Showing results for 
Search instead for 
Did you mean: 

Do Post goods issue & reverse delivery via ABAP Web services

former_member214084
Participant
0 Kudos

Hi Experts,

Apologies if I am not posting on appropriate area & please direct me.

I have created an ABAP Webservice (RFC Enabled FM) which does the post goods issue & reverse deliveries.

1. To do PGI I have used Standard FM ( WS_DELIVERY_UPDATE) inside my custom FM

2. To do reverse I have written a small BDC in that custom FM with Call transaction 'VL09' using BDC .....


This RFC enabled FM is working fine both the functionality .


Issue : when testing web service via SOAP UI (software only option 1 is working and when I execute with option 2 it is throwing some error but I am unable to understand this error.


Can anyone have a look into it to guide me towards the possible cause of this error.


File attached.

Accepted Solutions (0)

Answers (1)

Answers (1)

Rashid_Javed
Contributor
0 Kudos

From the picture, it is showing time out error. That can be either there is not response from server OR your RFC is taking too long to execute.

Just to help in troubleshoot,

Put an HTTP break point in your second RFC (just at the start before any BDC calls) and then call the web service from SoapUI. This should activate the ABAP debugger in you SAPGUI.  Now if this happens, you can conclude that the network between soapui and SAP application server is fine and something is wrong in RFC ABAP code.

If the debugger is not activated when you call web service from soapui, this mean the problem is even before your RFC code is triggered (some system setting or may be Web serivce is not active or something like that).

former_member214084
Participant
0 Kudos

Hi Javed ,

You are right I tried to debug it the way you mentioned already so when it is encountering BDC statement inside the Functional module it is taking quite long time to process the transaction 'VL09' and then control comes back to FM with sy-subrc = 0 .

When I check in SOAP UI there is only message "error getting response timeout exception is shown",which clearly says that connection is fine and  issue is in BDC code which as below , can you suggest me to optimize the code to decrease the runtime.

wa_bdcdata-program = 'RVV50L09'.

wa_bdcdata-dynpro = '1000'.

wa_bdcdata-dynbegin = 'X'.

append wa_bdcdata to i_bdcdata.

wa_bdcdata-fnam = 'BDC_OKCODE'.

wa_bdcdata-fval = '=ONLI'.

append wa_bdcdata to i_bdcdata.

wa_bdcdata-fnam = 'I_VBELN-LOW'.

wa_bdcdata-fval = lv_delivery"'8891963'.


CALL TRANSACTION 'VL09'

            USING       i_bdcdata

            MODE        w_mode     "  'Q'

            UPDATE      c_s            " ''A'

            MESSAGES INTO i_bdcmsgcoll.


LOOP at i_bdcmsgcoll.

   MESSAGE ID i_bdcmsgcoll-MSGID

   TYPE i_bdcmsgcoll-MSGTYP

   NUMBER i_bdcmsgcoll-MSGNR

   INTO description

   WITH i_bdcmsgcoll-MSGV1

         i_bdcmsgcoll-MSGV2

          i_bdcmsgcoll-MSGV3

           i_bdcmsgcoll-MSGV4.

  ENDLOOP.



Many thanks in advance

Rashid_Javed
Contributor
0 Kudos

Hi Drashti,

1: Unfortunately VL09 is standard transaction and there is nothing much we can do. I would suggest to analyze program RVV50L09 (transaction VL09) to find any specific function module it is using to reverse order/deliver (whatever your input is). if you can find such function, you can directly call it in your RFC to speed things up.

2: For timeout issue please check with your basis administrator, I think there is some system settings for web service timeout. We were having similar problem in a web service call. An RFC based web service was taking too much time and client was having time out error. To resolve it our basis team has changed the setting of timeout parameter to wait more (like it was 60 sec before and later they make it 80 sec) and this solved the problem.

former_member214084
Participant
0 Kudos

Hi Javed ,

Yes it looks BDC is failing when is executed via SOAP UI. I am implementing FM -WS_REVERSE_GOODS_ISSUE to do reverse which is a lot more easier & faster to the requirement .

I have raised issue with basis team for the same , as we are facing this issue for first time due to limited Web servies in he system.

thank you for all help and advice.