Tab controls [SOLVED]

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
chrisandk
Posts: 325
Joined: Sat Nov 11, 2006 7:55 am

Tab controls [SOLVED]

Post by chrisandk » Fri Jul 04, 2008 1:53 am

Hi,

I am doing a dialog program with two tabs.


For the tab control, i named it TC_MAIN in screen painter.


In the include TOP of the program, i defined CONTROLS TC_MAIN type tabstrip.

In PBO, i have tc_main-activetab = 'push1'.

Error message
------------------
Statement "TC_MAIN-ACTIVETAB" is not defined. Check your spelling. spelling. spelling. spelling.
What could be wrong?

The strange thing is when i double click on to the tabstrip keyword, it doesn't show anything. Unlike when you click on the sy-dynnr keyword, it will return you a strucutre.
Last edited by chrisandk on Sun Jul 06, 2008 11:32 pm, edited 1 time in total.

ashthomas
Posts: 107
Joined: Sat Jan 12, 2008 12:03 pm
Location: West London
Contact:

Re: Tab controls

Post by ashthomas » Fri Jul 04, 2008 6:07 am

Hello,

Remove that line, set a break-point and then in debugger look at what TC_MAIN is made up of.
Kind regards


Ash Thomas
Ash People, Sap Consultants & Sap Consultancy
http://www.ashpeople.com

chrisandk
Posts: 325
Joined: Sat Nov 11, 2006 7:55 am

Re: Tab controls

Post by chrisandk » Fri Jul 04, 2008 6:38 am

HI,

It is not a run-time error. it is some compilation error which doesn't make sense?

No idea.

If i create a non-dialog program (ZTEST001), create a screen, create tabcontrol and then in the main program i type
CONTROLS mytabstrip type tabstrip.
mytabstrip-activetab = 'TAB1'.

i am able to compile without error.

If i do the same thing in dialog program (SAPMZ001), create a screen, table control and then type in the two lines of code in the include TOP and compile, it hits this wierd error.
Statement "TC_MAIN-ACTIVETAB" is not defined. Check your spelling. spelling. spelling. spelling.
What do you reckon?

ashthomas
Posts: 107
Joined: Sat Jan 12, 2008 12:03 pm
Location: West London
Contact:

Re: Tab controls

Post by ashthomas » Fri Jul 04, 2008 6:43 am

I didnt say it was a run-time error.

I reckon you should follow my advice :o) See what that's made up of.
Kind regards


Ash Thomas
Ash People, Sap Consultants & Sap Consultancy
http://www.ashpeople.com

ashthomas
Posts: 107
Joined: Sat Jan 12, 2008 12:03 pm
Location: West London
Contact:

Re: Tab controls

Post by ashthomas » Fri Jul 04, 2008 6:44 am

Another thought - try compiling and activating the top include.

If that fails, compile everything, then log off - that has worked for me a couple of times.
Kind regards


Ash Thomas
Ash People, Sap Consultants & Sap Consultancy
http://www.ashpeople.com

chrisandk
Posts: 325
Joined: Sat Nov 11, 2006 7:55 am

Re: Tab controls

Post by chrisandk » Fri Jul 04, 2008 11:08 am

Hi,

Thanks for your reply.

I've tried all the methods you've suggested but it doesn't work.


I noticed this problem only exist if i create a dialog program by using the SAPMZ**** naming convention. If i create a norma program (Z********) and then create a screen to it, after declaring CONTROLS tc_main type tabstrip. tc_main-activetab = 'TAB1'. will just work fine without compilation error.

m@t or abapdoctor!!!!!!! I need your help :p

wilhitern1
Posts: 135
Joined: Thu May 15, 2008 4:25 pm
Location: Butterball LLC., Goldsboro, NC, USA
Contact:

Re: Tab controls

Post by wilhitern1 » Fri Jul 04, 2008 11:50 am

Are you building through a screen pool or just adhocking the names? If you look in SE80 are they all referenced properly?
Neal Wilhite (WilhiteRN1)Image

ashthomas
Posts: 107
Joined: Sat Jan 12, 2008 12:03 pm
Location: West London
Contact:

Re: Tab controls

Post by ashthomas » Sat Jul 05, 2008 12:01 pm

I really want to get to the bottom of this one.

What is that variable if you look at it in debug mode?
Kind regards


Ash Thomas
Ash People, Sap Consultants & Sap Consultancy
http://www.ashpeople.com

chrisandk
Posts: 325
Joined: Sat Nov 11, 2006 7:55 am

Re: Tab controls

Post by chrisandk » Sun Jul 06, 2008 11:31 pm

Hey,

I got it solved! :D It is just some silly mistake. I should put it inside a module instead of leaving it out in PBO.


Thanks for your help :)

Post Reply