Skip to Content
author's profile photo Former Member
Former Member

"Loop cannot be assigned to any field." What does that mean?

Hi, I want to create a Table Control.

This is my code for nów:


PROGRAM ZCONTROLART.
TABLES ZARTIKEL.
CONTROLS ARTIKELTABELLE TYPE TABLEVIEW USING SCREEN 1010.
TYPES: BEGIN OF ARTIKELBEARBEITUNG,
ARTIKEL_NR TYPE ZARTIKEL-ARTIKEL_NR,
ARTIKEL_TYP TYPEW ZARTIKEL-ARTIKEL_TYP,
BEZEICHNUNG TYPE ZARTIKEL-BEZEICHNUNG,
END OF ARTIKELBEARBEITUNG.

DATA: ITS TYPE TABLE OF ARTIKELBEARBEITUNG,
WA TYPE ARTIKELBEARBEITUNG,
itartikel TYPE ZARTIKEL,
waartikel TYPE ZARTIKEL,
okcode LIKE SY-UCOMM.
CALL CREEN 1010.

MODULE V1 INPUT.
CASE OKCODE.
WHEN 'SAVE'.
WA-ARTIKEL_NR = ZARTIKEL-ARTIKEL_NR.
WA-ARTIKEL_TYP = ZARTIKEL-ARTIKEL_TYP.
WA-BEZEICHNIUNG = ZARTIKEL-BEZEICHNUNG.
MOVE-CORRESPONDING WA TO WAARTIKEL.

INSERT INTO ZARTIKEL VALUES WAARTIKEL.

WHEN 'DELETE'.
WA-ARTIKEL_NR = ZARTIKEL-ARTIKEL_NR.
WA-ARTIKEL_TYP = ZARTIKEL-ARTIKEL_TYP.
WA-BEZEICHNIUNG = ZARTIKEL-BEZEICHNUNG.
MOVE-CORRESPONDING TO WAARTIKEL.
DELETE ZARTIKEL FROM WAARTIKEL.

WHEN 'MODIFY'.
WA-ARTIKEL_NR = ZARTIKEL-ARTIKEL_NR.
WA-ARTIKEL_TYP = ZARTIKEL-ARTIKEL_TYP.
WA-BEZEICHNIUNG = ZARTIKEL-BEZEICHNUNG.
MOVE-CORREDPONDING WA TO WAARTIKEL.
MODIFY ZARTIKEL FROM WAARTIKEL.
ENDCASE.
ENDMODULE.

MODULE EXIT INPUT.
IF OKCODE = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.

In screen-painter (layout) I got the program field from table wa.

In flow-logic I have the code:

PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL ARTIKELNUMMER.

ENDLOOP

PROCESS AFTER INPUT.
MODULE EXIT.
LOOP WITH CONTROL ARTIKELNUMMER.
MODULE V1.

ENDLOOP.

Now I got a failure, when I want to activate the Dynpro.

Its called:

Syntax error in screen.

Program - ZWORKTOP

SCREEN - 1010

Position - Flow logic

LOOP cannot be assigned to any field.

Has anyone of you an idea, so as the other times 😊, what this message mean and how I can fix the problem??

Is there a faulse code in my flow logic??

I hope you can help me so great, as you did the other times...

Bye

Buergman

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 16, 2015 at 06:53 AM

    I understand this is old post but I also faced same issue. My solution might be helpful to someone.

    Resolution - I missed to create table control in layout and once that was created, I was able to activate screen.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2009 at 08:57 AM

    Hi ,

    PROCESS BEFORE OUTPUT.
    LOOP WITH CONTROL ARTIKELTABELLE.       <<<You should be looping at table control here
     
    ENDLOOP
     
    PROCESS AFTER INPUT.
    MODULE EXIT.
    LOOP WITH CONTROL ARTIKELTABELLE.
    MODULE V1.
     
    ENDLOOP.
    

    Himanshu

    Add comment
    10|10000 characters needed characters exceeded