Help to add data to a component Table
Hi to all
I do not know how to binding componet Table to a SQL Server data base.... Is possible?
regards
You may find this article useful about using datatables: [http://balusc.blogspot.com/2006/06/using-datatables.html].
Basically you need to create an independent class following the DAO pattern which interacts with the database. Once you got that working, then use it in the managed bean to create, read, update and delete data.
Similar Messages
-
Hi, is it possible to create a submit button in the middle of the form to add data to a repeating table (That repeating table would add an item to a list).
Hi,
Please refer to the articles related to repeating section from the following link
Repeating Tables and Sections in InfoPath
Please don't forget to mark it as answered, if your problem resolved or helpful. -
How to add data in User Defined table
Hello Experts,
I have design form in screen painter , 3 text boxes and labels, 2 add buttons with uid 1 and 2 , and
i have created tables and fields maually and registered new object i have also mentioned table name and alias in property box with fields i have created with userdefined fields as ex: U_age etc and table @EMP in property box
I am loading this form as xml file to SAP B1 every thing works fine but when i click add button no data is added to table what is the problem
Please suggestHi,
Are you using UDO or not?
If not you have to write code by hand for manage data insert, update, search, and so on...
Regards.
Diego -
Add data item from a table to another table
I have two tables, "Model" and "Colour". Fields of Model are "Id", "ModelId" and "ModelName" and fields of Colour are "Id", "ColourId" and "ColourName". These two tables
have one to many relationship. A model must have a colour. One Colour can have many Models.
Say "A" is ColourId with a ColourName "black". An example of ModelId would be "101A", 101 is just model code and A refer to ColourId. ModelId cannot be computed property because that's the value user gonna enter.
What I'm asking is how do I split the ColourId from ModelId and query the related colour item and add it to a record of Model.For advanced query issue, this will be good start.
Advanced LightSwitch: Writing Queries in LightSwitch Code -
Auto add date in a dynamic table
http://www.mediafire.com/?nwmnv42yizg
I have a file here. I would like to make the Colum Day 01 should be auto created when I enter 5, then it will auto create 5 rows with Day 01 --> Day 05.
Also with the Date Selector. I would like to choose a date for 1st row. Then the rest, should be automatically created.
I tried to find the script in forum but no one face to this problem.
Thanks for your help.Here is the updated form..
Few things I corrected.
1) In the Form properties under Preview tab, you selected Preview Type as Print form. I changed it to Interactive.
2) The code in NF1 field I moved it to Exit event from enter event.
3) In the DayNum Calculate event you are not taking the index properly. You are adding rows for Row1. So your reference to Row1 should be like this.
(this.parent.parent.parent.index + 5);
https://acrobat.com/#d=lgd94K0Oh6WniLPrh8QQYw
I did not fully understand your second requirement on the date selection. But if you are thinking to have the same date value displayed in all of the rows then you need to have all the fields with same name and set the binding to Global..
Hope this helps..
Thanks
Srini -
Can someone help? Add date to date field.
I'm trying to make a form so a Starting Day & Date is selected and the following x number of fields are populated with x number days & dates. Example, if Wednesday August 17th 2011 is selected from a date field the field below it will display Thursday August 18th 2011 and the field below that Friday August 19th 2011 and so on.
I have searched for hours and have found many discussions on this but nothing i under stand or make work. I know little to nothing about this program.
I have created a Date/Time Field 1 which displays the current date and the following fields are populated with the following dates. However, this is based off the current date. If the fields were labeled Monday - Friday, Monday being the starting date and it was opened on a Tuesday the Monday date would be wrong therefore making the rest of the days & dates wrong.
Is this really that hard? It doesn't seem that hard but me knowing nothing doesn't help.
Thanks!Here's a possible solution. Your first field is where you select the date.
In the next field:
if (StartDate.rawValue==null) then
$.rawValue = ""
else
Num2Date(Date2Num(StartDate.formattedValue, DateFmt(2)) + 1, DateFmt(2))
endif
the next field:
if (StartDate.rawValue==null) then
$.rawValue = ""
else
Num2Date(Date2Num(StartDate.formattedValue, DateFmt(2)) + 3, DateFmt(2))
endif
the next field:
if (StartDate.rawValue==null) then
$.rawValue = ""
else
Num2Date(Date2Num(StartDate.formattedValue, DateFmt(2)) + 4, DateFmt(2))
endif
and so on.
Not pretty but it works. I can send you the sample if you'd like -
Add datas to UDT using business objects
Hi,
How to add datas to user defined tables using Business Objects.
Regards,
M.Dhivya.Hi,
Check for following provided bt SAP...
Dim ret As Long
d
Private Sub Add_Table_Click()
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
Set oUserTablesMD = oCompany.GetBusinessObject(oUserTables)
' When adding user tables or fields, use a prefix
' identifying your partner name space. This will
' prevent collisions from different partner add-ons
' SAP's name space prefix is "BE_"
'Set the two mandatory fields
oUserTablesMD.TableName = "T1"
oUserTablesMD.TableDescription = "Table1"
'Add the table (which contains 2 default, mandatory fields, 'Code' and 'Name')
ret = oUserTablesMD.Add
If ret <> 0 Then
oCompany.GetLastError ret, Str
MsgBox Str
Else
MsgBox "Table: " & oUserTablesMD.TableName & " was added successfully"
End If
End Sub
Private Sub Add_UDF_Click()
Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
oUserFieldsMD.TableName = "T1"
oUserFieldsMD.Name = "AlbUDF"
oUserFieldsMD.Description = "Albert UDF"
'Add the field to the table
lRetCode = oUserFieldsMD.Add
If lRetCode <> 0 Then
oCompany.GetLastError ret, Str
MsgBox Str
Else
MsgBox "Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table"
End If
End Sub
Private Sub Add_Data_Click()
Dim oUserTable As SAPbobsCOM.UserTable
Set oUserTable = oCompany.UserTables.Item(1)
oUserTable.GetByKey ("T1")
'Set default, mandatory fields
oUserTable.Code = "A"
oUserTable.Name = "Albert"
'Set user field
oUserTable.UserFields.Fields.Item("U_AlbUDF").Value = "1"
oUserTable.Add
If ret <> 0 Then
oCompany.GetLastError ret, Str
MsgBox Str
Else
MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
End If
End Sub
Hope this helps,
Vasu Natari.
Edited by: vasu natari on Jun 12, 2009 11:21 AM
Edited by: vasu natari on Jun 12, 2009 11:21 AM -
How to add a new data element for existing table filed(Primary key field)
Hi Experts,
How to add a new data element for existing table field(Primary key field)
For this filed ther is no foreign key relation ships and even check table.
while activating table it is giving message like below.
can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)
Primary key change not permitted for value table /TC/VENDOR
Check on table /TC/VENDOR resulted in errors
Thanks
RaviHi,
Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
Maybe there are other ways, but this works.
Success,
Rob -
Need help in transferring data from flatfiles to SAP R/3 tables
Hi,
I need to *transfer data in the flatfiles (NON SAP SYSTEM) to SAP R/3 tables*. Can we do it with a help of program ?
Please help me out
Thanks and regards,
Shiva shekar kHi Shiva,
This code will be helpful to you.
*Code used to create BDC
*& Report ZBDC *
*& Example BDC program, which updates net price of item 00010 of a *
*& particular Purchase order(EBELN). *
REPORT ZBDC NO STANDARD PAGE HEADING
LINE-SIZE 132.
Data declaration
TABLES: ekko, ekpo.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
waers TYPE ekko-waers,
netpr TYPE ekpo-netpr,
err_msg(73) TYPE c,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_error TYPE t_ekko,
it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_success TYPE t_ekko.
DATA: w_textout LIKE t100-text.
DATA: gd_update TYPE i,
gd_lines TYPE i.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
TITLE text-002. "New NETPR value
PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
*START-OF-SELECTION
START-OF-SELECTION.
Retrieve data from Purchase order table(EKKO)
SELECT ekkoebeln ekkowaers ekpo~netpr
INTO TABLE it_ekko
FROM ekko AS ekko INNER JOIN ekpo AS ekpo
ON ekpoebeln EQ ekkoebeln
WHERE ekko~ebeln IN so_ebeln AND
ekpo~ebelp EQ '10'.
*END-OF-SELECTION
END-OF-SELECTION.
Check data has been retrieved ready for processing
DESCRIBE TABLE it_ekko LINES gd_lines.
IF gd_lines LE 0.
Display message if no data has been retrieved
MESSAGE i003(zp) WITH 'No Records Found'(001).
LEAVE TO SCREEN 0.
ELSE.
Update Customer master data (instalment text)
LOOP AT it_ekko INTO wa_ekko.
PERFORM bdc_update.
ENDLOOP.
Display message confirming number of records updated
IF gd_update GT 1.
MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
ELSE.
MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
ENDIF.
Display Success Report
Check Success table
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM display_report.
ENDIF.
Display Error Report
Check errors table
DESCRIBE TABLE it_error LINES gd_lines.
If errors exist then display errors report
IF gd_lines GT 0.
Display errors report
PERFORM display_error_headings.
PERFORM display_error_report.
ENDIF.
ENDIF.
*& Form DISPLAY_COLUMN_HEADINGS
Display column headings
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records updated successfully:'(013).
WRITE:/ sy-uline(42).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(004), sy-vline,
(11) 'Old Netpr'(005), sy-vline,
(11) 'New Netpr'(006), sy-vline.
WRITE:/ sy-uline(42).
ENDFORM. " DISPLAY_COLUMN_HEADINGS
*& Form BDC_UPDATE
Populate BDC table and call transaction ME22
FORM bdc_update.
PERFORM dynpro USING:
'X' 'SAPMM06E' '0105',
' ' 'BDC_CURSOR' 'RM06E-BSTNR',
' ' 'RM06E-BSTNR' wa_ekko-ebeln,
' ' 'BDC_OKCODE' '/00', "OK code
'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
' ' 'EKPO-NETPR(01)' p_newpr,
' ' 'BDC_OKCODE' '=BU'. "OK code
Call transaction to update customer instalment text
CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
MESSAGES INTO messtab.
Check if update was succesful
IF sy-subrc EQ 0.
ADD 1 TO gd_update.
APPEND wa_ekko TO it_success.
ELSE.
Retrieve error messages displayed during BDC update
LOOP AT messtab WHERE msgtyp = 'E'.
Builds actual message based on info returned from Call transaction
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = messtab-msgid
msgnr = messtab-msgnr
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
IMPORTING
message_text_output = w_textout.
ENDLOOP.
Build error table ready for output
wa_error = wa_ekko.
wa_error-err_msg = w_textout.
APPEND wa_error TO it_error.
CLEAR: wa_error.
ENDIF.
Clear bdc date table
CLEAR: bdc_tab.
REFRESH: bdc_tab.
ENDFORM. " BDC_UPDATE
FORM DYNPRO *
stores values to bdc table *
--> DYNBEGIN *
--> NAME *
--> VALUE *
FORM dynpro USING dynbegin name value.
IF dynbegin = 'X'.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-program,
value TO bdc_tab-dynpro,
'X' TO bdc_tab-dynbegin.
APPEND bdc_tab.
ELSE.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-fnam,
value TO bdc_tab-fval.
APPEND bdc_tab.
ENDIF.
ENDFORM. " DYNPRO
*& Form DISPLAY_REPORT
Display Report
FORM display_report.
FORMAT COLOR COL_NORMAL.
Loop at data table
LOOP AT it_success INTO wa_success.
WRITE:/ sy-vline,
(10) wa_success-ebeln, sy-vline,
(11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
(11) p_newpr, sy-vline.
CLEAR: wa_success.
ENDLOOP.
WRITE:/ sy-uline(42).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. " DISPLAY_REPORT
*& Form DISPLAY_ERROR_REPORT
Display error report data
FORM display_error_report.
LOOP AT it_error INTO wa_error.
WRITE:/ sy-vline,
(10) wa_error-ebeln, sy-vline,
(11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
(73) wa_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form DISPLAY_ERROR_HEADINGS
Display error report headings
FORM display_error_headings.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(009), sy-vline,
(11) 'Netpr'(010), sy-vline,
(73) 'Error Message'(012), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. " DISPLAY_ERROR_HEADINGS -
To add new record into the table Data Service client
When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
Code:
DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
edoc.addNewEmployeeDetails();
//here I set the primary key value empid
edet.setEmpid("1212");
edet.setEmpname("manu");
ds.submit(edoc);
Error
EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
at com.bea.ld.ServerBean.submit(ServerBean.java:529)
at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Unknown Source)
Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
... 15 more
But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
The update method works fine for the same client.
The exception only happens when I am trying to insert a new record.
Please help me to figure out this problem.If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
Correction: put ld-server-app.jar in the client classpath
Edited by mreiche at 09/17/2007 3:28 PM -
Help - Need to Get Max(Date) from An Unrelated Table in PowerPivot
I have two tables in my Power Pivot model:
Table A (a many table)
Asset
SerialNumber
User
CTUT111
YC112233
Bob
CTUT222
ZZ221144
Susy
CTUT222
ZZ221144
Larry
CTUT333
AB332244
Bob
Table B (a many table, a CSV import from another system)
Asset
SerialNumber
CheckIn_Date
CTUT111
YC112233
6/15/2014
CTUT111
YC112233
6/20/2014
CTUT222
ZZ221144
6/18/2014
CTUT333
AB332244
6/20/2014
I know it appears odd that Table B would have two entries for the same Asset (CTUT111), but it does.
I know I could write a SQL query that gave me the MAX(CheckIn_Date), but I’m not staging these datasets in a SQL server first.
I’m pulling directly from CSV tables.
I don’t want to have bridge tables either, if possible.
So, I’m left with a many-to-many situation in Power Pivot.
I want to add a Calculated Column to Table A, called ‘Latest CheckIn Date’ – which I get from Table B, matching on Serial Number.
So, when I’m done, I would expect the value for Asset=CTUT111 to be 6/20/2014 (since it’s the MAX of a value of dates)
I’m trying this pattern from Marco Russo in which you don’t need to relate two tables to exchange information, but it doesn’t appear to be working.
=CALCULATE (
MAX ( VALUES ( TableB[CheckIn_Date] ) ),
FILTER (
TableB,
'TableA'[SerialNumber]
= TableB[SerialNumber]
I’ve also tried to use LOOKUPVALUE, but I can’t seem to figure it out.
Would appreciate the help.
Thanks in advance.
-EricHi Eric,
Please, try this one formula:
=CALCULATE (
MAXX ( VALUES( TableB[CheckIn_Date] ); TableB[CheckIn_Date] );
FILTER (
TableB;
'TableA'[SerialNumber] = TableB[SerialNumber]
P.S. In my locale I use ";". According to your locale you should use ",".
Truly yours,
Paul -
How can i add two table data into third internal table see below
hi i insert diffferent table data into different internal table i did try to insert two different internal table data into third internal table by using move
but only single data is coming please help me
i want this two internal table data inot third internal table.
sELECT * FROM J_1IEXCHDR INTO CORRESPONDING FIELDS OF ITAB1 WHERE STATUS = 'P'.
SELECT * FROM J_1IEXCDTL INTO CORRESPONDING FIELDS OF ITAB2 WHERE LIFNR = J_1IEXCHDR-LIFNR.
AND DOCYR = J_1IEXCHDR-DOCYR,
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / ITAB1-LIFNR,
ITAB1-DOCNO,
ITAB1-EXYEAR,
ITAB1-BUDAT,
ITAB2-EXBED,
ITAB2-RDOC,
ITAB2-ECS.
ENDSELECT.
ENDSELECT.
thank you .hi
Two add two internal tables data. first we need to create third internal table with all the fields of first two internal tables.
later u move the two internal tables data to third internal table
by looping the internal table which have more records or depending on the requirement and move the corresponding fields of first internal table to the third internal table and use the read statement with condition based on primary key of first itab and get the corresponding data of 2table into 3table.
i am sending the sample code to u.
check it out. i think u will understand how to move.
select vbeln waerk netwr erdat audat kunnr
into table it_vbeln
from vbak
where vbeln in s_vbeln
and erdat in s_erdat.
if not it_vbeln[] is initial.
select kunnr name1
into table it_kunnr
from kna1
for all entries in it_vbeln
where kunnr = it_vbeln-kunnr.
endif.
loop at it_vbeln.
clear it_final.
it_final-vbeln = it_vbeln-vbeln.
it_final-waerk = it_vbeln-waerk.
it_final-netwr = it_vbeln-netwr.
it_final-erdat = it_vbeln-erdat.
it_final-audat = it_vbeln-audat.
read table it_kunnr with key kunnr = it_vbeln-kunnr.
it_final-name1 = it_kunnr-name1.
append it_final.
endloop. -
Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.
Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
Pls explain me the steps for adding data from xml to B1 quotation step by step.
thanks and regards
PriyaHi,
Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
Thanks,
Gordon -
Add data to the table in the database with the use of add button
The name of my database is Socrates.
The name of the table in the database is Employees
I want to be able to add data to the database. i am presently working on the add button such that when i enter date into the textfield and press the add button it should automatically register in the table.
The error upon compilation is with this line of code
If (ae.getSource() == jbtnA)// it says that ";" is expected
Below is the entire code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Mainpage extends JFrame implements ActionListener
JTextField jFirstName = new JTextField(15);
JTextField jSurname = new JTextField(12);
JTextField jCity = new JTextField(10);
JTextField jCountry = new JTextField(12);
JTextField jSSN = new JTextField(8);
JLabel jFirstLab = new JLabel("First Name");
JLabel jSurnameLab = new JLabel("Surname");
JLabel jCityLab = new JLabel("City");
JLabel jCountryLab = new JLabel("Country");
JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
JButton jbtnA = new JButton ("Add");
JButton jbtnPrv = new JButton ("Previous");
JButton jbtnNt = new JButton ("Next");
JButton jbtnDl= new JButton ("Delete");
JButton jbtnSrch = new JButton ("Search");
public Mainpage (String title)
super (title);
Container cont = getContentPane();
JPanel pane1 = new JPanel();
JPanel pane2 = new JPanel();
JPanel pane3 = new JPanel();
pane1.setLayout (new GridLayout (0,1));
pane2.setLayout (new GridLayout(0,1));
pane3.setLayout (new FlowLayout());
pane1.add(jFirstLab);
pane1.add(jSurnameLab);
pane1.add(jCityLab);
pane1.add(jCountryLab);
pane1.add(jSSNLab);
pane2.add(jFirstName);
pane2.add(jSurname);
pane2.add(jCity);
pane2.add(jCountry);
pane2.add(jSSN);
pane3.add(jbtnA);
pane3.add(jbtnPrv);
pane3.add(jbtnNt);
pane3.add(jbtnDl);
pane3.add(jbtnSrch);
cont.add(pane1, BorderLayout.CENTER);
cont.add(pane2, BorderLayout.LINE_END);
cont.add(pane3, BorderLayout.SOUTH);
jFirstName.addActionListener(this);
jSurname.addActionListener(this);
jCity.addActionListener(this);
jCountry.addActionListener(this);
jSSN.addActionListener(this);
jbtnA.addActionListener(this);
jbtnPrv.addActionListener(this);
jbtnNt.addActionListener(this);
jbtnDl.addActionListener(this);
jbtnSrch.addActionListener(this);
validate();
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setResizable(false);
public void actionPerformed(ActionEvent ae)
If (ae.getSource() == jbtnA)
fst = jFirstName.getText();
srn = jSurname.getText();
cty = jCity.getText();
cnty = jCountry.getText();
int sn =
Interger.parseInt(jSSN.getText());
String ad = "Insert into Employees
(Firstname,Surname,City,Country,SSN)" +
"values('"fst"','"srn"','"cty"','"cnty"','"sn"')";
Statement stmt = con.createStatment();
int rowcount = stmt.executeUpdate(ad);
JOptionPane.showMessageDialog("Your
details have been registered");
Statement stmt = con.createStatment();
int rowcount = stmt.executeUpdate(ad);
public static void main (String args[])
Mainpage ObjFr = new Mainpage("Please fill this
registration form");
try
Class.forname("sun.jdbc.odbc.JdbcOdbcDriver");
String plato = "jdbc:odbc:socrates";
Connection con =
DriverManager.getConnection(plato);
catch(SQLException ce)
System.out.println(ce);
}i have restructured the code, but the following line of code is giving error:
String plato = jdbc:odbc:socrates;
the entire code is below:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class Mainpage extends JFrame implements ActionListener
JTextField jFirstName = new JTextField(15);
JTextField jSurname = new JTextField(12);
JTextField jCity = new JTextField(10);
JTextField jCountry = new JTextField(12);
JTextField jSSN = new JTextField(8);
JLabel jFirstLab = new JLabel("First Name");
JLabel jSurnameLab = new JLabel("Surname");
JLabel jCityLab = new JLabel("City");
JLabel jCountryLab = new JLabel("Country");
JLabel jSSNLab = new JLabel("Social Security Number (SSN)");
JButton jbtnA = new JButton ("Add");
JButton jbtnPrv = new JButton ("Previous");
JButton jbtnNt = new JButton ("Next");
JButton jbtnDl= new JButton ("Delete");
JButton jbtnSrch = new JButton ("Search");
Statement stmt;
String ad;
public Mainpage (String title)
super (title);
Container cont = getContentPane();
JPanel pane1 = new JPanel();
JPanel pane2 = new JPanel();
JPanel pane3 = new JPanel();
pane1.setLayout (new GridLayout (0,1));
pane2.setLayout (new GridLayout(0,1));
pane3.setLayout (new FlowLayout());
pane1.add(jFirstLab);
pane1.add(jSurnameLab);
pane1.add(jCityLab);
pane1.add(jCountryLab);
pane1.add(jSSNLab);
pane2.add(jFirstName);
pane2.add(jSurname);
pane2.add(jCity);
pane2.add(jCountry);
pane2.add(jSSN);
pane3.add(jbtnA);
pane3.add(jbtnPrv);
pane3.add(jbtnNt);
pane3.add(jbtnDl);
pane3.add(jbtnSrch);
cont.add(pane1, BorderLayout.CENTER);
cont.add(pane2, BorderLayout.LINE_END);
cont.add(pane3, BorderLayout.SOUTH);
jFirstName.addActionListener(this);
jSurname.addActionListener(this);
jCity.addActionListener(this);
jCountry.addActionListener(this);
jSSN.addActionListener(this);
jbtnA.addActionListener(this);
jbtnPrv.addActionListener(this);
jbtnNt.addActionListener(this);
jbtnDl.addActionListener(this);
jbtnSrch.addActionListener(this);
validate();
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
pack();
setResizable(false);
try
Class.forname(sun.jdbc.odbc.JdbcOdbcDriver);
String plato = jdbc:odbc:socrates;
Connection con = DriverManager.getConnection(plato);
stmt = con.createStatment();
catch(SQLException ce)
System.out.println(ce);
catch(ClassNotFoundException ce)
System.out.println(ce);
public void actionPerformed(ActionEvent ae)
try
if(ae.getSource().equals(jbtnA))
fst = jFirstName.getText();
srn = jSurname.getText();
cty = jCity.getText();
cnty = jCountry.getText();
int sn = Interger.parseInt(jSSN.getText());
ad = "Insert into Employees
values('"+fst+"',"+srn+"','"+cty+"','"+cnty+"','"+sn+"')";
stmt.executeUpdate(ad);
JOptionPane.showMessageDialog(this, "Your details have been
registered");
catch(SQLException ce)
System.out.println(ce);
public static void main(String args[])
Mainpage ObjFr = new Mainpage("Please fill this registration form");
} -
Help Required -- Can we use SQL Query to READ data from SAP MDM Tables
Hi All,
Please help.........
Can we use SQL Query to READ(No Creation/Updation/Deletion just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
Thanks in Advance
RegardsAll the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
BR,
Alok
Maybe you are looking for
-
How to call Labview-VI​s in a AgilentVee​-function?
Hello, i have some good running Labview-Vis and want to use them in a Agilent-Vee-function (*.vee). Is there a way to make a DLL from the VIs? Or is it possible to run a VI from a C++-DLL? Then i could create this DLL and call the DLL in VEE. But i w
-
Can't drag docs from desktop onto the HD icon.
I am no longer able to drag documents onto the hard drive. I get an error message: The item "xxxxxx" can't be moved because "Macintosh HD" can't be modified. Do I "authenticate" or run to the apple store. I've had this computer for 2 years; updated t
-
How-To Changing Page Size in iAuthor
Hi, is there a possibility to change the page size of an iAuthor iBook? I would like to create one which has the same dimension in portrait and landscape mode because the original paper book ist published in this way (of course I know, that I will ge
-
How to calculate value from perticular column and row in pivot table
Hi all, I am having following pivot table. Country A B C D F G H J K L M Grand Total Canada 1 1 3 3 12 14 13 97 China 8 4 3 19 India 2 47 448 176 395 3656 1964 1360 8077 USA 1545 352 380 26 10 4 8 32 2054 1023 758 4624 UK 12 19 13 23 33 298 Grand Tot
-
I am looking to publish portrait photographs on my studio website via Lightroom 2.5. Recently a customer asked me to password protect the gallery before posting onto the web to ensure family privacy. The facility is not currently (!) there. So how ca