The ContextWrapper has methods to add additional temp-tables to the context dataset. This is however intended for temporary extension of the context dataset.
For permanent extension to the context dataset, you should leverage the fact that the structure of the context dataset is also loosely coupled. The only class knowing that dataset is the ContextDatasetFactory. Our standard implementation of the IContextDatasetFactory interface.
So I suggest you implement your own CceContextDatasetFactory class. This should include our temp-table used in "our" ContextDataset and add your own table(s):
{ Consultingwerk/OERA/Context/eContextProperties.i &NO-BEFORE=YES }
{ Consultingwerk/OERA/Context/eSessionContext.i &NO-BEFORE=YES }
DEFINE {&ACCESS} DATASET dsOsivContext{&SUFFIX} {&REFERENCE-ONLY} FOR
eContextProperties{&SUFFIX},
eSessionContext{&SUFFIX},
< your own additional tables > .
When implementing the CreateContextDataset method, please ensure you include "our" code:
METHOD PUBLIC HANDLE CreateContextDataset ():
IF NOT SESSION:REMOTE THEN DO:
CREATE eSessionContext .
ASSIGN eSessionContext.ClientProVersion = PROVERSION
eSessionContext.ClientType = SESSION:CLIENT-TYPE .
END.
RETURN DATASET dsContext:HANDLE .
END METHOD.