Write the Error log from background Job to the Spool request
Hi ,
I have a situation where in i need to capture the error log of a Z program which runs as a background job and write that log into the spool request. My Z program calls runs RSEINB00 program using the SUBMIT statement. When this Job fails the error log can be seen in SM37. But i need this error log to be sent in to a spool.
I can read the error log using the BP_JOBLOG_READ FM and can also create a spool using the RSPO_SPOOL_OPEN FM.
The problem is, when the Submit statement executes, due to internal valdation in the RSEINB00 program the program terminates. Due to this it is not able to perform the SY-SUBRC Check and thus doesn't read the log.
Can anybody suggest me how to overcome this problem. I am attaching the code for your refernece.
SUBMIT RSEINB00
USING SELECTION-SET 'TEST2'
TO SAP-SPOOL
LIST NAME 'LOCL'
IMMEDIATELY space
KEEP IN SPOOL 'X'
AND RETURN.
<b>If sy-subrc <> 0.</b>
CALL FUNCTION 'BP_JOBLOG_READ'
EXPORTING
CLIENT = SY-MANDT
JOBCOUNT = i_tbtco-jobcount
JOBLOG = i_tbtco-joblog
JOBNAME = i_tbtco-jobname
TABLES
JOBLOGTBL = l_joblog
IF SY-SUBRC <> 0.
else.
message i002 with l_joblog-msgv1.
ENDIF.
<b>
ENDIF.</b>
Rgds,
Kewal
P.S. : any other approach to solve this problem will be appreciated too and the points will be rewarded suitably.
If I select a job in SM37 and I click on "spool" I get a list with separate spool entries for each of the steps, e. g.
Programmname/Kommand Programmtyp Spoolliste
Z_MM_STAT_UPDATE_WERK ABAP 1707445
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1707459
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_MARA ABAP 1721423
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1721437
Z_MM_STAT_UPDATE_MARA ABAP 1721446
Z_MM_STAT_UPDATE_WERK ABAP 1721447
Z_MM_STAT_UPDATE_VKORG ABAP 1721471
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721521
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721816
It's in German but I'm sure you get the idea. For each Z_MM_STAT_UPDATE and variant I have a separate spool list that I can display.
Markus
Similar Messages
-
Help, How to view the error log of oracle Job
Hi all,
I created a job in my database, which clears the archivelog. After the job is executed, it occurs error.Such as :
RMAN清理归档日志 1 问题 2010-3-19 下午03时11分00秒 GMT+08:00 PTDB 数据库实例 SYSTEM RMAN 脚本
How to view the error log of oracle Job?
Thank you.
Eric ZhouHello,
Besides some views (with the scheduler) that you can get on the link below:
http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse002.htm#CHDGIDFD
You may use the LOG parameter with RMAN so as to generate a logfile on the server.
Also from EM DBConsole (starting with 10g) you may have the RMAN Backup Report.
Hope this help.
Best regards,
Jean-Valentin -
Remove the Error log from Order screen
Hi,
We are getting error below while order creation from webshop (B2C implementation)
"No Connection could be made to IPC" This error comes when IPC down. And cleared the error also to IPC stop/start and done the price calculation successfully to using "Update" technique.
But, still that error log is there in CRMD_ORDER screen in error logs area (red color button). How to clear/remove this error from this screen?
Please any one help me out on this...
Thnx,
Suriya.Hi Suriya
Prakash is right, if you want to delete the error message from the existing doc, please follow waht he said.
But there is a possibility that you get run-time errors when you edit the same again. The document with error was created with a config in place. Now if you change the config, this will not change the existing docs but will change the documents from now
As Prakash suggested do the error deletion process in test mode or Sandbox, then see if you get any Runtime errors, otherwise
I would suggest
try deleting the one the inputs like item and other stuff on the document. this should take the error off. Please let me if this works,
Dont forget points -
How to change the position of the dialog for the error log from ALV Grid
Hi,
I've written a program using the method display_protocol to display the error detected in an ALV Grid and find that the error popup at the top left corner of the screen irrespective of the window of the SAP session.
I'm wondering if I can specify to locate the error popup relative to the top left corner of the window of the SAP session.
Thanks,
FrancisHI PG,
do below whie filling the filed catlog
wa_fieldcat-fieldname = 'Field1".
wa_fieldcat-COL_POS = '1',
append wa_fieldcat to it_fieldcat.
wa_fieldcat-fieldname = 'Field2".
wa_fieldcat-COL_POS = '2',
wa_fieldcat-fieldname = 'Field3".
wa_fieldcat-COL_POS = '3',
Thanks! -
Email multiple spools from background job - SM36 using Spool List recipient
I create a background job using Spool List Recipient to email me the reports. The program that I scheduled to run creates 2 spools. When the spools are sent via email, only the last spool is sent.
Please advise on how I can get the 2 spools sent via email.i would not use the Spool List recipient from Job and use the function RSPO_SPOOLJOB_TO_OFFICE in your Program instead.
tell me if it helps.
Regards,
Laurent -
Error in loading the WSDL file. Check the error log for more details
Hello,
I am trying to create a Import Adaptive Webservice Model. I am using the WSDL:
http://www.abysal.com/soap/AbysalEmail.wsdl
I am getting the below error when I choose WSDL source as UDDI or file (I am not using any logical destination)
"Error in loading the WSDL file. Check the error log for more details."
Where can i see the error log? And what is the solution to fix this?
I am able to create the model if i save the wsdl locally on my machine and choose Local File System or File as the WSDL source. But at runtime this fails as the application tries to read the WSDL for metadata info and it looks into the application server for this file.
I also tried creating the old webservice model. And it is able to create the model. But I feel I need to use the new model as this one is deprecated.
Thanks,
SachinHi
For the logs you can search in this directory
Goto Window->Show view->Other->PDE Runtim->Error Log
please try this may it would help you out, try to create a model for you Web Service using Web Service Model (DEPRECATED)
See this link:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/ep/integration%2bof%2bweb%2bservices%2b-%2bdifferent%2bscenarios -
How to get the job logs from sm35 by using the queue id and session name?
hi all,
can any one please let me know how to read the job log from sm35 by using the session name and queue id. i have the job name and job count but is it possible to download the job log by using the queue id and session name.
FYI..
i want to read this job log and i want to send it to an email id.
-> i am using the job_open and submitting the zreport via job name and job count and then i am using the function module job_close.
but this is not working in my scenario i have the queue id and session name by using this two i want to get the job log is there any function module available or code please provide me some inputs.
thanks in advance,
koushikHi Bharath,
If you want to download it to the local file then you can follow the instructions in the below link.
How to download Batch Input Session Log?
Regards,
Sachin -
An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help The profile for the user is a temporary profile. (Exception from HRESULT: 0x80090024)
while proview the report i will get this error am using sql server 2008R2,
can u plesae hlep me out for this
<Header>
<Product>Microsoft SQL Server Reporting Services Version 2009.0100.1600.01 ((KJ_RTM).100402-1539 )</Product>
<Locale>English (United States)</Locale>
<TimeZone>W. Europe Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\Logfiles\ReportServerService__01_30_2015_03_09_32.log</Path>
<SystemName>WEGDACM1</SystemName>
<OSName>Microsoft Windows NT 6.1.7601 Service Pack 1</OSName>
<OSVersion>6.1.7601</OSVersion>
<ProcessID>4880</ProcessID>
<Virtualization>Hypervisor</Virtualization>
</Header>
rshost!rshost!5e4!01/30/2015-03:09:32:: i INFO: Currently registered url http://+:80/ReportServer_MSSQLSERVEREPORT/ on endpoint 2
rshost!rshost!5e4!01/30/2015-03:09:32:: e ERROR: Failed to register url=http://+:80/Reports/ for endpoint 3, error=b7.
rshost!rshost!5e4!01/30/2015-03:09:32:: w WARN: Endpoint 3 is enabled but no url is registered for vdir=/Reports, pdir=C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\ReportManager.
servicecontroller!DefaultDomain!1e30!01/30/2015-03:09:32:: e ERROR: Error creating HTTP endpoint. System.Runtime.InteropServices.COMException (0x800700B7): Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
at Microsoft.ReportingServices.HostingInterfaces.IRsUnmanagedCallback.CreateHttpEndpoint(RsAppDomainType application, String[] urlPrefixes, Int32 cPrefixes, String[] hosts, Int32 cHosts, Boolean wildCardPresent, String virtualDirectory, String
filePath, Int32 authType, Int32 logonMethod, String authDomain, String authRealm, Boolean authPersist, Int32 extendedProtectionLevel, Int32 extendedProtectionScenario, Boolean enabled)
at Microsoft.ReportingServices.Library.ServiceAppDomainController.SetWebConfiguration(RunningApplication rsApplication, Boolean enabled, String folder)
rshost!rshost!65c!01/30/2015-03:09:32:: i INFO: Endpoint 4 is disabled and no url is registered vdir=/ReportServer_MSSQLSERVEREPORT/ReportBuilder, pdir=C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVEREPORT\Reporting Services\ReportServer\ReportBuilder.
rshost!rshost!1e30!01/30/2015-03:09:32:: i INFO: Derived memory configuration based on physical memory as 16776696 KB
servicecontroller!DefaultDomain!1e30!01/30/2015-03:09:32:: i INFO: Recycling the service from the default domain
rshost!rshost!1e30!01/30/2015-03:09:46:: i INFO: Application domain type WindowsService statistics: created: 7, unloaded: 7, failed: 0, timed out: 0.
appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:46:: i INFO: Appdomain:11 WindowsService_7 started.
library!WindowsService_7!1e30!01/30/2015-03:09:46:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The report server has encountered a configuration error. ;
servicecontroller!WindowsService_7!1e30!01/30/2015-03:09:46:: e ERROR: Error initializing configuration from the database: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration
error.
resourceutilities!WindowsService_7!1e30!01/30/2015-03:09:47:: i INFO: Reporting Services starting SKU: Enterprise
servicecontroller!WindowsService_6!1e30!01/30/2015-03:09:47:: i INFO: Service controller exiting.
appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:47:: i INFO: Appdomain:10 unregistered.
appdomainmanager!DefaultDomain!1e30!01/30/2015-03:09:47:: i INFO: Appdomain:10 WindowsService_6 unloading.
appdomainmanager!DefaultDomain!1f40!01/30/2015-03:09:47:: i INFO: AppDomain:10 0 pending unload(s)
library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The report server has encountered a configuration error. ;
library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: ServiceStartThread: Exception caught while starting service. Error: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration
error.
library!WindowsService_7!2410!01/30/2015-03:09:47:: e ERROR: ServiceStartThread: Attempting to start service again...
library!DefaultDomain!202c!01/30/2015-08:04:43:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The report server has encountered a configuration error. ;
library!DefaultDomain!202c!01/30/2015-08:25:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The report server has encountered a configuration error. ;
library!DefaultDomain!202c!01/30/2015-08:26:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: No DSN present in configuration file, Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The report server has encountered a configuration error. ;
The above is my log file pls find it resolve my problem,am trying to add the encryption key to my configuration seetings it will through the error like The profile you were used is temporary profile. -
Error while scheduling Background Job for User/Role Full Synchronization
Hi all,
We have installed RAR 5.3 Component and uploaded the authorization data & established the connectors to the backend system.
We have performed all the post installation activities and everything is complete.
When we have scheduled User -Full Synchronization with the Back End system as a part of Post Installation Activity we are receiving the below error message
"Error while executing the Job:Cannot assign an empty string to host variable 2."
Also the VIEW LOG/ Terminate Job buttons are disabled in this screen.
Can somebody please help us in resolving the above issue
Thanks and Best Regards,
Srihari.KHi,
We are copy pasting the error log (Part as it is huge) below here. We could able to do Full Synch for Roles and also for Profiles. Only for User Synch we are getting this error and none of the users are sychronized to RAR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WILSONA of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WINDC of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WLADICHJ of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WUK of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user ZENGS of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user ZHENGL of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: All System Flag:false=====Last Batch Flag:true
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis loadUserData
INFO: @@@ User sync completed for params true: Syskey List is [HL2-QAHR]
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob run
WARNING: *** Job Exception: Cannot assign an empty string to host variable 2.
com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 2.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
at com.virsa.cscext.dao.CSCDAO.updateIgnoredUserData(CSCDAO.java:1388)
at com.virsa.cscext.dao.CSCDAO.populateGenObjUser(CSCDAO.java:1169)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.populateGenObj(BatchRiskAnalysis.java:868)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.insertBAPIUserData(BatchRiskAnalysis.java:142)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.loadUserData(BatchRiskAnalysis.java:390)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1275)
at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:319)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob setStatus
INFO: Job ID: 13 Status: Error
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
FINEST: --- @@@@@@@@@@@ Updating the Job History -
2@@Msg is Error while executing the Job:Cannot assign an empty string to host variable 2.
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
INFO: -
Background Job History: job id=13, status=2, message=Error while executing the Job:Cannot assign an empty string to host variable 2.
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob scheduleJob
INFO: -
Complted Job =>13----
Please let us know how to resolve this error
Thanks and Best Regards,
Srihari.K -
Error in triggering background job
HI, I've been facing an error which a background job is being scheduled. The scenario is something like this ...
1) A third party schedulling system triggers a SAP job and monitors the progress
2) In SAP, the master job is been copied with a different user name and then released for processing.
3) There are multiple jobs which get triggered but there is one job which is causing a problem.
4) The job makes a copy an stays in a scheduled status without getting released. While i try to manually release the job it give me an error that cannot create record in the database.
5) Upon checking the system log it gives me this - Error: INSERT background sched. table(job $$$$).
There is already an entry for the specified job in the table TBTCS.
6) While checking the TBTCS table i've found multiple entries out there. Should this table be empty or have information about the runtime of this job.
Please help as this background job is causing concerns in archiving processess defined.
Thankx in advance for your help.
Arvind.the earlier problem of background job was solved by changing the output device assigned to user wf-batch .
regarding the transport request :
when i was trying to execute the step : "Schedule bakgrd for missed deadlines " MANUEL it was giving me an option of SAVE AND SCHEDULE . which was creating the transport request . but when i executed it automatically it worked fine without asking a request to me ... i don't know why )-: ... probablly we can specify a different interval then the standard of three minutes and which will be transported (it's just a guess) . i have executed it automatically ...
well thanks all for u r help -
Run the Report as a Background job and Get the Output in Excel in Local PC
Hello Gurus,
I have one following requirement.
One should be able to run the report as a background job and it should be possible to get the report in Excel format, also when running the report in background. The excel report should have the same information and look as the current SAPreport.
Please provide some solution.
Any helpful answer get surely awarded.
Thanks a lot,
VarlanirGUI_* WS_* Function In Background, CSV Upload
GUI_* and WS_* function modules do not work in background
When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.
At anytime, a user can switch of the Personal Computers even though the job is still running in the background. Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer file.
To choose the correct download method to used, you can check the value of SY-BATCH in your code,
if it is 'X' use OPEN DATASET and if it is ' ' use WS_UPLOAD.
*-- Open dataset for reading
DATA:
dsn(20) VALUE '/usr/test.dat',
rec(80).
OPEN DATASET dsn FOR INPUT IN TEXT MODE.
IF sy-subrc = 0.
DO.
READ DATASET dsn INTO rec.
IF sy-subrc <> 0.
EXIT.
ELSE.
WRITE / rec.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET dsn.
*-- Open dataset for writing
DATA rec(80).
OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.
TRANSFER rec TO '/usr/test.dat'.
CLOSE DATASET dsn.
What is the difference when we use upload, ws_upload, gui_upload function modules?
UPLOAD, WS_UPLOAD, GUI_UPLOAD, are used in BDC concepts. ie., Batch Data Communication.
Batch Data Conversion is a concept where user can transfer the Data from non SAP to SAP R/3. So , in these various Function Modules are used.
UPLOAD--- upload a file to the presentation server (PC)
WS_UPLOAD---- Load Files from the Presentation Server to Internal ABAP Tables.
WS means Work Station.
This is used upto SAP 4.6 version.
GUI_UPLOAD------- Replaces WS_UPLOAD. Upoad file from presentation server to the app server. From 4.7 SAP version it is replaced.
How to Upload csv file to SAP?
Common File Download Upload Questions:
How you upload the data from text file to sap internal table? From my knowledge its by upload or gui_upload.
How you download the data from sap internal table to text file?
How you upload the data from xls (excel) file to sap internal table how you download the data from sap internal table to xls(excel) file.
You can upload data from presentation server to an internal table using gui_upload. Use gui_download to download from internal table to flat file.
Use fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload data frm excel.
Use function module GUI_UPLOAD
The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\test.csv'
FILETYPE = 'ASC'
TABLES
DATA_TAB = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17. -
Error log table how to track the run details
Hi ,
I am using the log errors concept in oracle and recording the errors.
My table is employees and I used the
be low script to create the error log tables.
BEGIN
DBMS_ERRLOG.create_error_log (dml_table_name => 'employees');
END;
It has created a table called err$_employees;
I have run the procedure and the procedure has inserted some records into the table for unique constraint error .
but when i rerun the same job , again it has inserted the same records whcih has created a proble now .
How will i figure out that which records are from the first runa dn which are from the second run?
Also i want to fail my job based on entried in the error log table i created.
Is it possible to track whats records belong to what instance in error log table.
hope i am clear abt the requirement i'm looking for ?
thanks
sriIf you look at the documentation you will see you can tag records that are inserted in the error log table e.g.
insert into employees
select ...
from ...
where ...
log errors into err$_employees('My Run Identifier')
You need to construct the string used as a tag so you can identify your individual runs. -
Capturing Application Error log from SXMB_Moni
Hi,
I wanted to capture the error information from Application error log from ECC sxmb_moni and forward that as email alert.
We have already alert configuration in place with alert category using standard variables. Was wondering if I have to capture application error log from sxmb_moni what would be steps involved. Please let me know if anybody has worked on this and appreciate your help on this.
Sample Error message from sxmb_moni of ECC system
MT_Fault
Error in Application System
Detailed Information
Process Order invalid
Thanks
Selvam
Edited by: Selvam_muthu on Jun 23, 2011 5:40 PMHi Selvam,
As the exception is raised in ECC system, alert cannot be trigger, alert will get trigger when there is a error in PI system. To raise a email, write additional code in ECC to trigger the e-mail with proper error content -
Upload an excel file in the server with a background job
I am trying to upload an excel file in the server, but i only can upload flat files, i can upload files in local with the function ALSM_EXCEL_TO_INTERNAL_TABLE, can i use this function reading an excel file in the server, or is there another possibility of uploadinging an excel file in the server with a background job ?
thanks in advanceHi
First read the file from the server to some temporary place at presentation layer and then open it. And if required, save it to the server afterwards. To read/write files to application server you can use:
1. Statements "OPEN DATASET/CLOSE DATASET".
2. There are some FMs for server file operations, like "C13Z_FILE_UPLOAD_BINARY" and "C13Z_FILE_DOWNLOAD_BINARY".
*--Serdar -
Error in active background jobs
Hi All,
i facing problem while cosing the job
i have written the code
IF NOT p_imm IS INITIAL.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_f_jobcount
jobname = l_f_jobname
strtimmed = l_flg_start_sofort
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
COMMIT WORK .
and it is not showing any error and it should finished the job in sm37 but i am always getting the ststus active rather than finished.
please suggest what could be the reason
Thanks,
Madhuhi all,
please help me on this..
when there is no data then background job finish the job and in the job log it shows thst no valid data for selection. but if there si any data ... the job status stil active and it never get finished.... and finaly it get cancelled.
even while dubugging it never shows sy-subrc value other than 0. even when i run the background job manually for the submit sdt program it finish the job. I don't understand the reason why it is in active stage while executing id dialog.
Please mention if there is any parameter value missing ..
my code as follows..
do n times. "n muber of jobs
Start Immediately
IF NOT p_imm IS INITIAL.
l_flg_start_sofort = 'X'.
(1)Open the job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = l_f_jobname
IMPORTING
jobcount = l_f_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e032(sxmsf) WITH l_f_jobname.
ENDIF.
(2)Report start under job name
SUBMIT (g_c_prog_c1_lo)
WITH s_partn IN r_partn
WITH s_parro IN s_parro
WITH s_grvsy IN s_grvsy
WITH s_lgreg IN s_lgreg
WITH p_updab = p_updab
WITH p_updbi = p_updbi
WITH p_enqal = p_enqal
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
VIA JOB l_f_jobname NUMBER l_f_jobcount AND RETURN.
*(3)Job closed when starts Immediately
IF NOT p_imm IS INITIAL.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_f_jobcount
jobname = l_f_jobname
strtimmed = l_flg_start_sofort
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
COMMIT WORK .
ADD 1 TO g_cnt_job.
l_r_tbtcjob-jobcount = l_f_jobcount.
l_r_tbtcjob-jobname = l_f_jobname.
l_r_tbtcjob_previous = l_r_tbtcjob.
IF NOT l_flg_first_job IS INITIAL.
g_v_tbtcjob_first = l_r_tbtcjob.
ENDIF.
CLEAR: l_flg_first_job.
ENDDO.
thanks
Maybe you are looking for
-
Crystal reports 2008 Set optional parameter value
Hi, I'm working with .net Visual Studio 2008 C# and Crystal reports 2008 (Crystal.Decisions) and when I try to set a parameter to optional and set its value to no value, it returns the error: "Invalid parameter name", here is my code: foreach (Crysta
-
I was directed to adobe to download CS4 on my new iMAC after hardware failure on PC. The valid CS4 serial number for the PC is now not recognized by Adobe, even though I downloaded all the software successfully on the new iMac.. They gave me a free
-
Workstation Manager Service - High Memory Consumption
Anytime I leave my work PC running for 2-3 days without restarting it, the Workstation Manager Service gradually starts to consume more and more memory. It seems like every day past when I restart this work PC, the Window's Task Manager will show tha
-
Limitations of "Copy and Paste"
I may be wrong, but it seems to me that I used to be able to copy whatever portion of the screen I chose just by using my cursor and Edit>Copy or Cut. Well, I can't do it now; in fact, many times the Edit command is grayed-out and I have to resort to
-
MacBook Pro shutting off with battery charged
I have a MacBook Pro I purchased about 22 months ago. About seven days ago, I started noticing the computer just shutting off without warning, even with a charge of 20% or more. Using Coconutbattery my batter still has 62% of it's original capacity w