Basic function module in order to update table

Hi,
I have a very basic question. I need to make a fuction module that when accessed will update a z* table with a few inputs parameters..
Can someone give me some sample code and a few explanations about this?
                 Best Regards
                       João Fernandes

You can also try this.
first you collect all records that has to be updated in an internal table,then create a function module in se37 and pass this internal table to that FM as table parameter.
For function module write following statment.
modify <Standard TABLE_NAME> from table ITAB.
check if it help u.

Similar Messages

  • Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng)

    Hi,
    I have a requirement to use a Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng), which one (Function Module or BAPI) should I use? is there any sample codes?
    Thanks a lot!!

    Hi,
    *& Report  ZTEST
    REPORT  ztest.
    DATA : wa_header TYPE bapisdh1x,
                i_item TYPE TABLE OF bapisditm WITH HEADER LINE,
                i_itemx TYPE TABLE OF bapisditmx WITH HEADER LINE,
                i_return TYPE TABLE OF bapiret2.
               wa_header-updateflag = 'U'.
               i_item-itm_number = '000010'.
               i_item-target_qty = '4'.
               APPEND i_item.
              i_itemx-itm_number = '000010'.
              i_itemx-updateflag = 'U'.
              i_itemx-target_qty = 'X'.
              APPEND i_itemx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = '1234567890'
        order_header_inx            = wa_header
      TABLES
        return                            = i_return
        order_item_in                 = i_item
        order_item_inx               = i_itemx
    Hope this will help you.
    Regards,
    Anand.

  • BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition

    Dear All,
    BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition in PO pricing. Please give me a right solution on this query.
    Below I have given my code.
    Thanks and Regards
    Makarabd
    poitem-po_item = '00010'.
    poitem-net_price = '1060.00'.
    poitem-period_ind_expiration_date = 'D'.
    APPEND poitem.
    poitemx-po_item = '00010'.
    poitemx-po_itemx = 'X'.
    poitemx-net_price = 'X'.
    APPEND poitemx.
    select single * from ekko where ebeln = po_no.
    pocond-itm_number = '00010'.
    pocond-cond_type = 'ZVCU'.
    pocond-cond_value = 10.
    pocond-currency = '%'.
    pocond-STAT_CON = 'X'.
    pocond-accruals = 'X'.
    pocond-change_id = 'I'.   " I - Add , U - Update , D - Delete
    APPEND pocond.
    pocondx-itm_number = '00010'.
    pocondx-itm_numberx = 'X'.
    pocondx-cond_type = 'X'.
    pocondx-cond_value = 'X'.
    pocondx-currency = 'X'.
    pocondx-change_id = 'X'.
    pocondx-STAT_CON = 'X'.
    pocondx-accruals = 'X'.
    APPEND pocondx.
       CALL FUNCTION 'BAPI_PO_CHANGE'
            EXPORTING
              purchaseorder          = po_no
            TABLES
              return                 = return
              poitem                 = poitem
              poitemx                = poitemx
              pocond                 = pocond
              pocondx                = pocondx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.

    Hi ,
    Are you trying to pass the non char fields in CI_COBL. Please look at the link below .
    [http://forums.sdn.sap.com/thread.jspa?threadID=1137795] .
    Also serach for the similar threads when and notes while transferring currency and quantity field in different custom includes of the EKPO ...
    Thanks,
    Anjaneya .

  • Need name of a function module or BAPI to update the Tax Classification val

    Hi Guru's
    Need name of a function module or BAPI to update the Tax Classification value for Material master.
    Thanks in advance.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • Function Modules for Order Settlement

    Hi,
    I need simulate the transaction KO88 for Order Settlement with a function module but without batch input. Please, somebody can tell me which function module I can use and give me a example?
    Also, I need another function module for order release...
    Thanks in advance,
    Regards,
    Irina

    Here`s the way to find out how its using ...
    GO to TR.SE93-> give "KO88" 0>  click display
    Double click program name and find "call fucntion" when list come up "serach "Settlement" . You`ll get idea.
    Hope this’ll give you idea!!
    <b>Pl... award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • ABAP Program or Function Module to activate infospoke/openhub table

    Hi,
    Post migration to production, when i am trying to load the data in open hub table, its showing OH table is not active. i had tried to all aspect but i am unable to load the data.
    is there any ABAP Program or Function Module to activate infospoke/openhub table
    Thanks & Regards,
    Pankaj Bansal

    Hello Pankaj,
    Please check whether you have access to TCode SE14 . If Yes , You can use this TCode to activate the Tables.
    There are lot of  Posts talk about the procedure for activation through SE14. please refer the same
    Thanks & regards,
    Prasath

  • Function Module for .xlsx to Internal table

    Hi Gurus,
    Please let me know if there is any function module for .xlsx to internal table.
    Kind regards,
    Varun

    Hi,
    try the below FM's
    ALSM_EXCEL_TO_INTERNAL_TABLE
    TEXT_CONVERT_XLS_TO_SAP
    Thanks,
    Vinayaka

  • Reg:function module to retrive the ekko table data

    Hi all,
    Is there any function module to retrive the ekko table data for the given select-options and parametrs.
    could you provide that.
    Thanks & regards,
    S.chaitanya.

    dear chaitanya,
    may be you can use this function module ME_READ_EKKO_MULTIPLE which can be used to pass the select options to retrieve the desired EKKO data.
    OR the best way would be to do a SELECT Query which would retrieve the data faster and in an effective manner.
    Hope this helps you.
    Help Children of U.N World Food Program by rewarding and enocourage others to answer your queries
    Thanks
    Venugopal

  • Function Module with RFC for accessing tables

    Hello All
    I am programming using ABAP in Solution Manager system. I have to take data from tables(T001W and T001K) from a R/3 Server. Is there a function module which extracts data from tables via RFC ?
    Thanks
    Tharani.

    Hi,
    Check thes FM's:
    RFC_GET_TABLE_ENTRIES
    TABLE_ENTRIES_GET_VIA_RFC
    GET_TABLE_RFC
    or develop a RFC enabled FM to get the required data in R/3 and call it from your program
    example :
    data: wtab type BDSEL_STAT occurs 0 with header line.
    data: tab type BDI_ENTRY occurs 0 with header line.
    name = T001W.
    CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC'
    destination dest
    EXPORTING
    LANGU = SY-LANGU
    TABNAME = name
    TABLES
    SEL_TAB = wtab
    NAMETAB =
    TABENTRY = tab
    EXCEPTIONS
    INTERNAL_ERROR = 1
    TABLE_HAS_NO_FIELDS = 2
    TABLE_NOT_ACTIV = 3
    NOT_AUTHORIZED = 4
    OTHERS = 5 .
    Regards
    Laxman
    Message was edited by: Laxmana Kumar

  • Function Module or BAPI to update Short text  for sales order item(vl02n)

    Hi All,
    I need to update the Short text for sales order item in vl02n transaction from an internal table with Delivery number and other relevant details .
    Does any body know any Function Module or BAPI which can accomplish this purpose .
    Or else writing BDC is the only option I have got ? .
    Please clarify .
    Thanking you in advance .
    With Regards,
    Suriya .

    Hi
    You can try using BAPI_SALESORDER_CHANGE if you want to change sales order
    Regards
    MD

  • Function Module or BAPI to update Sales Order (delivery Block)

    Hi,
    Is there a Function Module or BAPI available that can update the Delivery Block for a looping Sales Order?
    Thanks,
    John

    Hi,
    check this sample code to update delivery block..
    DATA: BAPISDH1X LIKE BAPISDH1X.
    DATA: BAPISDH1 LIKE BAPISDH1.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY.
    PARAMETERS: P_LIFSK  LIKE VBAK-LIFSK OBLIGATORY.
    * Header
    BAPISDH1-DLV_BLOCK = p_lifsk.   " Delivery block
    * header X
    BAPISDH1X-DLV_BLOCK = 'X'.   " Delivery block
    BAPISDH1X-UPDATEFLAG = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_in   = BAPISDH1
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    * Check for error messages.
    IF SY-SUBRC = 0.
      WRITE: / 'Sales order not updated', T_RETURN-MESSAGE.
    ELSE.
    * Successfully updated
      WRITE: / 'Sales order updated'.
    ENDIF.
    COMMIT WORK.
    Thanks
    Naren

  • Function Modules for System Status update and reservation for service order

    I am sending the service orders data using IDOCS.
    once the IDOC is received successfully i need to do 2 things:
    1. Update the system status of the service order with the status 'SPV2'.
    2.  Create the reservation for the service order.
    Is there any function modules avilable for both of these process.
    If not how i can do these two things in ABAP Code.
    please help me out in it.

    check whether this Fm's helps you
    STATUS_CHANGE_INTERN
    CO_IH_SET_STATUS_EXTERNAL
    CO_IH_STATUS_FM_SET
    BAPI_ORDER_CHANGE_STATUS_GET
    BAPI_APPREQUEST_SETSTATUSVARNT
    BAPI_ALM_ORDER_MAINTAIN
    BAPI_RESERVATION_CREATE
    Edited by: Keshu Thekkillam on Oct 26, 2009 5:10 PM

  • Function Module for Delivery date update

    Hi all,
    Can anybody help me to solve my problem. My requirement is to update order delivery date for a partner. But I am not getting any FM for that and not getting the table name also where I can update delivery date value. If you have any known FM or any suggestion please tell me.
    Thanks in advance
    Chandan

    Hi,
    The function module is
    <b>/1CRMG0/CUST_CHAN_WRT_I01</b>
    Best Regards,
    Johnny.

  • Running Function Module in Background with Update Task is not working

    Hello Friends,
    I have a "Z" Report Program where I am running this Report in Background using JOB_OPEN, JOB_SUBMIT, JOB_CLOSE. I am calling this in BADI.
    In this Report I am calling another Function Module PRICES_POST which is a standard Function Module and in this FM there is another FM 'CKML_UPDATE_MATERIAL_PRICE IN UPDATE TASK'. Now when I am running the BADI these values are not being updated.
    Friends I would like to know whether can we run Function Modules which are  included with UPDATE TASK as Background Job program?
    Kindly help me in providing your valuable suggestions in proceeding further.
    Thanks and Regards
    Pradeep Goli

    Usually the sequence of CALLs in your report should look like
      CALL FUNCTION 'CM_F_INITIALIZE'
        EXPORTING
          msg_on_screen = c_x.
      CALL FUNCTION 'CKMS_BUFFER_REFRESH_COMPLETE'.
      CALL FUNCTION 'PRICES_CHANGE'
        EXPORTING
          actual_bdatj = f_matpr-pp-bdatj
          actual_poper = f_matpr-pp-poper
          bukrs        = p_bukrs
          budat        = p_date
          xblnr        = p_xblnr
        TABLES
          t_matpr      = t_matpr.
      READ TABLE t_matpr WITH KEY pp-xerror = ' '
                                TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        MESSAGE i046(ckprch).
      ELSE.
        CALL FUNCTION 'PRICES_POST'
          EXPORTING
            i_bktxt    = p_bktxt
            bukrs      = p_bukrs
            lis_update = 'X'
          TABLES
            t_matpr    = t_matpr.
      ENDIF.
      COMMIT WORK.
    If you forget the COMMIT-WORK each and every FM called in UPDATE TASK will not be triggered.
    Regards,
    Raymond

  • Function Modul for Order Number from VA02

    Hallo
    i have a delivery number and want read the order number from VA02.
    Of course, select the database from LIKP --> LIPS --> VBKD is possible but 
    maybe it has function modul for read the order number from transaction VA02.
    THX ANU

    Hi,
    I think is better recover the data directly from DB tables (in table LIPS you have the fields VGBEL, VGPOS, VGTYP ) if you only want the order number.
    With the delivery number you only need to acces 1 table. If you use a FM, you will recover this data and a few fields that is not interesting for you. The access to table LIPS is using table index (delivery number)
    Regards,
    Pepe

Maybe you are looking for

  • Playing slideshow on tv from ipad cutting off picture

    I am connecting my ipad 2 to my TV with a RocketFish Composite adapter and trying to play a video slideshow on my TV.  I am able to play the video/slideshow just fine, however both the top and bottom of the videos (and pictures) are being cut off by

  • Problem with parameterized reports in InfoView interface with Russian local

    Please, help! We have a problem with users, who have u201CRussianu201D as Info View portal interface language. Users have problems with reports which are parameterized. When user tries to select a custom date he gets prompt with incorrect template "E

  • FireGL V3200 Driver on Windows 7

    Hello everyone I have a Thinkpad T43 with a FireGL V3200 graphic Card. Unfortunately I didn't find a driver. Does anyone know if the exists a driver? Thanx!

  • What happened to file saving options in Lion?!

    I recently upgraded my Mac to OS X Lion and Photoshop CS5 seems to be working normally, albeit a little sluggishly, since the upgrade. However, when I create a new Photoshop file, create some layers, then "Save As", all my normal format options are m

  • Fire wires

    Hi. I've got an iMac that is about a year old running 10.6.8.  I have just bought a new Macbook Pro and want to transfer some files across. I've followed the discussions about firewires and can see what to do but am not sure which fire wire cable I n