Call transaction in user exit?

Hi
can we say "call transaction" in the background?.while using user exit...
regds
gunjan

Hi Gunjan
I've to consider you ( or your exit) are in trx, so if you need to update some tables or another object don't belong to main trx, you make sure to do the updating only if the main trx is finished successfully.
So it's usually placed the code for updating in a exit called before saving.
But also you make sure the saving is done successfully, SAP usually does the saving in update tusk, so it has to call a COMMIT to start the saving action.
When the COMMIT is called you can be sure the saving'll be done.
So if you run your code in update tusk, you'll be sure your action'll start after saving.
For these reason you should insert your code in a form called in update tusk.
PERFORM UPDATE_MY_DATABASE ON COMMIT.
So only when the system'll do the commit your code'll work.
Max

Similar Messages

  • Call BDC in User Exit?

    Hi,
    Is it possible to call BDC in User Exits? Requirement is to update cusotmer master using by CALL TRANSACTION that called from a user exit.
    How to know the user exit name, If I already know the function module name and include name?
    Ex: Include - ZXVSVU02.
    Function Module - EXIT_SAPLVV02_001.
    <removed by moderator>
    Edited by: Thomas Zloch on Jun 8, 2010 12:44 PM

    Hi,
    Have you tried calling BDC through module pool program? if its going to wotk there, sure u will get it done from user exist......
    I have worked it through module pool.......all the best for ur try.....
    Kalyan

  • Call an applications 'user exit' from a PL/SQL procedure

    My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it?
    (i.e. I am attempting to call the AR user exit SALESTAX)
    Thanks,
    Michelle Dodge

    Hi,
    Read this thread, perhaps is there your response :
    Host...
    Nicolas.

  • CALL TRANSACTION in user dialog

    Hi!
    I'm having problem to use syntax CALL TRANSACTION in user dialog (SE80).  My syntax is as follows:
    CALL TRANSACTION 'F-43' USING BDCDATA MODE 'N' UPDATE 'S'
              MESSAGES INTO t_msg.
    My problem is I cannot execute this syntax in background mode although I set the MODE as N(Do not display) or P(Do not display; debugging possible).
    However, if I set MODE as A(Display screen) or E(Display only if an error occurs), it works but foreground execution.
    Hope to get respond from you guys.
    Thank you and best regards.

    Hi,
    Chk this link if it can help you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_aba/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d3732353531%7d
    Regards,
    Balaji
    *Rewrds for helpful answers

  • Calling a std user exit from a user defined user exit

    hi
    I have a standard User Exit. I want to call it from a User Exit created by me something like zaaabbbb.
    Can you please tell me the procedure how to do it ?

    Hi,
    If the user exit is a Z include in a function module then you can call the function module like any other function module passing the required parameters. For example CALL CUSTOMER-FUNCTION '002' in transaction VA01 corresponds to function module EXIT_SAPMV45A_002. You can call this function module like you do any other function module.
    CALL FUNCTION 'EXIT_SAPMV45A_002'
      EXPORTING
        i_tvak        =
        i_tvta        =
        i_vkgrp       =
        i_vkbur       =
    * IMPORTING
    *   E_KUNNR       =
    If the user exit is a subroutine in an include in SAP name space (For example subroutine userexit_delete_document in include mv45afzz), then find out the main program in which the include is included (for example mv45afzz is included in program sapmv45a). Once you have done that you can using the following statement to call the subroutine.
    PERFORM <subroutine name> IN PROGRAM <program name>.
    For Examaple
    PERFORM userexit_delete_document IN PROGRAM sapmv45a.
    Please make sure that you use the main program name (In our example sapmv45a) and not the include name (in our example mv45afzz).

  • Transaction code + User exit

    Hi
      all
    i m looking for a Z program where i can enter 
    transaction code as parameter and get all the
    user exits corresponding to it.
    How can i do it can any one help me?
    can u tell me what r  user exits and why they r used?
    Thanks
    Saurabh Tiwari

    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

  • IPC Pricing with AP 7.00 Database Access/Call function module user-exit

    Hi experts,
    we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
    I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
    (I know that the SAP recommendation is, don't have access to database. But we need this functionality)
    In ABAP it looks like:
    select single * from  a590
          into     LH_674_a590
          where    kappl  = 'V'
          and      kschl  = 'ZSPR'
          and      kunnr  = komk-kunnr
          and      matnr  = komp-matnr
          and      datbi  >= komk-prsdt
          and      datab  =< komk-prsdt.
    Is there a possibility to implement the same SELECT in the Java-User-Exit?
    Is there maybe the alternative to call a function module instead?
    The database exits on the same application server on which the VMC runs.
    If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
    I would prefer to call a functions module.
    Thanks in adcance
    Karl-Wilhelm

    Hi Shanto & Sumit,
    Thanks for the inputs.
    as per my understanding of the log
    java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
    error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
    this was working earlier before upload.could this be because of the jar packaging.
    how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
    for further investigation.
    Thanks,
    Siddharth

  • Calling Transaction through User Decision step in workflow

    Hi all,
    Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
    Can you ppl let me know how can I achieve this?
    Pls reply ASAP...
    Thanks
    Sangharsh

    Hello Sangharsh ,
    Please Check the paramater of of the method which you define.
    e.g. I define CALL_TCODE_CJ03 method
          which have the parameters FLAG,ProjectDefinition,WBSElement2,User
          with export, import checkbox.            
    Pass the paratmeres in programs
    e.g.
    BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.                      
    DATA:                                                          
          FLAG(1),                                                        
          PROJECTDEFINITION TYPE PROJ-PSPID,                              
          WBSELEMENT2 TYPE PRPS-POSID,                                    
          USER TYPE USR21-BNAME.                                                                               
    SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.                
      SWC_GET_ELEMENT CONTAINER 'User' USER.                                                                               
    GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                                                                               
    SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                             
      CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.                                                                               
    SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.    SWC_SET_ELEMENT CONTAINER 'User' USER. 
    END_METHOD.
    I hope it will help you.
    ***Assigning points is the way to say thanks in SDN.***
    Minaxi Shah

  • Payment  transaction  F110 user exits

    Hi,
    We are running the FI payment program tcode(F110) to download the payment data using DME engine.We will be using SAP XI 3.0 to send the data from SAPR/3(enterprise edition) to an external system.Instead of downloading the data as a file,we want to send the payment data to XI using ABAP Proxy. This will enable a secure way of sending the data.
    Now the question Is there any User exits in the Standard SAP payment program where we can call the ABAP proxy to send the data to XI.The user exit should have access to the payment data before it is downloaded in to the file and obviously it should stop the downloading of the data into file and send data to XI.
    If any of the forum members have used user exits in the FI payment program,please share your experience.
    Thanks in advance,
    Leo

    Hi,
    one point is open FI (TA FIBF and BF34)
    -> process 1610 - 2060
    look here:
    <a href="http://help.sap.com/saphelp_47x200/helpdata/EN/cb/4104aadf2b11d3a550444553540000/frameset.htm">Data Medium Exchange Engine</a>
    regards Andreas

  • Hr_infotype_operation errors when called within a user exit

    Hi there.
    I am doing an enhancement in userexit PBAS0001 for CE using the enhancement framework.Whenever I am trying to change the payroll area in IT0001 by PA30 it has to give a message saying that 'all the assignments will change to new payroll areas do you want to continue?'if i say yes then the payroll areas for all the assignments should be chnaged to the current payroll area which I am trying to change.So after the pop up I am looping at all the assignments and calling the function module hr_infotype_operation.It gives an error Complex Application error.I debugged and saw that when it calls the function module the user exit gets triggered again and goes to the starting within the function call and hits the function module again and keep going like this.I checked the structure and all the parameters.looks fine below is the code where I am using the function module.I am trying to update IT0001 when somebody tries to change the IT0001(is that an issue??) i tried by submitting a program by calling the function module in the program.Didnt work too.Is there any way we can do it by BDC??
    Check if the payroll areas are equal
        IF ls_i0001-abkrs NE new_p0001-abkrs.
    If the payroll areas are not equal then generate a message pop-up with 'YES' and 'NO' buttons
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              titlebar       = 'Warning'
              text_question  = 'Payroll Area specified is different with other assignments.Do you want to move all the other assignments to the same payroll area?'
              text_button_1  = 'Yes'
              icon_button_1  = ' '
              text_button_2  = 'No'
              icon_button_2  = ' '
              default_button = '1'
              start_column   = 25
              start_row      = 6
            IMPORTING
              answer         = lv_case
            EXCEPTIONS
              text_not_found = 1
              OTHERS         = 2.
          CASE lv_case.
            WHEN '2'.                                 "For 'NO' button
              LEAVE TO SCREEN '2010'.
            WHEN 'A'.                                 "For 'CANCEL' button
              LEAVE TO SCREEN '2010'.
            WHEN '1'.                                 "For 'YES' button
    Second Pop-up confirm
              CALL FUNCTION 'POPUP_TO_CONFIRM'
                EXPORTING
                  titlebar              = 'Warning'
                  text_question         = 'System will update all other assignments to the new payroll area'
                  text_button_1         = 'Yes'
                  icon_button_1         = ' '
                  text_button_2         = 'No'
                  icon_button_2         = ' '
                  default_button        = '1'
                  display_cancel_button = 'X'
                  start_column          = 25
                  start_row             = 6
                IMPORTING
                  answer                = lv_case1
                EXCEPTIONS
                  text_not_found        = 1
                  OTHERS                = 2.
              CASE  lv_case1.
                WHEN '2'.                             "For 'NO' button
                  LEAVE TO SCREEN '2010'.
                WHEN 'A'.                             "For 'CANCEL' button
                  LEAVE TO SCREEN '2010'.
                WHEN '1'.                             "For 'YES' button
    For all the assignments read the infotype 0001 and update the payroll area
                  LOOP AT lt_pernr INTO ls_pernr.
                    CLEAR:lt_i0001,ls_i0001.
                    REFRESH lt_i0001.
                    CALL FUNCTION 'HR_READ_INFOTYPE'
                      EXPORTING
                        tclas           = 'A'
                        pernr           = ls_pernr
                        infty           = '0001'
                        begda           = new_p0001-begda
                        endda           = new_p0001-endda
                        bypass_buffer   = 'X'
                      IMPORTING
                        subrc           = lv_subrc
                      TABLES
                        infty_tab       = lt_i0001
                      EXCEPTIONS
                        infty_not_found = 1
                        OTHERS          = 2.
                    SORT lt_i0001 BY endda DESCENDING.
                    READ TABLE lt_i0001 INTO ls_i0001 INDEX 1.
                    ls_i0001-abkrs = new_p0001-abkrs.
                   lv_record = ls_i0001.
    Lock the employee
                      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
                        EXPORTING
                          number = ls_i0001-pernr
                        IMPORTING
                          return = lv_return.
                      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                        EXPORTING
                          infty         = '0001'
                          number        = ls_i0001-pernr
                          validityend   = '12302006'
                          validitybegin = '12012006'
                          record        = ls_i0001
                          operation     = 'INS'
                         IMPORTING
                          return        = return.
    *unlock the employee
                      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
                        EXPORTING
                          number = ls_i0001-pernr
                        IMPORTING
                          return = lv_return.
                   SUBMIT zhr_infotype_operation_py_area USING SELECTION-SCREEN '1000'
                   WITH p_infty  = '0001'
                   WITH p_pernr  = ls_i0001-pernr
                   WITH p_endda  = new_p0001-endda
                   WITH p_begda  = new_p0001-begda
                   WITH p_record = lv_record
                   WITH p_opera  = 'INS'
                   WITH p_tclas  = 'A'
                   AND RETURN.
                  ENDLOOP.
              ENDCASE.
          ENDCASE.
    ENDIF.

    maybe a little late, but I had found this message today (searching for different problem) but maybe the date for HR_infotype_operation might do a little problem, cause you are filling it with: DDMMYYYY but it should be YYYYMMDD so it just translate it that this is really far in the past so that might be a problem. Try sy-datum instead and for the end of validity try '99991231' dont worry, when you will update the same infotype again, the FM will end the previous infotype to previous day and the new one will get validity from sy-datum till the end ....

  • Call Bapi in user exit

    Hi Experts,
    i call to the FM in  user exit ,
    i check , if i do double click on the FM name i get inside of it!
    but when i put break-point on the fm and press F5 I go inside method
    if_rsr_var_runtime~check
    and after another method and another ... and i don't go inside the FM (i don't get any data from the Fm  despite I get data for the same input when i call to the bapi from se37  )What can be problem?
    i work in BI7 SYSTEM maybe i have to declare there something ?
    Regards

    Can you provide the FM name?

  • COPA: Transaction KE26 - User Exits

    Hi,
    I need to activate the SAP Enhancements COPA002 for this force hand in the transaction KE26.
    Is there any way to do this?
    Best regards and thanks

    Hello guys,
    I need to modify values store in COPA. When a bill document is saved (SD), COPA tables are store, but some values are incorrect for my business, and I can't configure this.
    So I think I can do somethig with COPA user exits.
    Which user exit can I use to modify data (value fields) just before they are inserted in COPA table ce1xxxx??

  • Statement not accessible in include called in a user-exit

    I am working on an upgrade project, and we receive an error 'Statement not accessible.
    In the following user exit:
    FUNCTION EXIT_SAPLZLWB_002.
    INCLUDE ZZLWBU02 .
    ENDFUNCTION.
    If I go to the include, I get an the error 'statement not accessible'.
    I tried to put all the code in the include between a form...endform statement,
    but then I get an incorrect nesting error because the form...endform is between a function...endfunction.
    How can I solve this?
    Thx!
    Edited by: christophe latinne on Jan 9, 2009 4:31 PM

    this seems to be a clone of a standard SAP function group, and thats why you can;t access the exits here.
    EXIT_SAPLZLWB_002
    you can create the exits starting with Z* in order to access those at runtime.

  • Calling transaction from user-defined button within cFolders

    Hi,
        I have inserted a custom field within the folder section in the cFolders. I implemented a BADI for rendering an action once the button is pressed. I am just wondering if it is possible to call a transaction (for example: CFI02) once the button is pressed. If it is not possible can anyone give me pointers how to open the transaction CFI02 from within cFolders similar to object links in cProjects?
    If there are any functional modules that would import documents into backend system from cFolders please let me know.
    thanks
    anantharam

    for Web Transaction...
    URL should be something like
    http://name.domain.ext:port/sap/bc/gui/sap/its/webgui
    Refer the foll link for specifying the transaction:
    [Maintaining ITS Service Parameters |http://help.sap.com/saphelp_nw04/helpdata/en/77/8b3d408ae01f24e10000000a1550b0/content.htm]
    Regards,
    Reema.

  • Hyperlink in a User Exit for standard transaction?

    Hi,
    First off, I am a novice in ABAP. After some searching on the forums, I have found out that it is possible to have hyperlinks in an ABAP Programm.
    Is it possible to change a standard transaction (through user exits) to add in this sort of functionality? For instance, a link in VA23 to jump to a remote portal? Is it possible? And if yes, could anyone give me an example of how this could be done? Links to documentation or tutorials would also help me.
    Could such a functionality be added through a button in the same transaction instead of a simple hyperlink?
    Thanks and regards
    Sameer

    The SAP.Web.UI.Controls namespace is a collection of classes that allow you to create controls in an iView. SAP NetWeaver web controls run on the server and include form controls such as buttons, input fields and tables. Because web server controls run on the server, you can programmatically control these elements. SAP NetWeaver controls are more abstract than HTML server controls or Microsoft web controls from the System.Web.UI.WebControls namespace. Their object model does not necessarily reflect HTML or Microsoft web control interfaces. SAP NetWeaver controls reflect the SAP WebDynpro UI elements. They also implement the behaviour of SAP Unified Rendering, which allows custom UI branding by selecting and modifying CSS style sheets. This namespace includes the ViewElement class, which is derived from System.Web.UI.Controls.Control and provides all SAP server controls with a common set of functionality. Therefore you can also mix SAP NetWeaver controls with Miocrosoft web controls within an iView.
    for more details on this please go through the below link.
    https://www.sdn.sap.com/irj/go/km/docs/library/dotnet/pdk%20for%20.net/developer's%20Guide%20PDK%202.0%20for%20.NET/Reference/SAP.Web.UI.Controls.html
    <b>Give points if useful</b>
    related topics
    http://help.sap.com/saphelp_crm50/helpdata/en/20/041c3a1cf1c54be10000000a114084/content.htm
    http://help.sap.com/saphelp_crm50/helpdata/en/e7/43f438c842cc2be10000000a114084/content.htm

Maybe you are looking for

  • When saving a pdf the objects on the page appear offset of the page boundries.

    This happens mostly in illustrator but it just happened again to me while printing a .ps booklet out of indesign and converting to a pdf using distiller. See the image below: The left shows my InDesign Document. On the right is the pdf that results f

  • Deploying Crystal Reports runtime using merge module failed

    Hi, I am having a problem when deploying Crystal Reports using merge module runtime, included into MS Visual Studio web setup project, when installing my *.msi with CR runtime on a completely clean PC (with only MS Windows installed). Error: Failed t

  • Email not working after upgrading to Yosemite.

    Mail reports all passwords incorrect. After manually entering the correct password mail still can not connect to mail server.

  • Shipment cost not calculating on VT01N

    Hi Gurus, I have configured the shipment cost configuration in all the relevant areas of Transportation node but still Shipment Cost is not calculating in VT01N. Following configuration has been done:   Define Routes Define Modes of Transport Define

  • MPEG4 Video playback is jumping and generally poor

    Hey all, I've got a couple videos that are already converted to MPEG4 (.mp4) that play absolutely fine in quicktime 7.1.3 but when i try to play them in itunes i get jumpy sketchy playback, it's unbearable to watch! The problem definately isn't hardw