BAPI for CRMD_ORDER  SAVE

Hi All,
Could you pl let me know the BAPI that will invoke 'SAVE' okcode in CRMD_ORDER transaction ? 
Thanks ,
Anita

Hi Anitha,
To find out any BADI which gets called in any transaction,let it be crmd_order or any other transaction.It is very easy to find which all badis are called.Just follow the procedure:
/people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
I am sure its the best way and will definitely solve all your similar problems.
<b>Kindly award points if it helps and close the question.</b>
Cheers,
Ashish.

Similar Messages

  • BAPI for CRMD_ORDER support message? Urgent

    Hi Experts,
    I want to change the support messages created.
    For that do we have a BAPI, for the support message?
    It is an urgen requirement..
    Points will be rewarded ....
    thanks,
    Mahantesh

    Hey Mahantesh,
    As i already mentioned in my previous post, you have  to use FM CRM_ORDER_MAINTAIN in the BADI ORDER_SAVE to update any field which is present in tcode CRMD_ORDER.
    Please Consult CRM techincal consultant to know how to use FM CRM_ORDER_MAINTAIN in order to update the ibase and component.
    please reward points for usefull answer.
    Regards,
    Anand...

  • BAPI for CRM - CRMD_ORDER

    Hi,
    I am using PI to integrate the third party system to our CRM system.At receive side, i am seeing for  a BAPI to call and to create transaction (CRMD_ORDER) in CRM.Can you please help me in identifying the correct BAPI for this requirement,
    Thanks
    Ashu

    this is worthless as it is....
    but gives you some idea of what you need to do....
    *--- Initialization before processing Quotes                           *
          call function 'CRM_ORDER_INITIALIZE'
            exporting
              iv_initialize_whole_buffer = gc_true
            exceptions
              error_occurred             = 1
              others                     = 2.
    *--- Create service order                                              *
          call function 'CRM_ORDER_MAINTAIN'
            exporting
              it_customer_h     = gt_customer_header
              it_appointment    = gt_appointment
              it_text           = gt_text_data
    *          it_status         = gt_status
            importing
              et_exception      = gt_exceptions
            changing
              ct_orderadm_h     = gt_order_header
              ct_orderadm_i     = gt_order_item
              ct_input_fields   = gt_input_fields
              ct_doc_flow       = gt_doc_flow
              cv_log_handle     = gw_log_handle
            exceptions
              error_occurred    = 1
              document_locked   = 2
              no_change_allowed = 3
              no_authority      = 4
              others            = 5.
    *---If successful, save
          if sy-subrc = 0
          or gt_exceptions[] is initial.
    *--- Service order created ok.....save the service order               *
            clear gt_object_guids.
            refresh gt_object_guids.
            loop at gt_order_header into gs_order_header
            where object_id = gw_object_id.
            endloop.
            insert gs_order_header-guid into table gt_object_guids.
            clear: gw_log_handle.
            call function 'CRM_ORDER_SAVE'
              exporting
                it_objects_to_save   = gt_object_guids
              importing
                et_saved_objects     = gt_object_guids_saved
                et_exception         = gt_exceptions
                et_objects_not_saved = gt_object_guids_not_saved
              changing
                cv_log_handle        = gw_log_handle
              exceptions
                document_not_saved   = 1
                others               = 2.
    endif.
    Just to put it into context, my program for this over 1400 lines long....  there was lots of data manipulation do be done and also some additional processing.

  • BAPI for T-code CRMD_ORDER

    HI folks,
    Can any one help me find out a BAPI for transaction CRMD_ORDER.
    Regards,
    Abie

    Hi,
    there is no BAPI for the order processing. Instead you might want to check the SOA services http://esoadocu.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DE4157EA06BD7BF1A3C7001A64D3F462&id=2771A3525CD111DA36BB000F20DAC9EF or check the XIF interface for sales order import.
    Best Regards,
    Michael

  • How to implement bapi for transaction code f-02 for multiple line items

    Hi All,
    I am having one requirement to of implementing bapi for tcode f-02.
    I have identified the name of the badi e.i.  BAPI_ACC_GL_POSTING_POST.
    but i dont have any idea how implement it.
    i have multiple line items for one header.
    Please help me in this.
    Regards,
    Shoaib.

    HI
    In recording once u save, the recording comings out the transaction.
    If u want the pop-up to display before save. Then in recording also
    after entering all data and before Save press enter or do check.Try
    this way after that save the transaction.
    Regards,
    Raghu.

  • BAdI for CRMD_ORDER data validation

    Hi,
    I'm trying to do an enhacement over crmd_order, so when the user puts a date into "Requested Delivery Date" (Shipping Tab) this date automatically copies into "Pricing Date" field (Prices Tab).
    So I need a way of detect when the user changes the value of "Requested Delivery Date", I think that using a BAdI or user-exit that executes each time the user change values into screen fields it's a good idea, but I can't find anything that fits to my requeriments.
    Looking into the internet I've found badis for the save command, but I need to control this each time the user changes data into screen.
    Any idea of how can I do this?
    Thanks in advance

    Hi Arjun,
    as far as I know this method executes whenever the user pushes save button. But what I need is a badi that executes whenever the user changes data from the "Requested delivery data" field.
    Doing some debugging I've found that CRM_SALES_BADI executes always, but I'm not very sure that this is the right badi for my requeriments
    Thanks for your answer

  • BDC / Bapi For  Post Incoming Payment (F-28)

    Hi
    Im creating BDC for F-28. But it got error coming out.
    >> It says DB05B-PSZAH(02) is not an input field.
    What I do is: First, I search for Line Item then Document Number. Then It return to basic list. Then I loop again for the second Line Item Number and Document Number.
    I can activate the first amount but cannot for the next amount and so on.
    Anybody could help me on this??
    Is there any BAPI for Post Incoming Payment (F-28)?
    Thank you.
    Regards.

    i dont think there is a BAPI for this Transaction...
    i have done a BDC on F-28 myself....pasting the code....hope it helps you....
    *******NOTE********
    the parameter in the subroutine is to see if there is a single document or multiple documents being posted.
    FORM fill_bdc_data_f-28_9005 USING p_i_mult_doc TYPE c.
    **BDC from screen 9005
      DATA : l_amt_bdc(13), l_amt_bdc_remain(13), l_amt_bdc_mult(13),
             l_amt_bdc_mult_remain(13), l_assignment(14), l_period(2),
             l_amount(13).
      CLEAR t_bdcdata.
      REFRESH t_bdcdata.
      PERFORM bdc_dynpro USING 'SAPMF05A' '0103'.
      PERFORM bdc_field USING 'BDC_OKCODE' '=AB'.   "OK CODE - doc overview
    **get user default date format and pass date in that format
      PERFORM convert_date_to_user_format USING bkpf-bldat.
      PERFORM bdc_field USING 'BKPF-BLDAT' w_date.  "cheque date
      CLEAR w_date.
      PERFORM bdc_field USING 'BKPF-BLART' i_blart.  "doc type
      PERFORM bdc_field USING 'BKPF-BUKRS' i_bukrs.  "comp code
    **get user default date format and pass date in that format
      PERFORM convert_date_to_user_format USING bkpf-budat.
      PERFORM bdc_field USING 'BKPF-BUDAT' w_date.  "posting date
      CLEAR w_date.
      l_period = sy-datum+4(2).
      PERFORM bdc_field USING 'BKPF-MONAT' l_period. "period
      PERFORM bdc_field USING 'BKPF-WAERS' 'INR'.    "currency
      PERFORM bdc_field USING 'BKPF-BKTXT' i_bankl.  "doc. hdr. text
      PERFORM bdc_field USING 'BKPF-XBLNR' i_xblnr.  "Ref. Document No.
      PERFORM bdc_field USING 'BSEG-ZUONR' i_zuonr.  "Assignment(Depot Code)
      PERFORM bdc_field USING 'RF05A-KONTO' i_bank_gl. "Bank GL acc
      PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.  "Business Area
      l_amount = bseg-wrbtr.
      PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "Amount
      PERFORM bdc_field USING 'BSEG-PRCTR' ''.  "Profit Center
    **open items data
      PERFORM bdc_field USING 'RF05A-AGKOA' 'D'.     "Acc type (D=customers)
      PERFORM bdc_field USING 'RF05A-XNOPS' 'X'.     "Std OIs check box
    **end of first screen
    **document overview screen
      PERFORM bdc_dynpro USING 'SAPMF05A' '0700'.    "Overview Screen
      PERFORM bdc_field USING 'BDC_CURSOR' 'RF05A-AZEI1(01)'.     "cursor
      PERFORM bdc_field USING 'BDC_OKCODE' '/00'.     "OK CODE
      PERFORM bdc_field USING 'RF05A-NEWBS' '19'.    "posting key
      PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
      PERFORM bdc_field USING 'RF05A-NEWUM' 'B'.     "Spl GL Indicator
    **for single document selected
      CLEAR l_amt_bdc.
      IF p_i_mult_doc = ''.
    ***new screen - next line item
        PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
        PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.    "OK CODE
    **for single document, use the bouncing amount calculated earlier
        l_amt_bdc = w_amt_ant_bouncing.
        PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc. "amount
    **due date - same as posting date on screen
    **get user default date format and pass date in that format
        PERFORM convert_date_to_user_format USING bkpf-budat.
        PERFORM bdc_field USING 'BSEG-ZFBDT' w_date.  "due date
        CLEAR w_date.
    **assignment
        CLEAR l_assignment.
        CONCATENATE t_seldoc_ant_bouncing-belnr
                    t_seldoc_ant_bouncing-gjahr INTO l_assignment.
        PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
        PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.
    **if there is some remaining amount, then go for another line item
        IF w_rem_amt_ant_bouncing > 0.
          PERFORM bdc_field USING 'RF05A-NEWBS' '15'.    "posting key
          PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
    **new screen
          PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
          PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-ZTERM'. "CURSOR
          PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.    "OK CODE-ENTER
          l_amt_bdc_remain = w_rem_amt_ant_bouncing.
          PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
          PERFORM bdc_field USING 'BSEG-ZTERM' '0001'.
    **AGAIN
          PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
          PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'. "CURSOR
          PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.    "OK CODE-SAVE
          PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
          PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term -hardcoded
          PERFORM bdc_field USING 'BSEG-SKFBT' l_amt_bdc_remain.
        ENDIF.
    **multiple documents
      ELSE.
    **initialize remaining amount to amt entered on screen
        l_amt_bdc_mult_remain = bseg-wrbtr.
        LOOP AT t_seldoc_ant_bouncing.
          IF l_amt_bdc_mult_remain > 0.
            IF bseg-wrbtr > t_seldoc_ant_bouncing-rem_amt.
              l_amt_bdc_mult = t_seldoc_ant_bouncing-rem_amt.
            ELSE.
              l_amt_bdc_mult = bseg-wrbtr.
            ENDIF.
    **remaining amt = screen amt - amt calculated above.
            l_amt_bdc_mult_remain = l_amt_bdc_mult_remain - l_amt_bdc_mult.
            PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
            PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.    "OK CODE
            PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult. "amount
            PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.  "Business Area
    **due date - same as posting date on screen
    **get user default date format and pass date in that format
            PERFORM convert_date_to_user_format USING bkpf-budat.
            PERFORM bdc_field USING 'BSEG-ZFBDT' w_date.  "due date
            CLEAR w_date.
    **assignment
            CLEAR l_assignment.
            CONCATENATE t_seldoc_ant_bouncing-belnr
                        t_seldoc_ant_bouncing-gjahr INTO l_assignment.
            PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
    **posting key 19 for all but last document
            PERFORM bdc_field USING 'RF05A-NEWBS' '19'.    "posting key
            PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
            PERFORM bdc_field USING 'RF05A-NEWUM' 'B'.     "Spl GL
          ENDIF.
        ENDLOOP.
      ENDIF.
    **post remaining amount
      IF p_i_mult_doc = 'X'.
    **new screen if there is some amount left
        IF l_amt_bdc_mult_remain > 0.
    **posting key 15 with remaining amount
          PERFORM bdc_field USING 'RF05A-NEWBS' '15'.    "posting key
          PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
          PERFORM bdc_field USING 'RF05A-NEWUM' ''.     "Spl GL
    **new screen
          PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
          PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.    "OK CODE
          PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult_remain.
          PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term - hardcoded
        ELSE.
    **if no amount is left, no need for a further line item
          PERFORM bdc_field USING 'RF05A-NEWBS' ''.    "posting key
          PERFORM bdc_field USING 'RF05A-NEWKO' ''. "customer
          PERFORM bdc_field USING 'RF05A-NEWUM' ''.     "Spl GL
        ENDIF.
      ENDIF.
    **clear variables
      CLEAR : l_amount, l_assignment, l_amt_bdc,
              l_amt_bdc_remain,l_amt_bdc_mult, l_amt_bdc_mult_remain.
    ENDFORM.                    " fill_bdc_data_F-28_9005

  • BAPI for meter reading order (MRO) Reversal

    Hi Experts,
    Please let me know if there is any FM or BAPI for meter reading order reversal, Similar to EL37
    Regards
    Bikas

    Hello Bikas,
    Though this is an old post, thought of replying for the sake of googlers who might look for a solution for your query...the below code works!
    *---Begin Of Code
      TYPES : BEGIN OF ty_meter_orders_data,
               anlage   TYPE eablg-anlage,
               adatsoll TYPE eablg-adatsoll,
               ablesgr  TYPE eablg-ablesgr,
              END OF ty_meter_orders_data.
      DATA : lt_meter_orders_data TYPE STANDARD TABLE OF ty_meter_orders_data,
                  xy_ieabl_delete   TYPE  eabl_tab,
                  xy_ieablg_delete  TYPE  eablg_tab,
                  xy_ietrg_delete   TYPE  etrg_tab,
                  x_anlage type anlage,
                  x_retro_upd_date type adatsoll,
                  y_return type char1.
      DATA : y_obj TYPE  isu17_meterread.
    *--Get the needed data for reversal
      SELECT a~anlage
             a~adatsoll
             a~ablesgr
        FROM eablg AS a
        INNER JOIN eabl AS b ON a~ablbelnr = b~ablbelnr
        INTO TABLE lt_meter_orders_data
        WHERE a~anlage = x_anlage AND
              a~adatsoll >= x_retro_upd_date AND
              b~ablstat = '0'. "MR Order
      IF sy-subrc = 0.
        SORT lt_meter_orders_data BY anlage ablesgr adatsoll.
        DELETE ADJACENT DUPLICATES FROM lt_meter_orders_data COMPARING anlage ablesgr adatsoll.
        SORT lt_meter_orders_data BY adatsoll DESCENDING.
        LOOP AT lt_meter_orders_data ASSIGNING FIELD-SYMBOL(<fs_meter_orders_data>).
          CALL FUNCTION 'ISU_O_METERREAD_OPEN'
            EXPORTING
              x_anlage              = <fs_meter_orders_data>-anlage
              x_adatsoll            = <fs_meter_orders_data>-adatsoll
              x_ablesgr             = <fs_meter_orders_data>-ablesgr
              x_select2             = '5'
              x_wmode               = '6'
            IMPORTING
              y_obj                 = y_obj
            EXCEPTIONS
              not_found             = 1
              foreign_lock          = 2
              internal_error        = 3
              input_error           = 4
              existing              = 5
              number_error          = 6
              general_fault         = 7
              system_error          = 8
              manual_abort          = 9
              gasdat_not_found      = 10
              no_mrrel_registers    = 11
              internal_warning      = 12
              not_authorized        = 13
              not_qualified         = 14
              anpstorno_not_allowed = 15
              already_billed        = 16
              dev_already_prep      = 17
              OTHERS                = 18.
          IF sy-subrc = 0.
            CALL FUNCTION 'ISU_O_METERREAD_ACTION'
              EXPORTING
                x_okcode             = 'PSAV'
              CHANGING
                xy_obj               = y_obj
              EXCEPTIONS
                cancelled            = 1
                failed               = 2
                action_not_supported = 3
                system_error         = 4
                input_error          = 5
                not_customized       = 6
                OTHERS               = 7.
            IF sy-subrc = 0.
              CALL FUNCTION 'ISU_O_METERREAD_ACTION'
                EXPORTING
                  x_okcode             = 'SAVE'
                TABLES
                  yt_eabl_delete       = xy_ieabl_delete[]
                  yt_eablg_delete      = xy_ieablg_delete[]
                  yt_etrg_delete       = xy_ietrg_delete[]
                CHANGING
                  xy_obj               = y_obj
                EXCEPTIONS
                  cancelled            = 1
                   failed               = 2
                  action_not_supported = 3
                  system_error         = 4
                  input_error          = 5
                  not_customized       = 6
                  OTHERS               = 7.
              IF sy-subrc = 0.
                COMMIT WORK.
              ENDIF.
            ENDIF.
            CALL FUNCTION 'ISU_O_METERREAD_CLOSE'
              CHANGING
                xy_obj = y_obj.
    * Implement suitable error handling here
          ELSE.
            y_return = 'E'.
          ENDIF.
        ENDLOOP.
        IF y_return <> 'E'.
          y_return = 'S'.
        ENDIF.
      ELSE
    *    RAISE no_mtr_read_ordrs_found.
      ENDIF.
    *---End of Code
    Thanks.
    Mohammed.

  • Create Conditions for CRMD_ORDER (Rebate)

    Hi,
    Can you please  tell me if we have any STD FM/BAPI for creating conditions for CRMD_ORDER (Rebates)?
    Thanks
    Ashu

    Hi Ashu,
    SAP CRM Web UI will not call CRMD_ORDER. The Web UI will also access the same old One Order API's that are used to create the One Order Objects. So, whether it's a SAP GUI or Web UI, the Model is same and consistent across other layers.
    So, if you put a debug point in the One Order API layer, you can very well notice that the debug point is it across from the upper layers.
    If you can debug the data, then you might probably get some more data which you might have missed while making the call.
    Hope this helps.
    Thanks,
    Samantak.

  • BAPI to do save as completed  a journal

    Hi
    We need a BAPI to park or save as completed a Journal.Inspecific we want to have save as completed of a Journal through BAPI.

    Hi ...,
    I Don't think so there is such parking BAPI for FI invoices (Not MIRO) in SAP. But there is 2 methods to achive parking and Posting in SAP.
    1 ) There is standard BAPI BAPI_ACC_DOCUMENT_POST to post all FI invoice respective subledgers also.You can use smae BAPI as park documents and Commit whenever business want through ABAP development.
    OR
    2 ) Create BDC for Parking t.code and Use PRELIMINARY_POSTING_POST_ALL bapi for posting parking documents.
    Best Rgds
    SumaMani

  • Screen Exists for crmd_order

    Hi,
               Any one tell me the screen exists for crmd_order t-code. I want to make the priority field mandotary  in Create Change Request screen
    Regards,
    Priya.
    Edited by: abap4kirti on May 20, 2010 2:54 PM

    Hey,
    in order to make sure a field is mandatory you should use badi crm_order_save called when a ticket is saved and raise a cancel save in case the field is empty ! This way you ll fore people to fill priority field for example
    In order to make the errors appear on ticket as the standard errors you can check documentation of SPRO Customizing point : 'Business Add-In for Activities: Header Data'
    You ll there find a very explicit explanation on how to handle messages buffer in tickets
    That should be OK for your requirement !
    Regards
    Khalil
    PS: Another simple way to do it is a screen variant and set field to mandatory (transaction SHD0)
    -> Screen values    7153 Program  SAPLCRM_SERVICE_UI             Subscreen   SUBSCR02

  • BAPI for transaction IW31 (creating a work order)

    Hi all,
    I need to be able to create a work order ( IW31) using ABAP code and was wondering if any knew if there was a BAPI that should be used for this functionality.
    Thanks in advance
    Mart

    hi,
    You can use
    BAPI_ALM_ORDER_MAINTAIN.
    Have a look at the following documentation.
    FU BAPI_ALM_ORDER_MAINTAIN
    Text
    Process Maintenance-/Service Order
    Functionality
    This Business Application Programming Interface (BAPI) is used for changing maintenance- or service orders and their lower-level objects. The following objects of an order can be processed (for restrictions, see the note at the end of the documentation):
    Order header
    Partner
    User status
    Order operations
    Relationships
    Components
    Long texts for order header, operations, and components
    Function
    Calling up this BAPI once allows you to perform all the operations. For this the system supplies the function module with a method table containing the methods to be performed. The entries in the method table refer to data records in the optionally filled-out data tables. All the methods from the method table are performed. Alternatively, just lower- level objects from existing orders can be changed.
    You can process the transferred data with the Business Add-In (BAdI) IBAPI_ALM_ORD_MODIFY to, for example, merge data from the external system with data from the R/3 system. The BAdI is called up as soon as the transferred data is converted into the internal format. The tests then take place after this.
    Construction of Method Table
    REFNUMBER Reference number for linking object methods - attributes
    The reference number is the line of the database which contains the corresponding data. The data table is determined by the object type.
    OBJECTTYPE Object category
    The object category specifies which object from the order should be processed. The key words listed here are not language-dependent and must be transferred exactly as they are. The following objects exist:
    HEADER Order header
    PARTNER Partner data
    USERSTATUS User status
    OPERATION Operation data
    RELATION Relationships
    COMPONENT Components
    TEXT Long texts
    (empty) ,General BAPI functions (save)
    METHOD Methods
    The methods with which the data should be processed. The following functions exist:
    CREATE Create objects
    CHANGE Change objects
    DELETE Delete objects
    RELEASE Release
    TECHNICALCOMPLETE Technically complete
    ATPCHECK Availability check
    CALCULATE Calculate
    SCHEDULE Schedule
    DELELTEDSEX Delete the status for external scheduling at operation level
    SAVE Save all data
    DIALOG Call-up dialog. See explanation below.
    TRACE Write trace file in the specified file to the frontend
    OBJECTKEY SAP external object key
    This key is for assigning the lower-level objects correctly to the corresponding objects, as there is always just one key in the data table. The key must have the following structure:
    1-12 Order number
    When creating orders with internal number assignment, a reference number beginning with % must be entered here. The BAPI then returns this number and the number actually assigned.
    13-16 Operation number
    17-20 Sub-operation number
    For relationships, the key is structured as follows:
    1-12 ,Order number from
    13-16 Operation number from
    17-28 Order number to
    29-32 Operation number to
    The following methods are permissible for the individual objects:
    HEADER:
    CREATE, CHANGE, RELEASE, TECHNICALCOMPLETE, ATPCHECK, CALCUALTE, SCHEDULE
    OPERATION
    CREATE, CHANGE, DELETE, DELETEDSEX
    PARTNER, RELATION, COMPONENT, USERSTATUS, TEXT:
    CREATE, CHANGE, DELETE
    (empty):
    SAVE, DIALOG, TRACE
    Data tables and update tables
    The objects have one or more data tables. For some objects you can specify which of the fields specified in the structure should be changed. For this you must set the field in the corresponding table to X as in the data table. If no update-table is transferred, then only those fields are set that have a value that is not initial. This simplifies the transfer data. However, this means it is not possible to delete fields. If an update structure should only be specified for some data records, the table with the update fields must nonetheless have the same amount of lines as the data table. The empty lines are then treated as if no update structure was transferred. The objects "Partner", "User Status", and "Text" have no update tables. The whole data record is always copied here.
    References
    The objects use the field REFNUMBER from the method table to refer to the lines in the data table. Counting always begins with 1. In doing this, REFNUMBER also refers to the update table. However, in the method table there is a second reference to higher-level objects for lower-levels objects. The field OBJECTKEY must be filled with order number, operation number, and sub-operation number, as specified above. If lower-level objects of a newly-created order should be changed, then you must enter a temporary order number that must begin with %. Several orders can be numbered serially, for example, with %00000000001, %00000000002 ... .
    The following objects have special treatment for REFNUMBER:
    Partner
    Texts
    Partners have an order number in the data table. During processing of the method table, all those entries in the data table are processed which have an order number that is the same as that in the line to which the method refers. Thus, through just one entry in the method table, several partners can be changed.
    Texts are composed of two tables. The first table (IT_TEXT) is made up of the header data of the text. Here you must specify the object and the first and last line of the text table (respectively inclusive, counting from 1). Through this, a line segment is specified in the text line table (IT_TEXT_LINES).
    Peculiarities in processing
    The BAPI processes the transferred methods in a particular sequence, which must not correspond to the sequence in the methods table.
    Write trace file
    Change user status time period 1
    Delete objects (dependent first)
    Create new objects
    Change existing or newly-created objects
    Change user status time period 2
    Status change of order
    Save data
    The methods are performed such that lower-level objects can also be assigned to newly-created objects. For example, first the operations are created, and then the components. Long texts can also be created for the objects.
    Components have an exceptional position. Components are created through the assignment to an operation, that is, using the "key" order/ operation (item number). However, as this is not the unique component key, you can only access the components to change them, delete them, or add long texts by using the reservation number/-item, which is only given after saving. This means that, for example, you cannot create a long text when you create the component.
    User status changes can take place at two different time points. Time point 1 is before the object changes, time point 2 is after the object changes and before the status change of the system. These time points should be defined in the transfer table in the field CHANGE_EVENT. The field documentation contains the possible values.
    The external scheduling is offered by the BAPI as a special function. THe BAPI can set the date field directly at the operation level, and select the operation with the status DSEX "Date set by external system". This status prevents any further scheduling of the operation, it keeps the transferred dates. For this, set the category 'X' in the restriction categories. When reading the operation, this category is also returned, independent of the category of restriction set in the dialog. To delete the status, you can call up the method DELETEDSEX for the object operation. The external scheduling cannot be influenced in the dialog. All changes to the scheduling restrictions in the dialog are saved as normal, but are not relevant for the scheduling as long as the status DSEX is active.
    Every time the BAPI is called up, a SAVE or DIALOG method must be transferred. Normally, calling up a BAPI is seen as a transaction. All data that is changed in the BAPI should be saved to the database immediately. The BAPI checks whether a SAVE method exists, otherwise it terminates processing. A test run of the BAPI is composed of a normal call-up using the SAVE method and a subsequent BAPI_TRANSACTION_ROLLBACK. To call up the BAPI without the SAVE method, for example, to realize dialog transactions, the BAPI can be called up with the DIALOG method. This switches off the check for the SAVE method. The processor must then ensure that later either a SAVE method or a BAPI_TRANSACTION_ROLLBACK is called up.
    A BAPI_TRANSACTION_COMMIT without SAVE method terminates processing in the update to ensure that no inconsistent data is written to the database. The processor who called up the BAPI does not receive any confirmation for the termination of the update in the target system. This logic is necessary as the order data was flagged for updating with BAPI_TRANSACTION_COMMIT through the SAVE method. However, the status information was already flagged for updating when the BAPI was called up. A BAPI_TRANSACTION_COMMIT without SAVE method then just saves the status information and would generate inconsistent orders, if the updating was not terminated.
    Customer Enhancement
    The BAdI IBAPI_ALM_ORD_MODIFY can be used to change the transferred data. The BAdI is called up after the conversion of the transfer structure into the structures used internally. Additional data can be transferred using the table EXTENSION_IN. Only then is the data checked.
    Example
    The following examples should clarify the use.
    Creating an order
    OBJECTKEY should be filled with a temporary key. The BAPI returns this key together with the assigned order number in the return table ET_NUMBERS . The order number in the HEADER table should also be filled with the number. For external number assignment, the external number should be specified. The update structure can be transferred if necessary.
    Methods table
    REFNUMBER OBJECTTYPE METHOD OBJECTKEY
    1 HEADER CREATE %00000000001
    IT_HEADER
    ORDERID ORDER_TYPE PLANPLANT ...
    %00000000001 PM01 1000 ...
    Creating an order with operation and long text
    Methods table
    REFNUMBER OBJECTTYPE METHOD OBJECTKEY
    1 HEADER CREATE %00000000001
    1 OPERATION CREATE %00000000001
    1 TEXT CREATE %000000000010010
    IT_HEADER
    ORDERID ORDER_TYPE PLANPLANT ...
    %00000000001 PM01 1000 ...
    IT_OPERATION
    ACTIVITY SUB_ACTIVITY CONTROL_KEY WRK_CNTR ...
    10 PM01 MECHANIC ...
    IT_TEXT
    ACTIVITY ... TEXTSTART TEXTEND
    10 ... 1 2
    IT_TEXT_LINES
    TDFORMAT TDLINE
    Longtext for operation 10, line 1
    Line 2 of the long text
    Notes
    Using the BAPI to process the order data cannot support all the functions of the transaction. This applies in particular for the following functions:
    Order header data
    The object list cannot be processed.
    Refurbishment orders are not supported.
    The estimated costs cannot be processed - only the estimated overall costs of the order.
    Notification data cannot be processed with the order BAPI. Even if the settings in Customizing are such that the orders and notifications can be maintained on one screen, no notification is created for the order.
    Permits cannot be processed.
    The order addresses cannot be processed.
    Individual partner addresses cannot be maintained.
    The settlement rule cannot be maintained.
    Order functions
    Printing the papers is not possible.
    Locking and unlocking the order is not possible.
    Accepting and rejecting quotations is not possible.
    Business completion is not possible.
    Flagging for deletion is not possible.
    The log cannot be displayed.
    User default values are not used.
    The field selection is not checked.
    The Customer Exits/BAdIs are not executed completely.
    Joint ventures are not supported.
    Funds Management is not supported.
    Investment orders are not supported.
    No integration of service products with task lists possible.
    No integration of configurable service products possible.
    Assignment of sales document items with service products in accordance with the aforementioned conditions.
    Operation data
    A change of the control key in the operation is not possible, if this leads to a change of the processing type (internal-/external processing)
    User status change not possible.
    Production resources and tools cannot be processed.
    Service lines cannot be processed.
    Task list integration is not supported.
    Linking operations with object list is not supported.
    Component data
    User status change not possible.
    BOM data cannot be processed.
    The delivery address cannot be processed.
    Further Information
    See also the documentation for the individual transfer tables.
    Parameters
    IT_METHODS
    IT_HEADER
    IT_HEADER_UP
    IT_HEADER_SRV
    IT_HEADER_SRV_UP
    IT_USERSTATUS
    IT_PARTNER
    IT_PARTNER_UP
    IT_OPERATION
    IT_OPERATION_UP
    IT_RELATION
    IT_RELATION_UP
    IT_COMPONENT
    IT_COMPONENT_UP
    IT_TEXT
    IT_TEXT_LINES
    EXTENSION_IN
    RETURN
    ET_NUMBERS
    Exceptions
    Function Group
    IBAPI_ALM_ORDER
    ~~Guduri

  • BAPI for QA11

    Hi All,
    Can Anybody tell me the BAPI for QA11.
    My requirement is (I am telling the manual process) But i want this to be done by BAPI.
    Open QA11 transaction
    Enter the Inspection Lot Number Hit enter
    Now at the bottom you see Usage decision . Select it from F4 or enter something and Hit Enter
    Now Click on the Inspection Lot Stock Tab
    In the To be Posted Box At the end you see Sales Order structure button. beside that enter the quantity 100.000 in editable field
    Now select the Sales Order structure button
    Enter the Sales Order and its Item number
    Save.
    Please give a hint. thats enough I will regard for sure. Please dont say me to use BAPI_INSPLOT_GETDETAIL or BAPI_INSPLOT_SETUSAGEDECISION. I already tried. if you still suggest them tell me how to use them.
    Thanks.

    Hi ,
    Check the BO BUS204501.
    here there is a number of Methods and check the BAPI names in that..
    If the are not enough with your requirement, Better go for BDC in that case.
    Regards,
    Bharani.

  • Any sort of bapi for SMW0 ?

    I want to create a program to add images to sap web repository automatically, but I cant find any bapi for the smw0.
    So far the best I've manage to do is call the FM 'UPLOAD_WEB_OBJECT' this function does create the object in the sap web repository, but has an unwanted behaviour it pot up's asking for confirmation to save.
    So...is any bapi for this transaction OR a way to avoid that pop up (some kind of forced save)
    thanks

    indeed, restart sap solved that problem.
    But something is wrong...
    REPORT  zsl_teste9.
    DATA: p_file_aux TYPE string.
    TYPES: BEGIN OF s_file,
             data(64),
          END OF s_file.
    DATA: BEGIN OF st_file,
             data(64),
          END OF st_file.
    PARAMETERS: p_fserv LIKE rlgrap-filename DEFAULT '.\ac2.jpg'.
    DATA: t_file LIKE st_file OCCURS 0,
          wa_file LIKE st_file.
    DATA l_xstring TYPE xstring.
    PERFORM download_from_server TABLES t_file."puts binary in t_file
    * get any binary, here it's an SAP INFO icon in PNG format
    PERFORM get_info_icon_png CHANGING l_xstring.
    * load into SMW0
    PERFORM create_smw0_binary_wo_dialog
          USING 'ZSLAC' 'image/jpg' 'descri' l_xstring.
    COMMIT WORK.
    FORM create_smw0_binary_wo_dialog
          USING
            i_w3objid     TYPE w3objid
            i_mimetype    TYPE clike
            i_description TYPE clike
            i_xstring     TYPE xstring.
    * it works only if we use a package without transport request (here
    * we use $TMP)
      DATA lt_html TYPE TABLE OF w3html.
      DATA lt_mime TYPE TABLE OF w3mime.
      DATA l_size TYPE i.
      l_size = XSTRLEN( i_xstring ).
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer     = i_xstring
        TABLES
          binary_tab = lt_mime.
      CALL FUNCTION 'EXPORT_WEB_OBJECT'
        EXPORTING
          object_id          = i_w3objid
          mimetype           = i_mimetype
          text               = i_description
          size               = l_size
          devclass           = '$TMP'
        TABLES
          html               = lt_html
          mime               = lt_mime
        EXCEPTIONS
          size_not_specified = 1
          object_locked      = 2
          OTHERS             = 3.
    ENDFORM.                    "create_smw0_binary_wo_dialog
    FORM get_info_icon_png CHANGING e_xstring TYPE xstring.
      DATA l_temp_xstring TYPE xstring.
      CLEAR e_xstring.
      LOOP AT t_file INTO wa_file.
        l_temp_xstring = wa_file-data.
        CONCATENATE e_xstring l_temp_xstring INTO e_xstring IN BYTE MODE.
      ENDLOOP.
    ENDFORM.                    "get_info_icon_p
    *&      Form  DOWNLOAD_FROM_sERVER
    *       text
    *      -->P_T_FILE  text
    FORM download_from_server  TABLES   p_t_file STRUCTURE st_file.
      CLEAR t_file.
      OPEN DATASET p_fserv FOR INPUT IN BINARY MODE.
      DO.
        READ DATASET p_fserv INTO wa_file.
        IF sy-subrc = 0.
          APPEND wa_file TO t_file.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET p_fserv.
    ENDFORM.                    " DOWNLOAD_FROM_SERVER
    this is prety much the same code sandra posted before, but Im reading the content from an actualy jpg file.
    but after doing this, im not able to see the image in smw0 (I see the code, description, etc but when I press to see the image it gives me an error. like if the file was currupted)

  • BAPI for Open production orders

    Hi All,
    Any BAPI for open production orders?.... Using BAPI i want to upload open production orders informatiomations.... Please help
    Thanks & Regards
    Santhosh

    Hi,
       Please check the following BAPI,
    Goto BAPI tcode, select hierarchical tab
      Production orders,ProductionOrder ,ProdOrdConfirmation , RCVPRORDCF and check the BAPIs

Maybe you are looking for