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

FLow logic + table control [ Urgent]

Former Member
0 Likes
1,080

Hi All

I have created a table using the tool table control ( without Wizard). And i have fetched some fields in this table using the path

Goto > secondary Window > program/ dictionary field.

thereby selecting the required field's from the dictionary table using "get from dictionary" pushbutton.

So after doing this when i return to the flow logic part of the module pool , i am facing the following error :

The field zempcode_proj_code is not assigned to a loop. "Loop.. Endloop" must appear in "PBO" and "PAI"

I'm unable to interpret what this error is all about.

Kindly help how to resolve this error.

Edited by: Gaurav Verma on Jan 13, 2008 11:20 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
760

Hi Gaurav,

Table controls indirectly relate to an internal table.

It is only form an internal table in a program that you access the table control.

And when displaying values in a table control, it will be done through an internal table from the program.

Even in the table control,the field names are given in the format <internal_table_name>-<field_name>.

If the value is being retrieved form a standard program,then the values need to be passed into the internal table and thus thye would be displayed on the table control.

The format that you need to follow in the PBO and PAI of the screen of the table control is :

PROCESS BEFORE OUTPUT.

LOOP WITH <table_control_name>.

MODULE user_command_0100.

ENDLOOP.

PROCESS AFTER INPUT.

LOOP WITH CONTROL <table_control_name>.

module read_table_control.

ENDLOOP.

To handle table controls in ABAP programs, you must declare a control in the declaration part of the program for each table control using the following statement:

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

where <ctrl> is the name of the table control on a screen in the ABAP program. The control allows the ABAP program to read the attributes of the table control and to influence the control. <scr> is the screen number where the initial values of the table are loaded.

Regards,

Kashyap

Hi Gaurav,

Table controls indirectly relate to an internal table.

It is only form an internal table in a program that you access the table control.

And when displaying values in a table control, it will be done through an internal table from the program.

Even in the table control,the field names are given in the format <internal_table_name>-<field_name>.

If the value is being retrieved form a standard program,then the values need to be passed into the internal table and thus thye would be displayed on the table control.

The format that you need to follow in the PBO and PAI of the screen of the table control is :

PROCESS BEFORE OUTPUT.

LOOP WITH <table_control_name>.

MODULE user_command_0100.

ENDLOOP.

PROCESS AFTER INPUT.

LOOP WITH CONTROL <table_control_name>.

module read_table_control.

ENDLOOP.

To handle table controls in ABAP programs, you must declare a control in the declaration part of the program for each table control using the following statement:

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

where <ctrl> is the name of the table control on a screen in the ABAP program. The control allows the ABAP program to read the attributes of the table control and to influence the control. <scr> is the screen number where the initial values of the table are loaded.

Regards,

Kashyap

4 REPLIES 4
Read only

Former Member
0 Likes
760

Hi,

While using table controls it is necessary to use loops in screen flowlogic.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

LOOP WITH CONTROL FLIGHTS.

MODULE FILL_TABLE_CONTROL.

ENDLOOP.

PROCESS AFTER INPUT.

LOOP WITH CONTROL FLIGHTS.

module read_table_control.

ENDLOOP.

module user_command_0100.

Here: flights is the name of ur table control

Write these modules in your main prog.

MODULE FILL_TABLE_CONTROL.

module read_table_control.

For more clarifications:

Refer to prog DEMO_DYNPRO_TABCONT_LOOP or revert back to me.

Regards,

Nishant

Edited by: nishant gupta on Jan 13, 2008 11:47 AM

Read only

Former Member
0 Likes
761

Hi Gaurav,

Table controls indirectly relate to an internal table.

It is only form an internal table in a program that you access the table control.

And when displaying values in a table control, it will be done through an internal table from the program.

Even in the table control,the field names are given in the format <internal_table_name>-<field_name>.

If the value is being retrieved form a standard program,then the values need to be passed into the internal table and thus thye would be displayed on the table control.

The format that you need to follow in the PBO and PAI of the screen of the table control is :

PROCESS BEFORE OUTPUT.

LOOP WITH <table_control_name>.

MODULE user_command_0100.

ENDLOOP.

PROCESS AFTER INPUT.

LOOP WITH CONTROL <table_control_name>.

module read_table_control.

ENDLOOP.

To handle table controls in ABAP programs, you must declare a control in the declaration part of the program for each table control using the following statement:

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

where <ctrl> is the name of the table control on a screen in the ABAP program. The control allows the ABAP program to read the attributes of the table control and to influence the control. <scr> is the screen number where the initial values of the table are loaded.

Regards,

Kashyap

Read only

former_member186741
Active Contributor
0 Likes
760

Hi there.....the other guys have given you good advice but why not just use the wizard to generate it all for you? Table controls are quite complex and the wizard can take all the pain away.

If you really want to do it yourself you can still clone your program and use the wizard on the copy before cutting and pasting selected code from the abap and logic flow back to the original.

Read only

Former Member
0 Likes
760

HI

When ever using the table control in screen desing, It is mandatory that one should write .. loop.. endloop both in the PBO and PAI. In your case , it seems you have not return loop .. endloop in PAI. Plz check.