How To Fix MC355 - Reference structures are passed to function modules


SAP Error Message - Details

  • Message type: E = Error

  • Message class: MC - Aggregate: views, matchcodes, lock objects

  • Message number: 355

  • Message text: Reference structures are passed to function modules

  • Show details Hide details
  • What causes this issue?

    You specified option 'allow RFC' for an existing lock object.
    During activation, the parameters of the generated ENQUEUE and DEQUEUE
    function modules are supplied with reference fields. Function modules
    without RFC permission do not require these reference fields.

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

    System Response

    How to fix this error?

    If the generated function modules are already called in an ABAP/4
    program, make sure that the call is made with parameters appropriate for
    the type. Otherwise, a runtime error occurs when you set the lock.
    The parameters are supplied with the following reference fields:
    Parameter: X_<field name> Reference field: DDENQ_LIKE-XPARFLAG
    Parameter: _WAIT Reference field: DDENQ_LIKE-WAITFLAG
    Parameter: _SCOPE Reference field: DDENQ_LIKE-SCOPE

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message MC355 - Reference structures are passed to function modules ?

    The SAP error message MC355, which states "Reference structures are passed to function modules," typically occurs when a reference structure is being used in a function module where a value structure is expected. This can happen in various scenarios, particularly when dealing with data transfer between different components or modules in SAP.

    Cause:

    1. Reference Structures: In SAP ABAP, a reference structure is a structure that points to another structure rather than containing its own data. This can lead to issues when the function module expects a value structure (which contains actual data) instead of a reference.
    2. Incorrect Parameter Type: The function module may have been designed to accept a specific type of parameter, and passing a reference structure instead of a value structure can lead to this error.
    3. Data Declaration Issues: If the data is declared incorrectly or if the wrong type of data is being passed to the function module, this error can occur.

    Solution:

    1. Check Function Module Definition: Review the function module's interface to understand the expected parameter types. Ensure that you are passing the correct type of structure (value structure instead of reference structure).
    2. Change Data Declaration: If you are using a reference structure, consider changing the declaration to a value structure. This can be done by using the DATA statement to declare a new variable of the correct type and then copying the data from the reference structure to this new variable.
      DATA: lv_value_structure TYPE your_value_structure_type.
      lv_value_structure = your_reference_structure.
      CALL FUNCTION 'your_function_module'
        EXPORTING
          your_parameter = lv_value_structure.
    3. Use MOVE-CORRESPONDING: If the structures have similar fields, you can use the MOVE-CORRESPONDING statement to copy data from the reference structure to a value structure.
      DATA: lv_value_structure TYPE your_value_structure_type.
      MOVE-CORRESPONDING your_reference_structure TO lv_value_structure.
      CALL FUNCTION 'your_function_module'
        EXPORTING
          your_parameter = lv_value_structure.
    4. Debugging: If the issue persists, use the debugger to trace the data being passed to the function module. This can help identify where the reference structure is being introduced.

    Related Information:

    • ABAP Data Types: Understanding the difference between reference types and value types in ABAP is crucial. Reference types point to data objects, while value types contain the actual data.
    • Function Module Documentation: Always refer to the SAP documentation for the specific function module you are using to understand its parameters and expected data types.
    • SAP Notes: Check SAP Notes for any known issues or updates related to the function module or error message MC355.

    By following these steps, you should be able to resolve the MC355 error and ensure that the correct data types are being passed to your function modules.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker