2013 May 26 10:14 PM
Q. How to pass data from table content cells to internal table in Module Pool.........
Example........
Like Price column
5,00
This $5,00 will be showing in Price column of Internal Table.
2013 May 30 11:51 AM
Guys,
I am giving you the example Like: my Table Control name is TC4
TC4 is showing data of EKPO
__________________________
PO No Items Net price
00000005 00001 30.00
This is showing in Table control Screen. Internal Table like I_EKPO.
Now I am going to edit Netprice column of Table Control TC4 with amount 10.00.
This 10.00 amount will be showing on TC4 table control screen in Net Price field like
PO No items Net price
00000005 00001 10.00
and this data will be passing into final internal table like I_EKPO_final.... HOW??????
Q. How to pass data from table content cells to internal table in Module Pool.........
Example........
Like Price column
5,00
This $5,00 will be showing in Price column of Internal Table.
2013 May 27 5:32 AM
Hello Kumar Krishna,
can you explain your scenario clearly ?
What exactly you mean by table content cells ?
2013 May 27 9:33 PM
Once we put 5,00 and hit enter then it will hold on the field of TC and automatically saved in Internal Table
2013 May 27 5:40 AM
Mr.Kumar krishna Sen,
If you set the table control column as Input field, automatically the data entered there will be saved into the internal table record.
2013 May 27 5:47 AM
Hi,
There has to be some kind of the user action triggered by the user which will trigger the event PAI through which we can transfer the data from the Table Control to the Internal Table.
Is there are any User Actions for this ?
Hope this helps.
Thanks,
Samantak.
2013 May 27 6:01 AM
u have to append the work area in pai loop to internal table..
pai.
loop at gt_final.
field : wa_final-1,wa_final-2,wa_final-3.
module apped.
endloop.
module append.
modify gt_final from wa_final.
if sy-subrc is not initial.
append wa_final to gtfinal.
endif.
end module.
Regards,
Siva.
2013 May 28 9:32 PM
2013 May 27 6:28 AM
hi Kumar,
In module pool, you must be using Table Control to display data, and in this scenario your table control will be editable. Now you want to save the data entered in the table control into your internal table. You will have to write logic to save data in PAI of you module pool:
PROCESS AFTER INPUT.
MODULE F_EXIT AT EXIT-COMMAND.
LOOP WITH CONTROL tab_control.
MODULE F_TABLE_TO_TC.
ENDLOOP.
********
MODULE F_TABLE_TO_TC INPUT.
*To move the data from the table control to internal table 'INT_TAB'.
int_tab-chk = line.
int_tab-field1 = tab_control-field1.
Concatenate '$' tab_control-field2 into VAR1. "please use correct data types or this statement may not work
int_tab-field2 = VAR1.
MODIFY int_tab INDEX tab_control-current_line.
IF sy-subrc NE 0.
APPEND int_tab.
CLEAR int_tab.
ENDIF.
ENDMODULE.
Please let me know if this helps.
Regards,
DN.
2013 May 27 6:37 AM
hi kumar,
Use concatenate statement
concatenate '$' price column into ' take one variable
append this value to internal table.
Suresh
2013 May 28 9:31 PM
Guys,
Issue has not been resolved yet. still Field of Table content does not hold this editable amount....
Can I use DEQUEUE AND ENQUEUE FM.
2013 May 29 4:32 AM
Mr.Kumar krishna Sen,
If you had created table control with attributes Output only, then you recreate with option Input Control.
Then the table control wizard automatically creates a module (MODULE TC_8001_MODIFY ON CHAIN-REQUEST) to alter the itab contents in line with the table control contents.
If itab has no data initially and if you want to save the table control data into itab, you have to write the logic inside the above module.
MODULE TC_8001_MODIFY INPUT.
MODIFY ITAB
INDEX TC_8001-CURRENT_LINE.
if sy-subrc = 4.
append itab.
endif.
ENDMODULE.
2013 May 29 5:52 AM
In the PAI of the screen :
loop at itab into witab.
module modify_table.
endloop.
module modify_table.
modift itab from witab index TC-current_line.
if sy-subrc ne 0.
append witab into itab.
endif.
endmodule.
Hope this helps..
2013 May 29 8:33 AM
Hi,
The Table Control and screen field names should be same, then on user action the values get automatically transferred.
Thanks,
Ankit
2013 May 30 11:51 AM
Guys,
I am giving you the example Like: my Table Control name is TC4
TC4 is showing data of EKPO
__________________________
PO No Items Net price
00000005 00001 30.00
This is showing in Table control Screen. Internal Table like I_EKPO.
Now I am going to edit Netprice column of Table Control TC4 with amount 10.00.
This 10.00 amount will be showing on TC4 table control screen in Net Price field like
PO No items Net price
00000005 00001 10.00
and this data will be passing into final internal table like I_EKPO_final.... HOW??????
2013 May 30 3:59 PM
Hi Krishna Kumar,
Structure of code should be ,
In Screen 9XXX,
PROCESS BEFORE OUTPUT
LOOP AT i_ekpo
INTO ls_ekpo "-- Work Area of table i_ekpo
WITH CONTROL tc4
CURSOR tc4-current_line.
MODULE <name of module1>
ENDLOOP.
Now the field name should be same in Table control as well as internal table/work area i.e.
Table control TC4 has field NETPR then internal table should also have field NETPR. Then values get automatically transferred.
Regards,
Ankit.
2013 May 30 8:01 PM
Hi Ankit,
What should be written inside Module .......................? Modify statement because 1st one passing data directly to W_EKPO from EKPO, now I want to change from Table Control Input..
2013 May 31 4:14 AM
Hi Krishna,
If you want to modify the content from Screen/Table Control to Internal Table then write code in PAI as,
PROCESS AFTER INPUT
Loop at i_ekpo.
module <module1>
endloop.
In <module1> code will be,
MODULE <module1> INPUT.
if i_ekpo is not initial.
Modify I_ekpo from <work_area> index tc4-current_line.
else.
Insert <work_Area> into i_ekpo index tc4-current_line.
ENDMODULE.
Hope this helps.
Revert in case of questions.
Regards,
Ankit
2013 Jun 01 10:11 AM
2013 Jun 01 4:09 PM
2013 Jun 01 9:19 PM
Thanks to all of u guys ..for your helps and ideas of this issue.......
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |