How to insert data into table control
hi experts,,
i have inserted data into data base table through table control .
now i want to insert data into table control through database table.
how to delete data from table control for selected row
Hi
go through this link.
http://www.****************/Tutorials/ABAP/TableControl/Demo.htm
Similar Messages
-
How to insert row in table control and save the data in tables
Hi,
I have one table control i am displaying data into table control ,
my problem is : i want to display data into read mode in table control.
but when i click on insert button on the same screen i want one blank line should inserted into table control , then i want to insert some data into table control on that row , when i click the save button . the new data inserted into the table control is insert that data into ztable ,
please give me solution
main problen is how can know inserted line in table control and pass that data into ztable.Hi,
Follow the below logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
MODULE POPULATE_TABLE_CONTROL. --> Get the data from table store in
ITAB
LOOP AT GT_CTRL_LP_D516 INTO GS_WA_CTRL_LP_D516
WITH CONTROL CTRL_LP_D516
CURSOR CTRL_LP_D516-CURRENT_LINE.
The following module moves data to control
MODULE MOVE_TO_CONTROL.--> Move data from ITAB to table control
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT GT_CTRL_LP_D516.
ENDLOOP.
MODULE EXIT AT EXIT-COMMAND.
MODULE USER_COMMAND_0001. --> Here you have to take out the values from table control and update database table
Reward points if helpful.
Thanks and regards,
Mallareddy Rayapureddy,
Munich, Germany. -
How to insert data into the mysql table by giving as a text file
Hi,
Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
Thanks:)At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).
-
Its very urgent:how to insert data into database tables
Hi All,
I am very new to oaf.
I have one requirement data insert into database tables.
here createPG having data that data insert into one custom table.
but i dont know how to insert data into database tables.
i wrote the code in am,co as follows.
in am i wrote the code:
public void NewoperationManagerLogic()
ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
OADBTransaction oadbt=getOADBTransaction();
if(!vo1.isPreparedForExecution())
vo1.executeQuery();
Row row=vo1.createRow();
vo1.insertRow(row);
in createPG processrequest co:
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
am.NewoperationManagerLogic();
process form request:
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("Submit")!=null)
ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
am.getOADBTransaction().commit();
please help with an example(sample code).
its very urgent.
thanks in advance
Seshu
Edited by: its urgent on Dec 25, 2011 9:31 PMHi ,
1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
Thanks
Pratap -
How to insert data into two tables linke with foreign key..
I have two tables
1)EMP(emp_ID,username,emp_type_code)
emp_ID is primary key, emp_type_code is a foreign key references emptype table.
2)emptype(emp_type_code,emp_type_descripton)
emp_type_code is primary key
Could anyone help me ..how to insert data into EMP table. How to insert data into two tables linke with foreign key..CREATE TABLE "CATDB"."DWDIMUSER"
"USER_ID" NUMBER(10,0) NOT NULL ENABLE,
"SPECIALTY_ID" NUMBER(10,0),
"FULLNAME" VARCHAR2(20 BYTE),
"FNAME" VARCHAR2(20 BYTE),
"LNAME" VARCHAR2(20 BYTE),
"USER_SUBTYPE" VARCHAR2(20 BYTE),
CONSTRAINT "DIMUSER_PK" PRIMARY KEY ("USER_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE,
CONSTRAINT "DIMUSER_DIMSPECIALTY_FK" FOREIGN KEY ("SPECIALTY_ID") REFERENCES "CATDB"."DWDIMSPECIALTY" ("SPECIALTY_ID") DISABLE
CREATE TABLE "CATDB"."DIMSPECIALTY"
"SPECIALTY_ID" NUMBER(10,0) NOT NULL ENABLE,
"SPECIALTY_NAME" VARCHAR2(100 BYTE),
CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("SPECIALTY_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
INSERT INTO DIMUSER (FullName, FNAME, LNAME, USER_TYPE, USER_SUBTYPE)
SELECT DISTINCT
Engineer AS FullName,
regexp_substr(Engineer , '[^,| ]+', 1, 1) as FName,
regexp_substr(Engineer , '[^,| ]+', 1, 2) as LName ,
'Engineer'
FROM EMPLOYEELOOKUP;
INSERT INTO DIMSPECIALTY (SPECIALTY_NAME)
SELECT DISTINCT SPECIALITY
FROM EMPLOYEELOOKUP;
COMMIT;
CREATE TABLE employeelookup ...IS A TABLE THAT HAS ALL THE DATA NEDED TO BE FILLED IN BOTHE TABLES...
CREATE TABLE "CATDB"."EMPLOYEELOOKUP"
"EMPLOYEELOOKUP_ID" NUMBER(10,0) NOT NULL ENABLE,
"ENGINEER" VARCHAR2(25 BYTE),
"SPECIALTY" VARCHAR2(20 BYTE),
CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("EMPLOYEELOOKUP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
DATA IN EMPLOYEELOOKUP
Engineer, Specialty,
John, Dow, Electronis,
Dow, Jons, Technician
Stan Smithers Sales
Mark, Richards Marketing
Jenny, Lane Marketing
John, Lee Sales
I NEED TO LOAD THE FOREIGN KEY IN DIMUSER FROM THE DIMSPECIALTY TABLE?
BY USING THE LOOKUP TABLE TO MARCH THE NAMES UNDER THE Engineer COLUMN, SPECIALTY COLUMNE DISTICTIVLY BY JOINING THE DIMSPECILTY TO RISTIVE THE PRIMARY KEY AND FILL IT IN THE DIMUSER TABLE AS A FOREIGNE KEY. -
How to modify data in table control
hi
i have created table control where i have displayed data into table control
logic used
screen 200
PROCESS BEFORE OUTPUT.
MODULE SELECT_RECORD.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TBC_200'
MODULE TBC_200_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
LOOP AT IT_MARA
INTO WA_MARA
WITH CONTROL TBC_200
CURSOR TBC_200-CURRENT_LINE.
MODULE TBC_200_GET_LINES.
*&SPWIZARD: MODULE TBC_200_CHANGE_FIELD_ATTR
ENDLOOP.
MODULE STATUS_0200.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TBC_200'
LOOP AT IT_MARA.
CHAIN.
FIELD WA_MARA-MATNR.
FIELD WA_MARA-ERSDA.
FIELD WA_MARA-ERNAM.
MODULE TBC_200_MODIFY ON CHAIN-REQUEST.
ENDCHAIN.
FIELD WA_MARA-MARK
MODULE TBC_200_MARK ON REQUEST.
ENDLOOP.
MODULE TBC_200_USER_COMMAND.
*&SPWIZARD: MODULE TBC_200_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
module -
MODULE SELECT_RECORD.
MODULE SELECT_RECORD OUTPUT.
SELECT MATNR ERSDA ERNAM
FROM MARA
INTO CORRESPONDING FIELDS OF TABLE it_mara.
ENDMODULE. " SELECT_RECORD OUTPUT
and
another thing
i have made field MARA-ERSDA. and FIELD WA_MARA-ERNAM editable by
input possible using layout
so
now those 2 fields contents are editable
i want to know how to edit and save the data
some body guide.
and i want to put the lock so that i can update
can tell how to implement lock.
Thanks
Edited by: viju bangalore on Jan 27, 2011 10:40 AMHi Viju,
In PAI do something like this
LOOP AT itab.
MODULE mod_table_control.
ENDLOOP.
MODULE user_command_0100.
at module mod_table_control put this
MODULE mod_table_control INPUT.
MODIFY itab FROM demo_conn INDEX flights-current_line.
if sy-subrc ne 0.
insert itab.
endif.
ENDMODULE.
for saving you can create at custom gui status with a save button, and at MODULE user_command_0100 save the data. -
How to populate data in table control .
hi all,
i put matnr no. in screen no. 103
validation is done at that screen only.
now when i want to modify dat record
when i put matnr no. at screen 103
so how i will get all data of dat number to table control screen.Hi Darshan,
Here is a detailed description of how to update data in table controll.
Updating data in table control
The ABAP language provides two mechanisms for loading the table control with data from the internal table and then storing the altered rows of the table control back to the internal table.
Method 1: Read the internal table into the Table Control in the screenu2019s flow logic. Used when the names of the Table Control fields are based on fields of the internal table.
Method 2: Read the internal table into the Table Control in the module pool code. Used when the names of the Table Control fields are based on fields of the database table.
Method 1 (table control fields = itab fields)
In the flow logic we can read an internal table using the LOOP statement. Define the reference to the relevant able control by specifying WITH CONTROL <ctrl>
Determine which table entry is to be read by specifying CURSOR <ctrl>-CURRENT_LINE.
After the read operation the field contents are placed in the header line of the internal table. If the fields in the table control have the same name as the internal they will be filled automatically. Otherwise we need to write a module to transfer the internal table fields to the screen fields.
We must reflect any changes the user makes to the fields of the table control in the internal table otherwise they will not appear when the screen is redisplayed after PBO processing, (eg, after the user presses Enter or scrolls) However, this processing should be performed only if changes have actually been made to the screen fields of the table control (hence the use of the ON REQUEST)
PROCESS BEFORE OUTPUT.
LOOP AT ITAB_REG WITH CONTROL TCREG
CURSOR TCREG-CURRENT_LINE.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB_REG.
MODULE MODIFY_ITAB_REG.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Method 2 (table control fields = dict. fields)
If using a LOOP statement without an internal table in the flow logic, we must read the data in a PBO module which is called each time the loop is processed.
Since, in this case, the system cannot determine the number of internal table entries itself, we must use the EXIT FROM STEP-LOOP statement to ensure that no blank lines are displayed in the table control if there are no more corresponding entries in the internal table.
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL TCREG.
MODULE READ_ITAB_REG.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP WITH CONTROL TCREG.
CHAIN.
FIELD: ITAB_REG-REG,
ITAB_REG-DESC.
MODULE MODIFY_ITAB_REG
ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE READ_ITAB_REG OUTPUT.
READ TABLE ITAB_REG INDEX TCREG-CURRENT_LINE.
IF SY-SUBRC EQ 0.
MOVE-CORRESPONDING ITAB_REREG TO TCREG.
ELSE.
EXIT FROM STEP-LOOP.
ENDIF.
ENDMODULE.
MODULE MODIFY_ITAB_REG INPUT.
MOVE-CORRESPONDING TCREG TO ITAB_REG.
MODIFY ITAB_REG INDEX
TCREG-CURRENT_LINE.
ENDMODULE.
Updating the internal table
Method 1
PROCESS AFTER INPUT.
LOOP AT ITAB_REG.
CHAIN.
FIELD: ITAB_REG-REG,
ITAB_REG-DESC.
MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
ITAB_REG-MARK = u2018Xu2019.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Method 2
PROCESS AFTER INPUT.
LOOP WITH CONTROL TCREG.
CHAIN.
FIELD: TCREG-REG,
TCREG-DESC.
MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE MODIFY_ITAB_REG INPUT.
MOVE-CORRESPONDING TCREG TO ITAB_REG.
ITAB_REG-MARK = u2018Xu2019.
MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
ENDMODULE.
Updating the database
MODULE USER_COMMAND_100.
CASE OK_CODE.
WHEN u2018SAVEu2019.
LOOP AT ITAB-REG.
CHECK ITAB_REG-MARK = u2018Xu2019.
MOVE-CORRESPONDING ITAB_REG TO TCREG.
UPDATE TCREG.
ENDLOOP.
WHEN u2026
u2026
ENDCASE.
ENDMODULE.
Hope this will solve your problem.
Regards,
Pavan.
Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 3, 2009 12:48 PM -
How to show data through table control
Hi Experts,
I have created an table control through wizard using table EKKO.
I have to populate one internal table( type ekko ), and then show it in output through table control.
Please advise, how to do that and in where i have to write the codes.
I will reward points for every suggestion
Thanks in advance.
regardshi saubrab,
This is kiran kumar.G.I am sending some sample code to populate data into table control check it once.
i will give input in 100 screen. and display table control in 200 screen.check it once once ..ok....
SE38 :(CODE)
*& Module pool YMODULEPOOL_TABLECONTROL1 *
*& DEVELOPER : KIRAN KUMAR.G *
*& PURPOSE : TABLE CONTROL DEMO *
*& CREATION DT : 17/12/2007 *
*& T.CODE : YMODTABLECONTROL1 *
*& REQUEST : ERPK900035 *
PROGRAM ymodulepool_tablecontrol1.
Tables
TABLES: yvbap, "Sales Document: Item Data
vbak. "Sales Document: Header Data
Controls
CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 200.
Global Variables
DATA: gv_lines TYPE i,
gv_lines1 type i,
gv_temp type i,
gv_flag(20) TYPE c VALUE 'DISP',
gv_mode1 TYPE c,
gv_mode TYPE c VALUE 'C'. " C: Change, D :Display
Internal Table
DATA: BEGIN OF gt_item OCCURS 0,
vbeln LIKE vbap-vbeln, "Sales Document Number
posnr LIKE vbap-posnr, "Sales Document Item
matnr LIKE vbap-matnr, "Material Number
matkl LIKE vbap-matkl, "Material Group
arktx LIKE vbap-arktx, "Short Text for Sales Order Item
cflag, "Deletion Indicator
END OF gt_item.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ZTABLECONTROL' OF PROGRAM 'YMODULEPOOL_TABLECONTROL'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'DISP'.
SELECT single vbeln
erdat
angdt
bnddt
FROM vbak
INTO (vbak-vbeln,vbak-erdat,
vbak-angdt,vbak-bnddt)
WHERE vbeln = vbak-vbeln.
IF sy-subrc EQ 0.
*Fetch the table control data and place them in Internal Table
SELECT vbeln
posnr
matnr
matkl
arktx
FROM yvbap
INTO TABLE gt_item
WHERE vbeln = vbak-vbeln.
IF sy-subrc EQ 0.
*NO OF line in the Internal Table
DESCRIBE TABLE gt_item LINES gv_lines.
my_table-lines = gv_lines + 20.
ENDIF.
ENDIF.
*Call Screen 200.
SET SCREEN 200.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
*Exit from the Program
CALL TRANSACTION 'SESSION_MANAGER'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
module STATUS_0200 output.
SET PF-STATUS 'ZTABLECONTROL1'.
endmodule. " STATUS_0200 OUTPU
*& Module copy_data OUTPUT
text
module copy_data output.
*Fetch the current line data from the Table control
read table gt_item index my_table-current_line.
if sy-subrc eq 0.
*Populating data into screen fields
gt_item-vbeln = gt_item-vbeln.
gt_item-posnr = gt_item-posnr.
gt_item-matnr = gt_item-matnr.
gt_item-matkl = gt_item-matkl.
gt_item-arktx = gt_item-arktx.
endif.
SE51:CODE (SCREEN 100)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
SE51 :CODE (SCREEN 200)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0200.
loop at gt_item with control my_table cursor my_table-current_line.
module copy_data.
endloop.
PROCESS AFTER INPUT.
loop at gt_item.
MODULE USER_COMMAND_0200.
endloop.
HAVE A NICE DAY..
Award points if helpful,kiran kumar.G -
Urgent!!!!! Inserting data in table control of infotype.
Hi Experts,
I want to insert data in custom infotype.I am using FM HR_INFOTYPE_OPERATION for this purpose.But custom infotype contains a table control.
Table control of infotype has 20 rows containing fields name01 , addr01 upto name20 , addr20.
How do i insert data in table control fields of infotype if i want to use FM HR_INFOTYPE_OPERATION .
Pls suggest if there is another way to do it.
Thanks.Thanks for your reply.
I am Calling FM HR_INFOTYPE_OPERATION in a loop of a table.
Table contains multiple employee numbers-PERNR.There can be all different PERNR or some records of same PERNR.
Suppose if there are four records in the table.First two records are of the same PERNR.Then how would name01 or name02 will be assigned.
Now, third record is of new PERNR .Again it should be name01.
So the question is how everytime in a loop i will assign nameNN for different PERNR.
nameNN and addrNN was an example. I am sending my code here.
Loop at it_data.
gs_9000-PERNR = it_data-pernr..
gs_9000-currentamount03 = it_data-curramt.
gs_9000-mtdamount03 = it_data-mtd.
gs_9000-qtdamount03 = it_data-qtd.
gs_9000-ytdamount03 = it_data-ytd.
gs_9000-roll12amount03 = it_data-roll.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = gs_9000-pernr
IMPORTING
RETURN = RETURNE.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '9000'
NUMBER = gs_9000-PERNR
VALIDITYBEGIN = '20080801'
RECORD = gs_9000
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
IMPORTING
RETURN = RETURN
KEY = KEY.
IF RETURN IS NOT INITIAL.
WRITE :/ 'Error Occurred'.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = gs_9000-PERNR
endloop.
So in above code...
gs_9000-currentamount03 = it_data-curramt.
gs_9000-mtdamount03 = it_data-mtd.
gs_9000-qtdamount03 = it_data-qtd.
gs_9000-ytdamount03 = it_data-ytd.
gs_9000-roll12amount03 = it_data-roll.
these are table control fields , so how i wud i assign for
gs_9000-currentamount04 = it_data-curramt.
gs_9000-mtdamount04 = it_data-mtd.
gs_9000-qtdamount04 = it_data-qtd.
gs_9000-ytdamount04 = it_data-ytd.
gs_9000-roll12amount04 = it_data-roll.
in loop of a table.
Thanks -
How to insert data in table UI elements
Hi Guys,
Here is my questions. How to insert data in table UI elements.
Here i try to insert data by using Add button
data:
Node_Item type ref to If_Wd_Context_Node.
Node_Item = wd_comp_controller->get_data_node( ).
data:
lr_table_line type ref to ITEM.
lr_table_line = Node_Item->create_element( ).
field-symbols:
<ls_table> type any.
assign lr_table_line->* to <ls_table>.
Node_Item->bind_element(
new_item = <ls_table>
set_initial_elements = abap_false
index = 1 ).
But i got syntax error the result type of the function method cannot not be converted in to the type of lr_table_line.
And i set cardinality and selection as 0.n.
Pls, let me know for the soulutions
Chandru
Message was edited by:
chandrasekar muthuvelrajChadru, another option is for you to bind the table UI field to an internal table and to populate the internal table. Then, automatically, your Table UI field will be populated with the data from the internal table. Here is the code that does that and works for me. Good luck!
method FILL_DATA .
DATA: node_level1 type ref to if_wd_context_node,
node_level2 type ref to if_wd_context_node,
node_items type ref to if_wd_context_node,
stru_ResItems type BAPI2093_RES_ITEM,
tab_ResItems TYPE TABLE OF BAPI2093_RES_ITEM,
n type i.
node_level1 = wd_context->get_child_node( name = 'BAPI_RESERVATION_CRE' ).
node_level2 = node_level1->get_child_node( name = 'CHANGING' ).
node_items = node_level2->get_child_node( name = 'RESERVATIONITEMS' ).
n = 2.
do n times.
insert stru_ResItems into table tab_ResItems.
enddo.
node_items->bind_table( tab_ResItems ).
endmethod. -
How to insert data into BLOB column using sql
Hi all,
How to insert data into BLOB column directly using sql .
create table temp
a blob,
b clob);
SQL> /
Insert into temp values ('32aasdasdsdasdasd4e32','adsfbsdkjf') ;
ERROR at line 1:
ORA-01465: invalid hex number
Please help in this.Thanks,
P Prakashsee this
How to store PDF file in BLOB column without using indirect datastore -
Insert Data into Table from TXT or CSV file !!!!!
Dear All,
Recently I have started working on APEX. In Oracle Forms, we used to use TEXT_IO for inserting records into tables from txt files. Now I want to do the same thing in apex 3.2. How can I insert data into tables from txt of csv files.
Waiting of your valuable suggestions.
With kind regards,
Yousuf.Yousuf
wwv_flow_files is used by APEX to hold uploaded files.
If you incorporate a file browse item on you page, browse for the selected file, then submit the page (having the PL/SQL process described as an on suibmit process) then what I detailed should work.
If you don't need users to have access to this then just go to Home>Utilities>Data Load/Unload in APEX and there is a handy load utility there that does it all for you.
Cheers
Ben -
Insert data into table from JSP page using Entity Beans(EJB 3.0)
I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
1. I have a table 'FRIENDS', (in Oracle 10g database).
2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
5. I am using JDev as editor.
Please provide me code ASAP or link with similar example.
Thank you.
AnuragHi,
I am also trying that scenario. So u can
Post the jsp form data to a Servlet which will act as a Controller.
In the servlet invoke the business method.
Similar kind of app is in www.roseindia.net
Hope this would help u.
Meanwhile if u get any optimal solution, pls post it.
Thanks,
Happy Java Coding. -
How to transfer data in table control in bdc
hi
how to transfer data in table control in bdc . I need the theory regarding this
byeHi,
just check in the forum , there is many threads available to ur questions.
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
You can even refer to these related threads
bdc table control
Re: table control in bdc
table control in BDC
Reward if helpful.
Thanks
Naveen khan -
How to delete data in table control
Hi,
I am doing module pool programming. After the user enters the data in table control after saving the data. if the user wants to remove the line item the line item shd be removed from the screen and data base.
Please Give me vaulable Suggestions
RegardsHi,
Screen 8002 (with table control) --> select records --> press delete button --> delete selected records
Now you wan to delete those records selected by the user at runtime when DELETE button is clicked.
Take another internal table and work area same as the initial internal table and work area used in screen 8002 which is to be used to delete the selected data.
Take the names of the input/output fields as work_area-field_name and select column in table control as work_area-flag.
Also take a flag field of size 1 datatype character as the last field in the internal table and work area while declaration.
You must have passed a code in PBO of the screen for reading internal table into the table control.
So it reads the internal table into the table control whenever you perform any action on use command.
All you need to do is to write a code to modify the internal table form the table control while performing any user action.
Remember to change the LINE SEL option in attributes of table control as MULTIPLE.
At screen logic,
PROCESS BEFORE OUTPUT.
MODULE status_8002. "for pf-status
LOOP WITH CONTROL po_tab. "po_tab is table control
MODULE pass_data. "to pass data into table control from internal table
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_command_8002. "for user command(back and exit)
LOOP WITH CONTROL po_tab.
MODULE modify_data. "to modify data from table control into table control
ENDLOOP.
MODULE delete. "to delete the selected records
In PBO,
*& Module STATUS_8002 OUTPUT
MODULE status_8002 OUTPUT.
SET pf-status 'ZAB_PFSTA'. " pf-status
DATA : line_count TYPE i.
DESCIRBE TABLE it_ekpo
LINES line_count.
po_tab-lines = line_count + 10.
" to make table control scrollable
ENDMODULE. " STATUS_8002 OUTPUT
*& Module PASS_DATA OUTPUT
MODULE pass_data OUTPUT.
READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
ENDMODULE. " PASS_DATA OUTPUT
"it_ekpo is internal table and wa_ekpo is the work area
In PAI,
*& Module MODIFY_DATA INPUT
MODULE MODIFY_DATA INPUT.
MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
"modify records from table control into the internal table
ENDMODULE. " MODIFY_DATA INPUT
*& Module DELETE INPUT
MODULE DELETE INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'DELETE'. "when delete button is clicked
SORT IT_EKPO BY FLAG DESCENDING. "sort by flag(selection column value)
CLEAR WA_EKPO1.
CLEAR WA_EKPO.
REFRESH IT_EKPO1.
LOOP AT IT_EKPO INTO WA_EKPO WHERE FLAG = 'X'.
DATA : J TYPE I.
CLEAR J.
J = SY-TABIX. "assign index value if a record is selected
MOVE-CORRESPONDING WA_EKPO TO WA_EKPO1. "append selected records to another
"work area and append to another internal table to delete
APPEND WA_EKPO1 TO IT_EKPO1.
DELETE IT_EKPO. "delete the selected records from initial internal table
" to reflect the changes on the table control
ENDLOOP.
IF J = 0.
MESSAGE I006. "if no record selected
ELSE. "if some records are selected
DELETE ZEKPO FROM TABLE IT_EKPO1. "delete from database table
COMMIT WORK.
IF SY-SUBRC = 0.
MESSAGE S007. "success message (records deleted)
ENDIF.
ENDIF.
ENDCASE.
ENDMODULE. " DELETE INPUT
Now at PAI, you have delete records and these changes are reflected back to the internal table.
Now when PBO is executed it will again read the initial internal table and will not show the deleted records.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Maybe you are looking for
-
In Apple Mail, how can I maintaining Mailbox links when migrating hosting?
First, I apologize if this question has already been asked and answered. If so, please kindly point me to the appropriate discussion. I'm in the process of changing hosting for one of my (several) websites and email addresses. I have been using App
-
SharePoint 2010 Rest API: How to add attachment to a list item via ListData.svc
Hi I have set up a project using the REST API in c# Visual Studio 2010. I have added a service reference to the URL //site/_vti_bin/listdata.svc/ I can query the list and get back data, but I can't retrieve the attachments. I can write data to the li
-
ITunes won't open after latest update on Windows8
I did that latest update a day or so ago - now iTunes just hangs and never opens on my machine. If I shut it down via task manager - I cannot open as I then get unable to open application due to another user using HELP please
-
Summing and Finding Maximum in 2d array
So I have an 2d array of numbers and I am trying to find the maximum sum of the rows and give back the row number. So far I can get the sum and the maximum number but I need to give back the row number of the maximum value. public static void RowSumR
-
AE CS6 Open GL with multiple video cards
I saw a similiar post to this from January, but wondering if anything has changed with CS6: I have two graphics cards in my Mac Pro, a Quadro 4000 and ATI Radeon HD 2600 (connected to 2 monitors). When I look at the "Preview" preferences in AE, I se