zoukankan      html  css  js  c++  java
  • 段值相关

    1,父值和子值常用表

    fnd_flex_value_norm_hierarchy-------父值,其中有子值的范围,

    fnd_flex_value_children_v--------------可以查询 父值下包含的所有子值。

    以上两张表都通过flex_value_set_id做定位

    应用:在报表中存在一类参数情况,要求参数输入父值的时候,返回全部子值的相应信息,此要求的实现关键语法如下:

    -------先验证是否是父值(fnd_flex_value_norm_hierarchy)

     select count(1)
        into l_count
        from fnd_flex_value_norm_hierarchy ffh,
             fnd_id_flex_segments          ffs,
             gl_sets_of_books              gb
        where ffh.flex_value_set_id = ffs.flex_value_set_id
        and gb.short_name = 'PROPERTY_SOB'----------------账簿简称
        and ffs.application_id = 101
        and ffs.id_flex_code = 'GL#'
        and ffs.id_flex_num = gb.chart_of_accounts_id
        and ffs.application_column_name = 'SEGMENT1'--------公司段可以换为其他段
        and ffh.parent_flex_value = g_company;-------------参数
     
        if l_count > 0-----------------------------------------说明是父值
        then
     
              SELECT gb.name,ffh.flex_value_set_id, ffh.parent_flex_value,ffh.child_flex_value_low, ffh.child_flex_value_high,ffc.flex_value

    -----------可以找出相应的子值范围或者父值中包含的所有子值(ffc.flex_value)
     
          from fnd_flex_value_norm_hierarchy ffh,
               fnd_id_flex_segments          ffs,
               gl_sets_of_books              gb,
               fnd_flex_value_children_v  ffc
          where ffh.flex_value_set_id = ffs.flex_value_set_id
          AND ffc.flex_value_set_id=ffh.flex_value_set_id
          AND ffc.parent_flex_value=ffh.parent_flex_value
       /*   and gb.short_name = 'PROPERTY_SOB'*/
          and ffs.application_id = 101
          and ffs.id_flex_code = 'GL#'
          and ffs.id_flex_num = gb.chart_of_accounts_id
          and ffs.application_column_name = 'SEGMENT1'
          /*and ffh.parent_flex_value = g_company*/;

        else
         直接按子值,最简单的情况处理即可

        
        end if;
     

     2,,常用查询段值 FLEX_VALUE_SET_ID或者FLEX_VALUE如下:


           select ffv.DESCRIPTION ,ffv.FLEX_VALUE_SET_ID from  fnd_flex_values_vl ffv ,fnd_id_flex_segments ffs,gl_sets_of_books gb
           
           where ffv.FLEX_VALUE_SET_ID=ffs.FLEX_VALUE_SET_ID
           and gb.SHORT_NAME='PROPERTY_SOB'---------------------------账簿简称
           and ffv.FLEX_VALUE='04'----------------------------------------具体值
           and ffs.APPLICATION_ID=101
           and ffs.ID_FLEX_CODE='GL#'
           and ffs.ID_FLEX_NUM= gb.CHART_OF_ACCOUNTS_ID
           and ffs.APPLICATION_COLUMN_NAME='SEGMENT1'; --------段
          

  • 相关阅读:
    (创建型模式)Abstract Factory——抽象工厂模式
    (结构型模式)Composite——组合模式
    (行为模式)Command——命令模式
    (创建型模式)Singleton——单例模式
    Windows的Notepad++的插件
    Ubuntu的软件源更新常见问题及解决
    The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
    Ubuntu安装ImageMagick
    常见误操作之警惕
    Rails3.2.x new project启动错误:Could not find a JavaScript runtime.
  • 原文地址:https://www.cnblogs.com/akami/p/6933636.html
Copyright © 2011-2022 走看看