We are converting our dialogue program into webdynpro application. We want to reuse our dialogue program code in the BAPI which we will be calling from webdynpro application.
I plan to do create a function group Z_FG_XXX for one dialogue program screen and put all the global variables in the top include of the function group. Then the codes of PBO are put in one function module called Z_XXX_PB0 and code of PAI are in another function module Z_XXX_PAI. These two function module will be within the function group Z_FG_XXX.
The values which are retrieved or calculated in PBO will be used in PAI and vice versa. In order to achieve this only i have created a function group and put the function module with in that. My doubt is, Since this BAPI function modules are called from webdynpro whether the value set by Z_XXX_PB0 function in the function group top include can be accessed by Z_XXX_PAI or not.
Is there any other best practise which can be used to convert a dialogue program to BAPI for webdynpro application.
Thanks & Regards,