zoukankan      html  css  js  c++  java
  • WIP*更新生产批详细信息行产品配料

    DECLARE
         l_batch_header_rec    gme_batch_header%ROWTYPE;
         l_material_detail_rec gme_material_details%ROWTYPE;
         x_material_detail_rec gme_material_details%ROWTYPE;
         x_message_count       NUMBER;
         x_message_list        VARCHAR2(240);
         x_return_status       VARCHAR2(240);
    BEGIN
         mo_global.set_policy_context('S',
                                                                                      81);
         fnd_global.apps_initialize(user_id      => 0,
                                                                                 resp_id      => 50783,
                                                                                 resp_appl_id => 555);
                                
                                
         l_batch_header_rec.batch_id              := 41381;
         --l_material_detail_rec.line_type          := -1;
         l_material_detail_rec.material_detail_id := 72641;
         l_material_detail_rec.plan_qty           := 93.706;
         --l_material_detail_rec.material_detail_id := 72642;
         --l_material_detail_rec.plan_qty := 39.3;
         gme_api_pub.update_material_line(p_api_version         => 2.0,
                                                                                                 p_validation_level    => gme_common_pvt.g_max_errors,
                                                                                                 p_init_msg_list       => fnd_api.g_false,
                                                                                                 p_commit              => fnd_api.g_false,
                                                                                                 p_batch_header_rec    => l_batch_header_rec,
                                                                                                 p_material_detail_rec => l_material_detail_rec,
                                                                                                 p_locator_code        => NULL,
                                                                                                 p_org_code            => 'NXS',
                                                                                                 p_scale_phantom       => fnd_api.g_false,
                                                                                                 p_validate_flexfields => fnd_api.g_false,
                                                                                                 x_material_detail_rec => x_material_detail_rec,
                                                                                                 x_message_count       => x_message_count,
                                                                                                 x_message_list        => x_message_list,
                                                                                                 x_return_status       => x_return_status);
         dbms_output.put_line('x_message_count:' || x_message_count);
         dbms_output.put_line('x_message_list:' || x_message_list);
         dbms_output.put_line('x_return_status:' || x_return_status);
         IF (x_return_status <> 'S') THEN
               dbms_output.put_line('更新失败');
         
               IF x_message_count >= 1 THEN
                    FOR i IN 1 .. x_message_count
                    LOOP
                          dbms_output.put_line(i || '. ' || substr(fnd_msg_pub.get(p_encoded => fnd_api.g_false),
                                                                                                                                       1,
                                                                                                                                       255));
                    
                    END LOOP;
               
               END IF;
         ELSE
               dbms_output.put_line('更新成功');
         END IF;
    EXCEPTION
         WHEN OTHERS THEN
               dbms_output.put_line('处理异常');
    END;
    

      

  • 相关阅读:
    OpenJudge计算概论-寻找山顶
    OpenJudge计算概论-配对碱基链
    OpenJudge计算概论-分配病房
    OpenJudge计算概论-计算鞍点
    OpenJudge计算概论-错误探测
    OpenJudge计算概论-文字排版
    OpenJudge计算概论-二维数组右上左下遍历
    OpenJudge-计算点的距离并排序
    OpenJudge计算概论-找最大数序列
    Openjudge计算概论-奇数单增序列
  • 原文地址:https://www.cnblogs.com/wang-chen/p/11871997.html
Copyright © 2011-2022 走看看