cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SELECT in SmartForms

Former Member
0 Kudos

Hi. I try to make a simple SELECT in my smartform.

SELECT zpersonal~nachn zpersonal~stredisko_aktual
INTO (itab_line-nachn,itab_line-stredisko_aktual)
FROM zpersonal
WHERE zpersonal~btrtl
BETWEEN werks_low
AND werks_high.
  APPEND itab_line TO itab.
  CLEAR itab_line.
ENDSELECT.

In global definitions/types I've defined

TYPES:
  BEGIN OF atab,
    nachn TYPE zpersonal-nachn,
    stredisko_aktual TYPE zpersonal-stredisko_aktual,
  END OF atab.

TYPES:
  tatab TYPE STANDARD TABLE OF atab.

and global definitions/global data

ITAB TYPE ATAB
ITAB_LINE TYPE TATAB

While activation I receive an error:

<i>@8O@ %CODE1 The list "(ITAB_LINE-NACHN" after "INTO" is not of the form (f1, ...,fn), or contains an undefined field. excludes specification

</i>

I'd be thankful for some help. Greetings. P.

Accepted Solutions (1)

Accepted Solutions (1)

former_member491305
Active Contributor
0 Kudos

Hi Piotr,

You have used the internal table fields <b>itab_line</b> in the into Clause. Instead, use the work area 'itab' as per your declaration in global definition.

SELECT nachn stredisko_aktual

INTO <b>(itab-nachn,itab-stredisko_aktual)</b> FROM zpersonal

WHERE btrtl

BETWEEN werks_low

AND werks_high.

<b>APPEND itab TO itab_lline.

CLEAR itab.</b>

ENDSELECT.

now it will work.Try to remove select endselect and use select into table options.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey,

Declaration should be

DATA: ITAB TYPE TATAB

ITAB_LINE TYPE ATAB.

Regards,

Vidya.