Hi Thomas,
In the badi code you can inspect some memory variable that will be initialized by custom logic badi called at the beginning of particular DM package/ We have done it like this:
By default it's prohibited in write back badi to write to ACT category. But for specific DM we use:
//*************************************************** ALLOW WRITE TO ACT
*START_BADI WRITE2ACT
WRITE=OFF
QUERY=OFF
DEBUG=OFF
*END_BADI
//*************************************************** Clear data in ACT
*XDIM_MEMBERSET PERIODS=%PERIODS_SET%
*XDIM_MEMBERSET BE=%BE_SET%
*XDIM_MEMBERSET PLANTYPE=ACT
*WHEN INACCT
*IS *
*REC(EXPRESSION=0)
*ENDWHEN
...
WRITE2ACT badi code:
method IF_UJ_CUSTOM_LOGIC~EXECUTE.
" Разрешить запись в ACT
DATA l_importact TYPE C.
l_importact = 'X'.
EXPORT importact = l_importact TO MEMORY ID 'Z_VALIDATOR_IMPORTACT'.
cl_ujk_logger=>empty_line( ).
cl_ujk_logger=>log( '=========================================================' ).
cl_ujk_logger=>log( '# Access to ACT is allowed now! #' ).
cl_ujk_logger=>log( '=========================================================' ).
endmethod.
In write back badi we check it:
IMPORT importact = l_importact FROM MEMORY ID 'Z_VALIDATOR_IMPORTACT'.
Vadim