2008 Jan 13 10:05 AM
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
2008 Jan 13 4:51 PM
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
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.
2008 Jan 13 10:47 AM
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
2008 Jan 13 4:51 PM
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
2008 Jan 13 11:23 PM
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.
2008 Jan 14 1:39 AM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |