My client requires changes to the RF screens for Physical Inventory - txn LM58 (System Guided). It is not possible to implement a custom screen in the usual way in RF (by pointing custom screen to logical screen etc). I found a badi 'BADI_DCC_SCREEN_151' which allows the customer to point the standard screen to a new custom one. I have implemented this BADI and specified my custom screen which now displays when I call txn LM58.

However my problem is in setting data to my custom screen. I created a new custom implementing class based on the standard class 'CL_EXM_IM_BADI_DCC_SCREEN_151'. This class has two methods to set data to instance and get data from instance i.e. IF_EX_BADI_DCC_SCREEN_151PUT_DATA_TO_INSTANCE F_EX_BADI_DCC_SCREEN_151GET_DATA_FROM_INSTANCE

I am trying to use the method PUT_DATA_TO_INSTANCE to populate custom screen but I am unsure how to do this. I would appreciate if someone could help with this. How do I link this method to my custom screen etc. There is hardly any documentation on this and I cannot find a similiar example by searching on here.

Thanks for taking the time. I appreciate any help at all on this matter.

Thanks for taking the time to reply. My custom screen was not in the correct function group so this was a problem. The screen fields are getting set but this seems to be happening automatically.

I still cannot use the fields gv_lgpla etc in my screen as they are not acessible in my custom screen. So how do I link this variable to my screen field ? I can see the variable I_CLGPLA from my screen but this value cannot in the class method. It seems the standard screen data is being set automatically on my custom screen (custom screen field names are the same as standard) so it seem's i might not need to do anything in the class method.

Still, for my own knowledge, I would like to know how to link gv_lgpla from the class to the field linv-lgpla on my custom screen ?

If I set the screen field name to GV_MATNR it wont work as the variable declared in the class is not visible from the screen PBO even if the screen field is the same name.

The exporting fields from the class are accessible in the screen PBO (ie. i_matnr, i_lgpla etc) and I think the behaviour is replicating whatever the standard is for the field. So whichever data the system provides as standard to the screen is accessible throug the i_field variables. This must be how the functionality was intended to function.

I'm happy that this will work in the way I want it to and that they class export fields are populated accordingly depending on the screen being processed. i.e. if I copy screen 151 to 9151 then I'll only be able to access the field information provided for the standard screen via the BADI. I'm going to close this thread