資源描述:
《EBS-FORM開(kāi)發(fā)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、Close_FORM('XX_FORM001');show_window('XX_FORM001',4,0.5);1:定義fnd_descr_flex.define(BLOCK=>'BLK_ROUTING_LINES',field=>'DESC_FLEX',appl_short_name=>'XX',desc_flex_name=>'XX_OM_INT_ROUTING_LINES');2:Message('Cannotdeletemasterrecordwhenmatchingdetailrecordsexist.');RAISEForm
2、_Trigger_Failure;go_block('BLK_ROUTING_HEADERS');hide_window('WIN_STEP');app_window.set_coordination('WHEN-WINDOW-CLOSED',:BLK_REP_STEP_CTL.COORDINATION_STEP,'R_ROUTING_HEADER_STEPS');3設(shè)置彈出信息fnd_message.set_string(GET_ITEM_PROPERTY(p_item,PROMPT_TEXT)
3、
4、''
5、
6、'cannotbeblank,
7、pleaseenter'
8、
9、''
10、
11、GET_ITEM_PROPERTY(p_item,PROMPT_TEXT));fnd_message.show;RAISEform_trigger_failure;帶有提示YESORNOwin_nm:=get_view_property(canvas_nm,WINDOW_NAME);FND_MESSAGE.SET_STRING('Doyouwanttosavethechangesyouhavemade?');ln_quest_count:=FND_MESSAGE.QUESTION('Yes','No',
12、'Cancel',NULL);IFln_quest_count=1THENDO_KEY('COMMIT_FORM');clear_block(no_validate);app_custom.close_window(win_nm);ELSIFln_quest_count=2THENclear_block(no_validate);app_custom.close_window(win_nm);ELSENULL;ENDIF;5:InsertintoINSERTINTO….EXCEPTIONWHENOTHERSTHENfnd_message.
13、set_string(SQLERRM
14、
15、':'
16、
17、SQLCODE);fnd_message.ERROR;RAISEform_trigger_failure6:UpdateUpdate….EXCEPTIONWHENOTHERSTHENfnd_message.set_string(SQLERRM
18、
19、':'
20、
21、SQLCODE);fnd_message.ERROR;RAISEform_trigger_failure7:DeleteDELETEFROMXX_OM_INT_ROUTING_HEADERSWHERErouting_header_id=:
22、BLK_ROUTING_HEADERS.routing_header_id;IF(SQL%NOTFOUND)THENRAISENO_DATA_FOUND;ENDIF;8:lock_idPROCEDURElock_rowISCURSORc_rowISSELECT*FROMXX_OM_INT_ROUTING_HEADERSWHEREROWID=:BLK_ROUTING_HEADERS.row_idFORUPDATEOFrouting_header_idNOWAIT;recc_row%ROWTYPE;iNUMBER:=0;BEGINLOOPBE
23、GINi:=i+1;OPENc_row;FETCHc_rowINTOrec;IF(c_row%NOTFOUND)THENCLOSEc_row;fnd_message.set_name('FND','FORM_RECORD_DELETED');fnd_message.error;RAISEFORM_TRIGGER_FAILURE;ENDIF;CLOSEc_row;IFec.ROUTING_HEADER_ID=:BLK_ROUTING_HEADERS.ROUTING_HEADER_ID)THENRETURN;ELSEfnd_message.s
24、et_name('FND','FORM_RECORD_CHANGED');fnd_message.error;RAISEFORM_TRIGGER_FAILURE;ENDIF;EXCEPTION