Installed software in Server insert to Database tables
Software table has a foreign key (compID) from the Computer table primary key (compID)
Computer table columns
compId name date .....
Software table columns
softID compID softwarename vendor version .........
For each computer name in Computer table, find all installed software then insert into software table all software info and only the compID. Also update the software table if it is already in the table or insert into software table if info is not there.
here is my code so far:
foreach($property in $soft){
$cmd.CommandText = "INSERT INTO Software (idNumber, softwareName, vendor, version, auditDate) values (@idNumber, @softwareName, @vendor, @version, @auditDate)"
$dt = Get-Date
$cmd.Parameters.AddWithValue("@idNumber", $property.IdentifyingNumber)
#Traps null values
if ([string]::IsNullOrEmpty($property.Name))
$cmd.Parameters.AddWithValue("@softwareName", [DBNull]::Value)
else
$cmd.Parameters.AddWithValue("@softwareName", $property.Name)
if ([string]::IsNullOrEmpty($property.Vendor))
$cmd.Parameters.AddWithValue("@vendor", [DBNull]::Value)
else
$cmd.Parameters.AddWithValue("@vendor", $property.Vendor)
if ([string]::IsNullOrEmpty($property.Version))
$cmd.Parameters.AddWithValue("@version", [DBNull]::Value)
else
$cmd.Parameters.AddWithValue("@version", $property.Version)
$cmd.Parameters.AddWithValue("@auditDate",$dt)
$cmd.executenonquery()
$cmd.Parameters.Clear();
$dbConn.Close()
Hi Morphius1,
I’m writing to just check in
to see if the suggestions were helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up.
If
you have any feedback on our support, please click here.
Best
Regards,
Anna
Wang
TechNet
Community Support
Similar Messages
-
Insert and update tables from SQL server to oracle database tables
Hi,
I am having problem while update data from sql server to oracle database tables.
I am doing one way insert +updates that is from SQL Server tables ==> Oracle database tables
I am using tools Sql server Integration service. I can insert data from sql server to oracle but update can't. Please help me how can I update + insert from sql server to oracle database tables easily.
Thanks in advance.Hi,
What about using Oracle SQL Developer for migration
http://www.oracle.com/technetwork/database/migration/sqlserver-095136.html
HTH -
Install AntiVirus in Server - impact on database ?
HI all,
my environment
hp proliant dl 380 g5
windows 2003 server sp2
oracle 10g (10.1.0.2)
i have been requested to install antivirus software in this server (Mcafee 8.7) , my question here is , what the impact in oracle of doing this? i undestand that the virus scans every time a user tries to access a file .. this wil slow down my database ... I'd like to you from you .. you experiencies , configurations etc.
Thanks for you attention.
Best Regards
Rui MadalenoHi all,
i found a document on this subject in metalink
Subject: How To Configure Anti-Virus On Windows Server Running Oracle Database
Doc ID: 782354.1 Type: HOWTO
Modified Date: 17-FEB-2009 Status: MODERATED
I've implemented the configs suggested in this document, also i've disable the "stop email worm from send mass email" for java.exe and oracle.exe (Enterprise Manager)
Best Regards
Rui Madaleno
Edited by: ruival on Mar 11, 2009 10:26 AM -
Program to upload csv file to internal table and insert into database table
Hi I'm writing a program where I need to upload a csv file into an internal table using gui_upload, but i also need this program to insert the data into my custom database table using the split command. Anybody have any samples to help, its urgent!
Hi,
Check this table may be it will give u an hint...
REPORT z_table_upload LINE-SIZE 255.
Data
DATA: it_dd03p TYPE TABLE OF dd03p,
is_dd03p TYPE dd03p.
DATA: it_rdata TYPE TABLE OF text1024,
is_rdata TYPE text1024.
DATA: it_fields TYPE TABLE OF fieldname.
DATA: it_file TYPE REF TO data,
is_file TYPE REF TO data.
DATA: w_error TYPE text132.
Macros
DEFINE write_error.
concatenate 'Error: table'
p_table
&1
&2
into w_error
separated by space.
condense w_error.
write: / w_error.
stop.
END-OF-DEFINITION.
Field symbols
FIELD-SYMBOLS: <table> TYPE STANDARD TABLE,
<data> TYPE ANY,
<fs> TYPE ANY.
Selection screen
SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
PARAMETERS: p_file TYPE localfile DEFAULT 'C:\temp\' OBLIGATORY,
p_separ TYPE c DEFAULT ';' OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b01.
SELECTION-SCREEN: BEGIN OF BLOCK b02 WITH FRAME TITLE text-b02.
PARAMETERS: p_table TYPE tabname OBLIGATORY
MEMORY ID dtb
MATCHCODE OBJECT dd_dbtb_16.
SELECTION-SCREEN: END OF BLOCK b02.
SELECTION-SCREEN: BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
PARAMETERS: p_create TYPE c AS CHECKBOX.
SELECTION-SCREEN: END OF BLOCK b03,
SKIP.
SELECTION-SCREEN: BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
PARAMETERS: p_nodb RADIOBUTTON GROUP g1 DEFAULT 'X'
USER-COMMAND rg1,
p_save RADIOBUTTON GROUP g1,
p_dele RADIOBUTTON GROUP g1.
SELECTION-SCREEN: SKIP.
PARAMETERS: p_test TYPE c AS CHECKBOX,
p_list TYPE c AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK b04.
At selection screen
AT SELECTION-SCREEN.
IF sy-ucomm = 'RG1'.
IF p_nodb IS INITIAL.
p_test = 'X'.
ENDIF.
ENDIF.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
Start of selection
START-OF-SELECTION.
PERFORM f_table_definition USING p_table.
PERFORM f_upload_data USING p_file.
PERFORM f_prepare_table USING p_table.
PERFORM f_process_data.
IF p_nodb IS INITIAL.
PERFORM f_modify_table.
ENDIF.
IF p_list = 'X'.
PERFORM f_list_records.
ENDIF.
End of selection
END-OF-SELECTION.
FORM f_table_definition *
--> VALUE(IN_TABLE) *
FORM f_table_definition USING value(in_table).
DATA: l_tname TYPE tabname,
l_state TYPE ddgotstate,
l_dd02v TYPE dd02v.
l_tname = in_table.
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
name = l_tname
IMPORTING
gotstate = l_state
dd02v_wa = l_dd02v
TABLES
dd03p_tab = it_dd03p
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF l_state NE 'A'.
write_error 'does not exist or is not active' space.
ENDIF.
IF l_dd02v-tabclass NE 'TRANSP' AND
l_dd02v-tabclass NE 'CLUSTER'.
write_error 'is type' l_dd02v-tabclass.
ENDIF.
ENDFORM.
FORM f_prepare_table *
--> VALUE(IN_TABLE) *
FORM f_prepare_table USING value(in_table).
DATA: l_tname TYPE tabname,
lt_ftab TYPE lvc_t_fcat.
l_tname = in_table.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = l_tname
CHANGING
ct_fieldcat = lt_ftab
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
WRITE: / 'Error while building field catalog'.
STOP.
ENDIF.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_ftab
IMPORTING
ep_table = it_file.
ASSIGN it_file->* TO <table>.
CREATE DATA is_file LIKE LINE OF <table>.
ASSIGN is_file->* TO <data>.
ENDFORM.
FORM f_upload_data *
--> VALUE(IN_FILE) *
FORM f_upload_data USING value(in_file).
DATA: l_file TYPE string,
l_ltext TYPE string.
DATA: l_lengt TYPE i,
l_field TYPE fieldname.
DATA: l_missk TYPE c.
l_file = in_file.
l_lengt = strlen( in_file ).
FORMAT INTENSIFIED ON.
WRITE: / 'Reading file', in_file(l_lengt).
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
TABLES
data_tab = it_rdata
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
WRITE: /3 'Error uploading', l_file.
STOP.
ENDIF.
File not empty
DESCRIBE TABLE it_rdata LINES sy-tmaxl.
IF sy-tmaxl = 0.
WRITE: /3 'File', l_file, 'is empty'.
STOP.
ELSE.
WRITE: '-', sy-tmaxl, 'rows read'.
ENDIF.
File header on first row
READ TABLE it_rdata INTO is_rdata INDEX 1.
l_ltext = is_rdata.
WHILE l_ltext CS p_separ.
SPLIT l_ltext AT p_separ INTO l_field l_ltext.
APPEND l_field TO it_fields.
ENDWHILE.
IF sy-subrc = 0.
l_field = l_ltext.
APPEND l_field TO it_fields.
ENDIF.
Check all key fields are present
SKIP.
FORMAT RESET.
FORMAT COLOR COL_HEADING.
WRITE: /3 'Key fields'.
FORMAT RESET.
LOOP AT it_dd03p INTO is_dd03p WHERE NOT keyflag IS initial.
WRITE: /3 is_dd03p-fieldname.
READ TABLE it_fields WITH KEY table_line = is_dd03p-fieldname
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
FORMAT COLOR COL_POSITIVE.
WRITE: 'ok'.
FORMAT RESET.
ELSEIF is_dd03p-datatype NE 'CLNT'.
FORMAT COLOR COL_NEGATIVE.
WRITE: 'error'.
FORMAT RESET.
l_missk = 'X'.
ENDIF.
ENDLOOP.
Log other fields
SKIP.
FORMAT COLOR COL_HEADING.
WRITE: /3 'Other fields'.
FORMAT RESET.
LOOP AT it_dd03p INTO is_dd03p WHERE keyflag IS initial.
WRITE: /3 is_dd03p-fieldname.
READ TABLE it_fields WITH KEY table_line = is_dd03p-fieldname
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
WRITE: 'X'.
ENDIF.
ENDLOOP.
Missing key field
IF l_missk = 'X'.
SKIP.
WRITE: /3 'Missing key fields - no further processing'.
STOP.
ENDIF.
ENDFORM.
FORM f_process_data *
FORM f_process_data.
DATA: l_ltext TYPE string,
l_stext TYPE text40,
l_field TYPE fieldname,
l_datat TYPE c.
LOOP AT it_rdata INTO is_rdata FROM 2.
l_ltext = is_rdata.
LOOP AT it_fields INTO l_field.
ASSIGN COMPONENT l_field OF STRUCTURE <data> TO <fs>.
IF sy-subrc = 0.
Field value comes from file, determine conversion
DESCRIBE FIELD <fs> TYPE l_datat.
CASE l_datat.
WHEN 'N'.
SPLIT l_ltext AT p_separ INTO l_stext l_ltext.
WRITE l_stext TO <fs> RIGHT-JUSTIFIED.
OVERLAY <fs> WITH '0000000000000000'. "max 16
WHEN 'P'.
SPLIT l_ltext AT p_separ INTO l_stext l_ltext.
TRANSLATE l_stext USING ',.'.
<fs> = l_stext.
WHEN 'F'.
SPLIT l_ltext AT p_separ INTO l_stext l_ltext.
TRANSLATE l_stext USING ',.'.
<fs> = l_stext.
WHEN 'D'.
SPLIT l_ltext AT p_separ INTO l_stext l_ltext.
TRANSLATE l_stext USING '/.-.'.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_stext
IMPORTING
date_internal = <fs>
EXCEPTIONS
OTHERS = 1.
WHEN 'T'.
CALL FUNCTION 'CONVERT_TIME_INPUT'
EXPORTING
input = l_stext
IMPORTING
output = <fs>
EXCEPTIONS
OTHERS = 1.
WHEN OTHERS.
SPLIT l_ltext AT p_separ INTO <fs> l_ltext.
ENDCASE.
ELSE.
SHIFT l_ltext UP TO p_separ.
SHIFT l_ltext.
ENDIF.
ENDLOOP.
IF NOT <data> IS INITIAL.
LOOP AT it_dd03p INTO is_dd03p WHERE datatype = 'CLNT'.
This field is mandant
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-mandt.
ENDLOOP.
IF p_create = 'X'.
IF is_dd03p-rollname = 'ERDAT'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-datum.
ENDIF.
IF is_dd03p-rollname = 'ERZET'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-uzeit.
ENDIF.
IF is_dd03p-rollname = 'ERNAM'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-uname.
ENDIF.
ENDIF.
IF is_dd03p-rollname = 'AEDAT'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-datum.
ENDIF.
IF is_dd03p-rollname = 'AETIM'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-uzeit.
ENDIF.
IF is_dd03p-rollname = 'AENAM'.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data>
TO <fs>.
<fs> = sy-uname.
ENDIF.
APPEND <data> TO <table>.
ENDIF.
ENDLOOP.
ENDFORM.
FORM f_modify_table *
FORM f_modify_table.
SKIP.
IF p_save = 'X'.
MODIFY (p_table) FROM TABLE <table>.
ELSEIF p_dele = 'X'.
DELETE (p_table) FROM TABLE <table>.
ELSE.
EXIT.
ENDIF.
IF sy-subrc EQ 0.
FORMAT COLOR COL_POSITIVE.
IF p_save = 'X'.
WRITE: /3 'Modify table OK'.
ELSE.
WRITE: /3 'Delete table OK'.
ENDIF.
FORMAT RESET.
IF p_test IS INITIAL.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: '- test only, no update'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE.
WRITE: /3 'Error while modifying table'.
FORMAT RESET.
ENDIF.
ENDFORM.
FORM f_list_records *
FORM f_list_records.
DATA: l_tleng TYPE i,
l_lasti TYPE i,
l_offst TYPE i.
Output width
l_tleng = 1.
LOOP AT it_dd03p INTO is_dd03p.
l_tleng = l_tleng + is_dd03p-outputlen.
IF l_tleng LT sy-linsz.
l_lasti = sy-tabix.
l_tleng = l_tleng + 1.
ELSE.
l_tleng = l_tleng - is_dd03p-outputlen.
EXIT.
ENDIF.
ENDLOOP.
Output header
SKIP.
FORMAT COLOR COL_HEADING.
WRITE: /3 'Contents'.
FORMAT RESET.
ULINE AT /3(l_tleng).
Output records
LOOP AT <table> ASSIGNING <data>.
LOOP AT it_dd03p INTO is_dd03p FROM 1 TO l_lasti.
IF is_dd03p-position = 1.
WRITE: /3 sy-vline.
l_offst = 3.
ENDIF.
ASSIGN COMPONENT is_dd03p-fieldname OF STRUCTURE <data> TO <fs>.
l_offst = l_offst + 1.
IF is_dd03p-decimals LE 2.
WRITE: AT l_offst <fs>.
ELSE.
WRITE: AT l_offst <fs> DECIMALS 3.
ENDIF.
l_offst = l_offst + is_dd03p-outputlen.
WRITE: AT l_offst sy-vline.
ENDLOOP.
ENDLOOP.
Ouptut end
ULINE AT /3(l_tleng).
ENDFORM.
Regards,
Joy. -
Hi Guy's,
Please help me, trying to insert the records into database table. when i debug the program work area contain data records but not insert into databse table. Here pasted my code pls suggest me where i did mistake.
FUNCTION ZEXM_PHOTOCOPYDTLS_EP.
""Local Interface:
*" IMPORTING
*" VALUE(EXMCODE) TYPE ZEXMCODE OPTIONAL
*" VALUE(EXMMONTH) TYPE ZEXMMONTH OPTIONAL
*" VALUE(SEATNO) TYPE ZSEATNO OPTIONAL
*" VALUE(STDFIRSTNAME) TYPE ZSTDFIRSTNAME OPTIONAL
*" VALUE(STDMIDDLENAME) TYPE ZSTDMIDDLENAME OPTIONAL
*" VALUE(STDLASTNAME) TYPE ZSTDLASTNAME OPTIONAL
*" VALUE(ADDLINE1) TYPE ZADDLINE1 OPTIONAL
*" VALUE(CITY) TYPE ZCITY OPTIONAL
*" VALUE(COUNTRY) TYPE ZCOUNTRY OPTIONAL
*" VALUE(PIN) TYPE ZPIN OPTIONAL
*" VALUE(TELEPHONENO) TYPE ZTELEPHONENO OPTIONAL
*" VALUE(MOBNO) TYPE ZMOBNO OPTIONAL
*" VALUE(EMAIL) TYPE ZEMAIL OPTIONAL
*" VALUE(DDNO) TYPE ZDDNO OPTIONAL
*" VALUE(DDAMT) TYPE ZDDAMOUNT OPTIONAL
*" VALUE(DDDATE) TYPE ZDDDATE OPTIONAL
*" VALUE(BANKNAME) TYPE ZBANKNAME OPTIONAL
*" VALUE(COLNAME) TYPE ZCOLNAME OPTIONAL
*" VALUE(COLADDRESS) TYPE ZCOLADDRESS OPTIONAL
*" VALUE(COURSECODE) TYPE ZCOURSECODE OPTIONAL
*" VALUE(EXMYEAR) TYPE ZEXMYEAR OPTIONAL
*" VALUE(PAPERCODE) TYPE ZPAPERCODE OPTIONAL
*" VALUE(PAPERNO) TYPE ZPAPERNO OPTIONAL
*" VALUE(MARKSOBT) TYPE ZMARKSOBT OPTIONAL
*" VALUE(EXMDATE) TYPE ZEXMDATE OPTIONAL
*" VALUE(EXMTIME) TYPE ZEXMTIME OPTIONAL
*" VALUE(SUBCODE) TYPE ZSUBCODE OPTIONAL
*" EXCEPTIONS
*" SELECTION_ERROR
DATA : WA_OUTPUT TYPE ZEXM_PHOTOCOPYDT,
WA_COLL TYPE ZEXM_COLLEGEMST,
WA_COURSE TYPE ZEXM_COURSEMST,
WA_EXMCODE TYPE ZEXM_EXMCODEMST,
WA_PAPER TYPE ZEXM_PHOPAPERMAP,
WA_SUBJECT TYPE ZEXM_SUBJECTMST.
STUDENT DETAILS
MOVE : EXMCODE TO WA_OUTPUT-ZEXMCODE,
EXMMONTH TO WA_OUTPUT-ZEXMMONTH,
SEATNO TO WA_OUTPUT-ZSEATNO,
STDFIRSTNAME TO WA_OUTPUT-ZSTDFIRSTNAME,
STDMIDDLENAME TO WA_OUTPUT-ZSTDMIDDLENAME,
STDLASTNAME TO WA_OUTPUT-ZSTDLASTNAME,
ADDLINE1 TO WA_OUTPUT-ZADDLINE1,
CITY TO WA_OUTPUT-ZCITY,
COUNTRY TO WA_OUTPUT-ZCOUNTRY,
PIN TO WA_OUTPUT-ZPIN,
TELEPHONENO TO WA_OUTPUT-ZTELEPHONENO,
MOBNO TO WA_OUTPUT-ZMOBNO,
EMAIL TO WA_OUTPUT-ZEMAIL,
DDNO TO WA_OUTPUT-ZDDNO,
DDAMT TO WA_OUTPUT-ZDDAMT,
DDDATE TO WA_OUTPUT-ZDDDATE,
BANKNAME TO WA_OUTPUT-ZBANKNAME.
insert into ZEXM_PHOTOCOPYDT values wa_output.
if sy-subrc = 0.
commit work.
endif.
Thanks and Regards,
Sai.
Edited by: sai shanhu on Jun 4, 2008 11:13 AMHai,
move wa_output into ZEXM_PHOTOCOPYDT.
insert ZEXM_PHOTOCOPYDT.
Thanks,
Durai.V -
On Insert, the database table is locked
Dear all,
I am asking your help please in this question,
In Forms Runtime, when a user tries to insert a record and before saving the transaction "Save", the program locks the database table and any other user cannot use this function in all branches.
Does anybody has an idea about what could be the main issues to search about.
Thank you very much, I appreciate your suggestions.user562674 wrote:
cannot use this function in all branches.What you mean by use this function in all branches ?
Is it a function or procedure or forms ? -
Install Oracle HTTP Server to Oracle Database XE
Successfully managed to install Oracle Database XE to Windows 2000 (after temporarily dropping TNSNAMES and TNS_ADMIN variables). I want to learn how to use Application Express (formerly HTML DB) and it would be a pain/take ages to get the enterprise DBA's to install it onto a supported networked instance. I have installed HTML DB into Oracle XE but the post installation instructions require that Oracle HTTP Server is installed. How do you get Oracle HTTP Server installed into Oracle XE? Oracle Universal Installer does not recognise Oracle XE as an Oracle Home. How do you use Oracle Universal Installer on Oracle XE? or how do you download Oracle HTTP Server with InstallShield? Seems strange that Oracle XE does not integrate with other toolset installations.
ThanksALTER SESSION SET CURRENT_SCHEMA = FLOWS_020000;
exec FLOWS_020000.wwv_flow_upgrade.switch_schemas ('FLOWS_020000','FLOWS_020100');commit;I would give it a try, it's hard to make it worse ;).
Oracle XE / Apex is almost the same.
Some of the differences are:
- SSO authentication is not supported out of the box (although there are workarounds)
- You can assign only a single database schema to a workspace
- There are no developer accounts in the workspaces
Basically, both version are pretty much the same. You can export / import applications both ways.
I cannot see what you mean by missing templates. They are all there (although not in the filesystem but stored in the database via XMLDB).
You can reach the documentation from the homepage of XE and also from Start > Programs > Oracle Express Edition
~Dietmar. -
Import parametes and insert into database table suggestions
experts need suggestions
created a table with 3 fields.
zstable.
field dataelement type length
kunnr kunnr char 10 key field
name dname char 30 key field
aedat aedat dats 8
aenam aenam char 12
now i am creating a function modlue with two input parameters
1)kunnr
2)name
i want to update this two fields into table zstable.
1. so suggest me the best way to do this.
Delcarations in import options which one of the below is best and why?
name type char30
kunnr type kunnr
or
name like zstable-name
kunnr like zstable-kunnr
or
kunnr type zstable-kunnr
name type zstable-name.
2. inserting into table
the data that we recieve from the import parameters need to be inserted into the zstable.
please suggest me the appropriate statement waht i need to code for this.
insert kunnr name into zstable.
can i ignore the third field as it is not the key field?
3. before inserting do i need to check whether kunnr and uname is initial ie import parametrs?
4. suppose if i delcared two input parameters in function module zfuntion say vbeln and posnr.
and source code
insert vbeln and posnr into zstable.
now i am calling from the program
zreport.
call function 'ZFUNCTION'.
EXPORT
NAME =
KUNNR =
Will the above statement updates the blank records into the table zstable?.Hi,
1) I think the best is either refer directly to data element or to table field. This is beacuse once any change is made to this data element it will automatically reflect in your parameters. For table fields it is a bit less safier but still correct. Golden rule - always try to refer to DDIC components like data elements.
name type dname
kunnr type kunnr
2) You need to provide all key fields. I recommend to use MODIFY as it would hanlde both INSERT (if yet no such record exists ) and UPDATE (if already exists).
data: wa_zstable type zstable. "declare work area
wa_zstable-kunnr = kunnr. "pass parameters here
wa_zstable-name = name.
modify zstable from wa_zstable.
3) good practise, for this use
if kunnr is initial and
name is initial.
"modify ...
endif.
"or if parameters are set as OPTIONAL, then use
if kunnr is supplied and
name is supplied.
endif.
4) No, the statment you want to use
insert vbeln and posnr into zstable.
is only used for FIELD GROUPS, not DB table. Please refer [INSERT|http://help.sap.com/abapdocu/en/ABAPINSERT_DBTAB_SHORTREF.htm] for correct syntax.
You can alternatively use somthing like
UPDATE zstable SET vbeln = ...
posnr = ...
WHERE ...
This will update fields VBELN and PONR for all records fullfilling WHERE condition. These however musn't be key fields, only non-key fields can be udpated.
Regards
Marcin -
How to insert message style text columns in database tables
Hi All,
i have two pages.
in first page segment1 lov is their.once u select the segment1 and click on the create button its navigate to next page.
and display the releted segment1 details(these columns are message text input fields but read only columns).
plz help me those columns are insert into database tables.
its very urgent
Thanks
Latha.Hi Anil,
plz help me still i am faceing the problem
so plz help me because i dont know java.
i wrote below code and i got the below error.
if(pageContext.getParameter("Submit")!=null)
String projnumber=pageContext.getParameter("ProjectNO");
//String projectnumber=pageContext.getParameter("Projectnumber");
String oldoperationid=pageContext.getParameter("EmployeeNumber");
String newManagerName=pageContext.getParameter("NewManagerName");
String ProjectID=pageContext.getParameter("ProjectID");
String OldOperationName=pageContext.getParameter("OperationsManager");
String OldOperationID=pageContext.getParameter("OldOperationID");
OAMessageTextInputBean projnumberbean =webBean.findIndexedChildRecursive("ProjectNO");
String projnumber=null;
if(bean!=null)
projnumber = (String)projnumberbean.getValue(pageContext);
Serializable[] params = {projnumber,oldoperationid,newManagerName,ProjectID,OldOperationName,OldOperationID};
am.invokeMethod("xxinsertpagelogic",params);
and i wrote import also.
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
my errors are
Error(64,78): incompatible types; found: oracle.apps.fnd.framework.webui.beans.OAWebBean, required: oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean
Error(65,13): duplicate definition of variable projnumber in method processFormRequest(oracle.apps.fnd.framework.webui.OAPageContext, oracle.apps.fnd.framework.webui.beans.OAWebBean)
Error(66,9): variable bean not found in class wnsgs.oracle.apps.pa.projectinfo.webui.ProjectInfoCreateCO
plz help me.
its very urgent
Thanks
Edited by: Latha on Jan 4, 2012 9:57 PM
Edited by: Latha on Jan 4, 2012 10:00 PM -
I have a mpp screen for a cd library management system (we are practicing on it).
We have a main screen where a user should enter the enteries and while clicking a add button it should be inserted in a table, Here the problem rises the table name are ztransaction and zstatus.The fields in mpp are cdid,customerid,transaction id,date of issue and duedate.Now after entering all the values on clicking add button it should be inserted to database table ztransaction and the field cdid alone should be inserted both in ztransaction and zstatus.
Thank youHi Raghuram R G,
Check for Primary key and foreign key in the Database table??? Because of this it was not inserting...check and confirm??
Regds,
Vijay SR -
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 -
Add a new record in database table without using table maintance generator
Hi Expart ,
Plz. tell me how to add new record in database table without using table maintance ganerator ....give me one ex.
Regards
BhabaniHi,
The other way to safely handle the modification of tables is through is by programs that can be done with SE38 or SE80.
To insert into database table we use INSERT statement :
1. To insert a single line into a database table, use the following:
INSERT INTO <target> VALUES <wa>.
INSERT <target> FROM <wa>.
2. To insert a several lines into a database table, use the following:
INSERT <target> FROM TABLE <itaba>.
Or even we can use MODIFY statementas this single statement is used to insert as well as update the records of database table.
MODIFY <target> FROM <wa>.
or MODIFY <target> FROM TABLE <itab>.
thanx.
Edited by: Dhanashri Pawar on Sep 10, 2008 12:25 PM
Edited by: Dhanashri Pawar on Sep 10, 2008 12:30 PM -
I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?
You only need the ODBC driver on each computer. If you are distributing the SQL Toolkit app as an executable and do not install the whole toolkit on each computer, you'll need the SQL Toolkit support files. This is about a dozen files. You can get the list at http://digital.ni.com/public.nsf/websearch/b814be005f9da9258625658700550c75?OpenDocument.
-
how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method. thanks
INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
SELECT col1, col2, col3, ...
FROM sourcedb.dbo.tbl
Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
Erland Sommarskog, SQL Server MVP, [email protected] -
Access is not inserting, updating or deleting records in my database table on the server
I am having a problem with an application I developed using Dreamweaver 8 and Access 2000 several years ago which is no longer working correctly. The problem is that Access is not inserting, updating or deleting records in my database table on the server but is reflected in changes to my Web site. I used the Dreamweaver server behaviors: insert record, update record and delete record to make the changes to my Access table on the server. My Access table on the server shows all of the records I inserted or updated in the past, but not any of the newly inserted on updated records.
does any one have any ideas as to what my problem is?
JimNo, that has nothing to do with your problem. Let's make sure I understand the symptoms.
1) Your site is online at a remote host.
2) You use a dynamic page in your online site to update a database record (insert, delete, or update)
3) The update then appears correctly on your dynamic content page.
4) You download the mdb and it appears to not have any of the upates you just made.
Please correct any of these statements if they are wrong.
If the above is correct, then you must be looking at a cached mdb, or the mdb you are looking at is in the wrong location. Do this: search your entire drive for copies of the mdb, including in the Windows temp directories which is likely where the cached copy is located. Delete any extra copies and download again.
Maybe you are looking for
-
Very frustrated with lack of customer service on rebate offer
Back in August I upgraded my cable service with Comcast and became a new Verizon customer. I was informed of a rebate that paid back $50 on each smartphone purchased. Since I ordered the phones (iPhone 4) directly from the website and did not deal di
-
Use catch block to do something other than handling exception?
Hello, I have always been under the impression that the catch block should only handle the exception thrown by the try block? But now I'm reading a class where it's more or less used as an else if. Of course this works well, but I don't like it. What
-
How can I change a wep key for a previous wifi
I have a previously saved wireless, but i dont know how to edit the settings and change them, like the wep key
-
Error when configuring Desktop Software with Outlook 2007 Calendar
Hello, I am trying to find some help for a problem I'm having with a Blackberry 8100. I would like to use the Desktop Software 5.0 in conjunction with Outlook 2007 (on Windows 7 64 bits) to sync the calendar between the device and the computer. Actu
-
AAC file conversion not working in iTunes 11.1.5.5
Hi, I have updated to the latest version of iTunes [11.1.5.5] and now when I try to convert a wav file to aac it claims to have converted the files but it remains as a wav file. Any body have any ideas for a fix?