2006 Jul 10 7:11 AM
Hi friends,
I have created a form using Table Control with five lines.
Though the form is having 5 lines, I am able to enter the data only in the first line and the balance four lines are in grey color, where I am not able to enter anything.
Could you pls guide me how to correct this problem.
Thanks in advance.
Regards,
Mark K
2006 Jul 10 7:17 AM
Hi,
Use DESCRIBE to append initial lines to table control.
first append empty lines to a internal table and then
use 'describe' to append them to table control.
here itab is the internal table used in table control and 'zbpsgtable' is a table control.
In a PBO module do this.
if itab[] is initial.
do 5 times.
append itab.
enddo.
endif.
describe table itab lines zbpsgtable-lines.
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
Hi,
Use DESCRIBE to append initial lines to table control.
first append empty lines to a internal table and then
use 'describe' to append them to table control.
here itab is the internal table used in table control and 'zbpsgtable' is a table control.
In a PBO module do this.
if itab[] is initial.
do 5 times.
append itab.
enddo.
endif.
describe table itab lines zbpsgtable-lines.
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
2006 Jul 10 7:17 AM
Hi,
Use DESCRIBE to append initial lines to table control.
first append empty lines to a internal table and then
use 'describe' to append them to table control.
here itab is the internal table used in table control and 'zbpsgtable' is a table control.
In a PBO module do this.
if itab[] is initial.
do 5 times.
append itab.
enddo.
endif.
describe table itab lines zbpsgtable-lines.
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
2006 Jul 10 7:39 AM
Hi Wasim,
Thanks for your response.
I tried your code but not working. The code I have written is given below. Kindly check the same and guide me the solution.
In PBO :
module line_disp.
This is module pool.
*&----
**& Module line_disp OUTPUT
*&----
text
*----
*MODULE LINE_DISP OUTPUT.
IF G_ZTDR_LINES_ITAB[] IS INITIAL.
DO 5 TIMES.
APPEND G_ZTDR_LINES_ITAB.
ENDDO.
ENDIF.
*
describe table G_ZTDR_LINES_ITAB lines ZTDR_LINES-lines.
*
*
*ENDMODULE. " line_disp OUTPUT
-
Regards,
2006 Jul 10 7:46 AM
*&----
**& Module line_disp OUTPUT
*&----
text
*----
MODULE LINE_DISP OUTPUT.
"is G_ZTDT_LINES_ITAB is blank....
IF G_ZTDR_LINES_ITAB[] IS INITIAL.
DO 5 TIMES.
APPEND G_ZTDR_LINES_ITAB.
ENDDO.
describe table G_ZTDR_LINES_ITAB lines ZTDR_LINES-lines.
<b>else.
describe table G_ZTDR_LINES_ITAB lines ZTDR_LINES-lines.
ENDIF.</b>ENDMODULE. " line_disp OUTPUT
Regards
vijay
2006 Jul 10 8:06 AM
Hi Wasim,
It is not working. Could u pls look into this.
Regards,
2006 Jul 10 8:26 AM
Hi,
Debug in the appending internal table and check if the lines are appending to the internal table or not.
The fields of the table control should be build from the internal table we are appending.
And also loop on the internal table in PBO and PAI in flow logic.
like.
IN PBO FLOW LOGIC.
loop at itab
with control zbpsgtable
cursor zbpsgtable-current_line.
module zbpsgtable_get_lines.
endloop.
*this is called module
module zbpsgtable_get_lines output.
g_zbpsgtable_lines = sy-loopc.
endmodule.
Regards,
Wasim Ahmed
2006 Jul 10 11:04 AM
Hi Wasim,
Thanks for your help. It is working now.
Thank you once again.
Mark K
2006 Jul 10 7:52 AM
Hai,
If you want to add a new record then increment the table control property line to 1. (EX : tbctrl-lines = current no of lines + 1 ).
Then enter your new record and append that record to the internal table.
You can also use Append initial line to internal table.
Regards,
Umasankar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |