I am trying to call the function module "CSAP_MAT_BOM_MAINTAIN" to create a BOM in SAP but i get error.
IFunctionTemplate ft = mRepository.getFunctionTemplate("CSAP_MAT_BOM_MAINTAIN");
System.out.println(" Functional Template Created ");
if (ft == null){return;}
JCO.Function function = ft.getFunction();
JCO.ParameterList importparams =function.getImportParameterList();
// Setting HeadData Structure Information
//importparams.setValue("C000000609", "CHANGE_NO");
importparams.setValue("CPF10104", "MATERIAL");
importparams.setValue("1", "BOM_USAGE");
importparams.setValue("0001", "PLANT");
importparams.setValue("01", "ALTERNATIVE");
importparams.setValue("11.11.2011", "VALID_FROM");
importparams.setValue("X", "FL_COMMIT_AND_WAIT");
importparams.setValue("X", "FL_BOM_CREATE");
importparams.setValue("X", "FL_NEW_ITEM");
importparams.setValue("X", "FL_COMPLETE");
importparams.setValue("X", "FL_DEFAULT_VALUES");
JCO.Structure headStructure = importparams.getStructure("I_STKO");
headStructure.setValue("01", "BOM_STATUS");
headStructure.setValue("1", "BASE_QUAN");
headStructure.setValue("KG", "BASE_UNIT");
headStructure.setValue("BOM01", "BOM_GROUP");
JCO.Table stpo = function.getTableParameterList().getTable("T_STPO");
stpo.appendRow();
stpo.setValue("BOM Position 2.1", "ITEM_TEXT1");
stpo.setValue("L", "ITEM_CATEG");
stpo.setValue("L", "ID_ITM_CTG");
stpo.setValue("0010", "ITEM_NO");
stpo.setValue("0010", "ID_ITEM_NO");
stpo.setValue("13", "COMP_QTY");
stpo.setValue("KG", "COMP_UNIT");
stpo.setValue("00000001", "ITEM_NODE");
stpo.setValue("00000001", "ITEM_COUNT");
stpo.setValue("000000000000000000", "DEP_LINK");
stpo.setValue("12345-R6000001", "COMPONENT");
//stpo.setValue("12345-R6000001", "ID_COMP");
JCO.Table stpu = function.getTableParameterList().getTable("T_STPU");
stpu.appendRow();
stpu.setValue("0", "POINTER");
stpu.setValue("00000000", "STLKN");
stpu.setValue("0010", "STPOZ");
stpu.setValue("0001", "UPOSZ");
stpu.setValue("46", "UPMNG");
stpu.setValue("T1", "EBORT");
I get error:
Exception in thread "main" com.sap.mw.jco.JCO$AbapException: (126) ERROR: Terminate processing.
After searching over the internet i found that this error comes when we have wrong input params.
But i am unable to find the error.
Please note that i have limited knowledge about ABAP programming.
Can any one help me?
(126) ABAP EXCEPTION: An exception has been thrown by a function module in the remote system.
I think you should carefully review all of these new parameters, since one is causing a bug in your function.
If you have access to the SAP system, you can run transaction ST22 to get a detailed error log. However, you may need to de-bug within SAP as per Raj's suggestion.
Related
I am trying to update into DCTM through java code, below is the code snippet
IDfDocument communication = (IDfDocument) getDfSession().getObject(DfId.valueOf(communicationId));
communication.setString(ATTR_STATUS, status);
communication.save();
but I am getting the below error
Caused by: DfException:: THREAD: be.ing.ca.xpression.DCTM001P-1; MSG: [DM_OBJ_MGR_E_VERSION_MISMATCH]error: "save of object
090283e589bf689d of type xx_document failed because of version
mismatch: old version was 4"; ERRORCODE: 100; NEXT: null
I thinki am getting this error because there is another process which is trying to modify the object ,and when more than one process try to modify anyobject DCTM throws this exception,
But after lot of searching i dident found any solution which can solve this error
If anyone knows the solution please reply..
Link that i refer
http://www.javablog.fr/?s=version+mismatch
Try calling a fetch() on the object before doing updates.
communication.fetch()
There are some optional parameters AFAIK, but it's been a while since I've been fiddling with DCTM.
Best of luck!
In our existing application we are using Esper Version 5.3.
We have added few addPlugInSingleRowFunction() to use it in EPL as below --
final Configuration cepConfiguration = new Configuration();
cepConfiguration.addPlugInSingleRowFunction("toNumber", Double.class.getName(), "parseDouble");
cepConfiguration.addPlugInSingleRowFunction("toBoolean", Boolean.class.getName(), "parseBoolean");
This was working fine in 5.3 version.
Post upgrading to 8.3 above code changed as per Esper documentation --
cepConfiguration.getCompiler().addPlugInSingleRowFunction("toNumber", Double.class.getName(), "parseDouble");
cepConfiguration.getCompiler().addPlugInSingleRowFunction("toBoolean", Boolean.class.getName(), "parseBoolean");
But once the sendEventBean() method is called to send a Event to runtime we are seeing below exception every time.
Surprisingly events are getting matched as per the statements present in runtime even if below exception are coming. Though we are not sure whether some events are not matching or not.
Can someone please help on this?
applog.cls=com.espertech.esper.common.internal.epl.expression.dot.core.ExprDotNodeForgeStaticMethodEval,applog.mthd=staticMethodEvalHandleInvocationException,applog.line=228,applog.msg=Invocation exception when invoking method 'parseDouble' of class 'java.lang.Double' passing parameters [null] for statement 'stmt-0': NullPointerException : null,exc.stack=java.lang.NullPointerException\n\tat sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)\n\tat sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)\n\tat java.lang.Double.parseDouble(Double.java:538)\n\tat generated.StatementAIFactoryProvider_a4bd241445010f45474e4598e34521ca1b2836db_stmt450.m8(StatementAIFactoryProvider_a4bd241445010f45474e4598e34521ca1b2836db_stmt450.java:161)\n\tat generated.StatementAIFactoryProvider_a4bd241445010f45474e4598e34521ca1b2836db_stmt450$2.get(ANONYMOUS.java:148)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.FilterParamIndexEquals.matchEvent(FilterParamIndexEquals.java:32)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.FilterHandleSetNode.matchEvent(FilterHandleSetNode.java:100)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.EventTypeIndex.matchType(EventTypeIndex.java:178)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.EventTypeIndex.matchEvent(EventTypeIndex.java:124)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.FilterServiceBase.retryableMatchEvent(FilterServiceBase.java:179)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.FilterServiceBase.evaluateInternal(FilterServiceBase.java:96)\n\tat com.espertech.esper.runtime.internal.filtersvcimpl.FilterServiceLockCoarse.evaluate(FilterServiceLockCoarse.java:52)\n\tat com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl.processMatches(EPEventServiceImpl.java:610)\n\tat com.espertech.esper.runtime.internal.kernel.service.EPEventServiceImpl.processWrappedEvent(EPEventServiceImpl.java:450)\n\tat com.espertech.esper.runtime.internal.kernel.thread.InboundUnitSendEvent.run(InboundUnitSendEvent.java:43)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)
You could turn on compiler logging (config.getCompiler().getLogging().setEnableCode(true);) and make sure you have INFO level logging. You can inspect "StatementAIFactoryProvider_a4bd241445010f45474e4598e34521ca1b2836db_stmt450.m8" at line 161 to see what the problem is. Sounds like a null value gets passed to Double.parseDouble. But since I don't have the complete code its hard to say.
I am facing some unknown issue looks like it is some internal compiler error:
these are the error when building apk:
Error:org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: doResume (Ljava/lang/Object;Ljava/lang/Throwable;)Ljava/lang/Object;:
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #375 L0: Incompatible stack heights
Error:org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Incompatible stack heights
Any help would be appreciated.
After struggling for a long time I found the solution, the code which causes the problem is this:
if (investorType=="Institutional")
{linSignUp
if (firmName.isEmpty()) {
There is a problem in first if block which a linSignUp a reference of linear layout which accidentally placed here, which should not be here.
So the View just here alone with no use, when I removed it, the build generated successfully.
This was one of the most frustrating errors to track down.
Here is the error I was getting:
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Cause: Back-end (JVM) Internal error: wrong code generated
org.jetbrains.kotlin.codegen.CompilationException Back-end (JVM) Internal error: Couldn't transform method node:
.....
If your stack trace further on is related to views and strings, the main culprit for me was that the xml view id was too long.
This name caused the error: team_management_players_recycler_view_layout
I reduced it to this: team_man_players_recycler_layout
BOOM ERROR WAS GONE!
Hope this helps someone else out!
I had the same error in kotlin 1.3.72 and the code that was causing it was a recursive suspend function contained in a suspend function:
suspend fun function1(){
suspend fun internalFun(){
// does something
internalFun() //<-- this was causing the problem
}
internalFun()
}
I fixed by rearranging the code in such a way that i hadn't to call internalFun() inside itself.
I don't know if the fact that they were suspend functions was relevant.
Error message: "e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong bytecode generated"
In my case, I used runBlocking{} in one of MainViewModel.kt's methods.
The app was compiling successfully with runBlocking{} (which I shouldn't use anyway)) until I changed the name of a parameter in that method.
I replaced runBlocking{} with viewModelScope.launch {} in order to get ride of this error message.
In case this helps others in the future, my issue was due to using my custom extension:
suspend operator fun <T> MutableLiveData<T>.plusAssign(newValue: T) = ...
It was used like this:
init {
job = GlobalScope.launch {
while (true) {
delay(1000)
foo += bar // This is the error.
}
}
}
Using it like this, is however, completely fine:
suspend fun refreshNextJob() {
foo += bar
}
Not sure why this happens, but maybe this will help someone later.
In my case I got this exception:
java.lang.IllegalStateException: Backend Internal error: Exception
during code generation Cause: Back-end (JVM) Internal error: wrong
code generated org.jetbrains.kotlin.codegen.CompilationException
Back-end (JVM) Internal error: Couldn't transform method node: getS
()Ljava/lang/String;: #Lorg/jetbrains/annotations/NotNull;() //
invisible L0
LINENUMBER 9 L0
NEW com/example/GsonConverter
DUP
INVOKESPECIAL com/example/GsonConverter. ()V
ASTORE 1 L1
LINENUMBER 10 L1 ...
Cause: UTF8 string too large Element is unknownThe root cause was
thrown at: ByteVector.java:246 Cause: Back-end (JVM) Internal error:
Couldn't transform method node: getS ()Ljava/lang/String;:
#Lorg/jetbrains/annotations/NotNull;() // invisible L0 ...
Cause: UTF8 string too large Element is unknownThe root cause was
thrown at: ByteVector.java:246 File being compiled at position: (8,5)
in
C:/Users/user/AndroidStudioProjects/MyApplication03/app/src/main/java/com/example/myapplication/ATest.kt
The root cause was thrown at: TransformationMethodVisitor.kt:92 File
being compiled at position:
file://C:/Users/user/AndroidStudioProjects/MyApplication03/app/src/main/java/com/example/myapplication/ATest.kt
The root cause was thrown at: FunctionCodegen.java:1043 ...
Cause: UTF8 string too large Element is unknownThe root cause was
thrown at: ByteVector.java:246 ...
I removed a class ATest from an application, but it didn't help. A problem was in a constant string about 80 Kb (JSON).
In my case I just forgot to add method call when typed view name.
img_my_best_image
Instead of
img_my_best_image.show()
The Oracle Tutorial page for the Temporal Query show this example code.
- Code
TemporalQueries query = TemporalQueries.precision();
System.out.printf("LocalDate precision is %s%n",LocalDate.now().query(query));
When I compile this segment code, the Compiler throws the error:
- Error
TemporalQueryExample.java:8: error: incompatible types: TemporalQuery<TemporalUnit> cannot be converted to TemporalQueries
TemporalQueries query = TemporalQueries.precision();
^
TemporalQueryExample.java:10: error: no suitable method found for query(TemporalQueries)
LocalDate.now().query(query));
^
I don't know this java 8 documentation tutorial example is correct or not but I copy this code segment and paste my IDE then IDE throw the Error.
There is an error in the code. Look at what Lokesh has mentioned.
To further learn coding, make sure you understand the error properly. It will make your life easier. In this example, the error says: TemporalQuery<TemporalUnit> cannot be converted to TemporalQueries
If you check your code, <TemporalUnit> is not there, which is an indication that you have to place it somewhere and the right place to have it is mentioned by Lokesh.
You can go through this tutorial
Change this line TemporalQueries query = TemporalQueries.precision(); to this TemporalQuery<TemporalUnit> query = TemporalQueries.precision();
You can check this Java 9 documentation
I'm trying to run a really simple dataflow job, just taking some data in BigQuery, processing it a bit and putting it in a new bigquery table
Pipeline p = Pipeline.create(
PipelineOptionsFactory.fromArgs(args).withValidation().create());
p.apply(BigQueryIO.Read.fromQuery("SELECT * FROM realtime.status_6_output_11"));
p.run();
However whenever I run it I get the following pretty undescriptive NullPointerException:
Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.<init>(Matcher.java:229)
at java.util.regex.Pattern.matcher(Pattern.java:1093)
at com.google.cloud.dataflow.sdk.util.IOChannelUtils.getFactory(IOChannelUtils.java:174)
at com.google.cloud.dataflow.sdk.io.BigQueryIO$Read$Bound.apply(BigQueryIO.java:553)
at com.google.cloud.dataflow.sdk.io.BigQueryIO$Read$Bound.apply(BigQueryIO.java:387)
at com.google.cloud.dataflow.sdk.runners.PipelineRunner.apply(PipelineRunner.java:74)
at com.google.cloud.dataflow.sdk.runners.DirectPipelineRunner.apply(DirectPipelineRunner.java:247)
at com.google.cloud.dataflow.sdk.Pipeline.applyInternal(Pipeline.java:367)
at com.google.cloud.dataflow.sdk.Pipeline.applyTransform(Pipeline.java:274)
at com.google.cloud.dataflow.sdk.values.PBegin.apply(PBegin.java:47)
at com.google.cloud.dataflow.sdk.Pipeline.apply(Pipeline.java:156)
at com.noraway.conductor.NormalizedPipeline.main(NormalizedPipeline.java:42)
I think there's a problem with my command line arguments (don't have any right now) but I'm not sure what that would be.
It looks like there is a missing --tempLocation for BigQuery to use. The obscure error message is fixed as part of https://github.com/GoogleCloudPlatform/DataflowJavaSDK/issues/313.