How to change order header data before SAVE in CRM 2007

Hi,
I want to modify service order header value before saving it, to achieve this :
1) Implemented BADI ORDER_SAVE
2) in the method CHECK_BEFORE_SAVE, read order details by using FM CRM_ORDER_READ and done all validations.
3) Now i want modify one field value. how to do that ?
i came to know that by using FM CRM_ORDER_MAINTAIN or CRM_ORDERADM_H_MAINTAIN_OW data can be update/modify.
Is this right ? what are the parameters i need to pass and exactly in which method i have use this FM.
I want to pass the value in CRMT_ORDERADM_H_WRK(ET_ORDERADM_H) structure i.e. only for one filed.
Please let me know how it can be done.
Thanks
Bhanu

Hi,
I am using following code, please correct if it is wrong.
DATA : IS_ORDERADM_H_COM  TYPE CRMT_ORDERADM_H_COM,
           CT_ORDERADM_H  TYPE  CRMT_ORDERADM_H_COMT,
           IT_INPUT_FIELDS    TYPE CRMT_INPUT_FIELD_TAB,
           WA_INPUT_FIELDS    TYPE CRMT_INPUT_FIELD,
           IT_FIELD_NAMES     TYPE CRMT_INPUT_FIELD_NAMES_TAB,
           WA_FIELD_NAMES     TYPE CRMT_INPUT_FIELD_NAMES,
           IT_SERVICE_H       TYPE  CRMT_SERVICE_H_COMT,
           WA_SERVICE_H       TYPE  CRMT_SERVICE_H_COM.
After reading order header data from "'CRM_ORDER_READ", pass header data to below structure
    MOVE-CORRESPONDING EW_ORDERADM_H TO IS_ORDERADM_H_COM.
   IS_ORDERADM_H_COM-ZZFLD00000Y = '123456'.  <== want to save value in this field created on service header screen by using AET
    APPEND IS_ORDERADM_H_COM TO CT_ORDERADM_H.
    WA_SERVICE_H-REF_KIND = 'A'.
    WA_SERVICE_H-REF_GUID = EW_ORDERADM_H-GUID.
    WA_SERVICE_H-MODE     = 'B'.
    APPEND WA_SERVICE_H TO IT_SERVICE_H.
    WA_INPUT_FIELDS-REF_GUID = EW_ORDERADM_H-GUID.
    WA_INPUT_FIELDS-REF_KIND    = 'A'.
    WA_INPUT_FIELDS-OBJECTNAME = 'ORDERADM_H'. <= Is this right ?
   WA_INPUT_FIELDS-LOGICAL_KEY =  ? what is nothing but logical key
    WA_FIELD_NAMES-FIELDNAME  = 'ZZFLD00000Y'.
    WA_FIELD_NAMES-CHANGEABLE = 'X'.
    APPEND WA_FIELD_NAMES TO IT_FIELD_NAMES.
    WA_INPUT_FIELDS-FIELD_NAMES = IT_FIELD_NAMES.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
   IT_SERVICE_H                  = IT_SERVICE_H <= is this required ?
    CHANGING
       CT_ORDERADM_H              = CT_ORDERADM_H
      CT_INPUT_FIELDS                = IT_FIELD_NAMES
     EXCEPTIONS
       ERROR_OCCURRED                = 1
       DOCUMENT_LOCKED               = 2
       NO_CHANGE_ALLOWED             = 3
       NO_AUTHORITY                  = 4
       OTHERS                        = 5.
    IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
awaiting for your replies
Thanks
Bhanu
Edited by: Bhanupracash on Apr 6, 2011 2:14 PM

Similar Messages

  • User exit for billing to change vbrk header data  on SAVE

    Hi
          I need to change vbrk header data on save in vf01
          transaction, can some one send me the user exit,
          also code if possible.
          I have tried out RV60AFZZ it is entering the exit
          but if i modify vbrk fields it does not get
          reflected.
    Thanks & Regards
    Abhimanyu.L

    Have a look in include RV60AFZC
    => maybe you can use form USEREXIT_FILL_VBRK_VBRP.

  • How can read BOM component date before save the production order??

    Hi Experts,
    In our company, we need to develop a program to read the BOM component data of the production order
    before we save the production order.
    That for example ,when we create and release a production order , before we save the production
    order,we want a porgram to read the BOM component data. If some component data can meet our
    requriement (may be if there is material requirement quantity>100 EA),then the system will pop up a
    small dialog box to remind us.
    There is user exit PPCO0007 and PPCO0007.But it seems they only can read the head data of the
    production order before we save the production order. And the BOM component data of the production
    order are saved in the RESB(Reservation Table).So if we do not save the production order,all the BOM
    component data are not saved in the RESB table.
    So how can slove the problem??
    How can read component date before save the production order??
    Are there any other user exit we can use???

    Hi Just wanted to check am I right that you are trying to check if you have enough Materials Available before you release or Save the order right ? if this is your business objective then when you create order you have material availability tab which checks and gives error if shortage is there. Please let me know if is this wht you asking for ?

  • Sales order header data change by using the ORDERS05 IDOC

    Hello Team
    I am getting sales order number and some code value from the legacy system. i need to check whether the sales order is avialable in SAP or not. if it is there, i need to update the CODE value (ie for example ABC100) in sales order header data> order data> your reference field.  For doing this i am using the IDOC type ORDERS05 and message type ORDCHG message type.
    Now i want to know what are the mandatory fields which i need to do the mapping for the IDOC ORDERS05, to change the sales order header data. please check and suggest me the required fields of the IDOC to be mapped, so that i can change the sales order header data.
    Please correct me if i am doing something wrong here.
    Regards
    Rj

    Hello chirag
    Thanks for your reply. My requirement is to change the sales order which is already avialable in SAP. Just i need to change the header data of the sales order, for example if i am getting the sales order as 1000 and CODE as ABC100. i need to change the Sales document number 1000 and put the code ABC100 in sales order header data>orders data>your reference field.
    So now i want to know the below points
    1. what are the mandatory fields for which i need to pass the values for the IDOC ORDERS05.
    2. what is the user-exit used for picking up those values from SAP because i am getting only sales order number and CODE values from legacy system.
    Please check and suggest me accordingly.
    Regards
    Rj

  • How to change the posting date at the line item level in a sales order

    how to change the posting date at the line item level in a sales order

    Hi,
    I believe the POSTING DATE will appear on the accounting document
    In the Accounting document, the posting date will be based on the  Billing date.
    Please let me know if you need any more details
    santosh

  • How to Change Journal Header name to Custom Header Name while GL Importing?

    Hello Experts,
    I am in situation where customer wanted to keep their own journal header naming conventions to imported journals in Oracle GL for custom Journal sources.
    As I know while importing journals, Oracle Creates the Journal Name based on the below mentioned logic.
    "Journal Import creates a default journal entry name using the following format:
    (Optional User-Entered REFERENCE4)(Category Name)(Currency)
    (Currency Conversion Type, if applicable)
    (Currency Conversion Rate, if applicable)
    (Currency Conversion Date, if applicable) (Encumbrance Type ID, if applicable)
    (Budget VersionID, if applicable). If you enter a journal entry name,
    Journal Import prepends the first 25 characters of your journal entry name to
    the above format"
    But then How it is possible to only allow journal header Name to be used present in REFERENCE4 excluding all other string provided by Oracle? Instead of using omitted string custmoer wanted to keep their own parameters. Example - REFERENCE4.A.B.C etc.
    Is it possible to solve this using seeded setup or modifying some hook packages or anything else?
    As far as I know there can be one workaround to be use of updating journal header name after journal import being completed successfully for custom journal source. But only fear is Oracle doesnt allow updating the base table without API. Am I rght?
    So it would be really great if anyone of you can suggest the best solution or best possible workaround.
    Thanks

    Duplicate - How to Change Journal Header name to Custom Header Name while GL Importing?

  • How to change the default date in Person assignment tab?

    Hi experts,
    Does anyone know how to change the default date in person assignment tab in cj20n? Currently, the system always take the scheduled finish date to the date of the person assignment tab. Can I change it to the start date?
    Thanks and rgs,
    Michelle

    Hi Michelle,
    Goto SPRO->Project system->Dates->Scheduling->Specify Parameters for Network Scheduling, Here you can control the workforce planning dates.
    Hope this is useful...
    Regards
    Aatish

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • Sales Order Header Data. Texts

    Hy All Experts.
    I wnt to put Filed Sales Order Header data. i go to transaction va02. ->> disp Doc. header Deatils.
    select Tab Texts. --> Notes .
    I wnt to put a notes in a sales order report. so hw to identify. that field.
    Please guide me above matter.
    Thnks
    Bhavesh Panchal.

    Hi Bhavesh Panchal,
                  Use read text function module and get data from header text for ur sales report.
    get object, id, en from text area. Double click the text area and click Goto menu and choose header.
    for ex
         TDNAME = IT_ORDER-VBELN.
          OBJECT = 'VBBK'.
          ID = '0001'.
          EN = 'EN'.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              CLIENT                  = SY-MANDT
              ID                      = ID
              LANGUAGE                = EN
              NAME                    = TDNAME
              OBJECT                  = OBJECT
            TABLES
              LINES                   = LINES
            EXCEPTIONS
              ID                      = 1
              LANGUAGE                = 2
              NAME                    = 3
              NOT_FOUND               = 4
              OBJECT                  = 5
              REFERENCE_CHECK         = 6
              WRONG_ACCESS_TO_ARCHIVE = 7
              OTHERS                  = 8.
          DELETE LINES WHERE TDLINE IS INITIAL.
    LOOP AT LINES.
      IT_ORDER-MSG1 = LINES-TDLINE.
      EXIT.
      ENDLOOP.

  • I have to load sales order header data 2lis_11_vahdr

    I have to load sales order header data 2lis_11_vahdr  but i dont know which starndard dso and cubes which use for this data souce.
    please give me list of dso and cube for 2lis_11_Vahdr, 2lis_11_vaitm,2lis_11_vasch for this data sources and also give the standard quaries..
    Thanks in Advance....

    Hi Praveen,
    follow documentation about BI Content available on help.sap.com:
    BI Content & BI Content Extensions -> Supply Chain Management -> Order Fulfillment
    -> DSO objects
    -> InfoCubes
    as per your requirements you need to study available objects DSO/cubes to see what covers it.
    cheers
    m./

  • How to map service contract data from ecc to crm

    Hi Experts,
    Please help me,how to map service contract data from ecc to crm system.
    is there any perticular process.please let me know.
    thanks in advance..

    Hi Srinivasulu,
    Create the service contract type of ECC and also item categories under it in ECC in CRM. Map the number ranges.
    Check the Partners mapping from R/3 to CRM and that will be all.
    I tried but in CRM in the transaction type internal number range is mandatory. So, if you create service contract in ECC with one number it will replicate to CRM but with different number. But you can see ECC number under the transaction history in CRM.
    Good Luck.
    Sharath.

  • Replicating Service contracts and Service orders from ECC 6.0 to CRM 2007

    Hi CRM Gurus,
        How can we replicate Service contracts and Service orders from ECC 6.0 and CRM 2007. Any pointers to do this?
    Please let me know.
    Best regards,
    Vinay

    Vinay,
    I dont think you need any Middleware adaptor objects for CRM Request download .
    You need to create a request in CRM using R3AR2 . Here you need to provide the R/3 table name and field name to download the service document along with Document ID
    You can monitor your request download in txn R3AR4.
    But as MCG rightly told , you should have done all requried customized settigns before downloading service documents .
    Regards
    Dinesh

  • How to verify that the user has changed table row data before db update

    Hi all,
    Iam using Oracle ADF with EJBs.
    I have a single selection table that displays rows of data returned from a function of my data control.
    The columns of my table are editable so that the user can change the data. The user selects a row, changes the data in one or more columns of the row and saves the data by means of a submit button. The code in the submit button, identifies the row of the corresponding iterator that the user clicked on and updates the data in the database (using the 'mergeEntity' function of the EntityManager)
    Before saving the data, I want to put some logic to check whether the user has actually changed some data to avoid unnecessary updates in the database . But for this I need a technique to detect that the user has indeed changed some data in the table row.
    One technique I have been using so far was to isolate the iterator row of the table and then query the corresponding row in the database table and compare their values.
    Except from dummy, this technique is not efficient if the table contains many rows.
    Moreover, in my case I have observed that on successive updates on the same row , the query on the database returns the new values (user changed values) and not the actual values contained in the database table. This means that when the user updates an iterator row the cached data affect also the results of the SELECT statement from the actual database table!!! Isn't this strange ?
    Can somebody propose me a neat method to detect when the user has changed the the data of an iterator row ?

    Hey Alan,
    The below solution seems overly complicated to me and can not be implemented without a custom screen and/or the use of JavaScript. Also, if your main concern is that a user may accidentally loose all their data because they closed the browser window or the session times out before they hit the save button then this solution does not help you.
    There are a couple of simpler approaches you can take here:
    # If the use of JavaScript is permissible you can hook into the windows 'onUnload' event, and pop-up a message box which gives the user the opportunity to cancel closing the window and save their case if they haven't already.
    # Implement an autosave feature by hooking into one of events provided by web determinations. A simple (but rather naive) way of doing this would be to hook into the OnRenderScreenEvent and call save on the interview session every time the event fires. This guarantees that all the data the user has submitted will aways automatically be saved, thereby removing the need to make sure the user manually saves their data before closing the browser.
    Automatically making Web Determinations close a browser window has to be done using JavaScript. However, doing so means that a) it won't work for people who turn off JavaScript, which is commonly done for accessibility reasons b) you'll likely run afoul of the browser's security mechanism (they generally won't let you close a window that you didn't open and some really don't like you doing that at all).
    Thanks,
    Kristy

  • How to change order data in APO

    Hi,
    I am keen to know on ways to change order data in APO say order category BI.....we want to change date by taking input from cif user exit APOCF006.We need this information for the ongoing  project.
    I know two options...1) using BAPIs  2) Not very sure about this option ...Function Module:/SAPAPO/OMORDER*CHANGE.
    Could you  please help to have better understanding on ways to change orders  in APO?
    Thank you
    Best Regards
    Nilesh Patil

    Hello Rishi,
    Thanks for your reply.
    Demand node ofr purchase Ordre( BF) in SNP is Conrel( BI category). We want to change date( start date) at this demand node . We will get this date from R3 using say non cif method.
    There are few ways to do it....
    1) If we ignore Menas of Transport( so essentially transit time or lead time in tlane)  in that purchase order  and change this requirement date directly using purchase order save BAPI( requirement node) ......Question will system allow us to do so and even if it allows us to do so will it casue some problem( inconsistencies) later?
    2) Second option I am thinking is...
    For one product we maiantain GR processing time in product location master and this is considered while determining strat date of BI (Start date=  Delivery date -GR procesisng time- means of Transport lead time - some other times ....). For this product let's say we have 100 Purchase Orders (BF). We have requirement that each of these POs should get separate treatment while calculating Start date. It means start date can be different for different POs and once we change it forcibly then it shoulkd not change unless we again change it forcibly.
    We are thinking to change GR processing time at runtime wheneveer Purchase Order is changed. So if GR time in product location master is 1 day ....for different Purchase Orders different GR processing time can be considered. Say for Po1...its 2 day...for P2 its 4 day.
    Or similar way we  can change transit time as given in means of transport in tlanes.
    Will appreciate your or anyone's comment
    Thank you
    Nilesh

  • MIGO change header data before saving

    Hi all,
    I want to update header data (budat) before saving the material document with MIGO.
    Has anybody an idea?
    I tried with Badi: mb_document_badi or similar user-exit
    MB_CF001 but with none of these I can CHANGE header data.
    Is it possible?
    Thanks a lot!

    check this
    MB_DOCUMENT_UPDATE
    regards
    Prabhu

Maybe you are looking for

  • Error while installing SAP R/3

    Hi friends,    I was tryng to install SAP R/3 4.7 in a lapop. but in the very begining of database installation i'm getting an error which says: ERROR 2015-02-21 10:11:40 MOS-01105  Processing of one or more file system node operations of table   Con

  • How to implement  a mask in a JtextField??? Is it  possible???

    I wish to have a masked edit box in Java ( a control present in VB). It is similar to a JTextField. In the control, if I specify a mask for data entry such as 99/99/9999 the box will appear on the form with dashes as --/--/----, and it will allow dat

  • Air print not working on my Iphone 6

    When I try to print using my HP printer, my old  ipad finds the printer immediately and prints but my new iphone 6 which i have not updated from the original 8.0 reports that no air printers can be found? I am reluctant to download 8.02 until Apple h

  • Purchased items not showing up on devices

    This is a problem I've not had before. When I sync iphone and ipad, some of my music purchases in my library are showing up in the music list on my phone and ipad but they are in faint type and a "O" out to the left side of the checkmark (they do not

  • Adobe on the beach

    Flash is on the beach but Adobe too! So give us an official date for the release right now