Repair orders using SD_SALES_DOCU_MAINTAIN

Hi all,
I'm trying to use the FM 'SD_SALES_DOCU_MAINTAIN' for creating repair orders. On runing the progrma i'm getting the following error message <b>'Only quantity 1 AU is allowed (Item 000010)'</b>.
I'm attaching my code here. If any one has worked on this FM before kindly guide me.
REPORT  Z_REPAIRORDER_CREATE.
DATA: header_data         TYPE vbakkom,
      header_datax        TYPE vbakkomx,
      header_out          TYPE vbak.
DATA: item_data           TYPE vbapkom   OCCURS 0 WITH HEADER LINE,
      item_data_out       TYPE vbap      OCCURS 0 WITH HEADER LINE,
      item_datax          TYPE vbapkomx  OCCURS 0 WITH HEADER LINE,
      partner_data        TYPE vbpakom   OCCURS 0 WITH HEADER LINE,
      return_data         TYPE bapiret2  OCCURS 0 WITH HEADER LINE,
      schedule_data       TYPE vbepkom   OCCURS 0 WITH HEADER LINE.
DATA: v_menge_g           TYPE vbapkom-menge_g value '1',
      var                 type vbapkom-zmeng   value 1.
*----Header data
header_data-auart = 'ZCOS'.
header_data-vkorg = 'SIPL'.
header_data-vtweg = '60'.
header_data-spart = '20'.
header_datax-auart = 'X'.
header_datax-updkz = 'I'.
header_datax-vkorg = 'X'.
header_datax-vtweg = 'X'.
header_datax-spart = 'X'.
*----Item data
item_data-posnr   = '000010'.
item_data-matnr_g = '000000000148670245'.
item_data-menge_g = v_menge_g.
item_data-zmeng   = var.
item_data-zieme   = 'LE'.
item_data-matkl   = '138'.
item_data-werks   = 'MUM3'.
APPEND item_data.
item_datax-posnr   = '000010'.
item_datax-updkz   = 'I'.
item_datax-matnr_g = 'X'.
item_datax-menge_g = 'X'.
item_datax-zmeng   = 'X'.
item_datax-zieme   = 'X'.
ITEM_DATAX-MATKL   = 'X'.
item_datax-werks   = 'X'.
APPEND item_datax.
*----Partner data
partner_data-posnr = '000000'.
partner_data-parvw = 'AG'.
partner_data-kunnr = '0000680818'.
APPEND partner_data.
CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'
  EXPORTING
   i_vbakkom                       = header_data
   I_VBAKKOMX                      = header_datax
   WITH_COMMIT                     = 'X'
   I_CALL_BAPI                     = 'X'
   SUPPRESS_AVAILIBILITY_DIA       = 'X'
   STATUS_BUFFER_REFRESH           = 'X'
IMPORTING
   E_VBAK                          = header_out
TABLES
   IX_VBAPKOM                      = item_data
   IX_VBAPKOMX                     = item_datax
   IX_VBPAKOM                      = partner_data
   RETURN                          = return_data
Thanks in advance
Warm regards,
Roshan Basheer

Hi vijaya dasu,
Thanks for your reply; but 'LE' is the internal format for sales unit 'AU'.
Regards,
Roshan

Similar Messages

  • Repair Order using BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
      I am creating a Repairs order using the above BAPI, but it does not provide the functionality to add Servicable Material and Repair Information.
      there was a similar forum where it was mentioned to use 'SD_SALES_DOCU_MAINTAIN', I am not sure where to pass this info and if this FM is safe to be directly used..
    Regards,
    Kaustubh.

    Hi Kaustubh,
    We are using 'SD_SALES_DOCU_MAINTAIN' to create the Repair Order and its working fine for us. We came at this conclusion only after extensive testing and debugging the standard BAPI.
    The material vbapkom-matnr is 'REPAIR' in our case. You should check with your functional person about the same.
    You need to populate the vbapkom-zmeng (quantity).
    The servicable material field is vbapkom-matnr_g which is the actual material that needs repair.
    You also need to populate the vbapkom-menge_g which is the servicable material quantity
    Apart from this you have to populate the schedule line table vbepkom, partner table vbapkom and header structure.
    My call looks like this       CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'
            EXPORTING
              i_vbakkom                 = wa_vbakkom
              i_call_bapi               = 'X'
              suppress_availibility_dia = 'X'
              status_buffer_refresh     = 'X'
            IMPORTING
              e_vbak                    = wa_vbak
            TABLES
              ix_vbapkom                = lt_vbapkom
              ix_vbpakom                = lt_vbpakom
              ix_vbepkom                = lt_vbepkom
              return                    = lt_bapireturn
              ix_text_header            = lt_text_head.
    Do let me know if you need any other information.
    Regards,
    Shubham
    P.S.- You can also use the standard BAPI for doing this. But in that case you have to append fields matnr_g and menge_g to the item table vbap and then populate the extension table 'EXTENSIONIN' of the standard BAPI BAPI_SALESORDER_CREATEFROMDAT2.

  • Service order creation using bapi with repair order number

    Hi experts,
    Pls suggest me a BAPI to create a service order for those repair orders where a PGR has been done(for return delivery type : LR).
    The plant should be 0260 with storage location wh01 and item category ZRRE
    Creation of a service order with repair order type SM03 is not allowed in iw31.
    thanks and regards,
    Vijayb.

    Hi prakash,
    Thank u for the BAPI
    But an error is being displayed saying that the REFURBISHMENT ORDERS CANNOT BE PROCESSED USING BAPI.
    ERROR DURING PROCESSING OF BAPI METHODS.
    This is while u pass the order type as either ZM03 or SM01or SM02 or SM03.
    pls help me on that.
    thanks and regards,
    Vijayb.

  • CRM 7.0 Repair Order: goods receipt against order stock

    Hi gurús,
    We are implementing CRM 7.0 Service and one of our business processes is Repair Order. We have done almost all customizing following Note 806768.
    We have our repair orders replicated in ERP, where logistics processes take place without problems as far as we do not set special stock indicator to order stock at level item, therefore receiving and issuing products to be repaired into unrestricted stock. Processes are correctly updated in CRM.
    The problem comes when we try to use order stock, as mentioned in SAP Help. Return to repair enters into unrestricted stock, even though it is supposed to entry order stock, with movement 653-E (Schedule categ. IR). When we try to deliver repaired product, movement 601-E (Schedule categ. IA), we are getting errors, since there is no order stock, and return and deliver are managed with two different item positions.
    I suppose this is a logistics issue, not a CRM problem, but I would like any advice in case anybody has already dealt with it.
    thanks in advance and take care.
    Pablo

    What resolution did you get for this issue? Did you do an enhancement?

  • BAPI_ALM_ORDER_MAINTAIN is suddenly creating Repair Order Reservations

    Hi,
    I am seeing a Material Reservation getting created for a Follow-Up Material on a Service Repair Order when using the function module BAPI_ALM_ORDER_MAINTAIN. We have a Custom application that uses this BAPI and it seemed to be working fine until last week when we applied a Serivice Pack. I think it has to do with the Parent Material is desiganted as a Discontinued Item in the Material Master and has the Material as a Follow-up Material value. I am just curious as to why this was working prior and if anyone knows that this might have been changed in the Service Pack and if maybe there is an OSS nOte that might apply or if this is just STD SAP logic?

    solved deleting some implemented by customizing
    and re-create there check by program

  • Billing issue with repair order(RA)

    Dear Experts,
    I am getting the following two errors while processing a repair order type RA for product swap (no repairs),using 101 Accept repair stage in repair procedure for creating a credit memo (as per client's req).
    Is tehre a work around, please suggest.
    Error 1: 0196000023 010000 Billing not possible because repair is not yet completed
    Technical data
        Tech. data details
         Client                                 100
         Group Number
         Sales Document Number                  0196000023
         Item Number of the SD Document         010000
         Schedule Line Number                   0184
         Counter in Control Tables              00
         Message Identification                 VF
         System Message Number                  184
         Output Type                            E
         Message Variable 01
         Message Variable 02
         Message Variable 03
         Message Variable 04
         Group Type                             F
    Error 2: 0196000023 020000 The item is not relevant for billing
       Technical data
      Tech. data details
      Client                                 100
      Group Number
      Sales Document Number                  0196000023
      Item Number of the SD Document         020000
      Schedule Line Number                   0044
      Counter in Control Tables              00
      Message Identification                 VF
      System Message Number                  044
      Output Type                            I
      Message Variable 01
      Message Variable 02
      Message Variable 03
      Message Variable 04
      Group Type                             F

    Dear SAP Experts,
    We are implementing SAP CS for our customer and I faced the same error while Billing the Repair Order. I had made an error in assigning the Transfer of Requirements correctly to each of the item category in the Repair Order.
    By SAP standard, the status of the main item of the Repair Order will be changed to "Repaired" as soon as the Service Order is Technically Completed (TECO).
    I had wrongly assigned the same Requirement class to both the main item and also the repair item. So the system was expecting there were 2 service orders created for the main item and the repair item. So when I TECO'd the actual Service Order, the main item status was changed to "Partially Repaired" and not "Repaired".
    So I corrected the Requirement class, and assigned the class SE to the main item and the copy of Requirement class 204 to the repair item.
    This solved the issue and once the service order is TECO'd the status of the main item in the Repair Order changed to "REPAIRED".
    Then I was able to invoice the Repair Order without any issue. So please check the requirement classes assigned to each of the sub-items in the Repair Order.
    Thanks,
    Siraj

  • Repair Order Process - o/b delivery from PO, need copy routine

    Hi Experts,
    We are configuring repair order process and while creating o/b delivery to Vendor from PO, need to check for GTS message and should be blocked that document for further processing in ECC. For SO to o/b delivery working fine using include program RV50B901 (routine 901, document type OR to LF, item category TAN). It is copy of 101 routine and added GTS code to block the documents in ECC if GTS is blocked for compliance checks.
    For o/b delivery from PO, document type NB with item category L (subcontracting but in copy control, I don't see LB to NB rather LB to DL. Is it correct? I put a break point in routine 901 but it is not hitting that routine. Where can I look at to find correct routine to include GTS code?
    I really appreciate your reply.
    Regards,
    Manohar.

    Hi Manohar,
    This is not really a GTS question, is it?  You should ask in the MM forum.
    Regards,
    Dave

  • Change Higher Level Item of the Sub-Item in Repair Order

    Hello
    We have a in-house-Repair order created from Compliant.
    This repair order has main Line Item of type 'Repair Request' having Item no 1000.
    From this Line, we are creating new main lines 'Return for Repair' 1001
    and 'Diagonsis' lines 1002 through Actions(appearing as buttons on the Items Assignment Block).
    Both these lines have Higher Level Item as 1000.
    From the Diagonsis 1002 line, we are generating new Debit Memo line 1003(higher as 1002 ) by selecting a new button . This is billable and to be charged to the Customer in ECC.
    How do I change the Parent/Higher Level Item value from 1002 to 1001(Return for Repair) for charging the Customer.
    I found an action used for generating the Debit Line in CRM.
    Please advice on how to achive this functionality.. Is this possible ?
    Cheers
    RJ
    Note: I am new Tech Guy in Service area.
    Edited by: Remo J on Jul 30, 2011 11:00 PM

    Hi Remo,
    Did you implement the in-house repairs completely?
    Did you also work on ECC billing and controlling integrations?
    would really appreciate your response on this.
    Regards,
    Itisha

  • Issue in Repair Order

    Hi Guru's,
    I am replicating the repair order scenario. I am trying to create repair order of document type RA and i did the configuration setting for item category IRRS to be coming for repair order.
    In this scenario, System is throwing the error material does not exists for the plant. But this material is used so many times. I doubt that there is some issue in repair procedure (t-code--vorp). and what is the right item category(is it irrs or irrp or any other.)
    in this scenario i am creating repair order and creating return delivery so that the stock will be coming to my plant for repair. I am not giving any loan item to the customer. Please let me know what is the right requirement type and requirement class.
    Please suggest the solution for my repair scenario.
    Thanks,
    C Chaitanya
    Message was edited by: G Lakshmipathi
    Please use the subject effectively and avoid using "Please Help", "Urgent" etc.

    Hi Santosh,
    Thanks for the reply. My scenario is I am getting the material from customer for repair. So I should create repair order w.r.t service notification. After creating repair order, I should create return delivery (LR).
    In this scenario i don't have service material. If material no 1808 is delivered to the customer, I need to get the same material back to the plant for the repair.
    If IRRS is not the right item category what is the right item category.
    I dont have any serviceable item. In my scenario IRRS is not serviceable item.
    What should be the setting for VORP (Repair processing). Any idea?
    Is this configuration is right? Please suggest.
    Thanks,
    C Chaitanya

  • Automatic Service Order creation and OBD line item creation - Repair Order

    Hi ALL,
    I tried to run the Repair process based on the help document of SAP:
    Configs Followed:
    1) In Material master MRP3 view, strategy group is assigned as 84 (service orders). By default this str.grp is linked with Requirement type SERA and Requirement class 203.
    2 ) Requirement class is assigned with appropriate Service order type.
    SPRO>Sales and Distribution>Basic Functions>Availability Check and Transfer of Requirements>Transfer of Requirements-->Define Requirements Classes (OVZG)
    Actual Assignment:
    Reqt. Class Service Order Type
    039 SM01
    203 SM01
    3) Task list is assigned to your Service material - Service product - OISD
    Actual Assignment:
    Service Pdt Work Centre Plant B Area Gen TL Group Counter Task List Type
    R-1001 PC-SERV 1200 8000 62 1 A
    4) Check the Requirement class setting indicator for configuration (cnfg)
    Actual Assignment:
    = mandatory
    5) SPRO>Sales and Distribution>Basic Functions>Availability Check and Transfer of Requirements>Transfer of Requirements-->Define Requirements Classes --> Determination Of Requirement Types Using Transaction
    Actual Assignment:
    Item Category Reqt class Reqt. Type
    IRRS 039 SE
    IRRE 203 SERP
    IRRP 203 SERP
    IRAL 040 KE
    6) Sales and Distribution>Sales>Sales Document Item-->Assign Item Categories for determining the item category based on usage
    Actual Assignment:
    Sal. Doc. Type Item Cat. Group Item Usage H. L . Item Cat Item Category
    RAS NORM IRRS
    RAS NORM R101 IRRS IRRE
    RAS NORM R102 IRRS IRRP
    RAS NORM R103 IRRS IRAL
    Errors Faced:
    1. Service Order is not getting created automatically.
    Error in SAP - IDES :"A service order has not been found for action 'Repairs'"
    2. Also im not getting the automatic creation of the 4th line item(Item Category - IRAL) in the repair order, which in turn stops me from creating the Outbound delivery.
    Please HELP !
    Regards

    Hi PeteA,
    Sorry, here it is...
    Let me explain the process that has been followed:
    1) Initially to start with Service Notification was created with IW51 T-code.
        In that, Sold to party and material # were entered. Then from there directly i go for Create Repair Order from the Action Box.
        Order type for repair order - RAS, and when i save both Service Notification and the Repair gets saved.
        Now, in the repair order, two line items were getting created automatically and the requirement Types for those line items are:
        Line Item I : SE
        Line Item II: SERP
    2) After that i take the material in with the help of t-code VRRE.
    3) Then, i do the acceptance of the stock ( Technical Check) with t-code QA11.
        Once i do that, i get the Third line item in the Repair Order and the requirement Type for that line item is:
        Line Item III: SERP
    Now my query is, Once i do the QA11 transaction i need to get a Service Order automatically but thats not happening.
    Also if i create a Service Order manually, and do the repair and do the technically completion of the service order, then i need to get a third line item (IRAL) in the repair order automatically and thats also not happening.
    Regards

  • How to send replacements in Repair Order in SAP CS

    Dear CS Experts,
    We have a scenario where in we need to send replacements before repairing the returned goods. I have maintained the Repair Procedure as below and maintained all the item category customizings. But when I try to add this manual step of "Send Replacement", the system is not creating a replacement item for the outbound delivery.
    I tried to automate this step by setting the "Automatic" flag, then the replacement item is generated by default. But then the system is not determining that this item is Delivery relevant. I had maintained all delivery relevant settings and also the copy control settings for delivery. Still I get an error saying that there are no delivery relevant item.
    So I was just wondering how can we send replacements after the initial step of repair goods receipt. Any help is highly appreciated.
    Send Replacement will actually create a Outbound Delivery item or it has to be achieved using a different movement type. Please help!!!!
    Thanks,
    Siraj

    Dear CS Experts,
    I think I have sorted out the issue.
    I changed the Repair Procedure as below.
    1. I create a Repair Order and enter 4 goods to be returned.
    2. I want to send 1 replacement item.
    So I add this manual step in the repair scheme for 1 item to be replaced.
    3. So the replacement item is created. The mistake I was doing initially was that - I was trying to do this manual activity after the return delivery. After return delivery, the repair procedure has already gone to the next step of Start Repair. Hence this replacement FLAG was not showing.
    4. Now I do the return delivery of the 4 goods.
    5. I trigger the outbound delivery of the replacement item. The issue with the Outbound Delivery before was that - I have not assigned the correct Schedule Line Category to the replacement item category. I assigned the correct Scheduled Line Category as IA. Now the system allowed me to create outbound delivery without any issue.
    In the outbound delivery I mention from which storage location this replacement item should be picked from.
    6. After the outbound delivery of the Replacement Item - now I see the correct figures in the Repair Scheme.
    From now I can proceed with the other steps successfully.
    So to summarize - these are the steps which needs to be checked for Replacement Item Delivery
    A. The Replacement Item Category should have the Scheduled Line Category IA assigned.
    B. Adding the Replacement Step should be done before the Returns Delivery (with the repair procedure settings which I had).
    I could sort out the issue now with the above two settings. I hope this could be helpful for others who are trying to sort out the same issue.
    Thanks,
    Siraj

  • Creation of Repair Order (SD with reference to a Service Notification

    Hi,
    I hv a requirment to create a Repair Order(Sales Order) with reference to a Service Notification when a Purchase Order arrives via EDI / interfaces using CIP2SAP ( EXITS OR BADI ).
    Pls suggest, if there are  any user exit(s) to meet this requirement.
    Thanks in advance
    Regards
    Anand

    if you want to have you can use the FM ALM_ME_GOODSMVT_CREATE
    hope it helps

  • Return Delivery for In-House Repair Order

    When I create an In-House Repair order in CRM and replicate it to ECC, the return delivery does contain the special stock indicator "E", hence the stock is posted to unrestricted.  This only happens with replicated orders.
    Any ideas?

    Hello Peter,
    Regarding Posting of Goods Issue for Spare Parts in SAP R/3 Materials Management,
    The data posted depends on the logistics scenario(s) that you use. The system therefore first determines the logistics scenario defined for the combination of transaction type, item category, service organization, and other relevant information required for the scenario (for example, movement type or special stock indicator in SAP R/3).
    Availability information informs you whether the service parts are currently in stock. Each service part item generates a reservation in the back end system, which can be used to trigger an early procurement process.
    To know more about the same refer the below link:
    http://help.sap.com/search/highlightContent.jsp
    http://help.sap.com/saphelp_crm50/helpdata/en/cb/f876d513c56e4e864c15517ff67e92/frameset.htm
    Hope this helps!
    Thanks and Best Regards,
    Shanthala Kudva.

  • Ek01 / EK02 Ist & Plan Cost in Repair order

    Hello Gurus,
    I´m working in Customer Service. I generate a service order automatically from a sales order item. My service order is copied from Standard SM03. After Confirmation IW42, I perform a DP90 in order to transfer all costs & articles used in the repair process to my sales order...... but now I have a doubt:
    --> Where are transferred the cost?? Do I need a EK01 or EK02 pricing conditions??. If yes, how I should define them in my pricing procedure?.
    --> In my service order I find automatically a task list...... when I generate my service order automatically is determined the pricing condition EK02(planned cost) in my sales order.... THat is normal???
    --> Should my EK01 (Ist cost) after the DP90 be informed?? Till now is always 0!
    Thanks a lot for your help!!! Any idea will be great!!

    Hello PeteA,
    Thanks for your idea!
    I´ve not informed the required values in ODP4..... Should I do it??? Ek02 is informed automatically although I´ve not included in ODP4....
    The process is like this:
    --> When I create my new item type IRRP iin my repair order RAS in order to create in background the Service Order automatically the price condition EK02 is informed. (I´ve defined EK02 in pricing procedure Manual & Statistical). Ek02 has the value of the plan Cost of the hours required for the repair process (Only 1 Task in my task list, for example Inspection 1 Hour, Plan Cost 70 euros).
    --> After confirmation of my Service Order IW42 , I perform dp90 but EK01 is not informed.....
    Any other Idea???
    Thanks in advance!!!!
    sapmcw

  • Depot Repair Order Flexibility after SO created

    Hi everyone,
    I have a client who's looking into using the Depot Repair functionality to handle all returns.  What we're finding so far is that everything works well so long as you know what you're going to do with the material before you create the service notification.  We need to be able to receive the material back in before we decide if we're going to repair it, replace it, or just credit the customer.  The Notification type creates and drives the SO processing.  W/in the SO, the item categories seem to be driving the returns subline, the repair subline, and the outboud delivery subline.  I thought perhaps we could change the item cateogories in order to control subsequent processing (ie, before the return is actually processed in VL01n, update the item category on the return to reflect an item category for return for replacement vs return for repair, etc. but the item categories are protected in the SO. 
    Does anybody have a better way of being able to provide the flexibility of determining the type of processing after the Service notification has been created?  If not, does anybody know how to "unprotect" the item category fields so we can update them manually?
    thanks for the assistance,
    Christie
    Edited by: Christie Monacos on Aug 4, 2010 3:53 AM

    Hello Christie
    I am not a CS specialist, but my current  role affords me the opportunity to provide some thoughts. Here the repair process has been automated to 2 distinct stages: a) Receipt and b) Inspection and repair,  to  create multiple documents  and even objects ( Equipment if required) from Service, Sales, Logistics, and Inventory Management perspectives.
    1) For one you can divide the service notifications into 2 types: a) Customer facing, and b) Internal (fault) Notification.
    2) When you receive you can have 3 types of dispositions: a) Review receipt, b) Return for Repair and c) Exchange at Receipt. If all information is available, in case of the last  2 dispositions, the following documents are created:
    a) Equipment if serialized
    b) Customer facing notification
    c) repair order
    d Inbound delivery
    e) Material  document for movement into stock
    f)  service order/s
    g) Internal Fault Service notification
    3) The first one, Review receipt is used when there is not enough information to create a Repair order. At that time the documents created are: a) Customer facing notification, b) Equipment u2013 if serialized, c) Goods receipt material document.  A task is added automatically to the notification for administration action and/or follow up with the customer.Once all info is available, the remaining documents are created using the reference of  Customer facing notification.
    4) Thus the repair order created will have requisite sub-lines, e.g. Return, Exchange, Repair etc.
    So I believe you need to follow the business  process as it happens in SAP.
    Hope this helps. Let me know.
    4)
    4) Once information becomes available, all other documents created.

Maybe you are looking for

  • Batch job - Delivery creation

    Hi all, Here in my project there are so many batch jobs ruuning.Deliveries are created manually and through batch job also A delivery was created manually.A particular delivery output type was not pulled in the delivery since we did not maintain the

  • Trying to publish to Flickr and get code error 4, document is empty?

    Does anyone have a solution to the question?

  • Graphics not reproduced in headers

    Hi, I was wondering if anyone has run into this problem. I've placed a shape (a horizontal line) in the header area of a Pages document. The header text shows up as expected on all other pages, but for some reason the line does not. Does anyone have

  • Attaching a task to an event

    In Event Viewer, I created a simple task for an email to be sent with custom text message whenever a Software Restriction Policy is triggered [Event 866].  When I select the event under the General tab I see what specifically was triggered.  Is there

  • ACU - Auto Update Feature enables Fast User Switching?

    Hi Guys, i am trying to update my novell clients with the acu feature of the novell client itself! i am planing to deploy: nov client 2 sp3 ir6 i set up acu and everything is working fine... but after the installation of the novell client and a reboo