‎2008 Apr 18 4:52 AM
hellow Sirs.
i m creating a module pool , for that i have got a screen and there are 2 buttons. for Confirmation and one for selection..
but when i m using them in my Code. it is not Generating any code .
so they are not workin.
please provide any solution nd if possible provide an example how it is using!!
thanking you
Rahul
‎2008 Apr 18 4:59 AM
Hi,
While providing attributes for buttons we have to maintain function code field in attributes and while writing code we have to mention that function code under that we will write respective code.
for example if you maintain button conform in layout.for that if u had given function code as conform then in flowlogic we have to write like this
case sy-ucomm.
when 'conform'.
/respective logic/
endcase.
Regards,
Swetha
‎2008 Apr 18 4:59 AM
Hi,
While providing attributes for buttons we have to maintain function code field in attributes and while writing code we have to mention that function code under that we will write respective code.
for example if you maintain button conform in layout.for that if u had given function code as conform then in flowlogic we have to write like this
case sy-ucomm.
when 'conform'.
/respective logic/
endcase.
Regards,
Swetha
‎2008 Apr 18 5:03 AM
once check your code
either you have given the fct code in small letter between the quotes in pai event
or the fct code you provided in the screen painter is different remove the unecessary blanks etc
regards
prasanth
‎2008 Apr 18 5:30 AM
Hi,
1. Check your code
2. You might have given the fct code in small letter between the quotes in pai event
3. The fct code you provided in the screen painter is different remove the unecessary blanks etc
Reward if Helpful.
Jagadish
‎2008 Apr 18 5:31 AM
Hi,
There may be 2 problems. One you have not set Function code in the Psh button attributes. Please check the screen field attributes. If that is fine, Check if you have given a OKCODE in your screen. There will be an entry in your screen element list without a name. you have to give a name to this field. Then you have to write your logic in the PAI.
For example the push button FCODE is 'SUBMIT'. screen okcode name is W_OKCODE.
You have declare a variable in your main program DATA: w_okcode TYPE sy-ucomm.
Now in PAI MODULE USER_COMMAND,
case w_okcode.
when 'SUBMIT'.
< Action to be performed>
when others.
<Action........>
endcase.
This should solve your problem.
Reward points if helpful.
Thanks and Regards,
Lakshmi.
‎2008 Apr 18 5:38 AM
Hi,
Check the function code used in attributes is exactly same as the one which u used in ur code also. Give OK_CODE in the element list also.
When u add a button in ur screeen n by maitaining fct code, it'll not generate any code by itself but u'v to code it in case sy-ucomm.
i.e...
case sy-ucomm.
when 'CONFORM'
.........................
when 'SUBMIT'
.......................
reward if helpful,
Iyswarya