2008 Nov 13 12:05 PM
Hi experts,
I have a table control (ZCTRL) which was created manually (not by the wizard). ZCTRL-TEXT is an input field, but when I enter some data and try to save it, it did not update the database table. Actually when I debugg it, I cannot see that the value entered into ZCTRL-TEXT is appearing. What could be the problem?
2008 Nov 13 12:12 PM
Hi,
LOOP AT <itab> INTO <wa_itab> WITH CONTROL <ctrl_name>. This statement processes a loop through the lines of the table on the screen
If the fields on the screen have the same structure and name as of the table control , you must return data from the work area to the body of the table itself. You do this using <ctrl_name>-current_line
But, if this is not the case, then it is done programmitically by using MOVE-CORRESPONDING sdyn_conn to <wa_itab>
Try like this.
Amresh
g_ytab_c3_wa-spart = ysmk_scaleoption-spart.
g_ytab_c3_wa-varcond = ysmk_scaleoption-varcond.
g_ytab_c3_wa-vctext = ysmk_scaleoption-vctext.
g_ytab_c3_wa-datab = ysmk_scaleoption-datab.
g_ytab_c3_wa-datbi = ysmk_scaleoption-datbi.
g_ytab_c3_wa-kstbw = ysmk_scaleoption-kstbw.
g_ytab_c3_wa-waers = ysmk_scaleoption-waers.
MODIFY g_ytab_c3_itab
FROM g_ytab_c3_wa
INDEX ytab_c3-current_line.
2008 Nov 13 12:12 PM
Hi,
LOOP AT <itab> INTO <wa_itab> WITH CONTROL <ctrl_name>. This statement processes a loop through the lines of the table on the screen
If the fields on the screen have the same structure and name as of the table control , you must return data from the work area to the body of the table itself. You do this using <ctrl_name>-current_line
But, if this is not the case, then it is done programmitically by using MOVE-CORRESPONDING sdyn_conn to <wa_itab>
Try like this.
Amresh
2008 Nov 13 12:13 PM
g_ytab_c3_wa-spart = ysmk_scaleoption-spart.
g_ytab_c3_wa-varcond = ysmk_scaleoption-varcond.
g_ytab_c3_wa-vctext = ysmk_scaleoption-vctext.
g_ytab_c3_wa-datab = ysmk_scaleoption-datab.
g_ytab_c3_wa-datbi = ysmk_scaleoption-datbi.
g_ytab_c3_wa-kstbw = ysmk_scaleoption-kstbw.
g_ytab_c3_wa-waers = ysmk_scaleoption-waers.
MODIFY g_ytab_c3_itab
FROM g_ytab_c3_wa
INDEX ytab_c3-current_line.
2008 Nov 13 12:38 PM
I think this topic has been discussed hundreds of times already, so you will get lots of threads if you search the forum.
Do have a habit of Searching the forum before posting a question.
Regards
Karthik D
2008 Nov 13 12:46 PM
Hello Karthik,
I have read lots of them, but I'm still having the problem since I didn't found the solution yet.
Edited by: mrwhite on Nov 13, 2008 1:48 PM
2008 Nov 13 12:51 PM
I'm using this piece of code, but I cannot see in i_zctrl what I enter on the table control
PROCESS BEFORE OUTPUT.
MODULE status_0200.
LOOP AT i_zctrl
WITH CONTROL zctrl
CURSOR zctrl-current_line.
MODULE set_screen_fields.
ENDLOOP.
2008 Nov 13 12:58 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |