Application Development 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: 

BAPI_SALESORDER_SIMULATE DESTINATION RFC_LOCAL getting dump

0 Kudos

Hi Folks,

i am getting a dump when an idoc gets posted in our system. this idoc is creating an order in our system through some interface and the bapi getting called is BAPI_SALESORDER_SIMULATE.

the code is as shown below

CALL FUNCTION 'BAPI_SALESORDER_SIMULATE' destination lv_rfcdest

     EXPORTING

       order_header_in    = sd_order_header

     IMPORTING

       return             = return

     TABLES

       order_items_in     = sd_order_items_in

       order_partners     = sd_order_partners

       order_items_out    = sd_order_items_out

       order_cfgs_ref     = sd_order_cfgs_ref

       order_cfgs_inst    = sd_order_cfgs_inst

       order_cfgs_part_of = sd_order_cfgs_part_of

       order_cfgs_blob    = sd_order_cfgs_blob

       order_cfgs_value   = sd_order_cfgs_value

       messagetable       = messagetable.



LV_RFCDEST is LOCAL_RESTRICTED


Dont knwo why the above bapi is not getting called for destination


there was a user called AGO_USER(non-dialog user).


please suggest if you know any solution.


Regards

Ravi

1 REPLY 1

Former Member
0 Kudos

Hi,

You can try to handle the exception in the destination call to analyse the message or exception if raised.

DESTINATION lv_destination EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE msg.

Also check the Documentation available for DESTINATION.

I am pasting the same for your reference .

Addition 5

EXCEPTIONS exc1 = n1 exc2 = n2 ...

Effect

The addition EXCEPTIONS is used to perform classic non-class-based exception handling, which works in essentially the same way as general function module calls. In addition, however, the special exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE can be specified to handle the exceptions raised by the RFC interface itself. An optional MESSAGE addition can also be specified after these exceptions. If one of the special classic exceptions system_failure or communication_failure is raised, the first line of the associated short dump is inserted in the smess or cmess field. This field which must be a flat character-like field. If a remotely called function module raises a class-based exception during non-class-based exception handling, this exception is not transported and raises the predefined classic exception SYSTEM_FAILURE instead

Notes

  • Specifying error_message after EXCEPTIONS has no effect in the RFC.

  • If the classic exception SYSTEM_FAILURE is raised when a message of type "A", "E", or "X" is sent, the smess field contains the message short text when MESSAGE is specified.

  • Class-based exception handling in RFCs is not possible in this release track.

Hope this helps.