cancel
Showing results for 
Search instead for 
Did you mean: 

Transient values are getting cleared in same session

dhruv_mehta
Active Contributor
0 Kudos

Dear all,

We have a code which is based on a transient field.

So If the code is getting runb one time I am setting the transient boolen = true but when if the second round trip happens in same session the transient field gets refreshed , as far as I know to hold the values in session we can use the transient fields.

What am i Doing wrong? Below is the field in Quote XBO

[Transient] element invokePartySession      : Indicator;

// Below is AfterModify event of Root

if(shiptoDetermined == true || billtodetermined == true )
{ this.invokePartySession = true; Party determination
}

The most strange thing is it works in my one system Dev system but not in my UAT system!

Basically i want a flag to hold a value in my current session , can you please suggest?

Regards, Dhruvin

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member564242
Active Participant

Dear Dhruvin,

There are a lot many factors that could lead to different behavior of same snippet in two systems, test data and framework internal calls be among.

You can hold the value in one variable in after loading event and clear it at the end of session.

Watch out for the calls of the after loading event in your ABSL.

dhruv_mehta
Active Contributor
0 Kudos

Hi Sneha,

There are a lot many factors that could lead to different behavior of same snippet in two systems, test data and framework internal calls be among.

If this is the case , This shouldmt be how can one anticipate the behavior then? Like It will work in Test system and then not in Prod!? I dont think so... that I have ever faced this kind of issue in any SAP System be in onPRem or C4C! 😞

Nonetheless I did what u said in afterloading still no success and in General this is working in DEV environment! Do you think I should raise an Incident?

dhruv_mehta
Active Contributor
0 Kudos

Hi Sneha,

There are a lot many factors that could lead to different behavior of same snippet in two systems, test data and framework internal calls be among.

If this is the case , This shouldmt be how can one anticipate the behavior then? Like It will work in Test system and then not in Prod!? I dont think so... that I have ever faced this kind of issue in any SAP System be in onPRem or C4C! 😞

Nonetheless I did what u said in afterloading still no success and in General this is working in DEV environment! Do you think I should raise an Incident?

dhruv_mehta
Active Contributor
0 Kudos

You can try creating a simple element and write the logic to clear it's value at the end of session to achieve your requirement.

By Simple means Persistant element then yes I did try that as well and that gets refreshed as well.

😞 i am creating now the After loading event and check if its something wrong there

JayantSaini
Active Participant
0 Kudos

Hi Dhruvin,

The transient fields are filled with the afterloading event. If your code is running multiple time in a session it will trigger the after loading multiple times which will affect the transient fields. You can try creating a simple element and write the logic to clear it's value at the end of session to achieve your requirement.

It's strange that UAT & Dev system are behaving differently.

Thanks,

Jayant