5 Replies Latest reply: Jun 26, 2013 9:08 AM by BluShadow RSS

    Logic Execution Algorithm - Help

    user9172053

      Help for me - Logic Execution Algorithm

      Considering the Execution Sequence 1: Consider the following information in the table GBI_PAR_DEFINE_ROTA parameterized.
      The required fields are filled in by users: Required_Res_1 and one of the fields:
      Product_id, customer_id or Sales_Order_No.
      Off the field will only be filled with the value N if you want to disable the rule. If the value of the rule is N, the routine being developed disregard the rule.

      REQUIRED_RES_1 PRODUCT_ID SALES_ORDER_NO CUSTOMER_ID OFF
      P_P_LAM2 P_289874 18669437-20 WHGA

      Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.
      Step 2: Within these sales orders, search through the table Works_Operation which ones have the field Product_ID = P_289874.
      Step 3: Restrict further data selection Sales_Order searching the table, which of them belong to the client WHGA.
      Step 4: In the records remaining in the table Works_Operation verify which code Alternate_Pref whose field Required_Res_1 equals P_P_LAM2. If more than one return Alternate_Pref (different) for the same product_id Required_Res_1 and generate a table of error called GBI_ERR_ALTERNATE_PREF, containing the following information: Required_Res_1, Works_Order and product_id. If this error occurs, the following steps should not be performed.
      Step 5: In the remaining records, delete those records whose field Alternate_Pref is different from the value returned in Step 4. IMPORTANT NOTE: The records can only be deleted if they exist for the same product_id Alternates_Prefs different. These same deleted records should be inserted in the table Works_Operation_Rota_Excluida.
      Step 6: Deleted records Works_Operation table must also be deleted from the table Works_Op_Char. Fields of connection between these two tables are: Works_Order_No, Version_No, Works_Op_No, Alternate_Pref and Op_Proc_No. Deleted records will be recorded in the table Works_OP_Char_Rota_Excluida.

        • 1. Re: Logic Execution Algorithm - Help
          Billy~Verreynne

          This is not a PL/SQL language problem.

           

          This is a fundamental programming issue.

           

          Which points to the fact that you cannot program.

           

          So please first learn to program.. then when you get stuck programming in PL/SQL, post the problem here.

           

          But expecting someone here to do your work/homework programming for you... that is just plain silly. That is your job.

          • 2. Re: Logic Execution Algorithm - Help
            user9172053

            I did not ask your opinion ... Rather than respond with this kind of mentality bothered to help others ... Idiot

            • 3. Re: Logic Execution Algorithm - Help
              Billy~Verreynne

              I did not offer an opinion.

               

              You have what is called a technical or program specification. It describes the programming steps that need to be designed and written. This is exactly what programmers do. And your seeming inability to do this, points to the fact that you are not a programmer. That is the issue you need to address - instead of looking for so-called algorithmic logic.

               

              Simple and basic approach. Take step 1. Write SQL code that satisfies the requirements and outputs of that step. E.g.

              Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.

              Code: select * from mp_wo_rep where sales_order = '18669437-20'


              Do the same for step 2. And the remaining steps


              You now have the basic code template required to perform these steps. The next actions are:


              1. Modularising the code (instead of a hardcoded sales order number, support specifying it as a parameter).
              2. Simplify the code (by combining and integrating processing steps). Real programming is said to be the act of removing program source code statements, and not writing them.


              • 4. Re: Logic Execution Algorithm - Help
                Paul  Horth

                Well, you seem keen to give opinions yourself. Billy is an Oracle Ace and knows more about Oracle than you or I will know in a million years.

                 

                Calling him an idiot is rude and blatantly untrue.

                 

                This forum is manned by volunteers, people who are not paid to do your job/homework for you.

                Put a bit of effort in yourself (this might include actually bothering to learn at least the basics of SQL and PL/SQL) and people will be willing to help.

                 

                Follow the advice just posted by Billy and see what you come up with. If you get stuck with a particular aspect of SQL or PL/SQL,

                then we can help.

                • 5. Re: Logic Execution Algorithm - Help
                  BluShadow

                  user9172053 wrote:

                   

                  I did not ask your opinion ... Rather than respond with this kind of mentality bothered to help others ... Idiot

                   

                  Moderator action

                  Please refrain from using offensive terms against other members.

                   

                  You would be well advised to read the advice given, and that is that the forum is not a place to get your work done if you do not show what you've tried yourself and what isn't working for you.

                   

                  Please ensure you read the FAQ: Re: 2. How do I ask a question on the forums?

                   

                  before posting questions.