Naveen, thank you for all the efforts you are taking to help me out on this issue.
I tried the above code but there seems to be a few problems here.
1. It does not display OK or NG bcos its in AT SELECTION-SCREEN OUTPUT. (which is why i chose to use Start-of-selection)
2. When I press execute, by default it shows the message under IP address, 'IPアドレスを指定してください'.
3. When I enter 11 in the instance number, it doesnt update the data in table first.
Any idea on how to rectify this?