Skip to Content

SLIN/EC error in structure enhancement (standard structure is used)

I'm making changes in a very old program and am getting an extended check error (not warning even though the message text says so): "After a structure enhancement, the assignment or comparison may no longer be permitted".

The code in question fills in an extension table for BAPI. Here are the relevant code lines:

DATA: ls_bape_vbap TYPE bape_vbap,
 extensionin TYPE STANDARD TABLE OF bapiparex WITH HEADER LINE. 

extensionin-structure = 'BAPE_VBAP'.
 extensionin-valuepart1 = ls_bape_vbap.


CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

[…]

TABLES
 extensionin = extensionin.

Style issues aside, the code seems legit to me. There are several old questions about this error on SCN (just a top search result) but they are either unanswered or an answer is "oh, just change the enhancement category in SE11". In this case it's a standard structure (with a custom append) so obviously I'm not doing that.

There is no concern about functionality. But since this comes up in EC as an error and not a warning, it presents an issue with a code review or when EC check is automated and such.

It's not clear why does this have to be an error without a pragma to hide it. But that's another story.

Without touching dictionary, can this code be changed in any way to avoid this EC error? I'm drawing blanks on this. Looked up an old SAP Note on BAPI extensions but it doesn't have any better guidance.

ec-message.jpg (149.6 kB)
bape-vbap.jpg (109.3 kB)
Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Posted on Oct 14, 2018 at 06:04 PM

    I had the same problem last week (SLIN message) with a specific structure. I changed the enhancement category of my structure to "Can not be enhanced". And the SLIN message disappeared.


    For your standard structure BAPE_VBAP, I was able to remove the message by using a newly specific DDIC structure ZZTMP_BAPE_VBAP that is an exact copy of the standard structure BAPE_VBAP (except the enhancement category). But of course, this is not a valuable solution.

    DATA: ls_bape_vbap_cus TYPE zztmp_bape_vbap, "bape_vbap cannot be enhanced,
    ls_bape_vbap_std TYPE bape_vbap, "bape_vbap,
    extensionin TYPE STANDARD TABLE OF bapiparex WITH HEADER LINE.

    extensionin-structure = 'BAPE_VBAP'.

    ls_bape_vbap_cus = ls_bape_vbap_std.
    extensionin-valuepart1 = ls_bape_vbap_cus. " ls_bape_vbap.

    DATA: ls_bape_vbap_cus TYPE zztmp_bape_vbap, "bape_vbap cant be enhan
          ls_bape_vbap_std TYPE bape_vbap, "bape_vbap,
          extensionin TYPE STANDARD TABLE OF bapiparex WITH HEADER LINE.
    
    extensionin-structure = 'BAPE_VBAP'.
    
    ls_bape_vbap_cus = ls_bape_vbap_std.
    extensionin-valuepart1 = ls_bape_vbap_cus. " ls_bape_vbap.<br>

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 15, 2018 at 12:13 PM

    Ah! You didn't check the old threads!

    I got the same issue and Bjoern Jueliger was kind enough to give me a full explain of this https://answers.sap.com/questions/662013/atc-and-bapis-extensions.html

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2018 at 09:54 PM
    Add comment
    10|10000 characters needed characters exceeded

    • I read the basic example of the documentation: a DDIC structure is moved to a string.

      Here, we want to move a DDIC structure (bape_vbap) to a 240 characters field (bapiparex-valuepart1).

      The DDIC structure bape_vbap enhancement category is "Can be enhanced and character-like".

      And it is having only 2 fields: VBELN (char10) and POSNR (numc6).

      The result of my test is:

      • If this DDIC struct is moved to a string then there is no message in SLIN. ==> the result corresponds to the documentation explanation
      • If this DDIC struct is moved to char240 there is a message in SLIN. ==> Is it normal to have a message ?
      DATA: my_struc  TYPE bape_vbap           , "DDIC struct. that "Can be enhanced and character-like"
            str       TYPE string              ,
            char240   TYPE bapiparex-valuepart1. "char length 240
      
      
      str     = my_struc. "SLIN: no message
      char240 = my_struc. "SLIN: Syntax check warning.
      
      
      "  SLIN Message:
      "       After a structure enhancement, assignments or comparisons may no longer be permitted. syntactically
      "       incorrect.
      "       Internal message code: MESSAGE G:M
      "       Cannot be deactivated using a pragma. Message Code STE 1306
      
      

      But, if we append a field of type T001 to the DDIC structure

      then the SLIN message disappears (for instruction char240 = my_struc).

      ==> Do you have the same result in your system ? (my system is ECC EHP8)

      91ynx.png (18.8 kB)
  • Posted on Nov 05, 2018 at 07:49 AM

    Jelena - have you tried changing the enhancement-category of the Append-structure ZABAPE_VBAP? That's obviously in the customer-namespace, so changing it isn't an issue.

    Alternatively - and to get rid of this being reported as an error - somebody who has the relevant authorizations could change the message-priority in SCI (Management of --> Message priorities) from "1" (error) to "3" (information) to still show the message but at least no longer as an error.

    Cheers

    Bärbel

    Add comment
    10|10000 characters needed characters exceeded