BAPI's for Txn. /sapapo/rrp3

Hi,
In Txn. /sapapo/rrp3, we need to select the particular sale order document and we need to activate heuritic.  This process to be done in as background.  Since, this screen has ALV control, we are not able to do in background.
Is there any BAPI or alternative solution for this....
Regards,
Ramki.

Hi ,
Unfortunately I dont have access to system. But, you can play with RRP3 screen using a BADI which is available.
Beterr do one thing, Go to SE24, put the class name as CL_EXITHANDLER and put a break pont in it and run the RRP3 transaction. It will stop at respective  BADI and you can use the one which is needed for you. I remember that the usually the internal table which stores the data is CT_BUFFER.
Only thing is you need to explore the BADIs in the RRP3 transaction using the above method.
Thanks,
Babu Kilari

Similar Messages

  • Product View: BADI/user-exit at "SAVING" for transaction /SAPAPO/RRP3

    Hi to All,
    i need to insert my custom routine BEFORE saving for transaction /SAPAPO/RRP3.
    I should display an error message that stop the saving.
    Does some BADI or user-exit exist for my requirement?
    Best Regards,
    Alessia Bassano.
    Edited by: Umberto Panico on Mar 19, 2009 10:07 AM

    hi
    /SAPAPO/RRP_EXPLODE BAdI for the Explosion of Orders
    /SAPAPO/RRP_IO_COL BAdI: Enhancement of the Order View
    /SAPAPO/RRP_ORD_CONV Enhanced Check for the Convertibility of an Order
    depends on your requirement you can select anyone of the above BADi's.
    if not try to use enhancement points.
    Rgds.

  • BAPI for Txn FB60

    Hi friends,
       I want to upload data to transaction FB60. I have found a BAPI 'BAPI_ACC_DOCUMENT_POST' for the same but I am not sure about it.
       Can anybody help me or if anybody has used the BAPI for uploading data to Txn FB60.
       Thanks in Advance,
       Punit

    Hi,
    check this code..
    REPORT  Z_FI_GL_POSTING.
    include <icon>.
    */ =================================================================== *
    CONSTANTS: on  VALUE 'X',
               off VALUE ' ',
               tabx TYPE X VALUE '09',
               c_e1bpache08 TYPE edilsegtyp VALUE 'E1BPACHE08',
               c_e1bpacgl08 TYPE edilsegtyp VALUE 'E1BPACGL08',
               c_e1bpaccr08 TYPE edilsegtyp VALUE 'E1BPACCR08'.
    TYPES: BEGIN OF t_tab_index,
              from TYPE i,
              to   TYPE i,
           END   OF t_tab_index.
    data :    tab type c.
    DATA:
          e1bpache08 LIKE e1bpache08,
          e1bpacgl08 LIKE e1bpacgl08,
          e1bpaccr08 LIKE e1bpaccr08.
    DATA:      g_subrc    TYPE subrc.
    DATA:      g_file     TYPE string.
    DATA:      g_segname  TYPE edilsegtyp.
    DATA:      g_sdata    TYPE edi_sdata.
    DATA:      g_first_doc.
    DATA:      i_dataf     TYPE char2000   OCCURS 900 WITH HEADER LINE,
               i_dataf_doc TYPE char2000   OCCURS  50 WITH HEADER LINE.
    DATA:      g_tab_index TYPE t_tab_index OCCURS 100 WITH HEADER LINE.
    DATA:      i_accountgl TYPE bapiacgl08 OCCURS 100 WITH HEADER LINE,
               i_curramnt  TYPE bapiaccr08 OCCURS 100 WITH HEADER LINE,
               i_return    TYPE bapiret2   OCCURS  10 WITH HEADER LINE,
               g_docheader TYPE bapiache08.
    */ ======================== SELECTION ================================ *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
    PARAMETERS: excelf TYPE file_name LOWER CASE
                DEFAULT 'C:my_excel_file.txt'.
    SELECTION-SCREEN END   OF BLOCK b1.
    */ =========================== CORE ================================== *
    START-OF-SELECTION.
    */ Call text File with GUI_UPLOAD
      g_file = excelf.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = g_file
    *     FILETYPE                      = 'ASC'
    *     HAS_FIELD_SEPARATOR           = ' '
    *     HEADER_LENGTH                 = 0
    *     READ_BY_LINE                  = 'X'
    *   IMPORTING
    *     FILELENGTH                    =
    *     HEADER                        =
        TABLES
          data_tab                      = i_dataf
        EXCEPTIONS
          file_open_error               = 1
          file_read_error               = 2
          no_batch                      = 3
          gui_refuse_filetransfer       = 4
          invalid_type                  = 5
          no_authority                  = 6
          unknown_error                 = 7
          bad_data_format               = 8
          header_not_allowed            = 9
          separator_not_allowed         = 10
          header_too_long               = 11
          unknown_dp_error              = 12
          access_denied                 = 13
          dp_out_of_memory              = 14
          disk_full                     = 15
          dp_timeout                    = 16
          OTHERS                        = 17
      IF sy-subrc <> 0.
        write: / Text-032.
        stop.
      ENDIF.
    */ Initialisation
      write tabx to tab.          " required as of ABAP 610 split cannot
    */                             have mixed char and byte types
      CLEAR   g_tab_index.
      REFRESH g_tab_index.
    */ how to process several doc : detecting docs in i_dataf
      g_first_doc = on.
      LOOP AT i_dataf.
        CLEAR: g_segname, g_sdata.
        SPLIT i_dataf AT tab INTO g_segname g_sdata.
        CHECK:  g_segname = c_e1bpache08,
                sy-tabix > 1.
    */ 1st document
        IF g_first_doc = on.
          g_tab_index-from = 1.
          g_tab_index-to   = sy-tabix - 1.
          APPEND g_tab_index.
    */ Next Documents
        ELSE.
          g_tab_index-from = g_tab_index-to + 1.
          g_tab_index-to   = sy-tabix - 1.
          APPEND g_tab_index.
        ENDIF.
        g_first_doc = off.
      ENDLOOP.
    */ Last doc.
      g_tab_index-from = g_tab_index-to + 1.
      g_tab_index-to   = sy-tfill.
      APPEND g_tab_index.
    */ Process documents.
      loop at g_tab_index.
         clear   i_dataf_doc.
         refresh i_dataf_doc.
         append lines of i_dataf from g_tab_index-from
                                 to   g_tab_index-to
                                 to   i_dataf_doc.
         perform process_document.
      endloop.
    END-OF-SELECTION.
    */ =========================== ROUTINES ============================== *
    *       FORM process_document                                         *
    FORM process_document.
    */ Clearing Memory
      CLEAR:   g_docheader, i_accountgl, i_curramnt, i_return, g_subrc.
      REFRESH:              i_accountgl, i_curramnt, i_return.
    */ Checking i_dataf_doc
    */ Mapping dataf => Bapi structures & internal tables
      CLEAR g_subrc.
      CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
        LOOP AT i_dataf_doc.
          CLEAR g_sdata.
          SPLIT i_dataf_doc AT tab INTO g_segname g_sdata.
          CASE g_segname.
    */ HEADER
            WHEN c_e1bpache08.
              PERFORM do_split_ache08.
              MOVE-CORRESPONDING e1bpache08 TO g_docheader.
              IF e1bpache08-doc_date IS INITIAL.
                CLEAR g_docheader-doc_date.
              ENDIF.
              IF e1bpache08-pstng_date IS INITIAL.
                CLEAR g_docheader-pstng_date.
              ENDIF.
              IF e1bpache08-trans_date IS INITIAL.
                CLEAR g_docheader-trans_date.
              ENDIF.
    */ Account GL
            WHEN c_e1bpacgl08.
              PERFORM do_split_acgl08.
              MOVE-CORRESPONDING e1bpacgl08 TO i_accountgl.
              IF e1bpacgl08-pstng_date IS INITIAL.
                CLEAR i_accountgl-pstng_date.
              ENDIF.
              APPEND i_accountgl.
    */ Account Currency & Amounts
            WHEN c_e1bpaccr08.
              PERFORM do_split_accr08.
              MOVE-CORRESPONDING e1bpaccr08 TO i_curramnt.
              APPEND i_curramnt.
    */ kick the line if segment name not filled
            WHEN space.
    */ Other names => Bad file structure !
            WHEN OTHERS.
              g_subrc = 2.
          ENDCASE.
        ENDLOOP. " i_dataf_doc
      ENDCATCH.
      IF sy-subrc = 1 OR
      NOT g_subrc IS INITIAL.
        perform message_output using on.
        exit.
      ENDIF.
    */ Calling the BAPI
      CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
        EXPORTING
          documentheader       = g_docheader
        TABLES
          accountgl            = i_accountgl
          currencyamount       = i_curramnt
          return               = i_return
    *   EXTENSION1           =
      LOOP AT i_return WHERE type CA 'AE'.
        g_subrc = 1.
        EXIT.
      ENDLOOP.
      IF NOT g_subrc IS INITIAL.
        perform message_output using on.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *        EXPORTING
    *           WAIT          =
    *        IMPORTING
    *           RETURN        =
          perform message_output using off.
      ENDIF.
    ENDFORM.
    *&      Form  do_split_ACHE08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_ache08.
      CLEAR e1bpache08.
      SPLIT g_sdata AT tab INTO
      e1bpache08-obj_type
      e1bpache08-obj_key
      e1bpache08-obj_sys
      e1bpache08-username
      e1bpache08-header_txt
      e1bpache08-obj_key_r
      e1bpache08-comp_code
      e1bpache08-ac_doc_no
      e1bpache08-fisc_year
      e1bpache08-doc_date
      e1bpache08-pstng_date
      e1bpache08-trans_date
      e1bpache08-fis_period
      e1bpache08-doc_type
      e1bpache08-ref_doc_no
      e1bpache08-compo_acc
      e1bpache08-reason_rev
    ENDFORM.                    " do_split_ACHE08
    *&      Form  do_split_ACGL08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_acgl08.
      CLEAR e1bpacgl08.
      SPLIT  g_sdata AT tab INTO
                      e1bpacgl08-itemno_acc
                      e1bpacgl08-gl_account
                      e1bpacgl08-comp_code
                      e1bpacgl08-pstng_date
                      e1bpacgl08-doc_type
                      e1bpacgl08-ac_doc_no
                      e1bpacgl08-fisc_year
                      e1bpacgl08-fis_period
                      e1bpacgl08-stat_con
                      e1bpacgl08-ref_key_1
                      e1bpacgl08-ref_key_2
                      e1bpacgl08-ref_key_3
                      e1bpacgl08-customer
                      e1bpacgl08-vendor_no
                      e1bpacgl08-alloc_nmbr
                      e1bpacgl08-item_text
                      e1bpacgl08-bus_area
                      e1bpacgl08-costcenter
                      e1bpacgl08-acttype
                      e1bpacgl08-orderid
                      e1bpacgl08-orig_group
                      e1bpacgl08-cost_obj
                      e1bpacgl08-profit_ctr
                      e1bpacgl08-part_prctr
                      e1bpacgl08-wbs_element
                      e1bpacgl08-network
                      e1bpacgl08-routing_no
                      e1bpacgl08-order_itno
    ENDFORM.                    " do_split_ACGL08
    *&      Form  do_split_ACCR08
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM do_split_accr08.
      data: l_filler(100).
      CLEAR  e1bpaccr08.
      SPLIT  g_sdata AT tab INTO
                e1bpaccr08-itemno_acc
                e1bpaccr08-curr_type
                e1bpaccr08-currency
                e1bpaccr08-currency_iso
                e1bpaccr08-amt_doccur
                e1bpaccr08-exch_rate
                e1bpaccr08-exch_rate_v
                l_filler
    ENDFORM.                    " do_split_ACCR08
    *&      Form  message_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_output using if_error.
      data: l_message(200),
            l_return type i.
       format color 1.
       skip.
       write: / text-020, g_tab_index-from,
                text-021, g_tab_index-to.
       skip.
       if if_error = on.
        write: / icon_red_light as icon, text-030 color 6.
       else.
        write: / icon_green_light as icon, text-031 color 5.
       endif.
       describe table i_return lines l_return.
       if l_return is initial.
         write: / text-032.
       endif.
       loop at i_return.
          CALL FUNCTION 'FORMAT_MESSAGE'
            EXPORTING
              ID              = i_return-id
              LANG            = sy-langu
              NO              = i_return-number
              V1              = i_return-MESSAGE_V1
              V2              = i_return-MESSAGE_V2
              V3              = i_return-MESSAGE_V3
              V4              = i_return-MESSAGE_V4
            IMPORTING
              MSG             = l_message
            EXCEPTIONS
              NOT_FOUND       = 1
              OTHERS          = 2
          check sy-subrc = 0.
          write: / l_message.
       endloop.
    ENDFORM.                    " message_output
    regards
    vijay

  • Sales orders in /SAPAPO/RRP3

    Colleagues,
    I have a question regarding the display of sales orders/deliveries within the transaction /SAPAPO/RRP3.  We are currently utilising SCM7.0 and my question realtes to the following process.
    1. Sales orders are created in ECC and transferred to APO
    2. Sales orders are visible within the ransaction /SAPAPO/RRP3, with the quantity and dates being the same as the sales order
    3. Deliveries are created from the sales order in ECC and transferred to APO
    4. Deliveries are transferred to APO and also visible within the transaction /SAPAPO/RRP same date and quanity.
    My quesition is should both the Sales order and delivery be visible within the transaction /SAPAPO/RRP3, the sales order exists with zero quantity and the delivery exists with the correct quntity and date.
    I cannot find any key completion erors, or inconsistency messages in any of the logs.
    Regards
    Paul

    Hi ,
    In a simple Full Delivery scenario, you will only see a delivery for a sales order in /sapapo/rrp3 and the corresponding Sales Order will not be seen once a delivery is created. But in case you have multiple schedule lines(Delivery Proposal) and partial deliveries are allowed, you will still see the sales order and the delivery.
    Let's say you have a Sales Order with confirmation situation like below
                                                                                    Req.Qty              Conf Qty              Req.Dt     Conf.Dt
    example, Sales Order 100034/0010/001          100                       0                          05/13    
                   Sales Order 100034/0010/002                                      50                                         05/17
                   Sales Order 100034/0010/003                                      50                                         05/18
    This will look something like this in RRP3(assuming transit, pick/pack, load equals zero)
    05/13        100034/0010/001          100-       0
    05/17        100034/0010/002            0         50
    05/18        100034/0010/003            0         50
    05/13        100034/0010/001                 100-       0
    05/17        Delivery#/0010                       0         50
    05/18        100034/0010/003                   0         50
    If a delivery is created for first confirmed schedule line, you will see the sales order first schedule replaced by the delivery like shown above.
    If you don't see this behavior and if you suspect some inconsistencies, try running CCR report with Sales Orders.
    Hope it helps.
    Regards
    Mohan
    Edited by: V R Mohan  Chunchu on May 14, 2010 7:33 PM

  • /N/SAPAPO/RRP3 different to MD04

    Hi,
    Does the values inf /N/SAPAPO/RRP3 should exactly be the same in MD04?

    Hi,
    The elements display in md04 and RRP3 differs based on the
    setting made in OLTP system in customisation.
    If all transactional data are sent from APO to R/3 and vice
    versa, the results will be same and if any indifference noticed
    can be controlled via CCR transaction as mentioned by AMOL.
    Also in APO customisation, there are settings for order view
    to change the way as we require so that we can bring in/take
    out may elements as we require.
    Regards
    R. Senthil Mareeswaran.

  • Advice on how to read the Product View (/sapapo/rrp3)

    Hi to all!!
    I need your help!!
    May you give me some advice on how to read  the product view /sapapo/rrp3 (above all the pegging overview tab)??
    Is there any useful link or some texts that could help me?
    Thanks in advance!
    Regards
    Maria Piscitelli

    Hi Maria.
    Here is a link to the help for the Product View, within that you will find a link to the pegging overview.
    [Product View|http://help.sap.com/saphelp_scm2007/helpdata/en/11/c87037e5c7005be10000009b38f8cf/content.htm]
    Hope this helps.
    M.

  • How to extract OPENING DATE information in /SAPAPO/RRP3 to BW?

    Hi All,
    I would like to extract OPENING DATE information in transaction code /SAPAPO/RRP3 to BW. Has anyone tried doing this before?
    Thank you.
    Regards,
    Joy

    Hi Joy
    We are using  /SAPAPO/EFPL_ORD_NET_GET this FM will give you the entire pegging relationship for any order in the live-cache. While extracting this information you get all the order details with all the required dates.
    you need to paas the values to this FM as below.
    I_SIMVERID   = active version 000
    I_SIMSESSID = simsession ID you can create using FM /sapapo/RRP_SIMSESSION_CREATE
    I_ORDERS_TAB= in this table,you need to pass the CHAR22 GUID of any order like planned/sales order/pur.req..
    Thanks
    Amol

  • BADI / USER-EXITS available for Txn. QE01

    Hi Experts,
    Could anyone please suggest appropriate BADIu2019s and user-exists available for Txn. QE01 to send the status change.
    Our requirement is to send a mail notification to the user when all the result recording status of the inspection characteristics turn to 'complete'
    In Tx QE01 the inspection results are recorded for each inspection characteristics.When results recorded for all the characteristics the user will close the insp. characteristic and the status will change to 'complete' then needs a mail notification so that user decision (UD) can be performed for the inspection lot.UD (Txn QA11) will be performing after result recording.
    Any suggestion will be appreciated.
    Thanx and Regards

    Hi ,
    Please check below BADI and User exits .
    Bus. add-in name     Description
    QE_RESULT_VALUATION   "Valuation of Single Values
    QE_SAVE              "Save Results
    QEEM_SUBSCREEN_5000   "EE: BAdI Subscreen for Display of Data on Screen 5000
    QM_IDI_INSPPOINT     "Changing of Inspection Point Processing in IDI and BAPIs
    QM_INPUT_PROCEDURE   "Input Processing
    Exit name     Description
    QEEM0003     "User exit: add. functions after valuating insp. characs
    QEEM0004     "User exit: add. functions after valuation of partial samples
    QEEM0006     "User exit: add. functions after closing inspection characs
    QEEM0007     "User exit: add. functions after completing partial samples
    QEEM0011     "User exit: add. functions before valuating insp. characs
    QEEM0012     "User exit: add. functions before valuating partial samples
    QEEM0015     "User exit: add. functions after entering individual results
    QEEM0020     "User exit: additional functions after entering the inspector
    QEEM0021     "User exit: additional functions for user key +US1
    QEEM0022     "User exit: additional functions for user key +US2
    QEEM0023     "User exit: additional functions for user key +US3
    QEEM0024     "User exit: additional functions for user key +US4
    QEEM0029     "User-Exit for Characteristic Overview Subscreen
    QEEM0030     "User-Exit for Subscreen: Characteristic Single Screen
    QEEM0031     "User-Exit for Table Structure with External Numbers
    QEEM0032     "Presentation of the characteristic text in the logon lang.
    QEEV0003     "Determination of order type for print
    QIST0002     "Generating MATERIAL_DATA for QM STI Interface
    QIST0003     "Generating VENDOR_DATA for QM STI Interface
    QIST0004     "Generating CHARACTERISTIC_HEADER for QM STI Interface
    QIST0005     "Generating CHARACTERISTIC_QUANTITATIVE for QM STI
    QIST0007     "Generating SAMPLE_HEADER for QM STI Interface
    QIST0008     "Generating RESULTS_ADDITIONAL_DATA for QM STI
    QIST0009     "Generating RESULTS_QUANTITATIVE for QM STI Interface
    QIST0010     "Generating REPORT_HEADER for QM STI Interface
    QIST0011     "Generating METHOD_DATA for QM STI Interface

  • SAPAPO/RRP3 vs MD04

    Hello Guru,
    i would like to ask about the category i have check SAPAPO/RRP3, the category DEP:PReq values was not available in MD04 for a material and plant. what is the reason behind this? and what is DEP:PReq?
    SAPAPO/RRP3 category PurRqs was available in MD04 PlOrd.
    Please help me on this.
    Thanks

    Hi
    I will suggest to execute /SAPAPO/CCR - Execute Comparison/Reconciliation report for the same product and check if you have issue between ECC and APO. It will be nice you also cross check your CIF Integration models. 
    Are you using APO Deployment functionality. The DEP: PReq, i.e. Deployment: Purchase requisition which means you have confirmed these PRs. Even its category has DEP: PReq, in APO we should have sub sequent MRP element as PurRqs in MD04.
    Regarding SAPAPO/RRP3 category PurRqs was available in MD04 PlOrd. , I think it is incorrect can you please cross check the same.
    Thanks
    Amol

  • Need BAPI Name for updation of Subcontracting scheduling line agreement

    Hi All,
            Can anybody please tell me BAPI Name for updation of Subcontracting scheduling line agreement from EKET table?
    Note: BAPI_PO_CHANGE is not useful for me.
    Thanks and Regards,
    Atul.

    Hi Muralidhara,
    Can you please give some more details for this BAPI..
    I tried using it , but getting an error "No instance of object type PurchSchedAgreement has been created. External reference:"
    and "Enter G/L Account" (Infact I did specify G/L account in account assignment table)
    with regards,
    Kirti

  • BAPI BAPI_ACC_GL_POSTING_POST for G/L posting through (for T-Code F-02)

    Hi,
    I want to use BAPI 'BAPI_ACC_GL_POSTING_POST' for G/L account posting (F-02). I need to populate the below fields at item level but i am not sure how to populate these fields at item level because not able to find last two fields in any structure of the BAPI.
    Posting Key:
    Account
    Amount
    Tax Code
    Determine tax base (Checkbox in F-02)
    Please let me know how to populate them and if i am using the wrong BAPI then please provide me the correct one.
    Thanks a lot in adv.
    Regards,
    Sheelesh

    Hi
    You can add fields that you don't have in the interface with EXTENSION. Please, see SAP Note 487722 - Using EXTENSION1 for accounting BAPIs.
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Dec 15, 2011 6:21 PM

  • Error in BAPI RETURN for Service Contract

    Hi,
      I get an error in the BAPI Return for the Uploading the Service Contracts by LSMW. The Error Message is E BS No status object is available for &.Also want to know can we upload multiple line of header text for a Contract by this BAPI. If so then how would I do this , as the BAPI structure BAPISDTEXT has textline upto 132 characters. And I am take only one file in LSMW where the header & details come alongwith text. Or could also tell me the file structure of for the data upload. The legacy system sends multiple text in the header for a Contract.For Eg.
    Header1 Detail1 Text1
    HEader1 Detail2 Text2
    Header1 Detail3 Text3
    So I would need this text1TEXT2text3 in the Header Text of the Contracts. Or do I need the change the file structure. Many thanks for your time and help.

    Thanks Nablan, I could do that for multiple header coming in file. But I have a question for you on BAdI ALM_ME_006_GOODSMVT. I have implemented this BAdI , and this BAdI is called by a function Module ALM_MEREP_006_CREATE. When I test this FM giving the Material , Orderid and Movement type entries, this BAdI is triggered when giving a breakpoint. I've given this code for changing the movement type to 961. Cause the stanadrd scenario does not maintain Movement type 961 in Mobile Asset Management. The Movement type 961 for unplanned Materials comes to SAP and changes to 261 as maiantained by TCOKO table. To bypass this & retain the movement type 961 in SAP I'm using this BAdI. Currently this is what I'm doing and am stuck in the method interface how do I call the method.
    method IF_EX_ALM_ME_006_GOODSMVT~CREATE .
    break-point.
    *DATA : i_ce_goodsmovement TYPE REFERENCE
              ALM_ME_CUSTOMER_ENHANCEMENT.
    DATA : lr_badi_goods_movement TYPE REF TO if_ex_alm_me_006_goodsmvt.
    DATA : ls_user_data TYPE ALM_ME_USER_DATA-USERID.
    *DATA : goods_movement TYPE ALM_ME_MATERIAL_MOVEMENT.
    CALL METHOD lr_badi_goods_movement->create
      EXPORTING
           ce_goodsmovement = ce_goodsmovement
      IMPORTING
           user_data        = ls_user_data
           custom_user_data = ls_ce_user_data
           goods_movement   = goods_movement
      changing
           return           = return[].
    CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'
           TABLES
                return = return.
    endmethod.
    Please help me to get the data in this method. How do I call this.

  • BAPI error for mvmt types 201 and 202

    Hi all,
      I'm using a bapi BAPI_GOODSMVT_CREATE for the movement type 201 and 202 with the gm_code = '03' for the transaction mb11- Goods movement. But it returns an error u201D Account 400000 requires an assignment to a CO object u201D...I'm unable to resolve this one....I have attached the code below. Please help me in fixing this issue...
    if sy-subrc = 0.
      loop at it_mchb into wa_mchb.
        if wa_mchb-clabs gt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '201'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        elseif wa_mchb-clabs lt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '202'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        endif.
      endloop.
      clear lv_lin.
      describe table it_item lines lv_lin.
      if lv_lin = 0.
        write : / 'No records found'.
      endif.
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header  = wa_header
          goodsmvt_code    = wa_code
        importing
          materialdocument = lv_matdoc
        tables
          goodsmvt_item    = it_item
          return           = it_return.
      if it_return is initial.        " if record created successfully
        call function 'BAPI_TRANSACTION_COMMIT'. " commit work
        write : / lv_matdoc, 'IS CREATED SUCCESSFULLY' color 5.
        loop at it_item into wa_item.
          write : / 'Mat :', wa_item-material,'bat :', wa_item-batch.
        endloop.
      else.                           " if record is not created successfylly
        loop at it_return into wa_return.
          write : / wa_return-message color 6.
        endloop.
        uline.
      endif.
    else.
      write : / 'No Records found' color 7.
    endif. " gt_s035 is not initial
    Edited by: Arunmozhi_06 on May 30, 2011 12:48 PM

    Hi,
       Did you passing the leading 0's in the cost center field?
    and check the below coding..
    * Structures for BAPI
      data: gm_header  type bapi2017_gm_head_01.
      data: gm_code    type bapi2017_gm_code.
      data: gm_headret type bapi2017_gm_head_ret.
      data: gm_item    type table of
                       bapi2017_gm_item_create with header line.
      data: gm_return  type bapiret2 occurs 0.
      data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.
      clear: gm_return, gm_retmtd. refresh gm_return.
      perform show_status using 'Scrapping(551) Material'.
    * Setup BAPI header data.
      gm_header-pstng_date = sy-datum.
      gm_header-doc_date   = sy-datum.
      gm_code-gm_code      = '06'.                              " MB11
    * Write 551 movement to table
      clear gm_item.
      move '551'        to gm_item-move_type     .
      move xresb-matnr  to gm_item-material.
      move p_bdmng      to gm_item-entry_qnt.
      move xresb-meins  to gm_item-entry_uom.
      move xresb-werks  to gm_item-plant.
      move xresb-lgort  to gm_item-stge_loc.
      move p_grund      to gm_item-move_reas.
    * Determine cost center per plant
      case xresb-werks.
        when '0004'.
          move '0000041430' to gm_item-costcenter."pass leading zero's in the cost center field
        when '0006'.
          move '0000041630' to gm_item-costcenter.
        when '0007'.
          move '0000041731' to gm_item-costcenter.
        when '0008'.
          move '0000041830' to gm_item-costcenter.
      endcase.
      append gm_item.
    * Call goods movement BAPI
      call function 'BAPI_GOODSMVT_CREATE'
           EXPORTING
                goodsmvt_header  = gm_header
                goodsmvt_code    = gm_code
           IMPORTING
                goodsmvt_headret = gm_headret
                materialdocument = gm_retmtd
           TABLES
                goodsmvt_item    = gm_item
                return           = gm_return.
    Maybe there is some config missing for your cost center, or maybe something missing in your code. check above.
    Regards,
    Dhina,..
    Edited by: Dhina DMD on May 31, 2011 8:02 AM

  • BAPI/RFC for Service Complaints Creation in CRM 5.0

    Hi,
    We are working on the Complaints and Returns module in CRM 5.0. We have found the Transaction Code for the same. (CRMD_BUS2000120).
    Not able to find the BAPI/RFC for the same.Let us know if any. Appreciate your comments on the same.
    Thanks,
    Moorthy

    Hi,
    Thanks for the response
    I am not talking about Service Order. I have requirement to create a Service Complaint. For that the transaction is CRMD_BUS2000120. Now I need to find the function modules/RFC available for this requirement.
    Hope it clarifies .
    Even I have found function module called -CRM_COMPLAINT_API_CREATE but not sure right one
    Thanks,
    Moorthy

  • Bapi's for creating Maintenance order in IW31 with notification

    Hi All,
       Is there any bapi's for creating Maintenance order with Notification number in the transaction iw31.
      Also is there any bapi's for creating measurement document.
    Points will be awarded.
    Regards,
    vinoth

    RFC MeasDocument: Individual Processing, Create
    MEASUREM_DOCUM_RFC_SINGLE_001
    RFC MeasDocument: Individual Processing, Change/Display or Read
    MEASUREM_DOCUM_RFC_SINGLE_002

Maybe you are looking for