I am supposed to modify the Existing Module pool. I have the main screen which is 9001 which has the Subscreen area in the layout say sub1.
I have created two subscreens 9002 which is blank and 9003 which has the table control and a push button 'DONE' along with other scrolling buttons.
Now all the Coding has been done . When in the screen 9001, which has a table control and a Push button 'EXCEPTIONS,' I enter the detail and seect a line and click on the push button it should take me to Subscreen 9003 and disply that screen.
I have done all the coding correctly and written the following code.
CALL SUBSCREEN SUB1 INCLUDING SY-REPID AND ZSCR.
CALL SUBSCREEN SUB1.
The value of the field ZSCR Would be decided upon pressing the Push button 'EXCEPTIONS' on the first main screen 9001. hence I have put a condition in the PAI of 9001 :
zscr = '9003'.
zscr = '9002'.
So the screen 9003 should e dispalyed when I press 'EXCEPTIONS' on the screen 9001.
When I activate the code and try to execute the transaction I get the Short dump saying that system is trying to call the dynpro 0000 . i.e. zscr does not have the value in PBO of 9001 and hence giving the dump. It will obviously have the value when the PAI is executed.
If I hard code the value of zscr = '9003' , the transaction executes and dispalys thesubscreen along with the main screen which I do not want.
I also want the logic for 9002 screen i.e. when I press 'DONE' on the Subscreen 9003 It should call the subscreen 9002 which is blank.
Can anybody please tell me what is the solution to avoid the short dump. I donot want to hard code the value of zscr to 9003 . It Should be dispalyed when I Press 'EXECPTIONS' buttonb on screen 9001 below the table control.
Now when all the data entry is done in 9003 the user would click on button 'DONE' then the screen '9002' Should be called which will display blank.