1. Create .fmb file with parameter - Called Form
Your are calling this form into another form ,here XXINV00013 (Called Form)
2. Creating parameter in .fmb file
Form Module ==> Parameter ==> Click on + Button
P_ISN - parameter name
3. Go to When New Form Instance Trigger (Form Level Triggers)
Write below Code
BEGIN
IF :PARAMETER.P_ISN IS NOT NULL THEN
--SET_BLOCK_PROPERTY('XXFM_PC_HEADER_DECODE_DTL_V',DEFAULT_WHERE,'ISN='||:PARAMETER.P_ISN);
go_block('XXFM_PC_HEADER_DECODE_DTL_V');
do_key('EXECUTE_QUERY');
END IF;
END;
Here P_ISN - Parameter Name
'XXFM_PC_HEADER_DECODE_DTL_V - Block name where ISN field is available.
4. Go To PRE_QUERY Trigger (Form Level Trigger)
Begin
IF :PARAMETER.P_ISN IS NOT NULL THEN
:XXFM_PC_HEADER_DECODE_DTL_V.ISN :=:PARAMETER.P_ISN;
END IF;
END;
Here P_ISN - Parameter Name
'XXFM_PC_HEADER_DECODE_DTL_V - Block name where ISN field is available.
Your are calling this form into another form ,here XXINV00013 (Called Form)
2. Creating parameter in .fmb file
Form Module ==> Parameter ==> Click on + Button
P_ISN - parameter name
3. Go to When New Form Instance Trigger (Form Level Triggers)
Write below Code
BEGIN
IF :PARAMETER.P_ISN IS NOT NULL THEN
--SET_BLOCK_PROPERTY('XXFM_PC_HEADER_DECODE_DTL_V',DEFAULT_WHERE,'ISN='||:PARAMETER.P_ISN);
go_block('XXFM_PC_HEADER_DECODE_DTL_V');
do_key('EXECUTE_QUERY');
END IF;
END;
Here P_ISN - Parameter Name
'XXFM_PC_HEADER_DECODE_DTL_V - Block name where ISN field is available.
4. Go To PRE_QUERY Trigger (Form Level Trigger)
Begin
IF :PARAMETER.P_ISN IS NOT NULL THEN
:XXFM_PC_HEADER_DECODE_DTL_V.ISN :=:PARAMETER.P_ISN;
END IF;
END;
Here P_ISN - Parameter Name
'XXFM_PC_HEADER_DECODE_DTL_V - Block name where ISN field is available.
Here we are assigning parameter value to Block.
5. For Form refistration purpose . We create Form Function.
So while creating Funtion assign parameter value in Form Tab
& save the changes.
6. Now Go to calling form . On the below we have to call new custom form. (XXINV00013)
Do personalization to add menu and create respond to that Menu.
Here ISN is field from calling form .means using ISN field we are calling the another form .
ISN is act as parameter here to call another form.
7. Create personalization to add Tool Menu.
8. Action code for tool menu
Seq - 10
Type - Menu
Menu Entry - Menu5 : Decode Details Form
Menu Label - Decode Details Form
9. Now create response to Tool menu
Condition
Trigger Event - Menu5
Processing mode - NOT in Enter-Query Mode
10. Now action code to your response to tool menu.
Seq -10
Type - Builtin
Built Type - launch a Function
Function Code - Function Code of called Form (XXFMINV00013)
Function Name - Function Code of Called Form (XXFMINV00013_Fun)
Parameter - 'P_ISN='|| ${item.Q_RES.DISPLAY1.value}
Use same code - here Q_RES is block name calling form.
DISPLAY1 is field name of calling form
Data DISPALY field match with P_ISN parameter data and fetch data and display.
Now you are able to call you custom XXFMINV00013.fmb form from calling form
Form will open.
Thanks !!!
No comments:
Post a Comment