1

I have a screen with one table control which displayed values from my internal db. It worked out flawlessly.

I added another table control which didn't worked out the way i wanted.

I deleted the control CONTROLS: tc_two TYPE TABLEVIEW USING SCREEN 9000.

And now I'm getting a runtime error CONTROL-Variable not found.

Q: What happens if i declare new Controls? Where do they get implemented?

I tried to debug my code and the error appears at CALL SCREEN 9000.

Here is the full code:

REPORT zsch_test.

CONTROLS: tc_one TYPE TABLEVIEW USING SCREEN 9000.

DATA: it_uebung  TYPE TABLE OF zsch_uebung,
      ok_code    TYPE sy-ucomm,
      fill       TYPE i.

TABLES zsch_uebung.

DATA: lines TYPE i,
      limit TYPE i.

SELECT * FROM zsch_uebung INTO CORRESPONDING FIELDS OF TABLE it_uebung WHERE status = '1'.

CALL SCREEN 9000.

MODULE status_9000 OUTPUT.
  SET PF-STATUS 'STATUS9000'.
*  SET TITLEBAR 'xxx'.
  DESCRIBE TABLE it_uebung LINES fill.
  tc_one-lines = fill.
ENDMODULE.

MODULE fill_table_control OUTPUT.
  READ TABLE it_uebung INTO zsch_uebung INDEX tc_one-current_line.
ENDMODULE.

MODULE cancel INPUT.

  LEAVE PROGRAM.

ENDMODULE.

MODULE read_table_control INPUT.
  lines = sy-loopc.
  MODIFY it_uebung FROM zsch_uebung INDEX tc_one-current_line.

ENDMODULE.

MODULE user_command_9000 INPUT.
  ok_code = sy-ucomm.
  CASE ok_code.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
    WHEN OTHERS.
  ENDCASE.
ENDMODULE.

Screen 9000:

PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
LOOP WITH CONTROL TC_ONE.
MODULE fill_table_control.
ENDLOOP.

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

LOOP WITH CONTROL TC_ONE.
MODULE read_table_control.
ENDLOOP.
MODULE USER_COMMAND_9000.

Thanks!

sadly it's in germanenter image description here

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • 1
    Again: Show us the entire problem, not just some fragment. Try to put yourself in someone else's position - "I did something, then changed something, now it no longer works, where's the problem?" – vwegert Nov 11 '16 at 14:37
  • I would like to understand what happens if i declare new controls. If someone could tell me the answer i can fix it :). I cant find any left over code from my control: tc_two. That's why i thought there is more than just the code i usually work with. –  Nov 11 '16 at 14:45
  • 1
    There certainly is - the screen definition (which is more than the processing logic), and you haven't added that to the question (yet) - please do so. – vwegert Nov 11 '16 at 14:49
  • What do you mean by "screen definition"? –  Nov 11 '16 at 14:54
  • The attributes and the element list. – vwegert Nov 11 '16 at 14:55
  • Done :). I know i should write my code in one language and dont mix it up. –  Nov 11 '16 at 14:59
  • And what exactly is the error message? Please not some approximation, but the literal message. – vwegert Nov 11 '16 at 15:00
  • Okay that's weird. I just executed the program and I didn't get the error message? I didn't change anything. –  Nov 11 '16 at 15:04
  • @vwegert Is there a way how I can display previous error messages? –  Nov 11 '16 at 15:12
  • 1
    try transaction ST22 – vwegert Nov 11 '16 at 15:25

1 Answers1

0

From the fact that the problem disappeared apparently without further action, one might assume that this was either a buffer issue (which is why you should re-start the entire transaction when testing a changed program) or you accidentally failed to activate the entire program (and, for example activated only the report source, but not the screen definition).

vwegert
  • 18,371
  • 3
  • 37
  • 55
  • If I'll run into this problem again I'll restart the transaction. Thanks for your help! –  Nov 14 '16 at 08:33