EBS-FORM开发

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('Cannot delete master record when matching detail records exist.');

RAISE Form_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 设置弹出信息

fnd_message.set_string(GET_ITEM_PROPERTY(p_item,PROMPT_TEXT) ||' ' ||'can not be blank, please enter' ||' ' ||GET_ITEM_PROPERTY(p_item,PROMPT_TEXT)); fnd_message.show;

RAISE form_trigger_failure;

带有提示YES OR NO

win_nm := get_view_property(canvas_nm

,WINDOW_NAME);

FND_MESSAGE.SET_STRING('Do you want to save the changes you have made?'); ln_quest_count := FND_MESSAGE.QUESTION( 'Yes' ,'No' ,'Cancel' ,NULL);

IF ln_quest_count =1 THEN DO_KEY('COMMIT_FORM'); clear_block(no_validate);

app_custom.close_window(win_nm); ELSIF ln_quest_count = 2 THEN clear_block(no_validate);

app_custom.close_window(win_nm); ELSE NULL; END IF;

5:Insert into

INSERT INTO ….

EXCEPTION

WHEN OTHERS THEN

fnd_message.set_string(SQLERRM || ' : ' || SQLCODE); fnd_message.ERROR;

RAISE form_trigger_failure 6: Update

Update ….

EXCEPTION

WHEN OTHERS THEN

fnd_message.set_string(SQLERRM || ' : ' || SQLCODE); fnd_message.ERROR;

RAISE form_trigger_failure 7: Delete

DELETE FROM XX_OM_INT_ROUTING_HEADERS

WHERE routing_header_id = :BLK_ROUTING_HEADERS.routing_header_id; IF (SQL%NOTFOUND) THEN

RAISE NO_DATA_FOUND; END IF; 8: lock_id

PROCEDURE lock_row IS

CURSOR c_row IS SELECT *

FROM XX_OM_INT_ROUTING_HEADERS

WHERE ROWID = :BLK_ROUTING_HEADERS.row_id FOR UPDATE OF routing_header_id NOWAIT; rec c_row%ROWTYPE; i NUMBER := 0; BEGIN LOOP

BEGIN i := i + 1; OPEN c_row; FETCH c_row INTO rec;

IF (c_row%NOTFOUND) THEN

CLOSE c_row;

fnd_message.set_name('FND'

,'FORM_RECORD_DELETED'); fnd_message.error;

RAISE FORM_TRIGGER_FAILURE; END IF;

CLOSE c_row;

IF ec.ROUTING_HEADER_ID = :BLK_ROUTING_HEADERS.ROUTING_HEADER_ID) THEN RETURN; ELSE

fnd_message.set_name('FND'

,'FORM_RECORD_CHANGED'); fnd_message.error;

RAISE FORM_TRIGGER_FAILURE; END IF; EXCEPTION

WHEN app_exception.record_lock_exception THEN app_exception.record_lock_error(i); END; END LOOP; END lock_row; End; LOV

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4