Hi Zoltán
sorry - didn't want to get too bogged down with the techo stuff initially, but if it helps with a solution, here we go -
My application (P5800002) has 2 form exits for printing - one a detail report and one a summary. They both have similar processing as follows:
=======================================================================
CONTROL: HYPITEM Print [HIDDEN]
EVENT: Button Clicked
-----------------------------------------------------------------------
//
// ============================================
// Run report
// ============================================
//
CALL( UBE:R5800005 , Ver: CBA0001 )
FC Address Number -> mnAddressNumber_AN8
FC Start Date -> jdStartDate_DWK
FC End Date -> jdEndDate_DWK
"CBA0001" X Version
//
// ============================================
// Work with Submitted Jobs
// ============================================
//
VA frm_szProgramId_PID = "R5800005"
Press Button(FC Work with Submitted Jobs)
=======================================================================
CONTROL: HYPITEM Summary [HIDDEN]
EVENT: Button Clicked
-----------------------------------------------------------------------
//
// ============================================
// Run report
// ============================================
//
CALL( UBE:R5800006 , Ver: CBA0001 )
FC Address Number -> mnAddressNumber_AN8
FC Start Date -> jdStartDate_DWK
FC End Date -> jdEndDate_DWK
"CBA0001" X Version
//
// ============================================
// Work with Submitted Jobs
// ============================================
//
VA frm_szProgramId_PID = "R5800006"
Press Button(FC Work with Submitted Jobs)
The button FC Work with Submitted Jobs, called from above, has borrowed and modified code from the Batch Versions application P98305 - form exit Submitted Jobs (calls P986110B). I won't include the code for that because it's the above two routines I want to change....
I'd like to know the results of the CALL(UBE.... ) - whether the user presses OK or Cancel on that screen. The CALL(UBE... ) calls app P98612 - Printer Selection. It's the standard select printer & options & submit your report. Then I'll change the Work with Submitted Jobs processing around to only execute if the user has pressed OK.
Of course I COULD just set up a new form exit to go to Submitted Jobs and NOT call it automatically from the other two processes - why I didn't think of THAT yesterday is beyond me!
So if you know of a way of returning the button pressed from P98612 back to my application, it would come in very handy. Copying the app as you suggest and calling my modified version would certainly do the job (hadn't thought of that), but if that was the only solution I think it'd be much easier and quicker to just pull that P986110B call out to another form exit!
Thanks for your help.
Sharon (previously slhgrainco)