Error Handling in OS 10gR3: How To's, Approaches, best practices
I am trying to do error rhandling within OSB 10gR3 and looking for some guidance as to best practices and how to carry out the error handling based on my use-case as -
Consumers ---> GenericProxyExt(WSDL based) ---> GenericProxyInt(Any SOAP) ---> Proxy (Any XML) ---> Business Service --------------> Target Service
Since target web service will pass error in the SOAP:fault, where in the OSB should this error be handled? Also, how can I pass the custom error messages (instead of the one returned from the target service). Do I have to write error handlers in each of the proxy services?
Any insight, sample code, approaches will be helpful
Thanks,
-J
user2629959 wrote:
I am trying to do error rhandling within OSB 10gR3 and looking for some guidance as to best practices and how to carry out the error handling based on my use-case as - Some customer has documented related info www.insemble.com/CustomExceptionHandlingwithOracleServiceBus.pdf
>
Consumers ---> GenericProxyExt(WSDL based) ---> GenericProxyInt(Any SOAP) ---> Proxy (Any XML) ---> Business Service --------------> Target Service
Since target web service will pass error in the SOAP:fault, where in the OSB should this error be handled? Also, how can I pass the custom error messages (instead of the one returned from the target service). Do I have to write error handlers in each of the proxy services?Not sure if I understood your point of using that many proxies for invoking a Target Service.
Since BS throws soap fault, and the last Proxy is AnyXML. You need to do bit of manipulations. First of all for AnyXML services, you have to manually copy $fault into $body. Reason behind this step, is For Any XML there is no concept of $fault being returned and reply with failure. Subsequent proxies will receive the $fault as originated in Target Service. If we want to control the $fault received by the consumers, we have to use error handlers and populate $fault accordingly.
>
Any insight, sample code, approaches will be helpful
Thanks,
-J
Similar Messages
-
How can i get best practice for SD and MM
Please, can any body tell me how can i get best practices for SD and MM for functional approach?
Thanks
UtpalHello Utpal,
I am really surprised, in just 10 minutes you searched that site and found it not useful. <b>Check out my previous reply "you will not find screen shot in this but you can add it in this"</b>
You will not find readymade document, you need to add this as per your requirement.
btw, the following link gives you some more link for new SAP guys, this will be helpful. <b>Check out HOW to BASIC transaction</b>
New to Materials Management / Warehouse Management?
Hope this helps.
Regards
Arif Mansuri -
CRM - how to work with Best Practices
Hi All,
we will start with the implementation of mySAP CRM during the next weeks.
I'm a bit confused - how should I work with Best Practices, and what are the differences between the 3 ways for Best Practices
1) we have a 'Solution Manager' System where I can use Best Practices for CRM
2) Best Practices on help.sap.com: http://help.sap.com/bp_crmv250/CRM_DE/html/index_DE.htm (Buliding Blocks!)
3) Best Practices DVD to install on the CRM System
Are the 3 ways exchangeable? Is there some information provided by SAP?
We have already installed the Best Practices DVD, but now I don't know how to use this Add-On: Is there a special transaction-code to use them or a extension for the IMG?
regards
StefanHi Stefan Kübler,
If the solution manager is in place, then the suggested (also the best) method is to use the best practices on it.
If you want to install and use the best practices with CRM system then the procedure is given in the best practice CD/DVD. Also you can download the installation procedure from the below link : http://help.sap.com/bp_crmv340/CRM_DE/index.htm. Click on Installation on left and then Quick Guide on right. Download the document.
Though the best practices give you a way to start with, but they cant replace your requirement. You have to configure the system as per your exact business requirement.
I never installed best practices before, but extensively used them as reference in all my projects.
Follow the below thread for additional information on best practices :
Also refer to my past thread :
Do not forget to reward if helps.
Regards,
Paul Kondaveeti -
How do you install Best Practices Install Assistant (BPIA)?
Hi
I've been looking into setting up Yard Management in our SAP system and have found documentation / software for ECC5 - fore this version it looks like I would need to install the Best Practices Wholesale Distribution Package with the necessary BC sets / eCatts from W70 Yard Management, and can use Best Practices Install Assistant (BPIA) which I think is installed via SAINT???
HOWEVER - I've just realised that the version of SAP to be installed on is only 6.20/4.7. I think Yard Management is still available for this release but doesn't look like Best Practices / BPIA is used - how is this installed and where can I find the documentation / software?
Cheers
Ross
Edited by: Ross Armstrong on Jun 18, 2008 9:00 AMThere are two option for downloading games or any application in BlackBerry device.
One
is using the OTA (Over the Air) link, provided by the application
owner, from where you can directely install games/application.
Another
is using Desktop Manager's Application Loader. In that case save the
game/application files in a folder of your PC/laptop. Use Application
Loader and find the location of the folder and click Open.
tanzim
If your query is resolved then please click on “Accept as Solution”
Click on the LIKE on the bottom right if the post deserves credit -
How to use KNOA - best practices
I am looking for best practices in implementing KNOA. How is the tool being used? How do we make sure it yelds value? Your input is appreciated!
Hi Shishir,
https://websmp104.sap-ag.de/instguides
Also:
help.sap.com\Sap Best Practices\Getting Started R/3
Patricio. -
How to connect AS400 (best practice)
Hi folks,
I'm trying to connect to an AS400 server and need expert advise to do so.
I'm planning to use a JDBC driver to connect to the DB2400 database (for write/read into specific tables).
What is the best way to reset AS400 user/password ? Use JDBC connectio and write into correct table or use Windows programs as RMTCMD to connect to AS400 and then launch AS400 command line ?
Does any of you have try these kind of solution ?
Thanks for your help,
BenBen,
That's an interesting question. I think there are a couple of approaches to this:
1. Check with SAP to see if they have an "official" connector. I know there was a slide deck out there a couple of years ago with some "approved" connectors. There might be one there. Slim chance, but why re-invent the wheel?
2. More likely you'll need to create your own. You're on the right path with the JDBC connector, but I'm not sure if you'll be able to set passwords. It'll depend on the system and level of access you have. You should also look to see if there's an LDAP interface to the system. Might not be helpful for database applications, but would be good for general system (OS) access.
Good luck!
Matt -
ESB Exception Handling Best Practices
I've update the "ESB Transactions, Error Handling and Resubmit" Lesson PDF to include a best practices section. Go to http://otn.oracle.com/goto/esb and click on the link in the Learning more section. Feedback welcome.
Hi Dave,
I checked this document yesterday, it contained 18 pages.
Some great info in the additional 7 pages, just in time as well: at a customer site we are hitting bug 5547165, the rejected messages being empty. I checked the rejection handlers for BPEL and was investigating how these could be used in case of ESB. Seems you have provided the answer.
Any chance a fix for the bug mentioned here is in the 10.1.3.3 patch set?
One more thing: by default the rejected messages for ESB are written to file system, in a directory below the 'home' OC4J instance. Could this be turned into a configurable space in a next release?
Thanks and best regards, Sjoerd -
OSB 10gR3 Error handling and reporting action approach
My use case:
Simple Proxy service routes to an external web service created as Business service in OSB
Whenever there is transport error/soap fault from the external web service, that error needs to be reported along with the original request received by the proxy service.
What I have tried so far?
Created a error handler/stage in the route node of my proxy service. Within that stage, added a report action to report $body which contains the error received from the external service. I created a report index key/value to report for this request, I used a specific element in the body of the original request sent to the proxy service.
Within the route error handling stage, I realized that $body which had my original request to the proxy service lost its content and replaced by the fault from external WS. So I made a copy of $body in my request pipeline and tried to use an element from that copy to index my failed request. But the copied variable always seem to be empty within the error handling stage.
So, my questions to the experts,
1)What variables are visible within the error handling stage/scope?
2)What is the best way(less overhead) to preserve my original request as $body context variable is already changed with fault by the time error handler is invoked? Remember I wanted to report the original request only incase of error, for success cases I don't care/I don't want to un-necessarily add an overhead of copying to a vairbale.
3)Is there another proper way to simply report the original request received by proxy and fault received from external service for a given key in the request, say orderId
Sample proxy request:
<MyData>
<OrderId>123</OrderId>
</MyData>1)What variables are visible within the error handling stage/scope? $fault - http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1051816
$body - http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1103311
2)What is the best way(less overhead) to preserve my original request as $body context variable is already changed with fault by the time error handler is invoked? Remember I wanted to report the original request only incase of error, for success cases I don't care/I don't want to un-necessarily add an overhead of copying to a variable.Can you print $body and $fault variables in your error handler?. Are they different ? What I'm suspecting is the back-end webservice is faulting (returning soap-fault and http response =5xx). There is no other way I can think of than copying the contents of $body to a separate variable.
Thanks
Manoj -
Hi,
Can any body give the brief idea of error handling.And what the option containing in the error handling tabs like
1. NO Update , No Reporting.
2. Update Valid Records only ,Reporting not possible(Request red).
3. Update Valid Records only ,Reporting possible(Request green).
Is these options works above the error tolerance limit or below the error tolerance limit.
like Error Tolerance Limit = 1000.
How can i Test it practically in Navigation.Plz send the detailed information about this.
Thanks in Advance,
D.Malla Reddy.Hi,
1 Valid Records Update, No Reporting (Request Red): When you select this option, you tell the system to isolate erroneous records in a data packet from the data load and to load the valid records into the data target. The data upload request remains in red status in the data target and is unavailable for reporting. With this option, the data administrator can check the error records and then manually turn the uploaded request to green, making the data available for reporting.
u2022 2 Valid Records Update, Reporting Possible (Request Green): When you select this option, you tell ETL to make the valid data available immediately for reporting in the data target.
u2022 No Update, No Reporting: When you select this option, you tell the system to suspend data processing to the data targets if it encounters an erroneous record, preventing further data from loading into the data target. The system keeps scanning the remaining data packages for erroneous records.
Another important aspect of error handling is the process to deal with the erroneous records. In SAP NetWeaver BI 7.0, the error handling process identifies the erroneous record from the original data upload request and isolates it by storing the records in a separate container called the error stack. After you correct or modify the erroneous records, you can then load them to the original intended data target by using a special DTP called the error DTP. This helps to ensure data consistency.
you can check the data packets data at monitor
Thanks
Ramesh.
Edited by: Ramesh Raju on Feb 11, 2010 2:24 PM -
Database Constraint Error Handling on create/edit (Struts ADF)
Hi,
In our project we use Struts ADF (JDeveloper 10.1.3) technology. And we're facing the following trouble with it.
If we try to create a record that violates say Unique constraint in the database, then during commit procedure of the AppModule's Transaction an exception occurs.
We handle this exception with our extension of DCErrorHandlerImpl. And we have to do the rollback action because the Transaction became invalid and we cannot do the commit since there was an error.
But unfortunately appModule.getTransaction().rollback(); forces ViewObj to loose all of the newly created rows. Because of this, after pressing submit with the same (violating) data once more our edit form shows the first row in a rowset.
Are there any ideas about what we may be doing wrong?
Any standard approaches on database constraint error handling?
The "before/after commit/rollback" approach is very effort-consuming because we have a lot of views in our app and tracking all of them may become a nightmare in future.
Thanks in advance.
Regards,
LarryHi Steve!
I'm using Postgree.
Here is StackTrace
06/06/27 09:52:24 Commit
oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO public.test_tb(id,name,org_code) VALUES (?,?,?)".
at oracle.jbo.server.BaseSQLBuilderImpl.doEntityDML(BaseSQLBuilderImpl.java:481)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5731)
at com.yukon.adf.postgre.entities.PostgreEntityImpl.doDML(PostgreEntityImpl.java:22)
at com.yukon.adf.postgre.entities.PostgreSequenceEntityImpl.doDML(PostgreSequenceEntityImpl.java:58)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4531)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2993)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2804)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1968)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2170)
at view.actions.ListTestPageController.onCommit(ListTestPageController.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.adf.controller.v2.lifecycle.PageController.invokeEventMethod(PageController.java:110)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.handleEvent(PageLifecycleImpl.java:950)
at oracle.adf.controller.v2.struts.lifecycle.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:238)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.processComponentEvents(PageLifecycleImpl.java:322)
at oracle.adf.controller.v2.lifecycle.PageController.processComponentEvents(PageController.java:54)
at oracle.adf.controller.v2.lifecycle.Lifecycle$3.execute(Lifecycle.java:275)
at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
at oracle.adf.controller.v2.lifecycle.LifecycleProcessor.execute(LifecycleProcessor.java:100)
at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:123)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.sql.SQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:282)
at oracle.jbo.server.BaseSQLBuilderImpl.doEntityDML(BaseSQLBuilderImpl.java:352)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5731)
at com.yukon.adf.postgre.entities.PostgreEntityImpl.doDML(PostgreEntityImpl.java:22)
at com.yukon.adf.postgre.entities.PostgreSequenceEntityImpl.doDML(PostgreSequenceEntityImpl.java:58)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4531)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2993)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2804)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1968)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2170)
at view.actions.ListTestPageController.onCommit(ListTestPageController.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.adf.controller.v2.lifecycle.PageController.invokeEventMethod(PageController.java:110)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.handleEvent(PageLifecycleImpl.java:950)
at oracle.adf.controller.v2.struts.lifecycle.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:238)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.processComponentEvents(PageLifecycleImpl.java:322)
at oracle.adf.controller.v2.lifecycle.PageController.processComponentEvents(PageController.java:54)
at oracle.adf.controller.v2.lifecycle.Lifecycle$3.execute(Lifecycle.java:275)
at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
at oracle.adf.controller.v2.lifecycle.LifecycleProcessor.execute(LifecycleProcessor.java:100)
at oracle.adf.controller.v2.struts.actions.DataAction.execute(DataAction.java:123)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595) -
How to Down load SAP Best Practices
Hi
How to download SAP Best Practices with S user Id .
While Downloading system throwing error message - No download authorization and Please refer to the SAP Note 1037574 .
Kindly Help.
Thanks
raviHi
While Downloading the scenario presentation PPT files from SAP Best practices system is throwing below message .
High security alert!!!
You are not permitted to download the file "200_Scen_Overview_EN_US.ppt".
URL = http://help.sap.com/bp_serv603/BBLibrary/Documentation/200_Scen_Overview_EN_US.ppt
Please help
Thanks
Ravi -
Best practice to handle the class definitions among storage enabled nodes
We have a common set of cache servers that are shared among various applications. A common problem that we face upon deployment is with the missing class definition newly introduced by one of the application node. Any practical approach / best practices to address this problem?
Edited by: Mahesh Kamath on Feb 3, 2010 10:17 PMIs it the cache servers themselves or your application servers that are having problems with loading classes?
In order to dynamically add classes (in our case scripts that compile to Java byte code) we are considering to use a class loader that picks up classes from a coherence cache. I am however not so sure how/if this would work for the cache servers themselves if that is your problem!?
Anyhow a simplistic cache class loader may look something like this:
import com.tangosol.net.CacheFactory;
* This trivial class loader searches a specified Coherence cache for classes to load. The classes are assumed
* to be stored as arrays of bytes keyed with the "binary name" of the class (com.zzz.xxx).
* It is probably a good idea to decide on some convention for how binary names are structured when stored in the
* cache. For example the first tree parts of the binary name (com.scania.xxxx in the example) could be the
* "application name" and this could be used as by a partitioning strategy to ensure that all classes associated with
* a specific application are stored in the same partition and this way can be updated atomically by a processor or
* transaction! This kind of partitioning policy also turns class loading into a "scalable" query since each
* application will only involve one cache node!
public class CacheClassLoader extends ClassLoader {
public static final String DEFAULT_CLASS_CACHE_NAME = "ClassCache";
private final String classCacheName;
public CacheClassLoader() {
this(DEFAULT_CLASS_CACHE_NAME);
public CacheClassLoader(String classCacheName) {
this.classCacheName = classCacheName;
public CacheClassLoader(ClassLoader parent, String classCacheName) {
super(parent);
this.classCacheName = classCacheName;
@Override
public Class<?> loadClass(String className) throws ClassNotFoundException {
byte[] bytes = (byte[]) CacheFactory.getCache(classCacheName).get(className);
return defineClass(className, bytes, 0, bytes.length);
}And a simple "loader" that put the classes in a JAR file into the cache may look like this:
* This class loads classes from a JAR-files to a code cache
public class JarToCacheLoader {
private final String classCacheName;
public JarToCacheLoader(String classCacheName) {
this.classCacheName = classCacheName;
public JarToCacheLoader() {
this(CacheClassLoader.DEFAULT_CLASS_CACHE_NAME);
public void loadClassFiles(String jarFileName) throws IOException {
JarFile jarFile = new JarFile(jarFileName);
System.out.println("Cache size = " + CacheFactory.getCache(classCacheName).size());
for (Enumeration<JarEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
final JarEntry entry = entries.nextElement();
if (!entry.isDirectory() && entry.getName().endsWith(".class")) {
final InputStream inputStream = jarFile.getInputStream(entry);
final long size = entry.getSize();
int totalRead = 0;
int read = 0;
byte[] bytes = new byte[(int) size];
do {
read = inputStream.read(bytes, totalRead, bytes.length - totalRead);
totalRead += read;
} while (read > 0);
if (totalRead != size)
System.out.println(entry.getName() + " failed to load completely, " + size + " ," + read);
else
System.out.println(entry.getName().replace('/', '.'));
CacheFactory.getCache(classCacheName).put(entry.getName() + entry, bytes);
inputStream.close();
public static void main(String[] args) {
JarToCacheLoader loader = new JarToCacheLoader();
for (String jarFileName : args)
try {
loader.loadClassFiles(jarFileName);
} catch (IOException e) {
e.printStackTrace();
}Standard disclaimer - this is prototype code use on your own risk :-)
/Magnus -
How to check verison of Best Practice Baseline in existing ECC system?
Hi Expert,
How to check verison of Best Practice Baseline in existing ECC system such as v1.603 or v1.604?
Any help will be appriciate.
SayanDear,
Please go to https://websmp201.sap-ag.de/bestpractices and click on Baseline packages then on right hand side you will see that On which release is SAP Best Practices Baseline package which version is applicable.
If you are on EHP4 then you can use the v1.604.
How to Get SAP Best Practices Data Files for Installation (pdf, 278 KB) please refer this link,
https://websmp201.sap-ag.de/~sapidb/011000358700000421882008E.pdf
Hope it will help you.
Regards,
R.Brahmankar -
How to perform Error Handling in this Bdc Code
Hi,
I had created this BDC for the tcode MB1B and i want to know how to perform the ERROR HANDLING in it ..
Plzz provide me guidelines for doing it . here's d code:-
report ZBDC_MB1B
no standard page heading line-size 255.
include bdcrecx1.
data: begin of record OCCURS 0,
WERKS_001(004), "Plant
MATNR_002(018), "ItemId
ERFMG_003(013), "Quantity in Unit of Entry
ERFME_004(003), "Unit of Entry
LGORT_005(004), "Storage Location
CHARG_006(010), "BatchId
KDAUF_007(010), "Sales Order Number
KDPOS_008(006), "Item Number in Sales Order
end of record.
PARAMETERS : P_FILNAM LIKE RLGRAP-FILENAME.
initialization.
CTUMODE = 'A'.
CUPDATE = 'A'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILNAM.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
MASK = ',. '
MODE = 'O'
IMPORTING
FILENAME = P_FILNAM
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILNAM
FILETYPE = 'DAT'
TABLES
DATA_TAB = RECORD
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT RECORD.
BEGIN OF SCREEN 1
perform bdc_dynpro using 'SAPMM07M' '0400'.
perform bdc_field using 'BDC_CURSOR'
'RM07M-SOBKZ'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MKPF-BLDAT'
'22.12.2008'.
*perform bdc_field using 'MKPF-BUDAT'
'22.12.2008'.
perform bdc_field using 'RM07M-BWARTWA'
'411'.
perform bdc_field using 'RM07M-SOBKZ'
'E'.
perform bdc_field using 'RM07M-WERKS'
RECORD-WERKS_001. "Plant
perform bdc_field using 'XFULL'
'X'.
perform bdc_field using 'RM07M-WVERS2'
'X'.
BEGIN OF SCREEN 2
perform bdc_dynpro using 'SAPMM07M' '0421'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-CHARG(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MSEG-MATNR(01)'
RECORD-MATNR_002. "ITEMID
perform bdc_field using 'MSEG-ERFMG(01)'
RECORD-ERFMG_003. "QTY.
perform bdc_field using 'MSEG-ERFME(01)'
RECORD-ERFME_004. "UOM
perform bdc_field using 'MSEG-LGORT(01)'
RECORD-LGORT_005. "ST.LOC
perform bdc_field using 'MSEG-CHARG(01)'
RECORD-CHARG_006. "BATCHID
perform bdc_field using 'MSEGK-MAT_KDAUF'
RECORD-KDAUF_007. "S.O.
perform bdc_field using 'MSEGK-MAT_KDPOS'
RECORD-KDPOS_008. "S.O.LINE ITEM
perform bdc_field using 'DKACB-FMORE'
'X'.
BEGIN OF SCREEN 3
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'DKACB-FMORE'
'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_dynpro using 'SAPMM07M' '0421'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-ERFMG(01)'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'DKACB-FMORE'
'X'.
BEGIN OF SCREEN 4
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_transaction using 'MB1B'.
ENDLOOP.hi,
check this code in bold letters.
INCLUDE BDCRECX1.
TABLES : MARC.
TYPES : BEGIN OF TY_UPLOAD,
MATNR TYPE MARA-MATNR,
WERKS TYPE MARC-WERKS,
STEUC TYPE MARC-STEUC,
END OF TY_UPLOAD.
TYPES : BEGIN OF TY_MARC,
MATNR TYPE MARA-MATNR,
WERKS TYPE MARC-WERKS,
END OF TY_MARC.
TYPES : BEGIN OF TY_MTART,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
END OF TY_MTART.
DATA : T_MARC TYPE STANDARD TABLE OF TY_MARC,
: T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD,
: T_BASIC TYPE STANDARD TABLE OF TY_UPLOAD,
: T_SALES TYPE STANDARD TABLE OF TY_UPLOAD,
: T_ERROR TYPE STANDARD TABLE OF TY_UPLOAD.
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_BDCDATA_VIEW LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_DATA(3200) OCCURS 0 WITH HEADER LINE,
IT_FIELD(3200) OCCURS 0 WITH HEADER LINE,
IT_BDCMSG TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA GI_MSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : CHAR1(500),
CHAR2(500),
CHAR3 TYPE STRING,
V_SELECTION TYPE STRING. " For View Selection
DATA : W_MARC TYPE TY_MARC,
WA_UPLOAD TYPE TY_UPLOAD,
WA_BASIC TYPE TY_UPLOAD,
WA_SALES TYPE TY_UPLOAD,
WA_ERROR TYPE TY_UPLOAD,
WA_MTART TYPE TY_MTART.
DATA : VAR TYPE N,
VAR1 TYPE STRING.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. "SELECTION SCREEN
PARAMETERS: P_FNAM LIKE RLGRAP-FILENAME.
PARAMETERS: P_BAS LIKE RLGRAP-FILENAME.
PARAMETERS: P_SAL LIKE RLGRAP-FILENAME.
PARAMETERS: P_ERR LIKE RLGRAP-FILENAME.
SELECTION-SCREEN : END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAM.
PERFORM SEARCH USING P_FNAM.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BAS.
PERFORM SEARCH USING P_BAS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SAL.
PERFORM SEARCH USING P_SAL.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ERR.
PERFORM SEARCH USING P_ERR.
*& Form SEARCH
text
-->PFNAME text
FORM SEARCH USING PFNAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
STATIC = 'X'
CHANGING
FILE_NAME = PFNAME.
ENDFORM. "SEARCH
START-OF-SELECTION.
PERFORM UPLOAD_PROCESS USING P_FNAM.
PERFORM OPEN_GROUP.
PERFORM PROCESS.
PERFORM CLOSE_GROUP.
IF NOT T_BASIC[] IS INITIAL.
PERFORM DOWNLOAD TABLES T_BASIC[] USING P_BAS .
ENDIF.
IF NOT T_SALES[] IS INITIAL.
PERFORM DOWNLOAD TABLES T_SALES[] USING P_SAL .
ENDIF.
IF NOT T_ERROR[] IS INITIAL.
PERFORM DOWNLOAD TABLES T_ERROR[] USING P_ERR.
ENDIF.
*& Form PROCESS
text
FORM PROCESS.
LOOP AT T_UPLOAD INTO WA_UPLOAD.
PERFORM CONV_ROUTINE USING WA_UPLOAD-MATNR
CHANGING WA_UPLOAD-MATNR.
SELECT COUNT(*) FROM MARA WHERE MATNR = WA_UPLOAD-MATNR.
IF SY-SUBRC NE 0.
MOVE-CORRESPONDING WA_UPLOAD TO WA_BASIC.
APPEND WA_BASIC TO T_BASIC.
CLEAR WA_BASIC.
CONTINUE.
ENDIF.
SELECT COUNT(*) FROM MARC WHERE MATNR = WA_UPLOAD-MATNR
AND WERKS = WA_UPLOAD-WERKS
AND PSTAT LIKE '%V%'.
IF SY-SUBRC NE 0.
MOVE-CORRESPONDING WA_UPLOAD TO WA_SALES.
APPEND WA_SALES TO T_SALES.
CLEAR WA_SALES.
CONTINUE.
ENDIF.
CLEAR : WA_MTART.
SELECT SINGLE MATNR MTART FROM MARA INTO WA_MTART WHERE MATNR = WA_UPLOAD-MATNR.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=AUSW'.
PERFORM BDC_FIELD USING 'RMMG1-MATNR'
WA_UPLOAD-MATNR.
CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW' " Function module
EXPORTING
MATERIAL = WA_UPLOAD-MATNR " Material number
MATERIALART = WA_MTART-MTART " Material Type
SELECTION = 'V' "
TCODE = 'MM02' " Tcode where view's are called.
TABLES
BTCI_D0070 = IT_BDCDATA_VIEW
EXCEPTIONS
MATERIAL_NOT_FOUND = 1
MATERIAL_NUMBER_MISSING = 2
MATERIAL_TYPE_MISSING = 3
MATERIAL_TYPE_NOT_FOUND = 4
NO_ACTIVE_DYNPRO_SELECTED = 5
NO_AUTHORITY = 6
OTHERS = 7.
READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL = 'X'.
IF SY-SUBRC = 0.
V_SELECTION = IT_BDCDATA_VIEW-FNAM.
ELSE.
CONTINUE.
ENDIF.
VAR = IT_BDCDATA_VIEW-FNAM+17(2).
VAR = VAR + 3.
CONCATENATE 'MSICHTAUSW-KZSEL(' '0' VAR ')' INTO VAR1.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0070'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(06)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING VAR1
'X'.
CLEAR VAR.
CLEAR VAR1.
PERFORM BDC_FIELD USING 'MSICHTAUSW-KZSEL(06)'
'X'.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0080'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RMMG1-VKORG'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_FIELD USING 'RMMG1-WERKS'
WA_UPLOAD-WERKS.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '4004'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
PERFORM BDC_FIELD USING 'MAKT-MAKTX'
'MTI_ESE_HALB_01'.
PERFORM BDC_FIELD USING 'MARC-STEUC'
WA_UPLOAD-STEUC.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'MARC-HERKR'.
PERFORM BDC_FIELD USING 'MARC-HERKL'
'IN'.
PERFORM BDC_FIELD USING 'MARC-HERKR'
'MAH'.
PERFORM BDC_TRANSACTION USING 'MM02'.
move the error record into seperate internal table nad down load it ****
IF MESSTAB-MSGTYP = 'E'.
MOVE-CORRESPONDING WA_UPLOAD TO WA_ERROR.
APPEND WA_ERROR TO T_ERROR.
CLEAR WA_ERROR.
ENDIF.
ENDLOOP.
ENDFORM. "PROCESS
*& Form UPLOAD_PROCESS
text
-->PFNAME text
FORM UPLOAD_PROCESS USING PFNAME.
DATA : PFNAME1 TYPE STRING.
PFNAME1 = PFNAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = PFNAME1
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = T_UPLOAD[].
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. "UPLOAD_PROCESS
*& Form CONV_ROUTINE
text
-->P_INPUT text
-->P_OUTPUT text
FORM CONV_ROUTINE USING P_INPUT
CHANGING P_OUTPUT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_INPUT
IMPORTING
OUTPUT = P_OUTPUT.
ENDFORM. "CONV_ROUTINE
*& Form DOWNLOAD
text
-->GI_FINAL text
-->PFNAME text
FORM DOWNLOAD TABLES
GI_FINAL
USING PFNAME .
DATA : FNAME TYPE STRING.
FNAME = PFNAME.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FNAME
FILETYPE = 'DAT'
WRITE_FIELD_SEPARATOR = 'x'
HEADER = '00'
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = GI_FINAL[]
FIELDNAMES = GI_FIELDNAMES[]
IF SY-SUBRC = 0.
MESSAGE 'FILE DOWNLOADED SUCCESSFULLY' TYPE 'I'.
ENDIF.
ENDFORM. " DOWNLOAD
Regards
Siva Prasad -
Dear all
How to Setup Forward Error Handling in PI Scenarios. Can you help me with the same with screen shots if possible?
Thanks
Regards
karanHello
These are the following errors
1. Trace level="1" type="T">no interface action for sender or receiver found</Trace>
2. <Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!
3.
<Trace level="1" type="T">Application Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="T">System Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
<Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!</
Trace level="3" type="T">No persisting of message after plsrv call, because of config</Trace>Trace level="3" type="T">Error of the prevous version:</TraceTrace level="3" type="T">Error ID APPLICATION_ERROR</Trace>
tThere are repeating errors also.
TThanks
Regards
kkaran
Maybe you are looking for
-
Some logins don't work in Firefox but do work in other browsers
I have a couple of sites that the logins don't work when I use Firefox but work perfectly if I use another browser such as Chrome or IE. I have tried uninstalling and reinstalling firefox including reinstalling back levels but nothing works. Any sugg
-
I have been using a 32 inch lcd tv as a monitor with no problems. When I tried with an led tv same make same size I could not get the display size anywhere near as good and the colours were poor as well. Has anyone else had this problem.
-
Ctrl-Clic combination not working
Hi! I'm developing dashboards in Oracle BPM Studio 10.3.1, in the properties tab I selected a method on the onClic property, but when the user clics twice on the graphic it shows a gray screen and the user has to exit the screen and excecute the glob
-
How do you find details of a preset's adjustments?
The Preset editor will show you the names of adjustments a preset applies, but not the details. For example, if you open the editor and select Quick Fixes -> Auto Enhance, the right side pane shows that the Enhance, Levels (Auto Luminance), and Edge
-
Using Powershell cmdlet i get all the details..But i want to get these Details by using EWS Managed Api.Is It Possible to do??? Powershell Cmdlet, Get-MailboxStatistics -Identity Username, Using this cmdlets all the details will get displayed. Delet