Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table control error

Former Member
0 Likes
1,209

Hi,

I am working with a table control in a dialog program.

I have the below error.

"The field "TITLE" is not assigned to a loop. "LOOP ... ENDLOOP" must appear in "PBO" and "PAI". "

Title is nothing but the text field which I have on my table as the title.

Should it be tied up with the table? Called in the program?

Not sure what that error means.

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
820

Hi There,,

According to that error, you must specify that table control both in PBO and PAI of your flowlogic..

Follow the steps given below to resolve the issue you are experiencing.

In the flowlogic,,

Inside the PBO write the similar code. :

loop at itab with control TC cursor TC-current_line.

endloop.

and in the PAI write the following .

loop at itab.

endloop.

In the report or Module pool program (SE38) You need to declare the table control

syntax :

Controls : TC type tableview using screen 100.

==============================

1. Controls is the keyword to declare the table control and it should be of type tableview.

2. In my example I have taken TC as the tablecontrol name. and I am passing itab to the table control.

Similarly you take care of the code, it should resolve the issue,,

Let me know if you need further help.

<REMOVED BY MODERATOR>

Thanks-

Rahul.

Edited by: Alvaro Tejada Galindo on Mar 5, 2008 5:58 PM

Read only

0 Likes
820

hi

in casse u make use of table contols

In Top Include, define:

CONTROLS <ctrl> TYPE TABLEVIEW USING SCREEN <scr>.

(Where <ctrl> is name of table control on screen <scr>)

Cursor Position in Table Controls

At PBO Event

SET CURSOR FIELD <f> LINE <lin> [OFFSET <off>].

(For setting Cursor Position on Table Control row)

At PAI Event

GET CURSOR FIELD <f> LINE <lin> ...

(For retrieving row of table control where cursor is.)

To just get row of table control on which cursor is there:

GET CURSOR LINE <lin>.

Checking for Cursor Position

SY-SUBRC allows you to check if the cursor is placed in a row of a table control.

REPORT Z_DB_TABLECONTROL.TABLES: MARA.CONTROLS MATERIAL TYPE TABLEVIEW USING SCREEN 130.TYPES: BEGIN OF ST_MARA,

MATNR TYPE MARA-MATNR,

ERSDA TYPE MARA-ERSDA,

ERNAM TYPE MARA-ERNAM,

LAEDA TYPE MARA-LAEDA,

END OF ST_MARA.DATA: IT_ST TYPE TABLE OF ST_MARA,

WA_ST TYPE ST_MARA,

IT_MARA TYPE MARA,

WA_MARA TYPE MARA,

OK_CODE LIKE SY-UCOMM.CALL SCREEN 130.&----


*& Module V1 INPUT

&----


  • text

----


MODULE V1 INPUT.CASE OK_CODE.

WHEN 'SAVE'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.

MOVE-CORRESPONDING WA_ST TO WA_MARA.

INSERT INTO MARA VALUES WA_MARA.WHEN 'DELETE'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.DELETE MARA FROM WA_MARA.WHEN 'MODIFY'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.MODIFY MARA FROM WA_MARA.

ENDCASE.ENDMODULE. " V1 INPUT

&----


*& Module EXIT INPUT

&----


  • text

----


MODULE EXIT INPUT.

IF OK_CODE = 'EXIT'.

LEAVE PROGRAM.

ENDIF.ENDMODULE. " EXIT INPUTCreate a screen by number 130 and provide the following attributes:

hope this code would help u solve ur problem

Regards

Archana