Duplicate Orders.

Hi,
I have a report which displays no. of orders in staging(before comming in to SAP, between EDI and SAP) by Sold to and PO date. For Ex:
soldto  podate    no-of-orders
Walmart 20071001  10
walmart 20071005  25
If I put cursor on one of the above lines and by clicking the button 'Duplicate orders', it gives the details of the duplicate orders(6) by cust.ship to, po number and shipto.
cust.ship-to po number   shipto
15          105PO15  1055000015
15          105PO15  1055000015
15          105PO15  1055000015
16          105PO16  1055000016
16          105PO16  1055000016
16          105PO16  1055000016
Suppose if the first line has 6 duplicate orders and second line does not have any duplicate orders, then user wants me to display like the following.
soldto  podate    no-of-orders Duplicate Orders
Walmart 20071001  10            6
no second line - because no duplicate orders for this.
Please help me to solve this.
Thanks,
Veni.
* Initial Output to the Screen
    SET PF-STATUS 'NORM'.
    LOOP AT itab_output.
READ TABLE itab_kna1 WITH KEY kunnr = itab_output-sndprn BINARY SEARCH.
      itab_output-name1 = itab_kna1-name1.
      MODIFY itab_output.
      CLEAR itab_output.
    ENDLOOP.
    SORT itab_output BY name1 datum.
    LOOP AT itab_output.
      WRITE: /01 sy-vline,
              02 itab_output-name1,
              40 sy-vline,
              41 itab_output-datum,
              51 sy-vline,
              52 itab_output-orders,
              62 sy-vline.
      HIDE: itab_output-inpnr.
    ENDLOOP.
    ULINE: /(62).
  ELSE.
    SET PF-STATUS 'NORM'.
    WRITE: /05 '********* NO DATA FOUND **************'.
  ENDIF.
* Duplicate order details
FORM output2.
  SET PF-STATUS 'STAT'.
  SORT itab_output2 ASCENDING BY belnr inpnr.
  LOOP AT itab_output2 WHERE sndprn = itab_output-sndprn
                         AND datum = itab_output-datum.
    FORMAT INTENSIFIED OFF.
    FORMAT COLOR 2.
    CLEAR counter.
    LOOP AT itab_output2 WHERE belnr = itab_output2-belnr
                   AND inpnr = itab_output2-inpnr.
      counter = counter + 1.
    ENDLOOP.
    IF counter > 1.
      SELECT SINGLE * FROM edid4 WHERE docnum EQ itab_output2-docnum
                              AND segnam EQ 'E1EDKT2'.
      IF sy-subrc EQ 0.
        FORMAT INTENSIFIED ON COLOR = 7.
      ENDIF.
      IF itab_output2-inpnr = 'UNKNOWN'.
        FORMAT INTENSIFIED ON COLOR = 6.
      ENDIF.
      WRITE: /01 sy-vline,
              02 chk AS CHECKBOX,
              03 sy-vline,
              04 itab_output2-lifnr,
              20 sy-vline,
              21 itab_output2-belnr,
              42 sy-vline,
              43 itab_output2-vtext,
              72 sy-vline,
              73 itab_output2-inpnr,
              83 sy-vline.
    ENDIF.
  ENDLOOP.
  ULINE :/(83).
ENDFORM.                                                    " OUTPUT2
* Get data
FORM check_data.
  LOOP AT t_itab_edid4 WHERE segnam = 'E1EDK02'.
    MOVE t_itab_edid4-sdata TO itab_e1edk02.
    IF ( itab_e1edk02-qualf = '001' AND itab_e1edk02-belnr IN s_ponumb
                                 AND itab_e1edk02-datum IN s_podate ).
      ind = 'V'.
      itab_output2-sndprn = itab_output-sndprn = t_itab_edid4-sndprn.
      itab_output2-docnum = t_itab_edid4-docnum.
      itab_output2-belnr = itab_e1edk02-belnr.
      itab_output2-datum = itab_output-datum = itab_e1edk02-datum.
      EXIT.
    ELSE.
      CLEAR: itab_e1edk02.
      ind = 'I'.
    ENDIF.
  ENDLOOP.
  IF ind = 'V'.
    LOOP AT t_itab_edid4 WHERE segnam = 'E1EDKA1'.
      MOVE t_itab_edid4-sdata TO itab_e1edka1.
IF ( itab_e1edka1-parvw = 'WE' )."and itab_e1edka1-lifnr in s_shipto ).
        READ TABLE itab_edpar WITH KEY kunnr = t_itab_edid4-sndprn
                               expnr = itab_e1edka1-lifnr BINARY SEARCH.
        IF sy-subrc EQ 0.
          IF ( itab_edpar-inpnr IN s_shipto ).
            ind = 'V'.
            itab_output2-lifnr = itab_e1edka1-lifnr.
            itab_output2-inpnr = itab_edpar-inpnr.
            itab_output-orders = 1.
            COLLECT: itab_output, itab_output2.
            CLEAR: itab_output, itab_output2.
          ELSE.
            ind = 'I'.
          ENDIF.
          EXIT.
        ELSE.
          IF ( s_shipto EQ space ).
            itab_output2-lifnr = itab_e1edka1-lifnr.
            itab_output2-inpnr = 'UNKNOWN'.
            itab_output-orders = 1.
            COLLECT: itab_output, itab_output2.
            CLEAR: itab_output, itab_output2.
            ind = 'V'.
            EXIT.
          ENDIF.
          ind = 'I'.
        ENDIF.
        EXIT.
      ELSE.
        ind = 'I'.
      ENDIF.
    ENDLOOP.
  ENDIF.

I'd collect this information in an extra internal table.
Finally I 'd loop this table:
loop at ztab where duplicate_order > 0.
A.

Similar Messages

  • Refund for duplicate orders

    It looks like I have a duplicate order placed on January 30th. The order numbers are AD015563224 and AD015562812.  What do I need to do to get credit for one of the orders? Joe Basore

    Hi Joe,
    I can take care of that for you. I've canceled one and processed a refund. You should see that refund in your account in 5-7 business days.
    Best,
    Sara

  • Duplicate orders in atg

    Hi
    In my project we are having 10 members we all are using same shared data base
    How atg will create different orders for each users (means we are not getting duplicate orders. how ATG will manage to create different orders for individuals )

    This behavior will be observed only if the servers in question are in a cluster, correct ? What about the Scenario where there are two or more physical servers [One of them is SLM] accessing shared db? Is IDSpace still assigned as the servers are bounced or the id-generator will keep generating the ids as an when the requests come in from any given servers. So lets say a request from Server 1 was assigned id 1456 and if another request was from Server 2 it gets assigned 1457.
    Thank you in advance.

  • Actual template allocation duplicate order posting

    Hi,
    We recently upgraded from 4.6C to 6.0. We use template allocation to allocate overhead to our process orders at month-end. We are doing our first month-end since going live on 6.0. When we ran tcode CPTD (actual template allocation) it posted the debit quantity and value to the process order twice, and the credit value to the business process only once. Therefore, the CO document is out of balance. We then run tcode CON2 to revalue the postings at actual price. Because of this error, we have a remaining un-allocated balance in our business processes for this month. We also have incorrect costsallocated to our process orders. How do we correct program CPTD, and correct these postings?
    Thanks...

    Hi
    I am using environment 9 yes.
    My formula is very simple:
    On Object I have:
    SenderCostCenter = '130570' AND
    SenderActivityType = 'LABORA'
    And then I have simply put "1" in Plan Quantity and Actual Quantity.
    So what it does is it allocates the unit cost of the combination of cost center 130570 and act. type LABORA one time to each material/order no matter lot size.
    Should I perhaps have put "1" into the Plan Fix and Actual Fix instead?
    Thanks

  • Cancelling a duplicate Order

    While pacing an order of  $60, for 12 months, Skype Number, something unknown  issue happend and two orders are placed showing two orders each for $60 on my account as well as my card.
    I want to cancel one of the orders and want to keep only one.
    Can you please let me know how to cancel one order and ask for refund.
    Thanks.
    Solved!
    Go to Solution.

    I was abel to resolve the issue by contacting the support team via live chat, It was quick.
    Below are details to get to live chat, I found below details in one of the posts, Just in case if anyone else looking:
    Please contact customer service for assistance; here is a link to the instruction on how to contact Skype Customer Service via their secure portal: Contact Customer Service 
    As you know you wish to contact Customer Service, skip past Step 2 of the instruction and proceed to Step 3, Continue Support Request

  • How do I cancel a duplicate order on an electronic order?

    I ran into a bug in the Apple store which caused me to accidentally order the $107.91 iOS Developer Program twice. I don't have that much money in my bank account and I don't know how to contact anyone from Apple. Is there an email address or 24/7 phone number I can call? I've already tried 1-800-MY-APPLE and 1-800-692-2775, and 1-800-854-3680.

    "... order the $107.91 iOS Developer Program .."?
    By how much is the $107.91 developer program better than the $99 everyone advises?

  • HT1933 duplicate order of a ringtone

    i accidentally ordered a text tone twice about 5 seconds apart.  how do i and can i get reimbursed for the 2nd order of the same tone?

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Received wrong device. Duplicate orders.

    I preordered iPhone 6 Plus Space Gray 64GB on 9/12 by phone, didn't get email confirmation. 10 days later, I talked to a support, he told me my order "wasn't completed and went through fraud"(preorder went through fraud). Today, I suddenly received an iPhone 6 Plus Space Gray 16GB, not the one I ordered and clearly that in-completed order was completed.
    I've made another order online last week. How can I return this iPhone which I haven't paid for and cancel this order? Or, can I exchange it for a 64GB device to complete my second order?
    Thanks

        ztpala we apologize for the mixup and we'll make sure everything is sorted out! You can return the device using the return shipping label provided in the box or at any corporate store http://bit.ly/3SdsA within 14 days. Is the order you placed last week still processing? Check the status at http://bit.ly/RjmCUB
    AshleyS_VZW
    Follow us on Twitter @VZWSupport

  • Duplicate order.

    I have just placed an order for the iphone.  The first time I tried it the screen said  "sorry an error has occured".  The second time I tried was successful, however I got 2 confirmation e-mails with 2 confirmation #'s.  It appears I have ordered twice.  OUCH!!!!  Has anyone have this happen to them?

    rmwilson wrote:
    I have just placed an order for the iphone.  The first time I tried it the screen said  "sorry an error has occured".  The second time I tried was successful, however I got 2 confirmation e-mails with 2 confirmation #'s.  It appears I have ordered twice.  OUCH!!!!  Has anyone have this happen to them?
    Bigger ouch is that when they both fully process one of them will go through with Full Retail pricing, (unless you ordered already with full retail, then both will). 
    I haven't had that happen ever, but I imagine if you call Verizon customer service when they open and explain the situation they'll be happy to remedy it for you. Make sure that you have your order numbers infront of you and that if you did order at upgrade price that they take off the one that will hit at full retail. 

  • Duplicates order by count

    hello,
    Is it possible to see the records in order by the number of counts they appears in the database asc or desc?
    ID | Country
    1 | USA
    2 | UK
    3 | USA
    4 | HKG
    5 | USA
    6 | UK
    Result should return
    ID | Country
    1 | USA
    3 | USA
    5 | USA
    2 | UK
    6 | UK
    4 | HKG
    Thanks

    with ta
      as
         select 1 col1, 'USA' col2 from dual union all
         select 2 col1, 'UK' col2 from dual union all
         select 3 col1, 'USA' col2 from dual union all
         select 4 col1, 'HKG' col2 from dual union all
         select 5 col1, 'USA' col2 from dual union all
         select 6 col1, 'UK' col2 from dual
    SELECT * FROM ta
    ORDER BY
    COUNT(*) over (partition BY col2) DESCRavi Kumar

  • Duplicate EDI Order Check

    We occasionally receive duplicate PO from the EDI subsystem in SAP. We don't have the error check for PO no. while creating the order.
    I am trying to check this in user exit ZXVEDU03. I know I have to check for segment E1EDK02 with qualifier '001' . If the PO no. is found in VBKD, then the idoc is for the same PO. Now what should I do ? How can I prevent that idoc to be created ?
    Your help will be greatly appreciated.

    Hello, Just write the error message within this user exit that "Duplicate order should not be created" so this process would stop If we write the error message.
    Thanks.

  • Warning needed for duplicate PO numbers on sales orders

    Hi all,
    We are using SBO 2005A SP: 01  PL: 19.
    We need a warning when adding a marketing document (Sales Order) with duplicate reference number. Presently SBO has the functionality only works on AR invoice and AR credit note. We
    need a solution to also make it work for Sales Orders. We are getting many duplicate orders from our customer and we are ending up shipping them the same order more than once.
    So we thought of creating a formatted search and assign it on the reference field but I need a query to solve this.
    Can any one help on this.

    Hi Ram,
    You could use an alert or an approval to prevent this happening.
    An alert would be something like the following query:
    select
         T0.DocNum,
         T0.CardCode,
         T0.CardName,
         T0.DocDate,
         T0.NumAtCard
    from
         ORDR T0
    where
         T0.NumAtCard is not null
         and T0.NumAtCard <> ''
         and T0.CANCELED = 'N'
         and (select count(T1.DocNum) from ORDR T1 where T1.CardCode = T0.CardCode and T1.NumAtCard = T0.NumAtCard and T1.CANCELED = 'N') >= 2
    group by
         T0.DocNum, T0.CardCode, T0.CardName,
         T0.DocDate,T0.NumAtCard
    order by
         T0.CardCode, T0.NumAtCard, T0.DocNum
    Kind Regards,
    Owen
    Message was edited by:
            Owen Slater

  • Duplicate PPDS orders

    I currenlty see duplicate planned orders being generated by the system( as part of nightly heuristic job only on some days) in certain cases. These have been far and  few but I am having trouble understanding what may be causing this.
    When I go into the product view , I see Dependent Demand of 100, and 2 planned orders for 100 covering the demand of 100. this has happend for every requirement. The first planned order has a status of planned order NC(checked, fully confirmed) which is nothing but a planned order on which an availability check has been done. The second planned order does not have this status. When I try to manually run the product heuristic, the plan again adjusts itself by deleting these duplicate orders.
    Can anybody think of any reason why this may happen?
    Appreciate your help!
    Varun

    Varun,
    Please check in MD04 whether order is there or not?
    Run CCR if it is not there.
    Also check through /SAPAO/OM16 when this orders are created and correlate with your Planning run timing..
    Also check whether any other jobs are running at that time of creation of order  through sm37  and  check SLG1 log at the time of order creation .
    It will certainly give you some clue about the root cause of the problem.
    Manish

  • Cancelling duplicate and now pending orders

     I was trying to process one order tonight for $10.00.  I manage to get 3 additional duplicate orders all back to back.  I did not want 4 orders.  Please cancel this order all except one order.   Please respond as prompltly as possible.   
    These orders were placed in error due to not undrestanding your system.
    PLEASE CANCEL PENDING ORDERS.
    Thank you
    This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content. A link to this post appears where the post was originally added.

    I tried to buy credit - on two separate occasions, Skype told me it there was a problem with my card details and I needed to use another card.
    I eventually re-entered the SAME card and the payment went through the third time I tried.
    I have just found out they took 3 payments !!!
    The problem I now have is that I cant get a refund. The refund page asks me to start a live chat and then each time it takes me in a loop to the page that tells me to contact customer service or takes me to a dead link.
    PLEASE SKYPE REFUND MY MONEY. I dont understand how you can charge my card 3 times after telling me the card is not working.

  • Delete Duplicate rows in Data Package based on selection

    Hello experts,
    I have the data coming from Oracle using DB_Connect. The data has duplicate order no. I need to delete the duplicate rows in the data package based selection before updating the data target.
    I am thinking of writing this in updaterule start routine. I would greatly appreciate any sample code on selective deletion of data package rows.
    Thanks a lot!
    Sri

    Nagesh,
    Thanks for your reply.
    Do I need write this in Update Start routine?
    Another thing the order number field is coming from source system. Currently we are not mapping/assingning to InfoObject. In other words we are not seding order no to data target.
    In my query can I write something like this...
    DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE COMPARING DATA_Package-OrderNo
    Thanks a lot!
    Sri

Maybe you are looking for

  • Issues with Creative Cloud payment - Problemas al intentar pagar el abono de Creative Cloud

    La primera vez que adquirí el producto se realizó el pago, el segundo mes me llegó una notificación que no se había podido efectuar el pago, así que revise mi tarjeta de crédito y había cupo disponible, sin embargo la fecha automática de cobro ya pas

  • Safari, Mail and App Store not working after 10.9.2 update

    I've updated last night and after restarting my Mac several Apple apps stopped working. Safari When opening any page on Safari, the page gets reloaded several times and eventually just show something similar to the picture below. There's also that we

  • Problems displaying BO reports in an iframe in Firefox

    Hi, I have an aspx page which has an iFrame. I have provided the src for this iFrame as the BO report. When I open this page in IE, the report comes up properly. However when I open this page in Firefox, the report does not display. However if I open

  • Helvetica Neue not displaying properly

    I have a problem with Helvetica Neue in Indesign - at certain zooms the characters are different heights. Think this might be called 'hinting'. It's also a problem when exported to PDF and looks awful. The only solutions seems to be to use a differen

  • Unable to Start Weblogic Admin Server

    I am working on Windows environment with Weblogic 8.1 sp3 when I start the admin from windows services the service shows as started but not able to get to console and also I tried starting the admin server from the command line it just stays here...