‎2008 Oct 31 6:26 AM
hi guys i am a fresher in abap and am havin a prob..
wen makin the module pool program...
i m addin two buttons to my screen painter..
NEXT and BACK
when in the module pool screen i am giving case n when statement it says case not defined and when i make a module for it in se38 it says for WHEN 'BACK'.. tat when should be followed by case..
pl help
‎2008 Oct 31 6:37 AM
i have already written
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'NEXT'.
SELECT ...
LEAVE TO SCREEN 200.
That i did before only... still the prob is comin
‎2008 Oct 31 6:34 AM
Hi
give like this
CASE SY-UCOMM
WHEN 'BACK'.
SELECT STATMENT.....................
And also check in SE51(screen painter) for button Back your given FCT code or/not.
Regards
ranga
‎2008 Oct 31 6:37 AM
i have already written
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'NEXT'.
SELECT ...
LEAVE TO SCREEN 200.
That i did before only... still the prob is comin
‎2008 Oct 31 7:04 AM
In your screen element list declare a variable for ok_code(last one in the element list), and declare the same variable in the program also.
Now use Case statement with that variable.
Regards
Karthik D
‎2008 Oct 31 9:26 AM
Hi Abhi,
Here you have to understand one concept, when you are clicking on Back or next pushbuttons it has to communicate the next action that you have given in the code that can be done using SY-UCOMM.
If you declare Ok code in module pool elements than use OK_CODE.
And you have to define your FCT code for Back and Next which will help you to trigger the action when button is click. Suppose double click on Back opens a window in that give fct code as BACK.
Coming to code part.
Case Sy-ucomm.
When 'BACk'.
Call screen 100.
endcase.
that means when i am clicking on back i am calling screen 100 understand the concept of your problem.
Cheers!!
VEnk@