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.