Application Log in Function Module

Hi Experts,
I have come across application log as input in several function modules. What is the significance of the application log and how do I generate it so that I can use the function module. Following is the interface of my function module
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(IV_UPDATE_TYPE) TYPE  UPDATE_TYPE DEFAULT 'U'
*"     REFERENCE(IV_PRODUCT_GUID) TYPE  COMT_PRODUCT_GUID
*"     REFERENCE(IS_SET_MAINTAIN) TYPE  ZSORGIB_MAINTAIN
*"     REFERENCE(IV_APPLICATION_LOG) TYPE  BALLOGHNDL
Regards,
Abdullah Ismail.

Hi,
You can use the Application Log to display error messages, warnings, and other information generated by KM applications and services.
Use FM Application 'BAL_LOG_CREATE'  for creating an handle and then call FM 'BAL_LOG_MSG_ADD' to add new messages under this handle. When you call the function module with the handle generated by you. The messages inside the fm will be logged with that handle which later on you can get using BAL_LOG_MSG_READ.
Thanks and warm regards,
Smita.

Similar Messages

  • How to call a WD Application from a function module?

    Hi Folks,
    I have a requirement in my project to call my web dynpro application from a function module .
    Can someone help me out with this , some example or docs would be of great help .
    Regards
    Abhishek Sahai

    Hi,
    why you want to have a FM to call the Application. If it is called also, do you want to display the applicaiton output to user.
    Do you use this FM inside any class or WD compoent or what.
    There is a class CL_WD_UTILITIES=>CONSTRUCT_WD_URL where an Application is generated but you need to have the windoe manager to show this application.
    Can you elaborate more on your requriement.
    Regards,
    Lekha.
    Edited by: Lekha on Sep 29, 2009 4:09 PM

  • How to get Java Version of an application server using Function Module?

    Hi Friends,
    We are doing developments for system performance reporting for multiple BW Systems. For this purpose we need to get the JAVA Version for these multiple systems.
    If anyone tell us about any Function Module or Program that we can use to get this information?
    Thanks
    Nayan Joshi

    Hi,
    Calling an SAP Function Module from Java
    To call an SAP function module from a Java application, you first need SAP JCo (Java Connector); you can download it from SAP's site, though you need an account to do so.
    To actually open the connection, use the tip code shown here.
    Class jcoClass = Class.forName("com.sap.mw.jco.JCO", true, this.getClass().getClassLoader());
    Client client = JCO.createClient(clientNumber, user, passWord, lang, host, systemId);
    //all parameters are strings
    client.connect();
    Repository repository = new JCO.Repository("SAP", client);
    IFunctionTemplate functionTemplate = repository.getFunctionTemplate
    ("YOUR_FUNCTIONAL_MODULE_NAME");
    Function function = functionTemplate.getFunction();
    ParameterList parameterList = function.getImportParameterList();
    parameterList.setValue("value1", "INPUT_PARAM_NAME");
    parameterList.setValue("value2", "INPUT_PARAM_NAME2");
    client.execute(function);
    Regards,
    Marasa.

  • Application server File renaming function module creation - sample code

    I want to rename a file from application server using function module.
    Can somebody tell me is there is any such sap provided function module
    is there?If not please tell me what should be abap routine to create such
    a function module.
    Thanks in advance....

    You need to create a logical file name using FILE transaction. Then create a logical path and assign the physical path (actual path on app. server) to the logical path. While defining the physical filne name you have the option of selecting from the list of 'reserved word' available. For e.g. <DATE>, <TIME> etc.
    Steps are:
    1) Execute transaction 'FILE'.
    2) Create a logical file path.
    3) Assign Syntax Grp (Operating Systems) to above logical file path. You need to create the syntax group to identify the physical path in the application server. This step actually assigns the physical path to the logical path.
    4) Create a logical file.
    5) Assign the physical file name to the logical file. You have lots of system reserved word to choose from to suffix your file name with date and time etc.
    The physical file name is used by the function module FILE_GET_NAME at runtime to compose a complete platform-specific file name.
    For more information, see [renaming a file on the application server;.
    Regards.

  • Configuring CIF application log in APO

    Folks
    I was trying to configure CIF Application log from an APO perspective by specifying a function module and the different table fields.
    I configured the same in R3 side using CFC6 but am having trouble finding it in APO
    Does any body know how to dod this in APO ?
    Thanks

    Thanks for the repsonse folks
    I tried /SAPAPO/C41 with detailed option but failed to see the detailed log which I had enabled in R3 through CFC6.
    In R3, I enabled field logging for function module CIF_PRODUCT_SEND. In R3 log, I am able to see the relevant fields form this function module that are being sent to APO.
    However, I also want to see the log from APO, for the same fields, if they were recieved without any errors or sent to postprocessing.
    There is a function module /SAPAPO/CIF_PROD and I need to use the fields of the modules in the APO side CIF logging.is this possible ?
    Would appreciate if any one can share their thoughts on how this can be accomplished
    Thanks

  • Custom error message in SAP application log

    Is there a way to add a custom error message to the SAP application log without passing the message variables MSGV1, MSGV2, MSGV3, MSGV4 and the Message class and number. 
    We want to pass a custom message from the BAPIRET2-MESSAGE without giving it a Message class and number.  The reason for this is that  we are using class based exceptions instead of the traditional message class with errors.  When we catch the class based exception, we take the error text of the exception and put in in the BAPIRET2-message and set the BAPIRET2-TYPE as 'E'.  Now we want to add this to the SAP application log.
    The call to 'BAL_LOG_MSG_ADD' takes a structure BAL_S_MSG which is just like BAPIRET2.  However this function builds the entry to the application log use the message variables MSGV1, MSGV2, MSGV3, MSGV4.  There is no provision to pass in the BAPIRET2 message.
    Add message to application log
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
        EXPORTING
         i_log_handle              = app_log_handle
         i_s_msg                   = log_message
    Thanks,
    Jay

    Hi Jay,
    Did you see <b>BAL_LOG_EXCEPTION_ADD</b>?
    This FM is represented by the structure <b>BAL_S_EXC</b>. This can have various versions as described below:
    <b>Data of BAL_S_EXC Structure  /     Use</b>
    <b>EXCEPTION</b>  /                              Exception class from which an exception text 
                                                       is added to the log. This field must be filled.
    <b>MSGTY</b>  /                                     Message type (MSGTY) of a T100 message.
                                                       This field must also be filled for exceptions.
    <b>PROBCLASS,
    DETLEVEL,
    ALSORT, TIME_STMP</b>  /                Message or exception attributes, such as
                                                        problem class (PROBCLASS, for
                                                        example, "very important"), level of detail
                                                        (DETLEVEL, from 1 to 9), sort criterion
                                                        (ALSORT, unrestricted) and timestamp
                                                        (TIME_STMP). These fields can be displayed
                                                        in the log (except TIME_STMP).
    <b>MSG_COUNT</b>   /                            This attribute is not used for exceptions.
    Follow the link below for more details:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm">SAP Help DOc</a>
    Hope this helps.
    Thanks
    Sanjeev

  • Uncatchable exception: BSP calling Function Module

    Hi all,
    currently i'm facing a very weird problem. My application class calls function module
    HR_INFOTYPE_OPERATION. Normally, in case of an error, the function module gives you back a return parameter. But if i call it from my BSP, the processing doesn't leave the function module. It directly throws an exception ERROR_MESSAGE_STATE instead of writing the message into parameter return.
    If i call the function module with the same parameters from a report, it works fine and the error message is written to return parameter without throwing an exception.
    What am i doing wrong? I don't want that exception and need to go on with filled parameter result.
    Regards
    Mark-André

    Hi MA,
    try using ERROR_MESSAGE in the exceptions list, like this.
    CALL FUNCTION 'func_name'
         EXPORTING
              string            = text
              pos               = position
         IMPORTING
              string1           = text1
              string2           = text2
         EXCEPTIONS
              string1_too_small = 1
              string2_too_small = 2
              ERROR_MESSAGE     = 3
              OTHERS            = 4.
    Cheers
    Graham Robbo

  • Use of Interface parameters in Function module in ECC 6.0

    Hello all,
    In ECC 6.0 Version we do not use Changing/Tables interface parameters. Instead we declare a table type and use Exporting Parameters.
    Can any one send me the link to sap help where this is mentioned.
    Thanks,
    Salil

    Should be straight forward. Here's a sample...
    Exporting...
    VBSK_E     LIKE     VBSK
    ET_SPLITPROT     TYPE     VLIKP_T_SPLITPROT
    If not enough, do application help from function module....
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801e9a454211d189710000e8322d00/frameset.htm

  • Update the custom table by using Custom Function module.

    Hi Experts,
            My requirement is ,
    1) To create the Custom Z table with fields
               vbak-vbeln
               likp-vbeln
               vbuk-vbeln
      After creating this Z table.
    2) I have to create one custom function module.
        Based on this function module i have to update that Z table.
    3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
        But I developed the ALV report with custom button and check box successfully.
      My doubt is how to write the function module and based on that function module how to update the table.
          Please suggest me on this requirement.
        Thanks in Advance.
    Thanks and Regards
    Srihari.

    HI ,
         Can any one help me out on my above requiremnet..
    Thanks and Regards
    Srihari.

  • ABAP Function Module to perform validation

    Hi Developers,
    I'm am trying to create a function module to be later used by a Web Dynpro application. The function module should be structured as followed:
    Importing
    USER_ID : User ID to be searched that is entered by user.
    TENANT: Tenant ID that is to be searched, also entered by user.
    Changing
    EXIST: A flag that will return the values Y or N based on a return from the function module.
    The function module must be able to access a specified Oracle database table and perform a check on the table with the provided import values. If the combination exists, it should return a Y. If the combination does not exist it should return an N. Assumption is that tenant and userid fields exist in this table in addition to two other. User ID is the primary key.
    Regards,
    JD

    Hi,
    For getting data from oracle the following threads may help you;
    Access external Oracle database with ABAP
    Accessing an external Oracle database from ABAP
    You can get more threads by [Searching|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_library&adv=true] the Forum.
    Regards
    Karthik D

  • How to use Application log (slg0 & slg1)

    Hi all,
    Can u please give me some hints to utilize Application log?
    Hope you will help me.
    Thanq in advance,
    Bye.

    hi John,
       Check these FM's out
    BAL_GLB_SEARCH_LOG            
    BAL_LOG_CREATE                
    BAL_LOG_EXC_ADD               
    BAL_LOG_HDR_CHANGE            
    BAL_LOG_HDR_READ              
    BAL_LOG_MSG_ADD               
    BAL_LOG_MSG_ADD_FREE_TEXT     
    BAL_LOG_MSG_CHANGE            
    BAL_LOG_MSG_CUMULATE          
    BAL_LOG_MSG_DELETE            
    BAL_LOG_MSG_DELETE_ALL        
    BAL_LOG_MSG_READ              
    BAL_LOG_REFRESH               
    SBAL_DETAIL                    Application Log: Display: Detail Screens                              
    BAL_DSP_LOG_PARAMETERS         Application Log: Display: Display log header parameter set            
    BAL_DSP_LOG_TECHNICAL_DATA     Application Log: Display: Display log header technical data                                                                               
    SBAL_DISPLAY                   Application Log: Display Log                                          
    BAL_DSP_LOG_DISPLAY            Application Log: Fullscreen log output                                
    BAL_DSP_LOG_PRINT              Application Log: Print log                                                                               
    SBAL_PROFILE                   Application Log: Display Profile                                      
    BAL_DSP_PROFILE_SINGLE_LOG_GET Application Log: Display profile: Standard profile (SLG1) for one log                                                                               
    SBAL_SERVICE                   Application Log: Service Functions                                    
    BAL_LOG_HDR_CHECK              Application Log: Log: Header data: Check                              
    BAL_LOG_MSG_CHECK              Application Log: Log: Message: Check                                                                               
    SBAL_TOOLBOX                   Application Log: Toolbox                                              
    BAL_DB_LOGNUMBER_GET           Application Log: Database: Get internal log number from number range  
    BAL_LOG_DELETE                 Application Log: Log: Delete log (from DB also at save)               
    BAL_LOG_EXIST                  Application Log: Log: Check existence (in memory)                     
    BAL_LOG_MSG_EXIST              Application Log: Log: Message: Check existence (in memory)            
    BAL_LOG_MSG_REPLACE            Application Log: Log: Message: Replace last                           
    BAL_STATISTICS_LOG_GET                                                                               
    BAL_STATISTICS_LOG_SET                                                                               
    Regards,
    Santosh
    Note: Reward Points if helpful

  • Write error log to Application log

    Hi All ,
    I am new to APO area . I am writing a report in APO and the requirement here is to write the error log to the application log .  Can anyone help explain the process o hot to write the error log to  application log . If possible please help me with some code .
    Thanks ,
    Daniel.

    Hi Daniel,
             Refer the below code for writing the application log.
    .<a href="/people/kamalkumar.ramakrishnan/blog/2007/01/10/a-primer-on-using-and-creating-sap-application-log on Application Log</a>
    Regards,
    Siva.
    Create a Application log
        CALL FUNCTION 'BAL_LOG_CREATE'
          EXPORTING
            i_s_log                 = g_bal_log
          IMPORTING
            e_log_handle            = g_log_handle
          EXCEPTIONS
            log_header_inconsistent = 1
            OTHERS                  = 2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    loop at g_return.
      g_log_mess-msgty     = g_return-type.
      g_log_mess-msgid     = g_return-id.
      g_log_mess-msgno     = g_return-number.
      g_log_mess-msgv1     = g_return-message.
      g_log_mess-msgv2     = g_return-message_v1.
      g_log_mess-msgv3     = g_return-message_v2.
      g_log_mess-msgv4     = g_return-message_v3.
      g_log_mess-probclass = 'Error Class'.
    appemd g_log_mess.
    endloop.
    add this message to log file
      CALL FUNCTION 'BAL_LOG_MSG_ADD'                          
        EXPORTING
          i_s_msg       = g_log_mess
        EXCEPTIONS
          log_not_found = 0
          OTHERS        = 1

  • BAPI or Function Module for Creating a service order

    Dear developers,
    i want to create a service order in CRM from a web-based BSP application. Which function modules or bapi's can be used for this?
    Has anybody still did something like this?
    Regards,
    Jens

    Hi,
    U can use CRMXIF_ORDER_SAVE FM to create the service Order.
    Regards,
    Ajay Gupta
    Reward points only if it helps

  • Function Module for Application Log(SLG1)

    HI SapAll.
    may i know what is the Function Module  to read the data for Applicaiton Log (tcode-SLG1).
    waiitng for your response.
    regards.
    Varma

    Hi Danish.
    running the program 'SBAL_DISPLAY' is similar to running the FM'APPL_LOG_DISPLAY' .However when i run any one of these i have to manually press the 'Execute button' to display the log(there is no option to save the log into spool or to get into some Internal table)
    i have tried running the program 'SBAL_DISPLAY'  by putting the Break point at the line (  CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
          EXPORTING
            i_t_log_handle      = l_t_log_handle)
    ,while debugging the values are as below:
    L_T_LOG_HANDLE : Sorted Table[1x1(44)]
    1      ZoDNJw4vg3BX0000h1GOdm.
    could you please help me in getting the log into spool wihtout having to press the execute button and without having to look at the Log.
    regards.
    Varma

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

Maybe you are looking for

  • How to set up file server in Azure Availability Set?

    Hi, We're going to set up file servers with SMB shares on VM:s in Azure. How do we set up the file services in the VM:s so that it works in an availability set? I've read something about using DFS. Is that the recommended "Best practice" way of doing

  • Handling Unit problem in Packing for STO

    Hello All, The problem is related to Packing process in case of Stock Transfer Order (STO).After making delivery while doing the packing procedure, in " Handling Unit " supplements 'Handling Unit Group 1' field  is not getting populated / assigned au

  • How to get the Dataprovider var of a Datagrid inside an ItemRenderer?

    Hey, I have two Datagrids, both of them have a bindable dataprovider. My first Datagrid has an ItemRenderer. I would like to update my dataprovider inside the ItemRenderer. Is it possible? My ItemRenderer is a Combobox. Everytime I change the Combobo

  • UK Cracked Screen Repair Costs?

    I have an iPhone which was recently dropped and now has a cracked screen. Anyone know the cost of repair for this is in the UK? Thanks Chris

  • When will that stupid adobe flash be removed from mozilla?

    I am tired of that thing crashing on me all the time. Can anyone give some info as to when to expect a html player or anything else to take the place of that stupid flash. I´m angry as a ****.