Numberformat error in generating excel sheet
i am changing the numberformat through these commands but getting error :-
NumberFormat fivedps =fivedps=new NumberFormat("#######.##");
WritableCellFormat fivedpsFormat = new WritableCellFormat(fivedps);
WritableCellFormat fivedpsFontFormat = new WritableCellFormat (times16font, fivedps);
ERRORS:-
java.text.NumberFormat is abstract; cannot be instantiated
NumberFormat fivedps =fivedps=new NumberFormat("#######.##");
constructor WritableCellFormat (java.text.NumberFormat)
location: class jxl.write.WritableCellFormat
WritableCellFormat fivedpsFormat = new WritableCellFormat(fivedps);
how do i solve these problems and achieve the same functioning?
Try DecimalFormat
Similar Messages
-
Error while importing excel sheet in Import manager
Hi Experts,
Please find below error while importing Excels sheet as a source into import manger and advice.
logon error: failed to open table Text Table for insertion
Error: Query must have at least one destination filed in sap MDM Import manager
Regards,
MFHHi,
Its clear now.
Merci
MFH -
SharePoint 2007 - Invalid Token Error when Generating Excel Worksheet with ItemLevelAudit
All,
I have the AuditLevel project located here working on a test site:
https://msdn.microsoft.com/en-us/library/office/bb397403(v=office.12).aspx#MOSS2007ItemLevelAudit_AuditingwithSharePointServer2007
Since I'm a site collection admin - I can access a document and go to View Audit History.
When I click the button to Generate Excel Document - if I've viewed the document I get the following error
since I have a ' in my name - is this due to AD or can this be fixed in code - I did run a
Replace ' with '' in each of the page loads on any aspx pages I saw
string s = "'";
string escaped = s.Replace("'","''");
'//s:si[s:t='O'Neill, Kevin']' has an invalid token. at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean allowVar, Boolean allowKey)
at MS.Internal.Xml.XPath.QueryBuilder.Build(String query, Boolean& needContext)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.Compile(String xpath)
at System.Xml.XmlNode.SelectSingleNode(String xpath, XmlNamespaceManager nsmgr)
at ItemAuditing.AuditLogWorkbook.XLInsertStringIntoCell(String sheetName, String addressName, String value)
at ItemAuditing.AuditLogWorkbook.WriteCell(String celladdress, String cellvalue)
at ItemAuditing.AuditLogWorkbook.WriteEntry(String User, String Occurred, String Event, String Version)
at AuditLogWorkbookHandler.<>c__DisplayClass1.<ProcessRequest>b__0() in c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\AuditLogWorkbook.ashx:line 54
at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at AuditLogWorkbookHandler.ProcessRequest(HttpContext context) in c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\AuditLogWorkbook.ashx:line 30
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Hi Alan J Stewart,
This issue may occur due to the column name in your scenario.
Would you please change the column name: raised by column to “raised_by”, and export the list with this column, check whether the issue persists.
I have seen similar issue that caused by the column name.
Thanks,
Qiao
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Qiao Wei
TechNet Community Support -
Error reading a Excel sheet in BDS
Hi Team,
I have uploaded an excel sheet in BDS by OAER. Now in my program I want to read the excel file. I am putting the code snippet.
DATA;
l_v_proxy TYPE REF TO i_oi_document_proxy,
l_v_control TYPE REF TO i_oi_container_control,
l_v_container TYPE REF TO cl_gui_custom_container.
CALL METHOD l_v_control->init_control
EXPORTING r3_application_name =
'BDS-DOI'
inplace_enabled = 'X'
inplace_scroll_documents = 'X'
parent = l_v_container
register_on_close_event = 'X'
register_on_custom_event = 'X'
IMPORTING retcode = v_retcode.
CALL METHOD c_oi_errors=>raise_message
EXPORTING
type = 'E'.
CALL METHOD l_v_control->get_document_proxy
EXPORTING
document_type = 'Excel.Sheet.8'
document_format = l_v_doc_format "OLE
IMPORTING
document_proxy = l_v_proxy
retcode = v_retcode.
IF v_retcode NE c_oi_errors=>ret_ok.
EXIT.
ENDIF.
CLEAR l_v_error.
CALL METHOD l_v_proxy->has_spreadsheet_interface
IMPORTING
error = l_v_error
is_available = l_v_has
retcode = v_retcode.
IF v_retcode NE 'OK'.
RETURN.
ENDIF.
But in has_spreadsheet_interface it returns error return code like 'DOCUMENT_NOT_OPEN'.
Can you please help me that what would be the possible causes of the error.
Thanks,
MainakHi,
Its clear now.
Merci
MFH -
Error while sending excel sheet as attachment to Mail Receiver
Hi everyone,
I am facing the below error when I am trying to send data to Mail receiver adapter. The attachment is excel sheet.
Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of MessageTransformBean.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MessageTransformBean..
I don't understand where the problem is. This has been running since long time and last month we have changed our web dispatcher details. I hope everything is fine. But not sure the root cause for this issue.
Please help me in resolving this.
Thank you.
Regards
Bhanu T.Check if this helps: MessageTransformBean module
Confirm that you have configured the MessagetransformationBean properly.
Are you trying to convert some payload into Excel and send it as an attachment in the Mail CC? If yes, then I hope that you have included the correct Content_type value.
Check this for more info on Content_type: /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
Regards,
Abhishek. -
Error while uploading Excel sheet
Hello Everybody,
I haave developed one application in which I am uploading one excel sheet. This code is working fine on my local WAS. But, it is giving me following error on Development server.
Application error occurred during request processing.
Details: java.lang.NoSuchMethodError: com.sap.engine.services.servlets_jsp.lib.multipart.MultipartMessage.setCharset(Ljava/lang/String;)V
Exception id: [0012799E23D0004E0000021C000022E900043C0595771BD9]
From the error it seems that it is not from my application but this error is coming from the server side. What could be the issues/problem from the server?
Did anybody encounter the same error?
Please help me in this regard.
Thanks,
Bhavik DevishaHello Bhavik,
are you using any external library in your project?
Can you please share the code which is posing problem?
Ashu -
Generating EXCEL sheet from an iView
hiii......
i've developed a iView which holds list of users in a dropdown list box....and a button...
now i want this data to be filled in a excel sheet when i click this button.....
can some one send me sample code for this task...
i have some code which doesnt work.......
i cudnt debug this.....
plz go through.......
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class XLSGen {
public void generate() throws Exception {
HSSFWorkbook wb = new HSSFWorkbook();
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
HSSFSheet sheet = wb.createSheet();
HSSFRow row = sheet.createRow(3);
HSSFCell cell = row.createCell((short)0);
HSSFCellStyle cs1 = wb.createCellStyle();
HSSFCellStyle cs2 = wb.createCellStyle();
HSSFCellStyle cs3 = wb.createCellStyle();
HSSFDataFormat df = wb.createDataFormat();
HSSFFont f = wb.createFont();
HSSFFont f2 = wb.createFont();
f.setFontHeightInPoints((short) 12);
f2.setFontHeightInPoints((short) 10);
cs1.setFont(f);
cs1.setDataFormat(df.getFormat("#,##0.0"));
cs2.setFont(f2);
cell.setCellValue(1);
row.createCell((short)1).setCellValue(1.2);
row.createCell((short)2).setCellValue("This is a string");
row.createCell((short)3).setCellValue(true);
// HttpServletResponse res = request.getServletResponse(true);
// res.setContentType("application/vnd.ms-excel");
// wb.write(res.getOutputStream());
wb.write(fileOut);
fileOut.close();
thanks and regards,
SudheerHi ,
Modified your code .
public void generate(IPortalComponentRequest request) throws Exception {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
HSSFRow row = sheet.createRow(3);
HSSFCell cell = row.createCell((short)0);
HSSFCellStyle cs1 = wb.createCellStyle();
HSSFCellStyle cs2 = wb.createCellStyle();
HSSFCellStyle cs3 = wb.createCellStyle();
HSSFDataFormat df = wb.createDataFormat();
HSSFFont f = wb.createFont();
HSSFFont f2 = wb.createFont();
f.setFontHeightInPoints((short) 12);
f2.setFontHeightInPoints((short) 10);
cs1.setFont(f);
cs1.setDataFormat(df.getFormat("#,##0.0"));
cs2.setFont(f2);
cell.setCellValue(1);
row.createCell((short)1).setCellValue(1.2);
row.createCell((short)2).setCellValue("This is a string");
row.createCell((short)3).setCellValue(true);
HttpServletResponse res = request.getServletResponse(true);
try {
res.setContentType("application/vnd.ms-excel");
wb.write(res.getOutputStream());
}catch(Exception e) {}
Check this blog for more
Create an excel file from JAVA using HSSF api -
Webutil error while generate excel form
Hi
In my forms appl. I use webutil in order to generate excel reports
I have to midtier instances both running on a separate host.
End users connect through a WLB frontend.
At one of the midtiers, when generating a excel report using webutil "error while running kit"
No errors appear in any log on the midtier. On a log table in the database ORA-12703 appears but I'm not sure if thats related.
On the other midtier, with the same compiled forms using the same database it works fine.
Does anyone have a clue?
reg.
MichelHi
Are you talking about adobe forms or smartforms. These are 2 different types of forms. For Adobe forms you need an ADS which sits on the java stack and needs to be configured properly. Some services need to be activated in SICF for the configuration as well. A conplete guide on how to configure the ADS is found on the following link
[https://www.sdn.sap.com/irj/sdn/adobe?rid=/webcontent/uuid/90355269-4d89-2a10-0bb9-f388704f1dcd]
Regards
Thashin -
Generating Excell Sheet using Reports 9i
Hello,
I wanna know how can I do to generate one excell sheet using reports, without
use the option that4s generate text file using tab. I wanna know if someone have
example codes, or library4s.
Thanks,
Paulo SergioHere are some notes we created from the demo below. This works great for generating true formated excel output in 9i Reports using 9ias Rel2.
Notes from
http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
Output to Excel with Oracle9i Report
1. Create an Excel template for the report. It should contain generic information such as title, logo and column headers
2. Cretae a sample line of data in the spreadsheet
3. Save the Excel spreadsheet as a Web page. File | Save As Web Page
4. Open the Web page you just created in Reports Builder
5. Double-click on Web Source node to display the HTML code for the Excel spreadsheet
6. Note how Excel generated HTML and XML code for the spreadsheet you created. Reports Builder also adds its own JSP tags
7. Add the Data Source An SQL Query
8. Modify the Web Source. Now that youve written the query, you can modify the Web source to tell Reports Builder to display your report in Excel.
9. Click on the Web Source icon in the toolbar.
10. To force the browser to open MS Excel it is necessary to change the HTTP Content Type to a specific MIME Type:
application/vnd.ms-excel
Insert the following line immediately before the <rw:report id=report> tag
<%@ page contentType=application/vnd.ms-excel %>
(This is a standard JSP directive to set a MIME Type (Content Type) )
11. To respect Excel format, you should delete the blank lines above the <html> tag.
12. Now, use Oracle 9i Reports JSP tags to add the data retrieved by your SQL Query to the report.
13. Search for the sample line of data you added to your Excel spreadsheet
14. Each line is saved as an HTML Table Row tag ( <tr> ).
15. Each column is mapped as an HTML Table Data tag ( <td> ).
16. Using Reports JSP Tags, add a Reports repeating frame tag to loop around the Data Model group.
17. To help, show the Object navigator next to the Web Source Window. All group information is now visible in the Object Navigator
18. Enclose the sample line of code in the Web source with the Reports9i JSP repeating tag.
Use from menu Insert | Repeating Frame at beginning of sample
Move the closing repeating tag after the </tr> tag.
Start of the repeating tag would be
<rw:foreach id=foreach src=>
Ending of the repeating frame would be
</rw:foreach>
19. In the opening of the repeating tag (<for each>), add the name of the group the tags enclose. JSP custom tags require a unique identifier.
For example: <rw:foreach id=gEmpNoId src=G_EMPNO>
20. Now, map the cells of the Excel spreadsheet to the corresponding field from your data model.
Select on the data value. From menu select Insert | Field. The source of the tag is the name of the field in the query.
21. Repeat the operation for each field of the report. Note: do not forget to specify a unique identifier for each field.
22. The code now contains a repeating frame. You have also mapped each cell in the Excel spreadsheet to the corresponding field in the data model
23. Save the report as a Reports JSP. You can test the report using the Run Web Layout icon in the toolbar
24. The execution of a Web Layout report from Reports Builder creates a temporary HTML file and launches the browser. The browser does not launch Excel because the document is saved as an HTML file. To launch Excel from the browser you need to test it from Reports Server.
25. In order to have the report appear inside Excel, you need to execute it with the Reports Server under OC4J. To do this you need to:
First, start an OC4J instance from Oracle 9iDS see How to Execute Reports Services from Oracle 9iDS on OTN. Then, copy the JSP to a directory. For example: $IDS_HOME/reports/j2ee/reports_ids/web/test
26. Enter the URL to execute the jsp. The JSP is executed from an OC4J instance.
http://reports9iTestServer:8888/reports/test/ListOfEmployees.jsp?userid=scott/tiger@ora901
27. The browser launches Microsoft Excel and displays the data from your report. -
Error while generating excel report on citrix Metaframe
Hi All,
I have developed a form which generates excel on client server. At my work people are using citrix metaframe and when i try to open the same form on the citrix the host command does not work. Can any one help me with this issue.
currently the host looks like this
HOST('C:\Program Files\Microsoft Office\Office\EXCEL.EXE c:\sgir938.xls');
Regards,
RiteshIs anyone having any idea about it...
-
Generate excel sheet list file through program
Hi,
I have to generate list in excel which is having column with fixed length.
I m using classical report for output then in output i m generating excel file .
but that file is not with fixed column length.
how ALV will be useful in this case
Please help.
Regards,
Sudhir Ghag.Hi,
As from Ur query u required the output in the fixed length of columns as output in the excel. This is not possible by using Type pool ole2. We have to control the length of the excel cell as fixed.
Hope this will help U -
Generate Excel Sheet using Servlet
Hi all,
I have a HTML page with some fields and a submit button. This HTML page is calling a servlet. When this servlet is called from this HTML, I want the servlet to take the values in the fields of the HTML page and create an Excel Sheet with those values.
Thanks,
AnirvanWrite all the details into an jsp/html as usual...
just change the content type of the response of the servlet before you redirect.
res.setContentType("application/vnd.ms-excel");
res.setHeader("Content-Disposition", "attachment; filename=\"fileName.xls\""); -
Generating Excel Sheet from Reports ......
Hi,
I want to generate reports both in Oracle Reports 6.0, as well
as in Microsoft Excel. The simplest solution I thought was to
generate the Oracle Report first and then, give a button on the
report, which when pressed, can scan the data in the generated
report and write it into an Excel file. The writing part to
Excel file, I can do by using the OLE2 automation. I am not able
to find a way to read the data in the generated report
programatically. Is this possible and if yes, then can anyone
suggest me a way to do this. Is there an alternate solution to
this problem.
regards,
AbhilashHi ,
Modified your code .
public void generate(IPortalComponentRequest request) throws Exception {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
HSSFRow row = sheet.createRow(3);
HSSFCell cell = row.createCell((short)0);
HSSFCellStyle cs1 = wb.createCellStyle();
HSSFCellStyle cs2 = wb.createCellStyle();
HSSFCellStyle cs3 = wb.createCellStyle();
HSSFDataFormat df = wb.createDataFormat();
HSSFFont f = wb.createFont();
HSSFFont f2 = wb.createFont();
f.setFontHeightInPoints((short) 12);
f2.setFontHeightInPoints((short) 10);
cs1.setFont(f);
cs1.setDataFormat(df.getFormat("#,##0.0"));
cs2.setFont(f2);
cell.setCellValue(1);
row.createCell((short)1).setCellValue(1.2);
row.createCell((short)2).setCellValue("This is a string");
row.createCell((short)3).setCellValue(true);
HttpServletResponse res = request.getServletResponse(true);
try {
res.setContentType("application/vnd.ms-excel");
wb.write(res.getOutputStream());
}catch(Exception e) {}
Check this blog for more
Create an excel file from JAVA using HSSF api -
Error in generating Excel using EXCEL_OLE_STANDARD_DAT
Hi,
While generating an Excel using EXCEL_OLE_STANDARD_DAT, the files are getting genrated but it also gives an
"OLE_OBJECT_METHOD_ERROR" (only on some PC's).
Why do we get this error and how will I be able to resolve it ?
Thanks in advance,
ArchanaHi Archana,
Have a look at OSS Notes 104165 and 691875. Hope these notes give some inputs.
Thanks
Lakshman -
Error in uploading excel sheet data into internal table
Dear all,
i am facing problem when uploading data from excel. i used KD_GET_FILENAME_ON_F4.i select the file and pass on to ALSM_EXCEL_INTO_INTERNAL_TABLE.and i get the ERROR....
Illegal type when transferring an internal table to a FORM. this is my code .
types : begin of ty_mm01,
matnr like rmmg1-matnr,
mbrsh like rmmg1-mbrsh,
mtart like rmmg1-mtart,
maktx like makt-maktx,
meins like mara-meins,
matkl like mara-matkl,
bismt like mara-bismt,
spart like mara-spart,
mtpos like mara-mtpos_mara,
end of ty_mm01.
data : tt_mm01 type standard table of ty_mm01,
wa_mm01 like TT_MM01.
data : t_bdcdata like standard table of bdcdata,
t_bdcmsgcoll like standard table of bdcmsgcoll.
constants: begcol TYPE i value 1 ,
begrow TYPE i value 1,
endcol TYPE i value 100,
endrow TYPE i value 32000.
selection-screen : begin of block bdc with frame.
parameter : tfile like rlgrap-filename obligatory.
selection-screen : end of block bdc.
at selection-screen on value-request for tfile.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = 'ZMM_MAT_MAS_BASIC_DATA'
DYNPRO_NUMBER = '1000'
FIELD_NAME = 'TFILE'
STATIC = 'X'
MASK = ',*.xls,'
CHANGING
FILE_NAME = tfile
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = tfile
I_BEGIN_COL = begcol
I_BEGIN_ROW = begrow
I_END_COL = endcol
I_END_ROW = endrow
TABLES
INTERN = tt_mm01
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks in advanceHi,
Check these FM : KCD_EXCEL_OLE_TO_INT_CONVERT
Report ZPSP_TEST.
data: bdc_DATA like bdcdata occurs 0 with header line,
mess_tab like bdcmsgcoll occurs 0 with header line.
DATA: BEGIN OF ITAB OCCURS 0 ,
tcnt TYPE i, "Table Counter &H0D
WERKS LIKE T001W-WERKS,
BNFPO LIKE EBAN-BNFPO,
MATNR LIKE MARA-MATNR,
MENGE LIKE EBAN-MENGE,
END OF ITAB.
start-of-selection.
PERFORM upload_data.
loop at itab.
perform bdc_dynpro using 'SAPMM06B' '0100'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BSART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-BSART'
'NB'.
perform bdc_field using 'RM06B-LPEIN'
'T'.
perform bdc_field using 'EBAN-WERKS'
ITAB-WERKS.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'RM06B-EKGRP'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RM06B-BNFPO'
ITAB-BNFPO.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-MATNR(01)'
ITAB-MATNR.
perform bdc_field using 'EBAN-MENGE(01)'
ITAB-MENGE.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM06B-EEIND'
record-EEIND_010.
*perform bdc_field using 'RM06B-LPEIN'
record-LPEIN_011.
*perform bdc_field using 'EBAN-EKGRP'
record-EKGRP_012.
*perform bdc_field using 'EBAN-BADAT'
record-BADAT_013.
*perform bdc_field using 'EBAN-FRGDT'
record-FRGDT_014.
*perform bdc_field using 'EBAN-PREIS'
record-PREIS_015.
*perform bdc_field using 'EBAN-WAERS'
record-WAERS_016.
*perform bdc_field using 'EBAN-PEINH'
record-PEINH_017.
*perform bdc_field using 'EBAN-REPOS'
record-REPOS_018.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'RM06B-BNFPO'
record-BNFPO_019.
*perform bdc_field using 'EBAN-MATNR(02)'
record-MATNR_02_020.
*perform bdc_field using 'EBAN-MENGE(02)'
record-MENGE_02_021.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'EBAN-MENGE'
ITAB-MENGE_023.
*perform bdc_field using 'RM06B-EEIND'
record-EEIND_024.
*perform bdc_field using 'RM06B-LPEIN'
record-LPEIN_025.
*perform bdc_field using 'EBAN-EKGRP'
record-EKGRP_026.
*perform bdc_field using 'EBAN-BADAT'
record-BADAT_027.
*perform bdc_field using 'EBAN-FRGDT'
record-FRGDT_028.
*perform bdc_field using 'EBAN-PREIS'
record-PREIS_029.
*perform bdc_field using 'EBAN-WAERS'
record-WAERS_030.
*perform bdc_field using 'EBAN-PEINH'
record-PEINH_031.
*perform bdc_field using 'EBAN-REPOS'
record-REPOS_032.
perform bdc_field using 'EBAN-TXZ01'
'BEARING 2"X2"'.
perform bdc_field using 'EBAN-MENGE'
'65'.
perform bdc_field using 'RM06B-EEIND'
'2005/01/03'.
perform bdc_field using 'RM06B-LPEIN'
'D'.
perform bdc_field using 'EBAN-EKGRP'
'M11'.
perform bdc_field using 'EBAN-BADAT'
'2005/01/03'.
perform bdc_field using 'EBAN-FRGDT'
'2005/01/03'.
perform bdc_field using 'EBAN-PREIS'
' 1,120.00'.
perform bdc_field using 'EBAN-WAERS'
'EUR'.
perform bdc_field using 'EBAN-PEINH'
'1'.
perform bdc_field using 'EBAN-REPOS'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-MENGE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-TXZ01'
'DRILLING PIPE 10"'.
perform bdc_field using 'EBAN-MENGE'
'75'.
perform bdc_field using 'RM06B-EEIND'
'2005/01/03'.
perform bdc_field using 'RM06B-LPEIN'
'D'.
perform bdc_field using 'EBAN-EKGRP'
'M11'.
perform bdc_field using 'EBAN-BADAT'
'2005/01/03'.
perform bdc_field using 'EBAN-FRGDT'
'2005/01/03'.
perform bdc_field using 'EBAN-PREIS'
' 0.53'.
perform bdc_field using 'EBAN-WAERS'
'EUR'.
perform bdc_field using 'EBAN-PEINH'
'1'.
perform bdc_field using 'EBAN-REPOS'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0106'.
perform bdc_field using 'BDC_CURSOR'
'RM06B-BNFPO'
perform bdc_field using 'BDC_OKCODE'
'&H3DBU'.
*perform bdc_field using 'RM06B-BNFPO'
CALL TRANSACTION 'ME51' USING BDC_DATA MODE 'A'.
endLOOP.
FORM upload_data.
*local variable declaration
DATA : lv_index TYPE i,
l_count TYPE i.
*local constants declaration
CONSTANTS:
lc_start_col TYPE i VALUE '1' ,
lc_start_row TYPE i VALUE '2' ,
lc_end_col TYPE i VALUE '256' ,
lc_end_row TYPE i VALUE '65536'.
*local field symbol declaration
FIELD-SYMBOLS : <lf_s>.
*loacal internal table declaration
DATA : li_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
*refresh internal table for each loop
CLEAR: li_intern,
l_count .
REFRESH li_intern.
to upload the data in excel on the presentation server this function
module converts the data from excel file into an internal table
containing row no col no and value
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename &H3D 'Give file location here'
i_begin_col &H3D lc_start_col
i_begin_row &H3D lc_start_row
i_end_col &H3D lc_end_col
i_end_row &H3D lc_end_row
TABLES
intern &H3D li_intern
EXCEPTIONS
inconsistent_parameters &H3D 1
upload_ole &H3D 2.
checking for data in internal table
CHECK NOT li_intern[] IS INITIAL.
sorting internal table
SORT li_intern BY row col.
collecting data into an internal table
LOOP AT li_intern.
MOVE: li_intern-col TO lv_index.
lv_index &H3D lv_index + 1.
ASSIGN COMPONENT lv_index OF STRUCTURE itab TO <lf_s>.
MOVE : li_intern-value TO <lf_s>.
AT END OF row.
l_count &H3D l_count + 1.
itab &H3D l_count.
APPEND itab.
ENDAT. " at end of row
ENDLOOP. " loop at li_intern
Reg,
Siva
Edited by: Siva Prasad on Jun 1, 2009 8:41 AM
Edited by: Siva Prasad on Jun 1, 2009 4:25 PM
Maybe you are looking for
-
How to replace the root tag in ABAP Mapping
how to replace the root tag with the certain string in ABAP Mapping just like <?xml version="1.0" encoding="UTF-8"?> <root> <name>Lawrence</name> </root> into <?xml version="1.0" encoding="UTF-8"?> <myRootElement> <name>Lawrence</name> </my
-
Changing resolution of images ?
I like to shoot my pics in the largest resolution because it gives me the best print quality. However, when I email my images to family and friends I like to reduce them in size to normally 640 x 480 to make them easier to view especially on older s
-
Fox code: unable to access infocube data
Hi Friends, Multi planning area consists of 2 basic areas. One infocube based on key figure model and other infocube based on account model. Now unable to access infocube(keyfigure model) data in multi area. Here my taget cube is based on account mod
-
Is it possible to load an external swf at a specific frame?
Hey! I've got a flash file which acts as the main menu for a program I'm developing. Everything works fine from the main menu however when you click to return to the main menu the whole main menu file reloads. Is it possible to use loadMovieNum( ) to
-
"Error issuing replication: 8453 (0x2105)" when doing a repadmin /syncall
Whenever I do a repadmin /syncall I get "CALLBACK MESSAGE: Error issuing replication: 8453 (0x2105):" If I do a repadmin /syncall /P the command completes with no errors I am running this command from the only FSMO roles holder for my domain This is