2010 Mar 15 8:36 AM
Hello everyone,
This is regarding the include in the function module .
Where we define constants , i have to define like this
If plant EQ 'ita' OR plant EQ 'del' OR plant EQ 'net' .
c_form LIKE itcta-tdform VALUE 'form1' .
ELSE .
c_form LIKE itcta-tdform VALUE 'form2' .
ENDIF .The error that i get while activating is "unable to interpret PLANT -possible causes -incorrect spelling or comma error".
I am not able to find out where i am going wrong .
Can anyone help me find out the error or where and what i missed out .
Any help will be appreciated .
Thanks
Sumit
Hello everyone,
This is regarding the include in the function module .
Where we define constants , i have to define like this
If plant EQ 'ita' OR plant EQ 'del' OR plant EQ 'net' .
c_form LIKE itcta-tdform VALUE 'form1' .
ELSE .
c_form LIKE itcta-tdform VALUE 'form2' .
ENDIF .The error that i get while activating is "unable to interpret PLANT -possible causes -incorrect spelling or comma error".
I am not able to find out where i am going wrong .
Can anyone help me find out the error or where and what i missed out .
Any help will be appreciated .
Thanks
Sumit
2010 Mar 15 8:40 AM
You can not have logical expressions in data decalration. If it various that way, it isnt a constant. So why decalring it as a constant if it may change? Thats nonsense.
2010 Mar 15 8:41 AM
Hi,
You should do something like this, assuming that plant is an importing parameter in the FM or alreayd declared in the codes..
data:c_form type itcta-tdform .
If plant EQ 'ita' OR plant EQ 'del' OR plant EQ 'net' .
c_form = 'form1' .
ELSE .
c_form = 'form2' .
ENDIF .
2010 Mar 15 10:51 AM
Hi Sumit,
The error message that you get while activating *"unable to interpret PLANT -possible causes -incorrect spelling or comma error" means that the variable plant is not defined in the include nor is it a global variable, or you have missplet the variable name. Declare/correct the variable accordingly in your include and proceed as mentioned in the above response for "FORM1" or "FORM2" values.
Regards,
Chen
2010 Mar 15 11:02 AM
Hi,
U have not defined the varibale PLANt.
Defin ethe same in Tcode = SE37
Give the function module name and clcik on change.
Use menu GOTO----
>GLOBAL DATA. define the plant here as below.
data: plant type werks.
Regards,
Pravin
2010 Mar 15 11:08 AM
I assume you mean the TOP include -that is - where the data is declared? The TOP include contains the global data definitions. It does not contain ANY programming. There is no conditional declaration of variables or constants.
Further (unless declared as global), parameters within a function module are local to the function module and cannot be accessed outside it.
matt
2010 Mar 15 2:37 PM
Actually, I think you'll find that the problem is in the statement just before this one. Did you end it with a period??
Rob
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |