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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.