Sales order line item cannot be rejected as service order has been archived

Iam trying to reject a line item in a sales order with a "AP cancel line item" reason, but it does not allow me saying that the service order does not exist. The service order has been archived earlier. Is there any solution or workaround of this problem ?

Program zz_clear_aufnr can be used to resolve this.

Similar Messages

  • Can sales order line item text be replicated into production order

    Hi
    Can sales order line item text be replicated to production order through standard PP configuration? If so how can it be done?
    If that is not possible through standard configuration then can it be possible to read both sales order line item information and production order information using a BAPI or a program?
    Please help me, i have been trying hard for this and also searches sdn for relevant posts but could not find any, I thank all people who can help me with some information on this.
    Regards,
    Jessica

    Sample code:
    DATA:
      wa_order_objects    TYPE bapi_pp_order_objects.
    DATA:
      it_order_header     TYPE STANDARD TABLE OF bapi_order_header1.
    *--Setting Flag to get details of BAPI
      wa_order_objects-header         = c_x.
      CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
        EXPORTING
          number           =  "Order number"
          order_objects    = wa_order_objects
        TABLES
          header           = it_order_header.

  • Cannot reject/delete sales order line item due to del.date in 2210

    Hi all,
    not sure if anyone else had this issue already....
    Situation :
    Sales order line item entered with delivery date in 2210.    We would like to correct this order but can't....
    every time SAP issues error :
    Error determining posting period (info
    S008, variant GL, RC 3)               
    I believe this is because we haven't maintained our calendars yet for 2210 :-D
    Question : without us having to load/define the calendar...is there a utility/oss program which we can use to delete the line item, or reject it...or even update the delivery date?
    Thanks for your help!

    If the system pop ups the error message M2012, then please refer note 10891 or 37532.  If the error message number is different, please update the forum.
    thanks
    G. Lakshmipathi

  • Sales order line item delete error for MTO sales order

    Dear Experts
    iam facing below error for MTO sales order line item deletion
    "For reasons of cost management, item 000040 cannot
    be deleted"
    Please help
    Regards,
    KEdar

    It looks you try to delete the sales order line item and you get this error message.
    Try to put reason for rejection for the line item and save the order. This is equal to deleting the line item.
    You can also refer the OSS note 14097 - Order item cannot be deleted/overwritten for further information.
    Regards,

  • Access control on Sales Orders - Line items

    Is it possible to control access to users from deleting line items in sales orders?
    (since Julius would reply saying a "YES" or a "NO" , i will complete my question )
    If it is feasible to control, could some one make a suggestion on how to do this and help me, please?

    Hi Manjula,
    Thanks for trying to help and for sending the link, but unfortunately, the link doesnt help me for my question.
    the discussion in the link you sent is more on the stock situations that is a mis-match in MD04, when a order line item is rejected then the stock of the line item should be refelcted in MD04 and since this doesnt happen the program was supposed to be eecuted for consistency ==> this was the issue in the link
    Now, coming to the problem on hand: If i create a sales order with 25 line items and make a delivery of 22 line items , do a PGI for the 22 and then , i check for the other 3 line items in the Order, realize that the schedule lines in the order are for a date that doesnt meet the date of goods issue of the other 22 items - i delete the 3 line items in the order <== this is what i want to restrict, users shouldnt be able to delete line items of a order that has a subsequent document.
    I know i can manage doing this via ABAP based on a few validations on the document flow, but i wanted to know if there is an alternate method of achieving this.
    I vaguely remember a situation where i had a user who couldnt enter line items in Purchase orders although he had all required transactions, org,values.......after much research and quite a few trial and error methods i got to a solution by adding/deleting (i dont remember corretly) a parameter value to the user and he could add line items. The curiosity i have is in knowing if there is some parameter value or an other Authorization object, that could help me achieve my objective
    Although it could be efficient, ABAP would be my last option
    Do keep posting, any help is good help

  • Sales order line items delivery cancelled but still appears in MD04.

    Hi PP Gurus,
    In the sales there are 6 line items are there out of which for 1 line item delivery and PGI happened. And for remaining line items delivery got cancelled, but these line items for which delivery cancelled appearing in the MD04, I have rejected the sales order line items but these line items still shows in MD04. Please advise how to remove these line items from MD04.
    Thanks and Regards,
    SHARAN.

    Hi
    Pl refer SAP Note : 1166713 for the Problem which says " You have posted goods issue and therefore the delivery requirements should no longer be existing. These inconsistencies can be seen using report SDRQCR21"
    Regards
    Brahmaji

  • Update Sales Order line item field

    Need to update a field mfrgr of VBAP table with some user defined values on selection screen parameter.
    I have selected all the Sales order line items in an internal table which need to be updated.
    How can I use the update command with set expression to do the same ? If yes how ? if no what is the best way to do the same.

    I am using the following command and it doesnt work as it says cannot use AND command.
              loop at it_vbfa.
                    UPDATE  VBAP
                    WHERE VBELN = it_vbfa-vbeln
                    and   posnr = it_vbfa-vbelv
                    SET MFRGR = P_MFRGR.
                    IF SY-SUBRC = '0'.
                       COMMIT WORK.
                    ENDIF.
              endloop.
    Any pointers ? What am I doing wrong.

  • Material Variant configuration in sales order line item from Ztable

    Hello Experts,
    we have configurable material and and creating sales order. from sales order line item if we goto configuration we can maintain variant configurations. My requirement is that when i click on configuration after selecting a line item i need to check ztable where i have material no and and relable text. if an entry exists i have to populate this relable text in one of the configuration filed. Can any one help how can i read and update configuration in sales order level and where to do this coding so that when i click on configuration the value from ztable populated in a field.
    Many thanks in advance.

    Hi Senthil,
    It is simple.
    When you create a characteristic which should have the value maintained in the Z table, go to the tab values. Here you have a push button called "Other Value check". Here you click this button and select the function module option. Now, in the window, you will have a place where you can mention the name of teh function module.
    You create a function module with the help of your developer to find out the text maintained in the Z table using teh rules you have in your mind and update that logic in the characteristic. In the earlier screen, you just have to mention the name of the function module, thats all, your work is done.
    Now when you configure, for this characteristic, the value will be automatically determined using teh function module. You have to create such characteristics as "Not ready for input" ones in additional data for which you cannot enter values manually.
    Hope this helps.

  • Sales order line item check based on material status

    Hi
    I have the following requirement
    There are Distribution chain specific material status maintained in the material master ( Sales Org1 View). Now for some of these statuses we need to reject these items in the sales order @ line item level. A reason for rejection needs to be assigned for these line items.
    Is there any standard setting or a user exit is required. I believe user exit save_document_prepare could be used to carry out these checks & assign a reason for rejection. Pls suggest asap
    Thanks
    Ramesh

    Dear Ankit,
    The difference between reason for rejection and delivery block is,
    Reason for rejection you can find this field at header level and line item level, the use of this is once you mention any reason for rejection the TOR or Schedule line not been confirmed for that material,so that the material can be confirmed to another customer.
    If you set delivery block the material for sale order in case if the material not available it will rise TOR or if available it will confirm the schedule line and block the material for that customer or sale order.
    This is the major difference between two.
    Regards
    Ram

  • Sales Order Line Item Details

    Hi Experts,
    Is there anyone knows in what variable or table does the line item number of the selected sales order line item after selecting any commands in Va01 transaction?
    Points will be rewarded...
    thanks in advance

    Most likely in the user exits you cannot know what line has been selected on the screen. Normally VBAP-POSNR has the line number of the line being currently processed, but it's not the same line that user selected (i.e. clicked on) on the screen.
    I think you can only get this information in the screen's PAI (I might be wrong though). If you need to pass this information further you could fill in a global variable in the screen's exit and then use it later in other user exits.

  • First Date on sales Order Line item problem

    I am having a problem with understanding why am I getting different First Date at the line Item every time I create an order using VA01.
    Our lead time for order type OR is set to 3 days in the TVAK table and field VLAUF.
    If I go to VA01 and enter a sales order OR, the date should be today's date (04/02/2014) + 3 work days = 04/07/2014 because 04/05/2014 is a Saturday.
    Today when I calculate the order it brings in the first date as 04/05/2014 in some cases.
    But if I put in the Sales Org in the VA01 screen along with the order type OR, the first date comes in as 04/07/2014.
    Can someone please  explain it?

    """""Users may or may not enter the sales org when creating an order"""""
    You cannot create a sales order without the sales organization.....
    Even though you missed system will always redetermine after entering the Sold to party number in sales order from your master data...
    Phanikumar

  • Third Party GRN Posting Date to be Copied to Sales Order Line item Billing Date

    Hello Experts
    I have a client requirement where in they want to bill line items in the sales order ( third party process ) to the end customer in sync with the GRN posting dates happened in the PO
    For EG if GRN happened on 1st July 2014 then Billing Date should come in as 31st July 2014 so when they execute VF04 giving from and to dates as 1st july to 31st corresponding sales order can be invoiced
    Actual problem is for suppose if i create a sales order in the month of june say 26th basing on the factory calendar setting and invoicing list maintained in the customer master system defaults the billing date to 30th June 2014 , and the same when user runs VF04 from 1st June to 30th June this sales order shows as due and mistakenly end user invoices the customer ( whereas logical GR would have only received in July 1st )
    My requirement is similar to below threads but i am unable to find answer how to copy GR Posting date to Billing Date of the sales order line item
    use GR Doc date as billing date
    3rd party sales process (w/o ship notif) - Billing

    Hi Lakshmipathi ji,
    As my requirement is to update the billing date at the sales order line item level , As a process user goes in executes VF04
    For Ex
    Sales Order Created Date is 1st June 2014 then System Defaults Billing Date at line item to 30th June 2014
    Now when i do GRN suppose on 1st July 2014 for that line item , system should trigger a code where in check the posting date of the GRN and override the same in the Biiling Date field of the sales order line item
    So when VF04 is run for a month All the GRN which are recieved in the month of July are invoiced in July
    Please share me your thoughts do we need to check any userexits from MM side which reads the posting date of GRN and then copies in to my third party sales order
    Regards
    Hiba

  • How to upload sales order line items?

    SAPGurus,
    For years my customer service department has been asking for a way to upload sales order line items into the VA01 sales order-entry screen.
    Many of our customers submit PO's with huge amount of line items, up to 1,000 lines. Our CS reps need to key in the data line by line (or copy/paste
    approx 17 lines at once from Excel into the VA01 screen), and we are looking for a way to make this process leaner. One idea we have is that user creates the order header, and then has a way to upload the material numbers and quantities in a separate (newly created Z-transaction) screen in one go.
    Obviously rules then need to be built that deal with the various pop-up messages related to e.g. ATP, material status, etc.
    Does anyone have any experience or thoughts on how we could achieve this? A way to make the sales order-entry process a bit less time-consuming? Any feedback would be greatly appreciated !
    Thank you,
    RVS

    Take the inputs from this Blog created by  SUNIL PILLAI                   
    Sales Documents upload  using Standard Direct Input Program in LSMW
    G. Lakshmipathi

  • Need to Split Sales Order Line Item in VA01

    Hi,
      I have a requirement in which i have to split an order line item for KMAT materail number. system popup configurable screen, here all the required characteristic values have to be selected as per the customer requirement.
    After entering all the required customer specific characteristic values, system determines batch automatically. If characteristic values of the Batch matches with the characteristic values of configurable screen selected in the sales order
    Here also we have to check the sales Order Quantity (VBAP u2013 KWMENG) and order Confirmed quantity (VBEP u2013 BMENG), if the both the quantities are not same, consider order has partially confirmed.
    If Order quantity is partially confirmed, check for the batches with the same characteristic values of the quotation configurable screen and if batch found, system has to create a one more line item and new batch has to be assigned to create line item.
    Reduce the order quantity equal to the confirmation quantity in the first line item.
    Create a new line item in the quotation, copy all the remaining unconfirmed quantity from the first line item and also copy all the characteristics and properties (item category, schedule line category, business data, item data, and requirement type) and assign the batch to the new line item. System does the availability check automatically and confirms.
    In another scenario system doesnu2019t find batch, in this case capable to promise has to trigger directly.
    Here we have to check the Order confirmed quantity, if confirmed quantity is equal to zero.
    Change the item category of the line item, due to which system determines different Requirement type and schedule line category.
    Based on the Requirement type system triggers the capable to promise.
    I would lke to know which is the suitable user eixt or BADI to split the line items and what all the tables or structures i need to populate in order to create a new line item successfully.
    I have seen many post in sdn but no body gives the right user exit name where i can add new line item.
    Regards,

    Hi Amit,
      Thanks for your reply. In this scenario configurable material is involved. And first Make to Stock scenario is executed to check any material with customer entered characteristics are avialable. If its so it will determine its batch and assigned the quantity.
    If zero quantity is assigned or no quantity is assigned then I have to trigger the Make to Order scenario for rest of unconfirmed quantities in order.
    I have check it in USEREXIT_MOVE_FIELD_TO_VBAP but it was of no use. I even tried in USEREXIT_CHECK_VBAP but still no result. I am not sure what all the tables and structures i need to populate there.
    Regards,

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

Maybe you are looking for

  • Preview app and Spaces not working

    I use Spaces with a 2 row 3 column grid, for a total of 6 spaces. I assigned Preview to Space 4 - the lower left space. Every time I double click to open a screenshot png that resides on my desktop, Spaces moves to Space 6, while opening Preview in S

  • How to link JE with A/R invoice

    I have generated an A/R invoice. After generation I want to give some discount to customer, so I generated a JE for discount. I want in customer ageing report the outstanding amount as bill amount less discount. How this can be done. Is there any way

  • XML import = missing entities (common HTML tags)?

    I have a very simple XML doc, mostly text, but with common HTML tags (nbsp, for example). Upon import, I get an error for several of these tags - "Entity _____ was not found." These are common HTML characters - what can I do so that InDesign recogniz

  • Master data load failed due to duplicate records .

    hello friends , need some help . I am loading the master data from soruce sys , and it is throwing error of duplicate 56 records. I repeated the step , but found the same error once again . i could not find out the duplicate record , as thr are more

  • Data change in a cube

    Hi, I've a situation. My company has a BI reporting system in place with mutliple cubes & ODS storing the demand & billing & all other data, with periodic loading taking place. Now due to some organizational changes, some (approximately 100) of the c