WEB ADI 注册功能的SQL 语句

1.删除集成器:bne_integrator_utils.delete_integrator

 

2.注册功能

DECLARE
  x_APPL_ID  FND_APPLICATION.APPLICATION_ID%TYPE;
  x_FORM_ID  FND_FORM.FORM_ID%TYPE;
  x_ROWID    VARCHAR2(100);
  x_FUNC_ID  NUMBER;
  x_menu_id  number;
  l_integ_code VARCHAR2(30);
  l_param VARCHAR2(300);
  l_map_code VARCHAR2(30);
  l_layout_code VARCHAR2(30);
  l_cont_code VARCHAR2(30);
BEGIN
  --应用
  SELECT APPLICATION_ID
    INTO x_APPL_ID
    FROM FND_APPLICATION
   WHERE APPLICATION_SHORT_NAME = 'CUX';
  

  SELECT bi.integrator_code
  INTO   l_integ_code
  FROM   bne_integrators_vl bi
  WHERE  bi.user_name = 'CRC_B17_AR_收款导入_ADI_2' --集成器的名称
  AND    bi.application_id = x_APPL_ID;

  SELECT l.layout_code
  INTO l_layout_code
  FROM bne_layouts_b l
  WHERE l.integrator_code = l_integ_code;

  SELECT c.content_code
  INTO l_cont_code
  FROM bne_contents_b c
  WHERE c.integrator_code = l_integ_code
  AND ROWNUM = 1;

  /*SELECT m.MAPPING_CODE
  INTO l_map_code
  FROM bne_mappings_vl m
  WHERE m.integrator_code = l_integ_code
  AND ROWNUM = 1;*/

  l_param := 'bne:page=BneCreateDoc'
      ||'&'||'bne:viewer=231:EXCEL2003'
      ||'&'||'bne:reporting=N'
      ||'&'||'bne:integrator='||x_appl_id||':'||l_integ_code
      ||'&'||'bne:layout='||x_appl_id||':'||l_layout_code
      --||'&'||'bne:map='||x_appl_id||':'||l_map_code
      ||'&'||'bne:content='||x_appl_id||':'||l_cont_code;

  --调用ADI功能
  SELECT FND_FORM_FUNCTIONS_S.NEXTVAL
  INTO   X_FUNC_ID
  FROM DUAL;
  FND_FORM_FUNCTIONS_PKG.INSERT_ROW(X_ROWID => x_ROWID,
                                    X_FUNCTION_ID => X_FUNC_ID,
                                    X_WEB_HOST_NAME => NULL,
                                    X_WEB_AGENT_NAME => NULL,
                                    X_WEB_HTML_CALL => 'BneApplicationService',
                                    X_WEB_ENCRYPT_PARAMETERS => '',
                                    X_WEB_SECURED => 'N',
                                    X_WEB_ICON => NULL,
                                    X_OBJECT_ID => NULL,
                                    X_REGION_APPLICATION_ID => NULL,
                                    X_REGION_CODE => NULL,
                                    X_FUNCTION_NAME => 'CUX17ARRECEIPTADI',
                                    X_APPLICATION_ID => NULL,
                                    X_FORM_ID => NULL,
                                    X_PARAMETERS  => l_param,
                                    X_TYPE => 'SERVLET',
                                    X_USER_FUNCTION_NAME =>'CUX_17_批量收款ADI',
                                    X_DESCRIPTION => 'CUX_17_批量收款ADI',
                                    X_CREATION_DATE => sysdate,
                                    X_CREATED_BY => -1,
                                    X_LAST_UPDATE_DATE => sysdate,
                                    X_LAST_UPDATED_BY => -1,
                                    X_LAST_UPDATE_LOGIN => -1);  
  

  COMMIT;
  --将功能挂到适当的菜单中,如:采购管理系统超级用户 GUI
EXCEPTION
    WHEN NO_DATA_FOUND THEN
      DBMS_OUTPUT.PUT_LINE ( '出错' );

END;  

你可能感兴趣的:(sql,Web,layout,null,application,Parameters)