Skip to Content
Jul 25, 2014 at 12:13 PM

Problem with an obsolete ABAP expression


This is really a tricky problem, maybe only old ABAP developers know a solution... for this...

FORM routine STRUKTUR_ANLEGEN that contains a Userexit Call


See note 548205

In this case coding is very old, so we have a function module call that is part of this 'old' construction' with global table VBAP VBAK etc...

and EXIT has not enough parameters to implement program logic because logic of return table XSTB depends on VKORG and VTWEG value of VBAK..

So I can only use two approaches:

1. Use 'dirty' assigns in userexit function

2. Use an implicit enhancement point at beginning of form routine STRUKTUR_ANLEGEN and copy complete code to change program behavior before adding a check 1 = 0.

Both approaches are not 'nice' but the secon approach seems to be the nicer one because I have access to all variables...

But now there's a serious problem because my code starts directly after FORM statement and before variables...

To substitute local variables with other named ones and in coding is no problem..

But there are varables defined with

LOCAL: structure,



But an obsolete LOCAL definition can only be made directly after a FORM statement, but as a part of an enhancement point implementation it technically seems to be a part of a mthod... so system throws an error that LOCAL is only allowed directly after FORM ..

Is there a way to implement LOCAL logic using other ABAP expressions ?