Query for Order recomendation from MRP.

Good evening,
Recommendations are saved for the Production and Purchase Order after MRP is done.  New Production and/or Purchase Orders are created in Planned stages.  We need a query for the Alert Management to the users for the new Orders created.
Please can anyone guide and help me.
thank you.

Hi,
Welcome you post on the forum.
Try this for production order:
SELECT T0.DocNum, T0.ItemCode FROM OWOR T0
WHERE T0.OriginType = 'R' AND DateDiff(dd,T0.DocDate,GetDate())=0
Thanks,
Gordon
Good Morning Sir,
Thanks for your message, guidance and support for the query.
The query for the alert for Production is working fine, we just changed the DocDate to PostDate as the Production Order, Posting date is as PostDate.
We tried to change the OWOR to OPOR and the Origin type to T0.Comments='Origin :MRP' and tried for Purchase Order, but the alert is not visible.  Would it be ok, that we create an UDF and try the same?.
thanks and warm regards.

Similar Messages

  • Unable to release planned order for single line from MRP workbench

    Hi
    We are unable to release planned order for single line from MRP Planner workbench,but Select All For Release is working for all the lines for the item
    User want to release a specific line but no new requisition is generated
    It is highly appreciable if anyone could help to resolve this issue
    Appreciate the Help
    Regards
    VKPK

    It sounds like the release goes through in the workbench but the requisition does not show up in source - is this correct? If so I would check item attributes / flags for purchasing and buy. also have found some items require a purchase price to be populated in master and org

  • Reduce Sales Order element from MRP using MIGO (Movement Types)

    Hi Folks,
    I was wondering if its possible to remove the Sales Order element from MRP through a movement type using transaction MIGO.
    Basically we don't want to use a delivery document to do this.
    Thanks in advance for your help.
    Regards,
    Gilberto Li

    to remove the Sales Order element from MRP through a movement type
    Sorry I am not sure whether I understood your requirement correctly.  You need to reduce the inventory by doing MIGO instead throgh PGI which means, the movement type will also differ.  Better if you can brief about your requirement, a suitable suggestion can be given.
    Incidentally, this is not the right forum to post.  You can post in the following forum
    [Forum: ERP - Sales and Distribution (SD) General |SAP ERP Sales and Distribution (SAP SD);
    thanks
    G. Lakshmipathi

  • Selecting the Subinventory for orders shipped from the LAO warehouse

    Experts,
    We will need to begin selecting the Subinventory for orders shipped from the LAO warehouse. Can we make this a required field at order entry? If so, can we set up a default value at the customer level as well?
    Please suggest me how to setup.
    Thanks,
    JP

    Prakash,
    Subinventory is not an attribute of the header so you can't default to header and then from header to line, you have to do it directly to the line. You have 2 alternatives:
    1) if this only relates to 2 or 3 key accounts you could create a validation template for each of these accounts:
    Name = Cust1 Subinv
    Attribute = Customer
    Value String = Customer1 name etc.
    ... and a rule for each using the relevant template as a defaulting condition:
    Source type = Constant Value
    Source/Value = Subinv for Customer1
    2) a PL/SQL procedure which looks at a DFF against your customer, picks up the subinv code and defaults that to your line. You need to reference the package name and procedure name from your defaulting rule. You'll probably need some tech assistance with writing this if you're not familiar with PL/SQL.

  • Sale order exclude from MRP

    one requirement from user
    He want to stop future sale order include into MRP
    For example sale order delivery date is 31.03.2012
    Based on the backward scheduling , planed oder created(lead time is 4 weeks) proerly for the component and Purchase order for raw material
    It leads to more inventory,as per the delivery date the sale order should include into MRP on January 2012
    My requirement is future sale order should exclude and it include as per the lead time
    now they are using NEUPL procesing key for MRP run
    they run the MRP run daily

    Hi,
    try with below option
    In sales order have field Schedule line category to set CN
    Schedule line category
    A classification that distinguishes between different kinds of schedule line. The category determines how the system processes the schedule line.
    Use
    The schedule line category determines, for example, whether the system passes on requirements to materials requirements planning (MRP).
    Regards,
    Sankaran

  • BADI/User exit for Purchase Requisition from MRP

    I am looking for a BADI or any enhancement when a purchase requisition is created or modified from MRP .ie. MD50 transaction. Can anyone help ?
    THanks in advance.

    Hello Shareen
    Have you had a look at package <b>MD03 </b>(contains transaction MD50). It contains lots of BAdIs. Perhaps the following ones may be useful:
    MD_PLDORD_CHANGE (BAdI for Changing Planned Orders)
    MD_PURREQ_CHANGE (BADI for changing purchase requisitions)
    However, I should mention that I have not found anything when I checked the <i>Where-Used-List</i> for these BAdIs (on ECC 5.0).
    Regards
      Uwe

  • Outer join query for SQL server from Oracle

    Hi All,
    My question is regarding making queries from Oracle to SQL Server database thorugh DBLink.
    In my oracle database I have a DBLink emp.world for SQL Server database.
    I need to query SQL Server data from oracle (so that this query can be combined with other oracle tables).
    Query is given below:
    SELECT
            a."EmpID" as "Employee ID",
            a."EmpStatus" "Employee Status"
            b."EmpSub" as "Employee Subjects"
    FROM
            [email protected] a
            left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY  a."EmpID";My problem is when I run the same query from oracle, it does not show the EmpID that does not exist in Subjects table, but when run from actual SQL Server database, it shows all the records.
    Samples are given below:
    Run from Oracle
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    104                   Inactive                  Chemistry
    Run form SQL Server
    Employee ID      Employee Status     Employee Subjects
    101                     Active                     Maths
    102                     Active                     Maths
    102                     Active                     Physics
    103                 Active                       NULL
    104             Inactive            ChemistryI am not sure why in oracle outer join for SQL server tables is not working. What is the right way for outer join in this case.
    I am using oracle database 10gR2 and SQL Server 2005.
    Please Help.
    Thanks.

    SELECT
    a."EmpID" as "Employee ID",
    a."EmpStatus" "Employee Status"
    b."EmpSub" as "Employee Subjects"
    FROM
    [email protected] a
    left outer join [email protected] b on a."EmpID" = b."suEmpID"
    ORDER BY a."EmpID";
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm#sthref3175
    From your description, it appears you may need a right outer join. You want to get back all the rows from 'B', not from 'A'. Try a right join and let us know.

  • Trouble writing Query for Pivoting data from a table

    I am having a little trouble writing a query for converting the below table data into a pivot data. I am trying to write a query for which if I give a single valid report_week date as input it should give me the data for that week and also provide two extra columns, one which gives the data of last week for the same countries and the second column which gives the difference of numbers in both the columns(i.e. COUNT - COUNT_LAST_WEEK).
    REPORT_WEEK     DIVISION     COUNT
    9/26/2009     country1     81
    9/26/2009     country2     97
    9/26/2009     country3     12
    9/26/2009     country4     26
    9/26/2009     country5     101
    10/3/2009     country1     85
    10/3/2009     country2     98
    10/3/2009     country3     10
    10/3/2009     country4     24
    10/3/2009     country5     101
    10/10/2009     country1     84
    10/10/2009     country2     98
    10/10/2009     country3     10
    10/10/2009     country4     25
    10/10/2009     country5     102
    For example, if I give input as 10/10/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/10/2009     country1     84     85     -1
    10/10/2009     country2     98     98     0
    10/10/2009     country3     10     10     0
    10/10/2009     country4     25     24     1
    10/10/2009     country5     102     101     1
    For example, if I give input as 10/3/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/3/2009     country1     85     81     4
    10/3/2009     country2     98     97     1
    10/3/2009     country3     10     12     -2
    10/3/2009     country4     24     26     -2
    10/3/2009     country5     101     101     0
    Can anyone please shed some light on Query building for the above scenarios.
    Thank you
    SKP
    Edited by: user11343284 on Oct 10, 2009 7:53 AM
    Edited by: user11343284 on Oct 10, 2009 8:28 AM

    I assume there is no gap in report weeks. If so:
    SQL> variable report_week varchar2(10)
    SQL> exec :report_week := '10/10/2009'
    PL/SQL procedure successfully completed.
    with t as (
               select to_date('9/26/2009','mm/dd/yyyy') report_week,'country1' division,81 cnt from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country2',97 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country3',12 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country4',26 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country1',85 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country4',24 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country1',84 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country4',25 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country5',102 from dual
    select  max(report_week) report_week,
            division,
            max(cnt) keep(dense_rank last order by report_week) cnt_this_week,
            max(cnt) keep(dense_rank first order by report_week) cnt_last_week,
            max(cnt) keep(dense_rank last order by report_week) - max(cnt) keep(dense_rank first order by report_week) difference
      from  t
      where report_week in (to_date(:report_week,'mm/dd/yyyy'),to_date(:report_week,'mm/dd/yyyy') - 7)
      group by division
      order by division
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    10-OCT-09 country1            84            85         -1
    10-OCT-09 country2            98            98          0
    10-OCT-09 country3            10            10          0
    10-OCT-09 country4            25            24          1
    10-OCT-09 country5           102           101          1
    SQL> exec :report_week := '10/3/2009'
    PL/SQL procedure successfully completed.
    SQL> /
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    03-OCT-09 country1            85            81          4
    03-OCT-09 country2            98            97          1
    03-OCT-09 country3            10            12         -2
    03-OCT-09 country4            24            26         -2
    03-OCT-09 country5           101           101          0
    SQL> SY.

  • Number Range for PR converted from MRP Run

    Dear Experts,
    We are experiencing problems with our number range when converting our MRP generated planned orders into PRs. We convert planned orders to purchase requisitions using MD03. We have 1 Plant with 2 MRP Groups which assigned to specific document types and number ranges as well. For example:
    In T-code OMI8:
    Plant AAAA --> Number Range 1111111111
    (Because 1 Plant only able to have 1 number ranges)
    In T-code OPPZ:
    Plant AAAA, MRP Group : A01--> PR Document Type : ZZZZ
    Plant AAAA, MRP Group : A02 --> PR Document Type : XXXX
    In T-code SPRO "PR Document Types" and "PR Document Ranges"
    PR Document Type : ZZZZ --> Number Ranges 1111111111
    PR Document Type : XXXX --> Number Ranges 2222222222
    When I run MD03, the result is:
    MRP Group : A01 --> PR Document Type : ZZZZ --> Number Ranges : 1111111111
    MRP Group : A02 --> PR Document Type : XXXX --> Number Ranges : 1111111111 (Why the number ranges is not 2222222222 ???????)
    Does anyone have idea? Please help. Thanks a lot..

    Hi Mallinath,
    thanks for your info.
    Note 46919 has been implemented in the system, and also i have maintain Tcode - OMI3:
    * Object Type : 2 (PR) --> PR Document Type : ZZZZ --> Internal number range : 1111111111 --> external number range : " " (blank) --> Reservations : 01
    * Object Type : 2 (PR) --> PR Document Type : XXXX--> Internal number range : 2222222222 --> external number range : " " (blank) --> Reservations : 01
    But still system pick wrong number ranges (1111111111, instead of 2222222222 ) for PR Document Type XXXX if generated from MRP run.
    Do you have any other idea? Thank you.

  • Function Modul for Order Number from VA02

    Hallo
    i have a delivery number and want read the order number from VA02.
    Of course, select the database from LIKP --> LIPS --> VBKD is possible but 
    maybe it has function modul for read the order number from transaction VA02.
    THX ANU

    Hi,
    I think is better recover the data directly from DB tables (in table LIPS you have the fields VGBEL, VGPOS, VGTYP ) if you only want the order number.
    With the delivery number you only need to acces 1 table. If you use a FM, you will recover this data and a few fields that is not interesting for you. The access to table LIPS is using table index (delivery number)
    Regards,
    Pepe

  • IPC error when displaying product config for order replicated from ISU

    Hi all,
    I am trying to set up ISU contract replication from ISU to CRM and I am having the problem sending product configuration. I am able to send all the nessesary settings for product config from ISU: when I look in resulting Bdoc in smw01 I see correct CUVAL values, CUCFG and CUINS. CRM order gets created without no problem. However, when I try to go to product configuration tab while displaying my order I see error message:
    ISA Framework: Internal Error: java.lang.NullPointerException
    I assume something might be wrong with the configuration values I am sending, however I have no idea how to get more details what caused this error. IPC apparently runs on separate server and I do not have direct access to it.
    May be somebody can give me a hint where to look or what to do?
    Any help is much appreciated,
    Vitali

    Hi Vitali,
    Have you resolved this error? I have the same message (but under different circumstances) and am curious how to resolve it.
    Thanks,
    Peter

  • Color profile for ordering prints from Apple

    Hy,
    I'm due for ordering prints tomorrow from Apple, my screen is hardware calibrated but can anyone tell me which profile to choose for softproofing when ordering prints from Apple ( I live in Belgium, print order come from Ireland )???
    Thanx

    Adobe RGB has worked best for me. Otherwise prints from Ireland have tended to be dark
    M.

  • How to write sql query for counting pairs from below table??

    Below is my SQL table structure.
    user_id | Name | join_side | left_leg | right_leg | Parent_id
    100001 Tinku Left 100002 100003 0
    100002 Harish Left 100004 100005 100001
    100003 Gorav Right 100006 100007 100001
    100004 Prince Left 100008 NULL 100002
    100005 Ajay Right NULL NULL 100002
    100006 Simran Left NULL NULL 100003
    100007 Raman Right NULL NULL 100003
    100008 Vijay Left NULL NULL 100004
    It is a binary table structure.. Every user has to add two per id under him, one is left_leg and second is right_leg... Parent_id is under which user current user is added.. Hope you will be understand..
    I have to write sql query for counting pairs under id "100001". i know there will be important role of parent_id for counting pairs. * what is pair( suppose if any user contains  both left_leg and right_leg id, then it is called pair.)
    I know there are three pairs under id "100001" :-
    1.  100002 and 100003
    2.  100004 and 100005
    3.  100006 and 100007
        100008 will not be counted as pair because it does not have right leg..
     But i dont know how to write sql query for this... Any help will be appreciated... This is my college project... And tommorow is the last date of submission.... Hope anyone will help me...
    Suppose i have to count pair for id '100002'. Then there is only one pair under id '100002'. i.e 100004 and 100005

    Sounds like this to me
    DECLARE @ID int
    SET @ID = 100001--your passed value
    SELECT left_leg,right_leg
    FROM table
    WHERE (user_id = @ID
    OR parent_id = @ID)
    AND left_leg IS NOT NULL
    AND right_leg IS NOT NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Query for getting address from RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    Some one please provide query for getting REMIT TO ADDRESS details by using the column RA_CUSTOMER_TRX_ALL.REMIT_TO_ADDRESS_ID

    try
    select ct.remit_to_address_id,
           raa_remit_ps.party_site_number,
           raa_remit_loc.state,
           ft_remit.territory_short_name,
           ct.*
      from ra_customer_trx_all    ct,
           hz_cust_acct_sites_all raa_remit,
           hz_party_sites         raa_remit_ps,
           hz_locations           raa_remit_loc,
           fnd_territories_vl     ft_remit
    where 1 = 1
       and ct.remit_to_address_id = raa_remit.cust_acct_site_id(+)
       and raa_remit.party_site_id = raa_remit_ps.party_site_id(+)
       and raa_remit_loc.location_id(+) = raa_remit_ps.location_id
       and raa_remit_loc.country = ft_remit.territory_code(+)

  • Query for Hierarchy Path from child to parent for a given child key by user

    CREATE TABLE EMP_ID
      HEAD_ID  NUMBER(4),
      TAIL_ID  NUMBER(4),
      NAME     VARCHAR2(20 )
    Insert into EMP_ID  Values  (1011, 1008, 'C11');
    Insert into EMP_ID  Values  (1008, 1003, 'C8');
    Insert into EMP_ID  Values  (1012, 1003, 'C12');
    Insert into EMP_ID  Values  (1020, 1003, 'C20');
    Insert into EMP_ID  Values  (1025, 1003, 'C25');
    Insert into EMP_ID  Values  (1015, 1012, 'C15');
    Insert into EMP_ID  Values  (1012, 1005, 'C12');
    Insert into EMP_ID  Values  (1005, 1017, 'C5');
    COMMIT;now my requirement is like this
    if choose the head_id as 1012 and tail_id as 1017
    it should traverse the path form tail to head and print the path as shown below
    c12/c5/c17/c12such that it shows that tail_id has been used as head_id in the same hierarchy path previously.
    here the hierarchy is as shown below
    1015
          1012
                1005
                    1017

    Rede,
    Is this what you want?
    CREATE TABLE EMP_ID
      HEAD_ID  NUMBER(4),
      TAIL_ID  NUMBER(4),
      NAME     VARCHAR2(20 )
    Insert into EMP_ID  Values  (1011, 1008, 'C11');
    Insert into EMP_ID  Values  (1008, 1003, 'C8');
    Insert into EMP_ID  Values  (1012, 1003, 'C12');
    Insert into EMP_ID  Values  (1020, 1003, 'C20');
    Insert into EMP_ID  Values  (1025, 1003, 'C25');
    Insert into EMP_ID  Values  (1015, 1012, 'C15');
    Insert into EMP_ID  Values  (1012, 1005, 'C12');
    Insert into EMP_ID  Values  (1005, 1017, 'C5');
    Insert into EMP_ID  Values  (1017, 1012, 'C17');  ---- ==== This was missing in your setup example
    COMMIT;QUERY and OUTPUT
    SELECT *
      FROM (
    select
      connect_by_iscycle as CYC
    ,dt.head_id
    ,dt.tail_id                     
    ,sys_connect_by_path
                      (  dt.name
                      ) AS EMP_PATH                   
    from   emp_id dt
    start with dt.head_id = 1012
    connect by  NOCYCLE  dt.head_id= prior dt.tail_id)
    CYC     HEAD_ID     TAIL_ID     EMP_PATH
    0     1012     1003     /C12
    0     1012     1005     /C12
    0     1005     1017     /C12/C5
    1     1017     1012     /C12/C5/C17
    0     1012     1003     /C12/C5/C17/C12If you just want the PATH printed
    SELECT *
      FROM (
    select     
    max(sys_connect_by_path
                      (  dt.name
                      )) AS EMP_PATH                   
    from   emp_id dt
    start with dt.head_id = 1012
    connect by  NOCYCLE  dt.head_id= prior dt.tail_id)
    /C12/C5/C17/C12vr,
    Sudhakar B.

Maybe you are looking for

  • Install 10g with 8.1.7/8.1.6 Fails

    I am trying to install 10g on Solaris 5.8 Sparc. The system has 8.1.6 and 8.1.7 on it. The install fails with a file not found exception. The file it is looking for is /u01/app/oracle/product/8.1.6/inventory/ContentsXML/oraclehomeproperties.xml. Wasn

  • GL2 cannon with FCP?

    I just bought a GL2 dv camcorder and thought I would have no problem capturing footage and now, I know differant! I just found out that I need to use firewire NTSC BASIC and I only have firewire NTSC? What would be the simplest, least expensive way t

  • Pap2 Issue when username contains @

    Hi, I'm unable to use my PAP2 because my voip provide uses a username that is my email address. The PAP2 is unable to sign in if the username contains a @ (I've tried with a friend account without the @ and it works) Is there a specific syntax to use

  • What does the bookmark bar do? How does it work?

    What does the bookmark bar do? How does it work?

  • Hi, How can import my forms into adobe in-design? or Adobe professional so I can continue populate them locally?

    is there a way to bring these forms into adobe indesign or adobe acrobat professional or nitro and make them editable/fillible so I don't have to recreate them from scratch?! please advice. thanks