2 Replies Latest reply: Sep 6, 2012 10:03 PM by Sanjay Desai EBS RSS

    How to add new Resource to existing Routings using APIs/ Interface Tables?

    895967
      Hi Friends,

      I need to add new Resource to our existing Routings. The number of records is more than 10,000. So I need to create an anonymous block for it. But I am not sure which Interface tables/ APIs to be used for inserting them. If someone can guide me how can this be achieved, I'd really appreciate. If you can provide me with a sample code for it, that would be the best.

      Thanks in advance.

      KM
        • 1. Re: How to add new Resource to existing Routings using APIs/ Interface Tables?
          PranitSaha
          Hi KM,

          You need use BOM_OP_ROUTINGS_INTERFACE and BOM_OP_RESOURCES_INTERFACE interface tables to perform the mentioned activity.

          The program "Bill and Routing Interface" will process the records from the above interface tables.

          Metalink note 131898.1 contains the sample code and detailed explanation.

          Thanks,

          PS.
          • 2. Re: How to add new Resource to existing Routings using APIs/ Interface Tables?
            Sanjay Desai EBS
            Hi KM,

            Pl. insert the row in BOM_OP_RESOURCES_INTERFACE table with

            INSERT INTO BOM_OP_RESOURCES_INTERFACE
            ( process_flag, transaction_type, organization_id, routing_sequence_id , operation_seq_num, resource_seq_num,
            resource_code , assigned_units, usage_rate_or_amount , basis_type, schedule_flag , creation_date, effectivity_date )
            VALUES
            ( 1, 'CREATE' , organization_id , v_rout_seq_id , v_operation_seq_num ,v_resource_seq_num , v_resource_code ,
                 v_assigned_units, v_usage_rate_or_amount , DECODE(v_basis_type , 'LOT', 2 , 'ITEM' , 1) ,
            DECODE(i.schedule_yes_no , 'YES', 1 , 'NO' , 2) , sysdate , v_eff_dt );

            Where, v_eff_dt = SELECT operation_sequence_id , effectivity_date INTO v_oper_seq_id , v_eff_dt
            FROM bom_operation_sequences b
            WHERE b.routing_sequence_id = v_rout_seq_id
                 AND b.operation_seq_num = v_operation_seq_num ;

            then run the concurrent program "Bill and Routing Interface" to import the new resources in existing routings.

            HTH
            Sanjay