个性化,自动创建批名

这里写图片描述
这里写图片描述

=SELECT CASE
         WHEN decode(instr(frv.responsibility_name, '_', -1),
                     0,
                     NULL,
                     substr(frv.responsibility_name,
                            instr(frv.responsibility_name, '_', -1) + 1)) IS NOT NULL AND
              cux_gl_num_utl.get_batch_num(p_resp_id => frv.responsibility_id,
                                           p_user_id => fnd_profile.value('USER_ID')) IS NOT NULL THEN

          (SELECT description
             FROM fnd_user
            WHERE user_id = fnd_profile.value('USER_ID')) || '-' ||
          to_char(SYSDATE, 'YYYYMMDD') || '-' ||
          cux_gl_num_utl.get_batch_num(p_resp_id => frv.responsibility_id,
                                       p_user_id => fnd_profile.value('USER_ID'))
         ELSE
          NULL
       END
  FROM fnd_responsibility_vl frv
 WHERE frv.responsibility_id = fnd_profile.value('RESP_ID')

猜你喜欢

转载自blog.csdn.net/lzl1101206656/article/details/80524792
今日推荐