Transaction Processing

KSK

KSK

Well Known Member
Hi,
I've a Headerless Detail(Parent) form ,From the row exists of headerless detail , I'm calling the two different forms(Say A, B) .Form A,B will do some transaction(Add,Update) to the database and return back to the parent form after completion of transaction , If the user clicks “Cancle” Button in the parent form(HeaderLess Details ) then all the transaction Done on Form “A” and “B”
should be Roll backed Automatically.

Can I Archive the Above by enabling “Transaction Processing” option for Parent Form and “A”, “B” Forms.

Thanks in advance.

--------------
JDE 8.11
Tool Release 8.97
--------------


Thanks
SivaKumar.K
 
Hi SivaKumar,

Include Transaction option is not available in all event.
They are listed under Transaction Processing chapter of Development Tools manual.

First of all, turn ON Transaction Processing option on your initial form.

First illegal solution maybe do not work after XE:
- construct your Form Interconnect call with Include Transaction option and Cut/Paste to the Row Exit events.

This second hopefully will work on your 8.11:
- manage one or more flag, which will inform the OK button, "who" pressed it:
>> user pressed
>> Form A caller Row Exit
>> Form B caller Row Exit
- In the Row Exits:
>> set the flag appropriately
>> Press the OK butten
>> clear the control error (see later)
- in beginning of OK Butten Pressed event
>> check the flag
>> If Form A call request, the call FORM A, set a dummy error e.g. for HC OK
>> issue a Stop Event Processing
>> For Form B call request the way is similar
>> If neither, A or B request (the user pressed the OK), let to continue the execution of your original logic on OK - if there is any

Let us know, does it work for you. Thanks.

Regards,

Zoltán
 
Hi Zoltan,

Thanks for your reply,

I've tried with the procedure as you mentioned

>> When the user Clicks “A” Application from the Row Exist , then I've Update the Flag to = Y
and Pressed “OK” Button
>> Inside the “OK” button

1) If Flag = = Y then called the Application “A”
*Enabled Transaction Processing *
2) Next line,Thrown Dummy Error, for not to close the Transaction

if Flag != N , then “ OK “ Button Works in Normal Way


When I ran the Application with the above coding by enabling “Transaction” on both the forms . I've added Records in Application “A” and pressed OK (In Application “A”)

>> it return to Parent Application Showing our Dummy Error
>>I Clicked “Cancel” Button of Parent Form
>> But Still the Transaction done on Application is Committed to Database(After clicking Cancel button also , I'm able see the records added in application A).

Any there any alternative solution to rollback the transaction.

Thanks
SivaKumar.K
 
[ QUOTE ]
Hi Zoltan,

Thanks for your reply,

I've tried with the procedure as you mentioned

>> When the user Clicks “A” Application from the Row Exist , then I've Update the Flag to = Y
and Pressed “OK” Button
>> Inside the “OK” button

1) If Flag = = Y then called the Application “A”
*Enabled Transaction Processing *
2) Next line,Thrown Dummy Error, for not to close the Transaction

if Flag != Y , then “ OK “ Button Works in Normal Way


When I ran the Application with the above coding by enabling “Transaction” on both the forms . I've added Records in Application “A” and pressed OK (In Application “A”)

>> it return to Parent Application Showing our Dummy Error
>>I Clicked “Cancel” Button of Parent Form
>> But Still the Transaction done on Application is Committed to Database(After clicking Cancel button also , I'm able see the records added in application A).

IS there any alternative solution to rollback the transaction.

Thanks
SivaKumar.K

[/ QUOTE ]
 
Hi SivaKumar,

#1. One step missed from my original suggestion:
- in the Menu/Toolbar exit event, after you pressed the OK, and it returned, clear the dummy error making available to to execute a real O in the parent form

#2. I suppose, Transaction proseenig is ON on all three form and you call A & B with Include Transaction option in the Form Intercnnect. Am I right?

#3. If everything match, then my next tip:
- in the OK, before the Form calls, open the tables behind the called form with Include Transaction option (on Advanced in Open statement)
- when the form returned, then Close the opened table, before you issue the dummy error and Stop Event Processing

Let me know, how does it work. Thanks.

Regards,

Zoltán
 
[ QUOTE ]
Hi,
how to attach processing option to a form
AnilKumar.V

[/ QUOTE ]
 
Back
Top