Skip to Content
0
Former Member
Jun 09, 2008 at 11:59 AM

Weird RFC problem

59 Views

I have defined a very simple RFC enabled FM to return the existence of a material. First call to the FM in a LUW works correctly, subsequent calls fail.

Parameter MATNR is passed into the FM. I have a log-point in the code to check what is passed in.

First call, value of matnr is 00000000000100000, which is correct.

Second call, value is logged as 〰〰〰〰〰㄰〰〰〰        

This happens when I execute the following code on the calling side:


  CALL FUNCTION 'Z_MAT_CHECK_EXISTENCE'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

  CALL FUNCTION 'Z_MAT_CHECK_EXISTENCE'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

  CALL FUNCTION 'Z_MAT_CHECK_EXISTENCE'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

Interestingly, if I hard code the materials like this:

  CALL FUNCTION '000000000001000000'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

  CALL FUNCTION '000000000001000001'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

  CALL FUNCTION '000000000001000002'
    DESTINATION l_dest
    EXPORTING
      matnr  = IM_MATNR
    IMPORTING
      EXISTS = l_exists.

  ex_exists = l_exists.

  commit work and wait.

Then all three values of matnr are correct in the receiving system.

Any comments as to what could be the issue here?