Log required inside a function exit

Hi All,
I am using enhancement MB_CF001. When the goods movement through MIGO transaction happens, i need to populate data to Z table and purchase requisition creation. I have a requirement to prepare a log if there is any error while inserting the data into Z table or while creating PR.
Please let me know is it possible by someway

One way to do this is to use the application log. Take a look at function group SBAL.

Similar Messages

  • Can we add the standard includes inside a function exit.

    Hi,
    Can we add the standard includes inside a function exit.
    I want to add 4 to 5 standard includes. If iam adding it it says report or program already exists.
    Can anyone tell me is it possible or we can modify the only the data which is coming to that function module .
    Please help me on this.
    Thanks,
    Rose.

    hi santhosh,
      The data needed for those includes are also exist in the funtion module exit. I want to add those includes and in one include just i want to add some 10 to 15 lines of code. Is it possible.
    If i include all those includes inside the function exit it says report or program name already exists. When i double clicked on the error it takes me to a line in 1 include which has function-pool statement.
    How can i eradicate this error.
    Can u please help me on this.

  • Logs required for checkout functionality issue

    Hi All,
    We are getting the issue when we are trying to checkout records in MDM.
    We are getting popup box saying that  "Database command execution error .A SQL statement failed to execute.The actual error
    may have been written to a log file.Version 5.5 SP6(5.5.64.79)".
    Some times we are getting the popup box saying that "The requested record was not found".
    Anyway in both cases,we are solving the issue for timebeing by unloading and loading the repository with update indicies.
    But the issue is repeating,we want to know the root cause for this to solve it permanently.
    and we have opened the message for SAP but SAP asking me to provide logs to analyze the issue.
    It is clear saying in the error "The actual error may have been written to a log file".
    But i was not able to find the logs for the same.
    Could you please tell me where excatly i can find the logs for the above issue?
    Thanks,
    Narendra

    Hello Narendra
    My point of view -  you have lost connection to SQL Server(this is Network connection problem)
    For localize that errors you should use some  changes to mds.ini file:
    Extra DBConnection Validation = True
    "Makes sure that the DBMS connection is live
    prior to every DBMS request and silently restores it if
    necessary. Useful for the small minority of MDM
    installations where the network connection between the
    MDM Server and the DBMS is unreliable and frequently
    lost. Improves reliability but slows the MDM Server"
    Log SQL Errors= True
    "Adds SQL error info to the rolling log."
    Log SQL Modifications=True
    "Logs every SQL modification of the underlying
    databases. Should be set to True only at SAP request since
    this generates a huge amount of rolling log info and slows
    the MDM Server."
    Log files you can get from SAP MDM Console
    or from "Logs" directory SAP MDM Server
    Regards
    Kanstantsin
    Edited by: Kanstantsin Chernichenka on Nov 18, 2009 5:43 PM

  • FM Call within Function Exit

    Hi All,
    is it possible to call a FM inside a function exit?
    I am trying to call FM 'RV_PRICE_PRINT_ITEM' inside EXIT_SAPLEINM_002 but it doesnt work. Ive tried attaching the same logic in values in a standalone program and it runs as expected.
    Again, can I callh a FM inside an exit?
    Thanks.
    Kenny

    >>>is it possible to call a FM inside a function exit?
    The reason for failure in your case may be something else. As an alternative, you can SUBMIT that Standalone program instead of a direct function call from the exit.
    ~Suresh

  • How to create a secondary list of alv grid inside the function module

    Hi All,
    My requirement is to create a RFC function module to display the alv grid of one table.
    i have created that.
    while clicking on the records of the alv it should open the secondary list of another table.
    My problem is it is not fetching the records of the internal table of the primary list since it is created inside the function module(FUNCTION...ENDFUNCTION).
    pls help me on this.
    Thanks in Advance.

    hi,
    READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
    here sel_sheet is the internal table for the primary list..
    i called the function module "reuse_lav_grid_display" inside Function...Endfunction.
    so when i am using  READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
    inside the user command perform therecords in this internal table is not populating..
    pls help me on this.
    thanks in advance.

  • Renaming a file inside a function in PL/SQL

    Hi,
    I have a file called TMP_g2_response_data. I have some data in it. I read the data inside my function. Once I read the data, I want to move it to some another file. Basically I want to rename the file TMP_g2_response_data to TMP_g2_response_data.old. How can I do this from my PL/SQL code.
    Please help me out.
    Thanks in andvance

    Its appropriate.
    I just coded it this way. Have a look at it. Please tell me where I am going wrong.
    create or replace procedure fmov as
    log varchar2(300);
    logfile UTL_FILE.FILE_TYPE;
    newlog varchar2(300);
    cmd varchar2(300);
    begin
    log := 'test-log';
    logfile := utl_file.fopen('/tmp', log, 'W');
    utl_file.put_line(logfile,'Here we go');
    utl_file.frename('/tmp',logfile,'/tmp','test-log.old');
    utl_file.fclose(logfile);
    end;
    show errors;
    Thanks in advance

  • Making parmanent changes to a internal table inside a user exit

    Hi All,
    I am having a User exit to which I am passing a structure as importing parameter.
    The user exit is not exporting the same structure, but is exporting some other values.
    My problem is that I want to make parmanent changes in the structure I am passing to the user exit.
    Currently what is happening:
    I am passing the structure to the user exit. It has got 6 rows. Inside the user exit I am making some changes to a particular field of all the rows. Till the program control is inside the user exit the changes in the structure are visible. As soon as the control come out of the user exit, the values for the field are switched to teh old values(values before passing to teh user exit).
    My question is, is there any method to make changes to a internal table inside a user exit and these changes are visible outside it when the program control come out of the user exit. (This is when the internal table to which the change is made in not exported by the user exit)

    Hi Dear,
    Your changes done in import parameters will not reflect outside exit. You can only change the values of export parameters...
    If you have very urgent requirement then make changes in SAP''s Standard code.
    For your problem you can write to SAP. In many cases SAP provides the solution.
    Award Points If Useful.

  • Menu-exits, Function-exits & Screen-exits

    What is Menu-exits, Function-exits & Screen-exits ? explain

    Hi,
          Why do you need enhancements ?
    The standard applications do not offer some of the functionality you need. The R/3 enchancement concept allows you to add your own functionality to SAP's standard business applications.
    What are the different types of enhancements ?
    Enhancements using customer exits
    Customers' potential requirements which are not included in the standard software are incorporated in the standard as empty modification 'shells'. Customers can then fill these with their own coding. Enhancements can relate to programs, menus and screens. Upward compatibility is assured. In other words, SAP guarantees that the jump from the standard software to the exit and the interface which call the exit will remain valid in future releases.
    Enhancements to ABAP/4 Dictionary elements
    These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-specific key words and documentation for data elements) and field exits (creation of additional coding for data elements).
    What is customer development ?
    Creating customer-specific objects within the customer name range.
    What is SSCR ?
    SSCR (SAP Software Change Registration) is a procedure, for registering all manual changes to SAP source coding and SAP Dictionary objects.
    What is the difference between modifications and enhancements ?
    Modifications mean making changes to the SAP standard functionality.
    Enhancements mean adding some functionality to SAP standard functionality.
    What are the disadvantages of modification ?
    Modifying standard code can lead to errors
    Modifications mean more work during software upgrades
    What are the advantages of enhancements ?
    Do not affect standard SAP source code
    Do not affect software upgrades
    when do you opt for modification ?
    Customer exits are not available for all programs and screens within the R/3 standard applications. You can only use exits if they already exist within the SAP R/3 System . Otherwise you have to opt for modifications .
    What are the various types of customer exits ?
    Menu exits
    Screen exits
    Function module exits
    Keyword exits
    What is a menu exit ?
    Adding items to the pulldown menus in standard R/3 applications .
    13.What is a screen exit ?
    Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special subscreen areas within a standard R/3 screen and calling a customer subscreen from within the standard dynpro's flow logic.
    What is a function module exit ?
    Adding functionality to R/3 applications. Function module exits play a role in both menu and screen exits.
    What is a keyword exit ?
    Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system displays this documentation whenever a user presses F1 to get online help for a screen field.
    How do SAP organizes its exits ?
    SAP organizes its exits in packages that are called SAP enhancements. Each SAP enhancement can contain many individual exits
    Regards

  • FB70 Function Exit or user exit

    Hello!
    I have a requirement in which I need to assign customer invoice smartform in FB70 transaction. When the user will press save button then the data should go to spool request.
    Is it possible by using any Function Exit or BADIs. If yes please tell me the Exit or BADIs name.
    Your help will be appreciated.
    Ashvender
    [email protected]

    solved

  • How to read data from a function exit

    Hi friends,
    I have a requirement, where in i am creating a screen exit for ME51N.I am using MEREQ001 enhancement for this.It is working fine, but i am to get data in to this so as to write any code.For that i am using the function exit EXIT_SAPLMEREQ_001 in that same enhancement(thought of doing export and import).
    But the data is declared in this way..
    REFERENCE(IM_REQ_ITEM) TYPE REF TO IF_PURCHASE_REQUISITION_ITEM
    so now it is having a method GET_DATA in which i have all the parameters required.
    can anyone please tell me how to read this data...
    Regards,
    Thoufique.

    thats ok friends..i got the solution.
    Regards,
    Thoufique

  • How to get al object's type used inside a function group

    Hello There,
    I want to create a program to get all the objects used inside a Function group, for example all the data structure type (not the field name of fieds ortable name used in import/export but their data types) used in import/export/table parameters of Function group or Function module inside that FG. I also want to know all the field types/function module/class/method etc used inside a FG.
    The main purpose is to create a program to know if a function group uses a object from a particular software component. we have a requirement in our project for example all the standard objects used in a program should belong to only sap_basis /sap_abap/sap_appl software component.
    I realy appreciate any help on the same.
    Mani

    Goto se80, provide the function group, double click on the object name, click on the main program button and get the function pool name. Now place this function pool name in se38 , go to menu utilities->environment analysis. You will get the list. If you would like to do this via custom program then see through debugging mode and check what is coded.
    Kesav

  • Difference between user exit/Function exit / Customer exit and BADI

    Hi Guys,
    I am confused with the types of exits-user exit/Function exit / Customer exit and BADI.
    Can you tell me the difference between the different exits/Enhancements?
    Classify the following:
    what is the one which is shown in SMOD under enhancements? There are 3 sections in that - Function module, Screen and includes.
    What is the one which are called using -
    Call Customer-Function 001?
    Regards,
    Guru

    hi,
    The standard applications do not offer some of the functionality you need. The R/3 enchancement concept allows you to add your own functionality to SAP's standard business applications.
    Different types of enhancements
    Enhancements using customer exits
    Customers' potential requirements which are not included in the standard software are incorporated in the standard as empty modification 'shells'. Customers can then fill these with their own coding. Enhancements can relate to programs, menus and screens. Upward compatibility is assured. In other words, SAP guarantees that the jump from the standard software to the exit and the interface which call the exit will remain valid in future releases.
    Enhancements to ABAP/4 Dictionary elements
    These are ABAP/4 Dictionary enhancements (creation of table appends), text enhancements (customer-specific key words and documentation for data elements) and field exits (creation of additional coding for data elements).
    advantages of enhancements
    Do not affect standard SAP source code
    Do not affect software upgrades
    Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    Various types of customer exits
    Menu exits
    Screen exits
    Function module exits
    Keyword exits
    Menu exit
    Adding items to the pulldown menus in standard R/3 applications .
    Screen exit
    Adding fields to the screens within R/3 applications. SAP creates screen exits by placing special subscreen areas within a standard R/3 screen and calling a customer subscreen from within the standard dynpro's flow logic.
    Function module exit
    Adding functionality to R/3 applications. Function module exits play a role in both menu and screen exits.
    keyword exit
    Add documentation to the data elements of key words defined in the ABAP/4 Dictionary. The system displays this documentation whenever a user presses F1 to get online help for a screen field
    Hope this helps, Do reward.

  • Update the database table inside an user exit.

    Hi Experts,
    I have a issue where i have to update a custom table in an User exit.
    I am using Lock object for ENQUE/DEQUE.
    I have tried to use statements like UPDATE/MODIFY inside the user exit.
    But the problem is that it's not updating the database table at the same time.
    I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
    The real issue is that this custom table is read for batch creation at the same time for different users.
    Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
    While requirement is to create a different/unique batch numbers.
    Program is updating the table but it's taking time..so in between other users are creating the same batch number.
    Please guide me what would be the best solution for this.
    Regards,
    Amit Kumar Singh

    Thanks for your quick reply.
    My actually requirement is like that.
    I have to create a Process Order using tcode COR1.
    After passing some input value it goes inside an User Exit.
    There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
    The new batch number is created using the combination of these table fields.
    Once a new batch number is created it increment the numeric key field number by one.
    Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
    Here i am not able to update the database table inside this User Exit.
    Table is geeting updated but after some time and out of this User Exit.
    Please suggest what's required in that case?
    Regards,
    Amit Kumar Singh
    Edited by: Amit  Singh on Feb 3, 2009 11:33 AM

  • Function exit for MM02

    Hi experts,
    My requirement is to display error message to user when he inputs invalid material at the first screen of MM02.
    Can anyone tell me the correct function exit name to achieve this?
    Thanks,
    Sonali.

    Hi,
    use the badi BADI_MATERIAL_OD method READ_OTHER_MATERIAL_DATA.
    Thanks,
    Shailaja Ainala.

  • BPS function exit  how to

    Hi all,
    I have some bad fund in my cube. So to correct these bad funds, I am using function exit in BPS. My question is: Do I need to implement the initialization function and exit function both. how could I write these function modules.
    does anybody have sample coding for these functions.
    any help appreciated.
    Thanks.
    BNP

    Thanks ATW and all.
    But I still could not figure it out.
    I am trying to summarize my problem and code here.
    FUNCTION Z_INFOPROV_FUND_EXIT.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA OPTIONAL
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL OPTIONAL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD OPTIONAL
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM OPTIONAL
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE OPTIONAL
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP OPTIONAL
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL OPTIONAL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA OPTIONAL
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
    functional requirement.
    correct fund value in the given cube zxxx1.
    *characteristics                  key values
    *fund     fund center             key1    key2
    *1A2      4562389                 300     500     -
    line 1
    *to correct the fund above, I am adding these two records
    *2A2      4562389                 300     500     -
    line2
    *1A2      4562389                -300    -500     -
    line3
    *I am trying to accomplish the above scenario.
    *Could you please tell me what I am missing.
    *Here is my code
      TYPES: begin of f_c,
                 v_from type /BIC/OIZVAL_FROM,
                 fund   type /BI0/OIFUND,
             end of   f_c.
      Data:  t_fund type table of f_c,
             w_fund type f_c,
             old_fund(10) type c..
      FIELD-SYMBOLS: <fundctr> type any,
                     <fund>    type any,
                     <s_kyfs>  type any,
                     <s_chas>  type any.
      field-symbols: <t_data> type hashed table,
                     <chavl>  type any,
                     <value>  type any,
                     <s_data> type any.
      data: ls_data type ref to data,
            lt_data type ref to data,
            l_chavl type upc_y_chavlint,
            ls_chasel type upc_ys_chasel,
            ls_charng type upc_ys_charng.
      data: l_app type ref to cl_upx_application.
      l_app = cl_upx_application=>get_instance( i_area ).
      lt_data = l_app->create_th_data( ).
      assign lt_data->* to <t_data>.
      ls_data = l_app->create_s_data( ).
      assign ls_data->* to <s_data>.
      <t_data> = xth_data.
      clear xth_data.
    transaction data
      loop at <t_data> assigning <s_data>.
        ASSIGN COMPONENT 'S_CHAS' OF STRUCTURE <s_data> TO <s_chas>.
        ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <s_data> TO <s_kyfs>.
        check sy-subrc eq 0.
        ASSIGN COMPONENT '0FUND' OF STRUCTURE <s_chas> TO <fund>.
        check sy-subrc eq 0.
        check not <fund> is initial. "no need to check for blank fund
        old_fund = <fund>. "holding old fund for third record above
       here add new record with new fund but with same key figures and characteristics
        ASSIGN COMPONENT '0FUNDS_CTR' OF STRUCTURE <s_chas> TO <fundctr>.
        check sy-subrc eq 0.
        select /BIC/ZVAL_FROM fund into table t_fund from /BIC/AZFMDERIV00
                          where /BIC/ZVAL_FROM <= sy-datum and
                                /BIC/ZSOUR1_TO = <fundctr>.
        check sy-subrc eq 0.
        sort t_fund by v_from descending.
        read table t_fund into w_fund index 1.
        <fund> = w_fund-fund. "new correct fund.
        collect <s_data> into xth_data. "adding line 2 above
       here add new record with all key figures values reversed
       return back old fund now.
        <fund> = old_fund.
        LOOP AT ito_chasel INTO ls_chasel.
        select struture with characteristics
          ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE <s_data> TO <s_kyfs>.
        choose char according to ito_chasel
          ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE <s_kyfs> TO <value>.
        select value according to ito_chasel
          READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.
        set char value
          <value> = ls_charng-low * -1.
        ENDLOOP.
        collect <s_data> into xth_data. "adding line 3 above
      endloop.
    ENDFUNCTION.

Maybe you are looking for

  • Mac Book Pro fail to properly recognize Apple 23inch HD monitor

    Hi I have a brand new mac book pro, 2.4Ghz, 15 inch, 4 gb and so on... I just upgraded to leopard, and everything works fine except that when I try to hook up my external monitor which is an Apple 23 inch HD monitor, the external display flickers eve

  • Two ALV Grid in the same screeen

    Hi,   I have created a module pool with a screen. In this screen I have defined two customer objects and I dipslay two different ALV grid. DATA: grid_1         TYPE REF TO cl_gui_alv_grid,           grid_2         TYPE REF TO cl_gui_alv_grid. When th

  • Best view for help page

    Hi, I am working on a iphone App and I am wondering if you can help me select the most appropriate view for the Help or Information page. In my main window, I have a tool bar. In the bar, there is a small icon (UIButtonTypeInfoDark). If user click it

  • Applescript: How do i loop a script between two sheets in one workbook?

    My office uses excel for its invoices and they have tasked me with finding a way to automatically name the invoice tabs in the workbook which are set up between two dummy sheets. What I have works but does not do exactly what they asked. This is what

  • Wifi is connected and has good link and traffic is shown but no IP connectivity possible

    I'm getting crazy about that: iMac 27" Mid 2011, Airport Extrem/Atheros 9380 Core WLAN 4.0 (400.45.1) is connected with approx. 80% link quality (SNR: 45dB, Noise: 1%) to an 802.11n AP with 5GHz an 80MHz with at least 4 other Clients. The link acts w