Which ABAP Programs Require Dialog Programming 
The ABAP programmer is provided with two mechanisms for controlling the interaction between ABAP program and online user:
(Parameters STAT, M_TYP, PWDID, SUPER, WINID and RWNID)
For new programs, you should use only the second mechanism, graphics function modules with the utility function modules.
Your program may not require dialog programming at all, depending on whether your application is simple, more complex or complex.
This means your program does not need to manage multiple windows. Hence it does not need to use any of the WINID, PWDID, or SUPER dialog parameters.
Even though your program will not respond to user input, it must ask the function module to wait for input. This is because at least one function module call in each ABAP program must be a waiting function module. ("Waiting for user input" under the relevant topics "Dialog Programming Using the Dialog Parameters" and "Dialog Programming With GRAPH_RECEIVE and GET_xxxx_PARAM" explains why.)
You do not need any dialog parameters for this kind of program. The default value of STAT specifies waiting, and thus can be omitted.
If your program doesn't respond to user input, neither of the dialog parameters that report this input are needed.
For this scenario, you don't need the STAT parameter, since waiting is the default. You do, however, need message code parameter (MCODE or M_TYP) in order to know when the user has closed the window. You can ignore the other dialog parameters.
You must use the STAT, MCODE (M_TYP), WINID, and PWDID (and possibly also SUPER) parameters.
Your program might allow the online user to select a menu item in the first window, which then starts up a second window. The graphics program running in the second window might be the same as the program in the first, or they might be different.
For example, SAP Hierarchy might run in the first window, and might allow the user to select a node. Node selection might then trigger a second window running SAP Statistics, where a graph is displayed for the selected node.