‎2010 Sep 04 8:37 AM
Hello Experts,
I am designing one application. In that application in top include I am declaring one Database table as TABLES ZABC.
I am also desiging selection screen blocks using fields of Table ZABC.
But while activating the TOP include I am getting the message as "ZABC must be a flat structure. You cannot use internal table, strings, references or structures as components."
Can anybody will suggest me what is the root cause & how to resolve it?
Thanks,
Neha
‎2010 Sep 04 9:16 AM
Hi Neha,
Please post the data declaration part here.
I believe you might have done some mistake in defining the internal table or Defining the Selection-screen.
Regards
Abhii
‎2010 Sep 04 9:16 AM
Hi Neha,
Please post the data declaration part here.
I believe you might have done some mistake in defining the internal table or Defining the Selection-screen.
Regards
Abhii
‎2010 Sep 04 9:44 AM
Hi Abhii,
I had declared as mentioned below.
TABLES: ZABC.
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_F1 FOR ZABC-F1 NO-EXTENSION NO INTERVALS,
S_F2 FOR ZABC-F2 NO-EXTENSION NO INTERVALS,
S_F3 FOR ZABC-F3 NO-EXTENSION NO INTERVALS,
SELECTION-SCREEN: END OF BLOCK B1.
I am really surprised to get the error as mentioned earlier.
Regards,
Neha
‎2010 Sep 04 10:16 AM
Hi Neha,
Everything looks okay to me.
Just do some more checks, Have you defined the TABLES declaration in another include & Selection screen in another.
Also check if table ZABC is activated in Data Dictionary.
Also when error is displayed just double click on error & see where in the program the the control points.
Regards
Abhii
‎2010 Sep 04 10:22 AM
Your table may consist of string components. Thats why this error is appearing.
Instead of declaring as a table declare with DATA as below.
* TABLES: ZABC. " Comment it
DATA: ty_so_zabc TYPE zabc.
SELECT-OPTIONS: s1 FOR ty_so_zabc-f1.
SELECT-OPTIONS: s2 FOR ty_so_zabc-f2.
SELECT-OPTIONS: s3 FOR ty_so_zabc-f3.
‎2010 Sep 04 10:33 AM
Hello Experts,
Thanks for your reply. I am not sure why I am getting error. But while following Asik's approch, I am able to declare selection screen.
Regards,
Neha