Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help in finding out error in include ---se37

Former Member
0 Likes
1,133

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

6 REPLIES 6
Read only

rainer_hbenthal
Active Contributor
0 Likes
952

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.

Read only

dev_parbutteea
Active Contributor
0 Likes
952

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 .

Read only

0 Likes
952

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

Read only

Former Member
0 Likes
952

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

Read only

matt
Active Contributor
0 Likes
952

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

Read only

Former Member
0 Likes
952

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