Bapi for reversing MIRO transaction

Hi everybody,
i want a bapi that i can use for reversing MIRO that is posted.
Thanks in advance.
Abhijit D.

hi prabhu..
thanks for the solution.
this is a perfect one..
thanks again.
hi vikas..
i didnt try the transaction u said
but BAPI_INCOMINGINVOICE_CANCEL works
fine
nways thanks for the suggestion vikas..
Message was edited by:
        abhijit dangat

Similar Messages

  • I want to Bapi For Reverse Meter Reading

    Hi
    Everyone Thank You in advance.
    I want to Bapi For Reverse Meter Reading.
    Tcode : EL37
    Here I can Do manualy meter reading reverse now i want to do this process in mass..
    is there any bapi to do this task here in EL37 i can only add one installation number to reverse it .
    i want my program to use multipule installation number to reverse in mass .
    so i need bapi for this .
    Thankx
    Kaushal

    Hi;
    You can look below link.
    Best Regards.
    ISU: BAPI to update MRU on Installation

  • BAPI for  Reversal of Goods Receipt Purchase Order(Transaction : MIGO)

    Hi all,
    Is there any BAPI for the Reversal of posting the documents Goods receipt Purchase order
    (Transaction: MIGO).
    Any inputs on this..is highly appreciable...
    thanks in advance...
    regards..
    prathima.

    Hi,
    Try this passing material doc and year.
    * Cancel the goods movement (creates a reversal document)
      CALL FUNCTION 'BAPI_GOODSMVT_CANCEL'
        EXPORTING
          materialdocument = g_material_doc
          matdocumentyear  = g_matdoc_year
        TABLES
          return           = i_return.
    Edited by: Raj on May 14, 2008 7:46 PM

  • Run time is more for processing MIRO transaction

    Dear SAP Gurus,
    At our client, when they are doing MIRO, it is taking much time to open the first screen after entering invoice date & PO no. The client was telling this is happening only for certain materials. I could not understand the relation between material master and MIRO transaction time. When run time analysis is done by t. code se30 for that transaction. The Abap element is taking 20% time where as database access is taking 80% time.
    Kindly guide me on the same isuue to sort it out.
    With Warm and Regards
    Bhikshapathi

    Hi,
    Index table 'MSEG'. Then the database access time will be reduced. The indexing will take time depending upon your database volume, but once completed, time required for various transactions will be drastically reduced.
    Regards,
    Prashant

  • BAPI for delivery VL01N transaction

    Hi All,
           I am working on SAP ECC 5.0 version. My requirements are to create a delivery note against a purchase order. The purchase order is basically for Stock transfer between intra company (UB) and Inter Company (NB) . So am looking for BAPI that can create outbound delivery for Goods movement types 641 and 643.
    I tired searching some of the already asked questions on this forum, but nothing was substantial.
    If any of you know the BAPI/ worked on similar requirements, Please let me know the details with an example snippet if possible.
    Thanks,
    Kiran

    HI,
    check this link BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N
    Thanks
    Mahesh

  • What is d BAPI for reversal of Good Receipt Note(GRN) for movement type 102

    Hi ABAPers,
       I have got requirement like this , I have done Goods Receipt Note (GRN) based on Purchse order Number using '.BAPI_GOODSMVT_CREATE' with 101 movement type.
       But now my requirement is reversal of good receipt note(GRN) based on Material Document Number (or) Purchase Order Number with 102 movement type. what is the bapi name i need to use. and i need to give reason for the reversal of GRN.
    please tell me the field name for reason  in bapi.
    i have searched in the net, but i could not get proper answer to this isse.
    Highly appriciate who gives answer as early as possible. I need to complete this task EOD. please give replies.
    Thanks & Regards,
    Vinay Kumar.

    Hi,
    If your material document has specific movement type i.e. 101, if you cancel document using BAPI_GOODSMVT_CANCEL, it automatically picks associated movement type 102 defined in customizing setting, you don't need to pass 102 explicitly while cancelling.
    I have not seen reason code in this bapi, but it is required to pass reason code then you may try transaction code MBST using BDC.
    Thanks,
    Ashok Veer

  • BAPI for f-04 transaction

    Hi all,
           I am using a bapi ( BAPI_ACC_DOCUMENT_POST ) for transaction f-04, posting and clear. But here only posting is happening, i.e after the execution only the table BSIS (Accounting: Secondary Index for G/L Accounts) is getting updated and clearing is not happening i.e the table BSEG (Accounting: Secondary Index for G/L Accounts (Cleared Items) ) is not getting updated.
          Is there is any other BAPI that I can use for my requirement or I should go with BDC.
    Thanks
    S. Sudagar

    Funny - a similar question was posed earlier:
    BAPI_ACC_Document_Post
    My suggestion there was to look at the POSTING_INTERFACE_CLEARING function and the documentation around it - if suitable, you may need to write a bit of a "wrapper" function around it so you can have it RFC enabled (if that's what you need).
    Jonathan

  • BAPI for calling Z transaction From NON-SAP system

    hi all, am new to BAPI i want to know that can we call any standard or Z transaction from NON-SAP system using BAPI if yes then plz let me know how.???
    thanx...

    BAPI's are not used for calling transactions. They have the same result though, a business partner for example kan be created, and maintained via the GUI, but it can also be done via a BAPI. These BAPI's are created for calling them from (non-) SAP systems since they are remote enabled. However, this means that the calling application / party will have to 'build' some sort of application themselves in order to call these BAPI's from 'outside' of the SAP system.
    The calling application will have to have access to the system, which can be maintained in the remote destination transaction SM59.
    But enough of this, there are lots and lots of posts on SDN about BAPI's, remote destination etc.

  • BAPI for access to transaction MIR7 (preliminary invoice)

    Hello,
    I need to access from SRM 5.0, the R/3 Backend transaction
    MIR7 -(preliminary invoice)
    We use R/3 Backend 4.6C
    Which BAPI can I use to acomplish this? Is it in SRM or in the BackEnd?
    Thank you for any answer.
    Aart

    Hi. I can't actually get on to SAP at the moment but try BAPI_INCOMINGINVOICE_PARK in R/3.
    If that does not work look at BAPI_INCOMINGINVOICE_CREATE, it might have the option to post or park.
    Regards,
    Dave.

  • BAPI for MFBF Scrap Transaction

    Does anyone know if there is a BAPI that can do an MFBF scrap transaction? The transaction would need to both accumulate earned hours and issue material.  The processing type would be ZB.
    Thanks,
    Lori Enos

    Hi,
      Check in function group 'VHURM', that may be useful,
    Rgds,

  • BAPI for invoking 'Stop Transaction'

    Hi,
    Is there any BAPI to stop the running of any function module or report after some time by specifying the time. If any FM or report goes running for long time need to invoke BAPI to stop the same.
    Regards,
    Ram

    Dear All,
    Thanks for the replies.
    Also, I am posting the data through Excel sheet and I want to check whether the excel file has already been processed or not, will you please let me know how to check this?
    Thanks in Advance,
    Ramana

  • BAPI for bank related transaction

    Hi All,
    can u pls suggest me the BAPI used to upload
    1)bank financial year master data
    2)A/C type master data
    3)bank payments & receipts master data

    Try this BAPI BAPI_BANK_CREATE
    Thanks,
    Mahesh.

  • BAPI FOR POSTING FBS1 TRANSACTION

    Hi,
    Can any one help on How/which BAPI to user in posting doc using FBS1 transaction

    hai pankaj,
    here is the example code using the bapi 'BAPI_ACC_GL_POSTING_POST'
    example:
    data:
          obj_type like bapiache02-obj_type,
          obj_key like bapiache02-obj_key,
          obj_sys like bapiache02-obj_sys,
          documentheader like bapiache08,
          accountgl like bapiacgl08
                      occurs 0 with header line,
          currencyamount like bapiaccr08
                      occurs 0 with header line,
          return like bapiret2
                      occurs 0 with header line,
          extension1 like bapiextc
                      occurs 0 with header line,
          t_edidd  like edidd occurs 0 with header line,
          bapi_retn_info  like bapiret2 occurs 0 with header line.
    data: error_flag.
    *documentheader-obj_type     = 'BKPFF'.
    *documentheader-obj_key      = '18000000002002004'.
    *documentheader-obj_type     = 'BKPFF'.
    *documentheader-obj_key      = '180000000010002004'.
    *documentheader-obj_sys      = 'RD1CLNT200'.
    documentheader-username     = sy-uname.
    documentheader-header_txt   = 'Test using BAPI'.
    documentheader-comp_code    = '1000'.
    *documentheader-ac_doc_no
    *documentheader-fisc_year    = '2005'.
    documentheader-doc_date     = sy-datum.
    documentheader-pstng_date   = sy-datum.
    *documentheader-trans_date
    *documentheader-fis_period
    documentheader-doc_type    = 'SA'.
    *documentheader-ref_doc_no
    *documentheader-compo_acc
    *documentheader-reason_rev
    accountgl-itemno_acc = '1'.
    accountgl-gl_account = '0000160100'.
    accountgl-comp_code = '1000'.
    accountgl-pstng_date = sy-datum.
    accountgl-doc_type   = 'SA'.
    accountgl-profit_ctr = '0000010000'.
    append accountgl.
    accountgl-itemno_acc = '2'.
    accountgl-gl_account = '0000160100'.
    accountgl-comp_code = '1000'.
    accountgl-pstng_date = sy-datum.
    accountgl-doc_type   = 'SA'.
    accountgl-profit_ctr = '0000010000'.
    append accountgl.
    *AC_DOC_NO
    *FISC_YEAR
    *FIS_PERIOD
    *accountgl-STAT_CON = 'X'.
    *REF_KEY_1
    *REF_KEY_2
    *REF_KEY_3
    *CUSTOMER
    *VENDOR_NO
    *ALLOC_NMBR
    *ITEM_TEXT
    *BUS_AREA
    *COSTCENTER
    *ACTTYPE
    *ORDERID
    *ORIG_GROUP
    *COST_OBJ
    *PROFIT_CTR
    *PART_PRCTR
    *WBS_ELEMENT
    *NETWORK
    *ROUTING_NO
    *ORDER_ITNO
    currencyamount-itemno_acc = '1'.
    currencyamount-currency = 'GBP'.
    currencyamount-amt_doccur = '100.00'.
    append currencyamount.
    currencyamount-itemno_acc = '2'.
    currencyamount-currency = 'GBP'.
    currencyamount-amt_doccur = '-100.00'.
    append currencyamount.
      call BAPI-function in this system   
    call function 'BAPI_ACC_GL_POSTING_POST'
         exporting
              documentheader = documentheader
        importing
             obj_type       = obj_type
             obj_key        = obj_key
             obj_sys        = obj_sys
         tables
              accountgl      = accountgl
              currencyamount = currencyamount
              return         = return
              extension1     = extension1
         exceptions
              others         = 1.
    if sy-subrc <> 0.
      message e999(re) with  'Problem occured'.
    else.
          loop at return.
              if not return is initial.
              clear bapi_retn_info.
              move-corresponding return to bapi_retn_info.
              if return-type = 'A' or return-type = 'E'.
                error_flag = 'X'.
              endif.
              append bapi_retn_info.
            endif.
          endloop.
      if error_flag = 'X'.
         message e999(re) with  'Problem occured'.
         rollback work.
      else.
      commit work.
      endif.
    endif.
    hope this may be helpful
    regards,
    praba.

  • Bapi for the transaction FBRA, FB08, FB01 anf FD02

    hi,
    can any one please help me with BAPI for the following transaction?
    FBRA - reset cleared items
    FB08 - reversal of the documents
    FB01 - post documents
    FD02 - change customer.
    regards kriti

    Hi
    Copy the below  program in se38 and execute the program and along with the transaction code you need to specify the program name to obtain the program name all you have to do is execute the t-code and go to system--> status and copy the program name from the screen and paste it in the above program.
    tables : tstc,
             tadir,
             modsapt,
             modact,
             trdir,
             tfdir,
             enlfdir,
             sxs_attrt ,
             tstct.
    data :
       jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode,
    p_pgmna like tstc-pgmna .
    data wa_tadir type tadir.
    start-of-selection.
      if not p_tcode is initial.
        select single * from tstc where tcode eq p_tcode.
      elseif not p_pgmna is initial.
        tstc-pgmna = p_pgmna.
      endif.
      if sy-subrc eq 0.
        select single * from tadir
        where pgmid = 'R3TR'
        and object = 'PROG'
        and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
          where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
            where pname = tstc-pgmna.
            select single * from enlfdir
            where funcname = tfdir-funcname.
            select single * from tadir
            where pgmid = 'R3TR'
            and object = 'FUGR'
            and obj_name eq enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
        select * from tadir into table jtab
        where pgmid = 'R3TR'
        and object in ('SMOD', 'SXSD')
        and devclass = v_devclass.
        select single * from tstct
        where sprsl eq sy-langu
        and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(105) sy-uline.
          format color col_heading intensified on.
          * sorting the internal table
       sort jtab by object.
          data : wf_txt(60) type c,
          wf_smod type i ,
          wf_badi type i ,
          wf_object2(30) type c.
          clear : wf_smod, wf_badi , wf_object2.
          * get the total smod.
          loop at jtab into wa_tadir.
            at first.
              format color col_heading intensified on.
              write:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              write:/(105) sy-uline.
            endat.
            clear wf_txt.
            at new object.
              if wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              elseif wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              endif.
              format color col_group intensified on.
              write:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            endat.
            case wa_tadir-object.
              when 'SMOD'.
                wf_smod = wf_smod + 1.
                select single modtext into wf_txt
                from modsapt
                where sprsl = sy-langu
                and name = wa_tadir-obj_name.
                format color col_normal intensified off.
              when 'SXSD'.
                * for badis
             wf_badi = wf_badi + 1 .
                select single text into wf_txt
                from sxs_attrt
                where sprsl = sy-langu
                and exit_name = wa_tadir-obj_name.
                format color col_normal intensified on.
            endcase.
            write:/1 sy-vline,
            2 wa_tadir-obj_name hotspot on,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            at end of object.
              write : /(105) sy-uline.
            endat.
          endloop.
          write:/(105) sy-uline.
          skip.
          format color col_total intensified on.
          write:/ 'No.of Exits:' , wf_smod.
          write:/ 'No.of BADis:' , wf_badi.
        else.
          format color col_negative intensified on.
          write:/(105) 'No userexits or BADis exist'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(105) 'Transaction does not exist'.
      endif.
    at line-selection.
      data : wf_object type tadir-object.
      clear wf_object.
      get cursor field field1.
      check field1(8) eq 'WA_TADIR'.
      read table jtab with key obj_name = sy-lisel+1(20).
      move jtab-object to wf_object.
      case wf_object.
        when 'SMOD'.
          set parameter id 'MON' field sy-lisel+1(10).
          call transaction 'SMOD' and skip first screen.
        when 'SXSD'.
          set parameter id 'EXN' field sy-lisel+1(20).
          call transaction 'SE18' and skip first screen.
      endcase.
    Regards
    Pavan

  • BAPI needed  for  change material(Transaction : MM02)

    Hi all,
    We have a requirement where in we need to post the documents throuh BAPI for change material (Transaction: MM02).
    Any inputs on this..is highly appreciable...
    thanks in advance...
    regards..
    prathima.

    CHECK THIS CODE
    *& Report  ZBAPI_MATERIAL_SAVEDATA
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
           STGE_LOC(4),
           MRP_IND(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
           LANGU(2),
          MATL_DESC(40),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA.
    *decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *INTERNAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MATMAS.XLS' .
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    perform F_GET_DATA.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_MOVE_DATA .
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_EXCEL BY ROW COL.
    CLEAR IT_EXCEL.
    LOOP AT IT_EXCEL.
    MOVE IT_EXCEL-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE WA_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_EXCEL-VALUE TO <FS>.
    AT END OF ROW.
    APPEND WA_DATA TO IT_DATA.
    CLEAR WA_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " F_MOVE_DATA
    *&      Form  F_GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DATA .
    LOOP AT IT_DATA INTO WA_DATA.
    MOVE-CORRESPONDING WA_DATA  TO  BAPI_HEAD.
    BAPI_HEAD-BASIC_VIEW ='X'.
    BAPI_HEAD-SALES_VIEW ='X'.
    BAPI_HEAD-PURCHASE_VIEW ='X'.
    BAPI_HEAD-STORAGE_VIEW ='X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_CLIENTDATA.
    BAPI_CLIENTDATAX-MATL_GROUP = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM_ISO = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_PLANTDATA.
    BAPI_PLANTDATAX-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_PLANTDATAX-DEL_FLAG = 'X'.
    BAPI_PLANTDATAX-PUR_GROUP = 'X'.
    BAPI_PLANTDATAX-BASE_QTY = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_STORAGELOCATIONDATA.
    BAPI_STORAGELOCATIONDATA-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-PLANT = BAPI_STORAGELOCATIONDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-STGE_LOC = BAPI_STORAGELOCATIONDATA-STGE_LOC.
    BAPI_STORAGELOCATIONDATAX-MRP_IND = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_SALESDATA.
    BAPI_SALESDATAX-SALES_ORG = BAPI_SALESDATA-SALES_ORG.
    BAPI_SALESDATAX-DISTR_CHAN = BAPI_SALESDATA-DISTR_CHAN.
    BAPI_SALESDATAX-DEL_FLAG = BAPI_SALESDATA-DEL_FLAG.
    BAPI_SALESDATAX-MIN_ORDER = 'X'.
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = WA_DATA-LANGU.
    IT_MAKT-MATL_DESC = WA_DATA-MATL_DESC.
    APPEND IT_MAKT.
    CLEAR IT_RET.
    REFRESH IT_RET.
    PERFORM F_CALL_BAPI.
    READ TABLE IT_RET WITH KEY TYPE = 'S'.
    IF SY-SUBRC EQ 0.
    PERFORM F_BAPI_COMMIT.
    WRITE:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',WA_DATA-MATERIAL.
    ELSE.
    MESSAGE E000(ZHNC) WITH 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    ENDIF.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM F_CALL_BAPI .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = BAPI_HEAD
       CLIENTDATA                 =  BAPI_CLIENTDATA
       CLIENTDATAX                =  BAPI_CLIENTDATAX
       PLANTDATA                  =  BAPI_PLANTDATA
       PLANTDATAX                 =  BAPI_PLANTDATAX
       STORAGELOCATIONDATA        =  BAPI_STORAGELOCATIONDATA
       STORAGELOCATIONDATAX       =  BAPI_STORAGELOCATIONDATAX
       SALESDATA                  =  BAPI_SALESDATA
       SALESDATAX                 =  BAPI_SALESDATAX
    IMPORTING
       RETURN                     =  IT_RET
    TABLES
       MATERIALDESCRIPTION        = IT_MAKT
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    APPEND IT_RET.
    ENDFORM.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    FORM F_BAPI_COMMIT .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    ENDFORM.                    " F_BAPI_COMMIT

Maybe you are looking for

  • Ipod will not restore, I keep getting error message 1604

    I have an Ipod 3rd generation touch and when I was syncing my ipod it asked if I  wanted me to restore it.  I went through the step to restore the ipod and but it won't restore and I keep getting message 1604....does anyone know how to fix this ! !

  • Problems While Creating A Oracle Instance In Windows 7

    Hi All, I am trying to create a primary standby configuration in windows 7. When I am trying to create a oracle instance using oradim I am facing the below issue:- I am using Oracle version 10.2.0.1.0. C:\>ORADIM -new -sid STDBY -SRVC OracleServiceST

  • Purchase Order Import inserts duplicate records in po_line_locations

    Hi, I'm running standard Purchase Order Import program to import few PO's. We have only one shipment for each item, so its only one record for each line in po_line_locations. But after running the import, it inserts a duplicate record with same qty i

  • What kind of Headphones are included with Zen Mik

    I was wondering about buying a Mp3-Player a long time, and finally decided that Zen Mikro would be the best choice to make. There is no information about the kind of headphones who are included in the package, and knowing the quality of the Headphone

  • Sql Server Error 2

    When Im Install Its Working Perfect.. But Upgrading Window Into Windows 10 its giving this error at the time of connecting.. After upgrading Window Also Apper a new Folder. Windows.old