Updating VBAP line information in user exit when using VA02

HI All
  I am trying to update the values of VBAP-CHARG in user exit form USEREXIT_SAVE_DOCUMENT for all line items. But i am unable to update the values though it gets reflected in xvbap.
Kindly help me in this.
thanks and regards
shilpa

Hello Shilpa,
At the point where this userexit is called the data has already been sent to the database (in update task) hence any changes you do to the internal tables are not reflected on the database. If you want to change the data of the internal tables e.g. xvbap use the userexit USEREXIT_SAVE_DOCUMENT_PREPARE instead. This is called before the data is posted.
Regards,
Michael

Similar Messages

  • Problem with User exits when using custom fm

    Hi everybody,
    I am processing an IDoc using fm IDOC_INPUT_INVOIC_MRM. Nos I had to copy this to Z_...
    And this fm has a sun-routine that calls User-exits. When I am using the standard fm, the UEs are being checked for active and executing the logic in the UE. But when I am processing IDoc using Z_...fm, the system is checking if the UEs are active. Its also active and now the cursor is coming to CALL CUSTOMER-FUNCTION '014'. But here when I press F5 in Debug, the cursor moves to the next statement after this function call without executing the user- exits. I dont know why its not executing the UE.
    Is there any setting that I need to make?
    thanks in advance
    kris

    Hi Vamsi,
    User exits are specific to the object they are included in. So when you have a "CALL CUSTOMER-FUNCTION '011'" in IDOC_INPUT_INVOIC_MRM and when you have "CALL CUSTOMER-FUNCTION '011'" in your Z function module, they are two different things.
    The purpose of a user exit is that you can include your logic in there within the limits defined by the object and without repairing the system. If you copied it, then you don't need the user exit anymore, as that copied object is your custom object and you can incorporate anything you want within main source code itself. If you really thing you should have that user exit, then double click on the call function statement, the system will ask if you want to create the function module, say yes and proceed with the creation.
    But I don't see any reason why you will copy a standard IDOC function module(while you could have used a user exit in there) and still want to use the user exit functionality. Once you copied, it is your object and you don't need a user exit to insert code into your own object.
    Hope this is clear.
    Srinivas

  • Suggest the user exit when process order released then save

    Need to update batch value from component's batch field to FG batch field. Need at the time of process order released and saved. Can you please tell me which user exit to use?

    Hi,
    The following enhancements are available for process order management:
    For order maintenance:
    o   PPCO0006 to predefine entries for order header fields when creating
        an order
    o   PPCO0001 to provide information at the time of saving (for
        production orders and process orders)
    o   PPCO0007 to check or change header data when saving
    o   PPCO0002 to add additional checks that are to take place when
        setting the deletion flag or deletion indicator
    o   PPCO0003 to prevent changes in sales order items that would cause
        changes in the process order for static assembly processing
    o   STATTEXT to format the status line
    o   PPCO0008 to check components that have been changed or added
    o   PPCO0005 to change the storage location and the 'backflush'
        indicator in the reservation
    o   PPCO0013 to change the priority of the selection criteria for batch
        determination in production orders or process orders
    o   PPCO0014 to restrict the selection of process orders that are
        offered when creating external relationships
    o   PPCO0020 to display additional information for another tab page in
        the process order header
    Regards,
    Dhaval

  • Give me information on User-Exits.

    Hi,
      I have received an object on User-exits. I have no knowledge of user-exits. Could anyone please tell me Where can i get information on user-exits.
    Thanks in advance for your esteemed help, if you have any files please send it to my YAHOO id.
    Regards,
    Goutham.
    [email protected]

    You can type a transaction code and this program show you all passed user exits
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      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 = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            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:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • Schedule Line Category change-USER EXIT

    REQUIREMENT:
    When saving a SALES ORDER, Change the schedule line category on the SALES ORDER from CP(Standard Availability Check) to CS(Third Party Processing u2013Trigger Purchase Requisition)
    Initially when we create the SALES ORDER, we have Schedule line category CP to generate schedule lines based on stock availability
    SO Date- 09/14/2010
    Schedule line 0001--- 09/14/2010 --- Confirmed Qty (0) --- Sched Line Categ(CP)
    Schedule line 0002--- 09/16/2010 --- Confirmed Qty (1) --- Sched Line Categ(CP)
    Config Change: We have changed the Schedule line category- CS to turn off Purchase Order Scheduling (Indicator turned off--P.req.del.scheduling)so that when we change the schedule line category, no PO scheduling happens again
    Our requirement is that when saving the sales order, we want to change both the schedule lines item category-0001/0002 from CP to CS
    SO Date- 09/14/2010
    Schedule line 0001--- 09/14/2010 --- Confirmed Qty (0) --- Sched Line Categ(CS)
    Schedule line 0002--- 09/16/2010 --- Confirmed Qty (1) --- Sched Line Categ(CS)
    After saving the order, a Purchase Requisition is generated for the Schedule Line 0002..
    MY QUESTION:
    Is this possible using the BAPI_SALESORDER_CHANGE without changing the dates on the schedule lines or deleting any schedule line
    Thanks
    Kumar

    Hello Kumar,
    Please check the User exit and let us know whether your requirment is met or not.
    #USEREXIT_MOVE_FIELD_TO_VBEP
    Use this user exit to assign values to new fields at the level of the sales document schedule lines.
    The user exit is called up at the end of the FORM routine VBEP_FUELLEN.
    Regards,
    Sarthak

  • CJ20N BADI or user-exit when back without saving

    Dear all,
    I am looking for a BADI or a user-exit when the user press the back button in transaction CJ20N.
    Please note that the user don't want to ave in this case.
    Thank you for your help.
    Regards,
    Kevin MICHEL
    Moderator message: please (re)search yourself before asking, make use of available information/documentation.
    Edited by: Thomas Zloch on Oct 22, 2010 11:23 AM

    Hi venkatesh,
    put a breakpoint into method GET_INSTANCE of class cl_exithandler.
    Then do what you want to supervise. The method is called for all BADIs triggered. You will find out which one can be used.
    Please excuse the generic nature of my answer. I didn't know what you already tried.
    Regards,
    Clemens

  • How to find the ME29N 'USER EXIT' when our save the release PO after.

    How to find the ME29N 'USER EXIT' when our save the release PO after.
    which user exit will be used?
    thanks.
    alex.

    Hi,
      process :
        go to tranx code :   ME29N ,
           System---->Status , here copy the program name (SAPLMEGUI),
         go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
         tranx code : CMOD ,  Utilites--->Sap Enanchement,
                                         specify the package name : ME
                                          and execute, displays a list of exits ,
                                 and find out our suitable exit based on requirement.
    check these :   EXIT_SAPMM06E_021
    reg
    Siva

  • Where can I get more information about User exits?

    Where can I get more information about user exits,their related Tables and the source code of an User exit?
    Thanks

    would you please give the Internet addresses of these places?
    Mostly I want to get the source of some user exits in Oracle Application.
    If you know how and where can I get these sources,I'll appriciate if you let me know.
    Regards

  • User-exit in VA01/VA02 to add order item and condition price

    Hi experts,
       I have an urgent requirement to add an order item and pricing for VA01/VA02 when certain logic are met. Do you know a user-exit in VA01/VA02 to add sales order item and condition price for an order?
    I am currently using user-exit USEREXIT_SAVE_DOCUMENT_PREPARE but I can only add the required order item to xvbap but I also need to add a condition code and condition price for the added item (in xkomv). Your response are very much appreciated.
    Thanks in advance!

    Hi Leo,
      Check out few more exits:
    Exit Name           Description
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    Reward points if this helps.
    Manish

  • How to handle  user exits while using BAPI

    HI experts can any one help me on how to handle user exits while using BAPI. Do we need to handle it explicitly or standard  BAPI will take care of it??.
    Regards,
    Hari Krishna

    If you have added some fields using append structures for screen enhancements, then you have to use appropriate user exits to fill these data while calling BAPI.  Some BAPIs have EXTENSION structures to fill the custom data which can be processed using user exists or enhancements.
    Regards
    Vinod

  • BAdi or User exit to use in MB26 to avoid posting before saving of mat doc?

    Hello Experts,
    Can anyone tell me which BAdi or User exit to use in MB26 to avoid posting before saving of material document?
    I have requirement to stop posting incase of negative invetory in issuing storag location.
    Thanks

    Hello,
    The issue is currently we alllowing the negetaive stock at storage location level.At this movement , we want to avoid the negetive stock creation while posting the Mat doc with MB26.Before saving the material document I want check the stock levels in MARD , if the stock levels goes negative from this posting, then I want to stop the document posting.
    Thanks

  • User exit is used to get incoterms from ship-to-party.

    Hi Gurus,
    my client needs to catch incoterms from ship-to-party,
    please let me know which user exit is used to get incoterms from ship-to-party.
    regards,
    Naren

    In our system we get the inco terms from the ship to party. We use user exit move_fields_to_vbkd in program mv45afzz. The code looks like this:
    Inco terms
    Added to get the values of Inco Terms from
    Ship-To-Party instead of Sold-To-Party.
    data: oldship like kuwev-kunnr value space.
    if sy-ucomm   <> 'UEBR' and  "Ordre er ikke oprettet med reference
       t180-trtyp <> 'A'.        "Der er ikke Vis mode
      import oldship from memory id 'ZSS'.
      if *vbkd-inco1 is initial. "Første gang vi er i User-Exitet
        if kuwev-kunnr <> kuagv-kunnr. "Varemodtager forskellig fra ordregiver
          select single inco1
                        inco2
         into (vbkd-inco1,
               vbkd-inco2)
         from knvv
        where kunnr = kuwev-kunnr
          and vkorg = vbak-vkorg
          and spart = vbak-spart
          and vtweg = vbak-vtweg.
        endif.
      elseif oldship <> kuwev-kunnr and
       ( *vbkd-inco1 <> vbkd-inco1 or
         *vbkd-inco2 <> vbkd-inco2 ).
        select single inco1
                      inco2
          into (vbkd-inco1,
                vbkd-inco2)
          from knvv
         where kunnr = kuwev-kunnr
           and vkorg = vbak-vkorg
           and spart = vbak-spart
           and vtweg = vbak-vtweg.
      endif.
    endif.
    Det skal ligge udenfor if-sætningen for at undgå at det overskrives
    ved oprettelse med reference
    move kuwev-kunnr to oldship.
    export oldship to memory id 'ZSS'.
    /Torben

  • How to find whether user exits are  used in the query or not??

    Hi ,
    I have to make the list of queris in which user exits are used.
    Please any body help me how to find the queries in which user exits are used.
    Thanks
    Maruthi

    Hi Maruthi,
    Using table RSZGLOBV you can find out the queries that have customer exit variables.
    Set filter VRPROCTP (processing type) = 3 means customer exit.
    and the field COMPID will give you the Query name.
    Best Wishes,
    Mayank

  • How can we fnd wich user exit yo use for

    hi ABAP masters
    how can we find out which user exit to use or a particular requirment.

    Hello Devender,
    The procedure followed is usually by reading the documentation
    eg: consider a user exit or BADI definition
    We get a hint from the text of the same...if not we refer the documentation given
    if documentation is not available we check the signature of the enhancement i.e, which all fields are importing,exporting,which tables can be changed which cannot ....etc
    Finally ,if none works out we do what abapers do best
    Put a break point and see if it works or in case of BADI ,create a test implementation and see if it works out..
    so here is the summary
    Check description ->  Check documentation  -> Check signatures -> debugg/Trial and error
    Hope it helped you out
    Regards
    Byju

  • How user exit is used to populate the Profit center field in  Sales order?

    Hi All,
    Please let me know :
    How the user exit is used to populate the Profit center field in the Sales order?
    Please gurus answer as quickly as possible as I require this urgently.

    Hi,
    To derive the correct profit center in the Sales Order, you customize in 0KEM.
    Trust this helps much and do encourage our efforts!
    Cheers!

Maybe you are looking for