cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: transactionid value -1

0 Kudos

Hello

I'm using MII 12.2(.5)

In a transaction I use the transactionid standard function for a variable assignement.

If I run the transaction using manual commmand (CTRL+F5) it works fine.

If I run the transaction using a scheduled job (System management->Scheduler), it returns always -1 value. The same issue if I run the transaction using both webservice and HTTP call.

The user used in all the calls is the same.

Do you have any idea about the issue?

Thank you a lot

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

former_member204240
Active Participant
0 Kudos

Hi Fabio,

Yes you are right, If you calling Transaction from another Transaction then need to set Persist Transaction to Always.

This can be done in dynamic call action block where you have to configure persist transaction.

You can change it from inherit to persist always. This will give you the transaction ID. You doing in schedule Editor which also works.

Thanks for sharing the results .

Warm Regards,

Rao

0 Kudos

Hello.

In your opinion, is there any way to set this option inside the child transaction?

The always-onError parameter should be set in slave transaction, so who calls master transaction could not know all the code of child transaction.

Actually I fixed the issue with the parameter in the scheduler, in the future I will use dynamic call (as you suggested), but my dream would be to fix it forever in the child transaction.

Best regards

Fabio

former_member211944
Active Participant
0 Kudos

Hi Fabio/Padma,

In my opinion, setting the Persist Transaction to 'Inherit' in dynamic transaction call is the best option so that the child replicates the behavior of the parent transaction.

Fabio do you have a certain scenario where you want this to happen in the child transaction?

Regards,

Rohit Negi.

0 Kudos

The scenario is:

you are creating a slave transaction and you need to use transactionid value for logs and other things. You know what you are doing and you write the transaction knowing that it uses transactionid and it will need persistence "always".

Then you give this transaction to another software developer and you explain the interface of the transaction. He calls your transaction in his software...and your transaction doesn't work for inherit/onError/Always parameter.

In my opinion you should know everything of your transaction (for example the requirement of persistence), but nothing of the transaction done from other developers (just I/O description). The developer of slave transaction should configure it in secure way (he should fixes persistence of his transactions, if it is necessary a specific value).

But, if it is not possible, I will explain to everybody the persistence requirement. And I will hope that nobody will forget this important parameter...

Best regards

Fabio

Answers (3)

Answers (3)

former_member204240
Active Participant
0 Kudos

Hi Fabio,

Try checking log in NWA.

http://IPadress:Port/NWA

Execute from scheduler and check in NWA, you may get any clue for this.

Also once restart all services and SAP instance and try again.

Regards,

Rao

0 Kudos

I tried to restart SAP instance and now it's ok.

before my log was full of trow like this:

[Transaction: -1] Link execution failed: com.sap.lhcommon.exceptions.EvaluationException: Unable to find variable of keyword: EC_ConsumptionImport.doConsumptionsImport

As you can see, also for MII logs the transaction ID was -1.

Now it is ok.

My doubt now is: will it happen again?...I hope no...but this seems a bug.

Thank you for your suggestion

Best regards

Fabio

former_member204240
Active Participant
0 Kudos

Hi Fabio,

Glad it worked.

I don't think its a bug.

Generally sometime there will be connection issue or license issue or sometime memory lock,which will impact the Trx, Message processing, MII menu page problem etc.

Restart of services orSAP instances will fix this. (If license issue you should fix the same).

Regards,

Rao

former_member211944
Active Participant
0 Kudos

Hi Fabio,

It does not looks like a bug as I have also tested in SP5.

Hope that it would not happen again.

Regards,

Rohit Negi.

0 Kudos

Hello

change of solution: the real problem was the field PERSISTENT TRANSACTION in job configuration.

The right value is Always, and it was OnError.

Now the issue is really solved

Thank you

Best regards

Former Member
0 Kudos

Does your transaction has IsAsync flag as one of the input parameters? If yes, just try removing and testing.

It would be helpful if you post a screenshot of the scheduler configuration so that our experts can have a look at it.

0 Kudos

No, it hasn't.

Thank you

former_member211944
Active Participant
0 Kudos

Hi Fabio,

I tested this on MII 12.2 SP5 and SP7 and it worked fine(I ran the transaction through a scheduler)

Your MII system is on which SP?

Regards,

Rohit Negi.

0 Kudos

My SP is the 5

Regards

Fabio