Write to application log in user exit

Hi all,
I want to write a collection messages to the application log in user exit EBIA0003, user exit for transaction EA00, but I only can write one if I just use
message eYYY(x) with lv_msgv1
                                  lv_msgv2
                                  lv_msgv3
                                  lv_msgv4.
It will be placed in the log after the exit.
I've already tried with the BAL functions, but it doesn't seem to work or maybe I'm doing something wrong. Is there a way to write a collection of messages in to the application log in this user exit?
greetz Pieter

Hi Pieter,
you can do using BAL functions if the lop is already opened. Try to find out what parameters the transaction uses for LOG access (handle!). Do the calls in the exit accordingly.
We append messages to the current log using FUNCTION 'BAL_LOG_MSG_ADD'. If the log handle is not available, you might access it using dynamic assign like
  ASSIGN ('(<program>)<field>') TO <field> .
Regards,
Clemens

Similar Messages

  • Uswer exits: How can we know weathewr application is having user exits

    what is the t.code used to find weather user exits is having or not.

    u can use this program to find it.
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    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 EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    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:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.

  • Oracle Applications Report Mod & User Exits...

    OK, here is an incredibly stupid question for y'all. I want to customize an existing Oracle Application report (gasp!). I've brought the .rdf file down to my PC and made my changes. I can run the report OK if I ftp it back to UNIX and run it through Oracle Applications...but I can't run it on my PC. It can't find the user exits.
    Where can I find these user exits, and what must I do with them so I can run the report on my PC (from Report Builder)?
    Thank you for any and all assistance!

    You need to get and install the applicaions software (but not the DB objects) for your PC (if it's available - depends on the OS), so that the apps user-exits are available.
    Otherwise - stick to what you're doing. The advantage of this is that you see exactly how the report is going to look - there are porting issues between unix and win32 (eg fonts). This way you're testing on the target platform.
    You could try posting your question to an appsnet discussion forum (http://appsnet.oracle.com) and see what other applications users do.
    fyi, a lot of the user exits for apps are going away now that they're moving to Reports 6i as part of apps 11i. This is possible as we have included a lot of the functionality that they originally wrote as a user-exit, native in the product.
    Regards
    The Oracle Reports Team http://technet.oracle.com

  • How to write to application log at BBP_CREATE_BE_PO_NEW

    Dear all,
    I am running in a strange problem. I want to log to application log (SLG1) in BADI BBP_CREATE_BE_PO_NEW. As soon as I call a function from there I get an error at the shopping cart position. Changing values in the given data does work without any problems. In EBP 3.5 we used the BADI BBP_CREATE_PO_BACK and this worked with logging without any problems.
    Thanks for support.
    Regards
    Roman

    Hello , there is an example of application logging usage in report SBAL_DEMO_01.
    You need an application log instance to be created before you can add messages that will be displayed using tx SLG1. Maybe its because you dont have a logging object instance in your badi.
    Hope it helps.
    Regards, Luciano.

  • Exception write to event log when user not found in active directory

    I'm trying to use a exception to write to a event log to show which user did not get imported from my csv file. Any help to write this exception is appreciated. Thanks
    Import-CSV $importfile | ForEach-Object{
    $samaccountname = $_.sAMAccountName.ToLower() #samaccountname on csv file
    Try {
    $exists = Get-ADUser -LDAPFilter "(sAMAccountName=$samaccountname)" #Filter user by samaccountname
    Catch
    write-host "Users did not exist." #user does not exisit

    To your question:
    "How can I create a new event log every time without saving to the original event log textfile?"
    The answer provided by Mike Laughlin doesn't require you save anything to a text file - so either I'm misunderstanding this follow-up, or you are misunderstanding Mike's post. :)
    To answer your other follow up... try:
    $goodCount = 0
    $badCount = 0
    Import-Csv $importFile | ForEach {
    $SamAccountName = $_.SamAccountName
    try {
    $user = Get-ADUser -Identity $SamAccountName -ErrorAction Stop
    $goodCount++
    } catch {
    Write-EventLog # <-finish this command however you want
    $badCount++
    write-host "Users imported: $goodCount"
    write-host "Users not imported: $badCount"
    G. Samuel Hays, MCT, MCSE 2012, MCITP: Enterprise Admin
    Blog:gsamuelhays.blogspot.com
    twitter:twitter.com/gsamuelhays

  • Brief about enhancements and user exits

    hai,
    can any  one tell me what are enhancements and user exits in sap sd,
    their  signifcance & configuration
    regards
    sriram

    hi,
    an example of user exit
    In case of Inbound DELINS IDOC (830 type) once there was a requirement of taking the “Target *** Qty required” and the “Target *** Date” for a specific customer who was not sending “*** Qty Received” by him.
    So for that specific customer we used the search term and added the same in the “Data 4” field of the IDOC under segment E1EDK09.
    There was one user exit available in IDOC_INPUT_DELINS_START Function module of SAP. We triggered this logic by the search term of customer and reached the user exit where we had made some code changes. (User Exits are used to make code changes when we are running standard programs or reports or function modules). With this we were able to reach the desired point of calculating “*** Issued” and then find out the difference from “Target *** Qty” and get “*** Qty Received” for the scheduling agreement. We did not copy the standard function module into Z . Instead the same was done using a user exit.
    <b>User exits in SD</b>
    Menu Path:
    SPRO- IMG- SD- System Modification- User Exists. User Exists are available in SD for the following processes:
    • User exits for price determination
    • User exits for partner determination
    • User exits for credit check & risk management
    • User exits in sales:
    o User exits in sales doc processing
    o User exits for contract processing
    o User exits for product allocation processing
    o User exits for availability checking
    o User exits for component supply processing
    o User exits for product selection
    o User exits for billing plan
    • User exits for shipping
    • User exits for transportation
    • User exits for billing
    • User exits for general billing interface
    • User exits for sales support
    • User exits for lists.
    The topic of user exits is a subject that concerns ABAP development & extensive experience in ABAP is required to understand and use the user exits.
    A customer user exit is essentially a function module using a unique naming convention, in which set import and export parameters are defined to limit the data that can be manipulated. This is to protect certain data from being changed. This function module is attached to an enhancement that may contain other function modules. A user exit should only be used if the possibilities for customizing or application-specific user exits are inadequate.
    NEW FIELDS IN PRICING:
    To use a field in pricing, one creates a cond table. This cond table is created using the allowed fields from the field catalog. Should the fields one requires not be included in the list of allowed fields, one can add the fields from the list of available fields. However, one may find that a new field may not be in the list of available fields. For this reason, one must create new fields for pricing. The document & item data in SD is stored in data tables such as VBAK & VBAP (for the order transaction). Many of the fields from these tables are available in the field catalog.
    The field catalog is a structure (KOMG) that consists of 2 tables (KOMK & KOMP). These tables contain the header & item data for pricing respectively. They are called KOM”x” because they are communications structures used to communicate the transaction data with the pricing procedure. Table KOMG contains the field KOMK & KOMP.
    If you require a field that is not in KOMG, it means that it is not in KOMK or KOMP. This means that the field you require cannot be used in pricing because there is no communication of this field from the transaction to the pricing procedure via the communication structures.
    To use a field not defined in the field catalog, you need to add this field to KOMK or KOMP structures, and then write the ABAP code to transfer the data in the field from the transaction tables to the communication structure. Follow these steps:
    Create the field in the KOMK (header data) & KOMP (item data) tables using the standard includes provided for this requirement.
    Write the code in the user exit to read the transaction data & transfer it to the KOM”x” structures.
    Menu Path:
    SPRO- IMG- SD- System Modification- Create New Fields (using the cond tech)- New fields for Pricing.
    Adding the field to KOMK & KOMP:
    This process requires some knowledge of the ABAP dictionary & how to use the ABAP dictionary to create & change fields & tables. If the field is from the header table (for e.g. the order table: VBAK), you will need to add it to the include table KOMKAZ in the table KOMK. If the field is from the item table (for e.g. the order item table: VBAP), you will need to add it to the include table KOMPAZ in table KOMP.
    Let’s say you need to use the ‘base material’ to define a price & the base material is no in the pricing field catalog. The base material is a field on the MMR basic data screen & is defined as MARA-WRKST. Since this relates to the material, it is at the item level, so you would add the field to KOMKAZ include table.
    • When you add a field to these tables, it must start with ‘ZZ’. Therefore, the field you add would be ZZWRKST. In ABAP, when you add the field, use the same domain as in the field in the original table MARA-WRKST.
    • After adding the field, generate the structure KOMP. This field is not available in the field catalog & can be used in condition tables.
    Menu Path:
    SPRO- IMG- SD- System Modification- User Exists. User Exists are available in SD for the following processes:
    • User exits for price determination
    • User exits for partner determination
    • User exits for credit check & risk management
    • User exits in sales:
    o User exits in sales doc processing
    o User exits for contract processing
    o User exits for product allocation processing
    o User exits for availability checking
    o User exits for component supply processing
    o User exits for product selection
    o User exits for billing plan
    • User exits for shipping
    • User exits for transportation
    • User exits for billing
    • User exits for general billing interface
    • User exits for sales support
    • User exits for lists.
    The topic of user exits is a subject that concerns ABAP development & extensive experience in ABAP is required to understand and use the user exits.
    A customer user exit is essentially a function module using a unique naming convention, in which set import and export parameters are defined to limit the data that can be manipulated. This is to protect certain data from being changed. This function module is attached to an enhancement that may contain other function modules. A user exit should only be used if the possibilities for customizing or application-specific user exits are inadequate.
    NEW FIELDS IN PRICING:
    To use a field in pricing, one creates a cond table. This cond table is created using the allowed fields from the field catalog. Should the fields one requires not be included in the list of allowed fields, one can add the fields from the list of available fields. However, one may find that a new field may not be in the list of available fields. For this reason, one must create new fields for pricing. The document & item data in SD is stored in data tables such as VBAK & VBAP (for the order transaction). Many of the fields from these tables are available in the field catalog.
    The field catalog is a structure (KOMG) that consists of 2 tables (KOMK & KOMP). These tables contain the header & item data for pricing respectively. They are called KOM”x” because they are communications structures used to communicate the transaction data with the pricing procedure. Table KOMG contains the field KOMK & KOMP.
    If you require a field that is not in KOMG, it means that it is not in KOMK or KOMP. This means that the field you require cannot be used in pricing because there is no communication of this field from the transaction to the pricing procedure via the communication structures.
    To use a field not defined in the field catalog, you need to add this field to KOMK or KOMP structures, and then write the ABAP code to transfer the data in the field from the transaction tables to the communication structure. Follow these steps:
    Create the field in the KOMK (header data) & KOMP (item data) tables using the standard includes provided for this requirement.
    Write the code in the user exit to read the transaction data & transfer it to the KOM”x” structures.
    Menu Path:
    SPRO- IMG- SD- System Modification- Create New Fields (using the cond tech)- New fields for Pricing.
    Adding the field to KOMK & KOMP:
    This process requires some knowledge of the ABAP dictionary & how to use the ABAP dictionary to create & change fields & tables. If the field is from the header table (for e.g. the order table: VBAK), you will need to add it to the include table KOMKAZ in the table KOMK. If the field is from the item table (for e.g. the order item table: VBAP), you will need to add it to the include table KOMPAZ in table KOMP.
    Let’s say you need to use the ‘base material’ to define a price & the base material is no in the pricing field catalog. The base material is a field on the MMR basic data screen & is defined as MARA-WRKST. Since this relates to the material, it is at the item level, so you would add the field to KOMKAZ include table.
    • When you add a field to these tables, it must start with ‘ZZ’. Therefore, the field you add would be ZZWRKST. In ABAP, when you add the field, use the same domain as in the field in the original table MARA-WRKST.
    • After adding the field, generate the structure KOMP. This field is not available in the field catalog & can be used in condition tables.
    Pl reward if helpful.
    Thanks
    Sadhu Kishore

  • Configuration for writing user exits

    sir provide me the configuration of user exits,purpose how to write it
    thank u

    Hi Supraja,
    User exits are the enhancements provided by SAP
    you can use them in transactions. Each transaction will have user exits.
    If you want to use your own requirements by making your coding while the transaction is run you can use user exits.
    For example if you want to run the MRP in MD02 specific to MRP controller you can user exit.
    Please also refer the document below.
    USEREXIT
    Userxits allow us to add our own functionality to SAP standard program
    without modifying it. These are implemented in the form of subroutines and hence are also known as FORM EXITs. The userexits are generally collected in includes and attached to the standard program by the SAP.
    All Userexits start with the word USEREXIT_...
    FORM USEREXIT_..
    z..
    ENDFORM.
    The problem lies in finding the correct userexit and how to find it if one exists for the purpose. Once the correct userexit is found the necessary customer code is inserted in the customer include starting with the z. in the form routine.
    e.g. USEREXIT_SAVE_DOCUMENT_PREPARE
    Certain application like SD still provide this form of enhancement using userexit but this practice is no longer being followed for newer extensions instead they are using EXITs which come bundled in enhancement packages . Nevertheless existing USEREXITS will be supported by SAP an all the newer versions of SAP.
    HOW TO FIND USEREXITS
    Userexits can be found in number of ways:
    1) To find userexits in SD module , goto object navigator(SE80) and select
    development class from the list and enter VMOD in it. All of the userexits in SD are contained in the development class VMOD. Press enter and you will find all the includes which contain userexits in SD for different functions like PRICING, ORDER PROCESSING etc. Select the userexit according to the requirement and read the comment inserted in it and start coding.
    Some examples of userexits in SD (SALES & DISTRIBUTION) are:
    1)ADDING OF NEW FIELDS IN PRICING
    In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure. This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields. The fields which are not in either of the two tables KOMK and KOMP cannot be used in pricing .Sometimes a need arises when the pricing is to be based on some other criteria which is not present in the form of fields in either of the two tables. This problem can be solved by using USEREXITS which are provided for pricing in SD. Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done. Hence SAP provides 2 userexits ,one for sales order processing which is
    USEREXIT_PRICING_PREPARE_TKOMP or
    USEREXIT_PRICING_PREPARE_TKOMK
    Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.
    In the case of userexit which will be called when invoicing is done ,these
    are provided in the include RY60AFZZ which is in the standard SAP program SAPMV45A. The name of the userexits are same. i.e.
    USEREXIT_PRICING_PREPARE_TKOMP or
    USEREXIT_PRICING_PREPARE_TKOMK
    These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newly created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.
    Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .
    To create the field in header data (KOMK) the include provided is KOMKAZ
    and to create the field in item data (KOMP) the include provided is KOMPAZ.
    One possible example for the need of creating new fields can be e.g. Freight to be based upon transportation zone, for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.
    2) The other method of finding userexit is to find the word USEREXIT in the
    associated program of the transaction for which we want to determine userexit using SE38.
    3) The other method of finding userexits is to find the include in case of SD/MM applications where the userexits are located, this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.
    Some other examples of userexits in SD are:
    USEREXIT_NUMBER_RANGE
    This userexit is used to assign a different internal document number to the
    sales order(VA01) when it is created depending on some criteria like a different SALES ORGANIZAION(VKORG) .
    USEREXIT_SAVE_DOCUMENT_PREPARE
    This userexit is used to insert the ABAP code which will be called when
    the document (sales order VA01) is just about to be saved. This userexit is used generally for custom checks on different fields , to display some information before the order will be saved or for making changes to certain fields before the sales order will be saved.
    Exits & Enhancements
    There are mainly six types of EXITs in sap which have been collected in the form of enhancement packages and attached to standard code in SAP.
    These are different from USEREXIT in the way that they are implemented
    in the form of FUNCTIONs while in USEREXITS we use form routines for their implementation. These are also sometimes known as function exits.
    These start from the word EXIT_ followed by the program name and then followed by a three digit number.
    e.g. EXIT_SAPMV45A_002
    This exit is found in SD in enhancement V45A0002.
    TYPES OF EXITS
    1) MENU EXITS
    2) FUNCTION EXITS
    3) TABLE EXITS
    4) SCREEN EXITS
    5) KEYWORD EXITS
    6) FIELD EXITS
    We use SAP transactions CMOD and SMOD to manage exits. Before implementing an exit, it is required to create the project by using CMOD
    selecting the enhancement e.g. V45A0002 and selecting the component
    (one which fulfills our need) i.e. the exit which will be implemented in SMOD and after coding has been done the project has to be activated.
    An exit can be coded only once.
    FUNCTION EXITS
    These are used to add functionality through ABAP code. These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any type of exit including function exits.
    The function exits are called from the standard SAP program in the form
    of ABAP statement
    CALL CUSTOMER-FUNCTION 'NNN'
    This is in contrast to USEREXITs where PERFORM statement is used to call
    the required userexit.
    To implement the FUNCTION EXITs first of all the project is created and a suitable enhancement package is selected and from its components the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR(se38) where a Z include will be found and the customer code should be entered in this include.
    e.g.
    ADDING A DEFAULT SOLD-TO-PARTY in Sales Order Creation
    To show a default sold-to-party in this field when the user creates a sales order (VA01) we can use a function exit .This function exit is located in enhancement no V45A0002 . Before we can choose the exit we have to create a project in CMOD after that enter V45A0002 in the enhancement field and click on the components. In the components you will see the exit EXIT_SAPMV45A_002. This exit is used for our purpose.
    Double clicking on this exit will takes us to function builder (SE37) . This
    function exit has one exporting parameters and two importing parameters, we are interested in exporting parameter which is E_KUNNR of type KNA1-KUNNR i.e. if we move the desired customer name to this structure(E_KUNNR) it will be shown in the field as the default value when we create the sales order. This function also contains a customer include ZXVVA04. This include will be used to write our custom code.
    Double clicking on this include and it will prompt us that this include does not exists do you want to create this object, select yes and the include will be created .In this include we can write our own code that will fill the field E_KUNNR.
    e.g. E_KUNNR = 301.
    Activate the include and Activate the project. Now when ever the SALES ORDER will be created, sold-to-party field will come up with a predefined customer.
    FIELD EXITS
    The field exits are managed, created, activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.
    The format of field exit is:
    FIELD_EXIT_dataelement_A-Z or 0-9
    If a particular screen and program name is not specified than the field exit will effect all the screens containing that data element.
    The function module associated with field exit shows two parameters
    INPUT and OUTPUT. Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3, we can write our own code to change the output parameter depending upon our requirements.
    Before the field exit can have any effect the system profile parameter
    ABAP/FIELDEXIT in all the application servers should be set to YES
    ABAP/FIELDEXIT = YES.
    TYPES OF USER EXITS
    User exits are basically 4 types,
    1. Field exit,
    2. Menu Exit,
    3. Function module and
    4. Screen exit.
    These exits we can use according to a situation...
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • To populate condition in the sale order or a scenario in the USER Exit

    Hi Experts,
    I want to write the code in the USER EXIT to add a condition type in the Sale order when the ship-to-party address is changed in the transaction level from the address maintained in the Master data,
    So can anyone let me know is there any function module or how will i populate condition type.
    I found that the internal table XKOMV contains all the condition types.
    Thanks,
    Prem

    i saw the answer provided by u, i was pleased to find the answered way, so i writing back to u regarding my requirements.
    my requirement.
    while creating sale order, before entering the screen 4001 where we enter sold to party and material and order quantity, i need to populate these fields from my exit.
    i am able to populate the sold to party field from the exist  EXIT_SAPMV45A_002 and
    INCLUDE ZXVVAU04 .
    in the same fashion i need to populate my material filed.
    how do i do it

  • 0FI_AR_4 Extractor Enhancement without user exit code Question

    Hi
    I have a requirement to enhance 0FI_AR_4 Extractor with below Fields from BSID:
    Field     DataElement
    PRCTR       PRCTR
    VPOS2       NUM06
    VBUND       RASSC
    As per SAP Note: 410799, I am assuming I don't need to write any ABAP code to populate these fields.
    In the extract structure DTFIAR_3 of extractor 0FI_AR_4 Double clicked on the Include CI_BSID.
    It prompted "Structure CI_BSID not available. Create the structure?"
    After entering Access key it created new Structure "CI_BSID".
    I have entered the Component and Component Type values as below:
    Component   Component Type
    YYPRCTR     PRCTR
    YYVPOS2     NUM06
    YYVBUND     RASSC
    1. Please let me know Component and Component Type values and the steps I followed are correct or not?
    2. And I hope I don't need to write the code in the User exit to populate these fields?
    Thanks
    Sree

    Hi,
    For any FI datasource enhancement there are two scenarios :-
    1. All the fields of the customer enhancement in the customer include are available in the read structure BSID
    Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".
    2. Fields of the customer enhancement in the customer include are not contained in the read structure BSID
    In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
    Hope this helps.
    Reg,
    Rahul

  • User Exit not getting triggered

    Dear all,
    we are creating a workflow for PR Release which needed release strategy customization. so we are trying to set the release stratagy by changing the communciation structure CEBAN-USRC1 field.
    for this, i had done the following things:
    1. SMOD->M06B0005->components->EXIT_SAPLEBND_004->INCLUDE ZXM06U31 (double clicked) wrote few lines of code.
    2. CMOD-> created a proj ZMM_PREL->assigned Enhancement M06B0005 under enhancements tab-> EXIT_SAPLEBND_004-> activated all
    (User exit, project eveything).
    Now my problem is when i create a PR, this user exit does not get triggered at all. I am working on ECC6.0 the same code which i did in Ecc5.0 for my previous client is still working fine.
    Can anyone please guide me where i might have gone wrong?
    Thank you,
    Regards,
    Lakshmi

    Hi,
    HAve u verifiyed that the user-exit u r using is triggered whenever u create ou PR.?
    First of all u have to put breakpoints at each and every user-exits provided for that transaction, then check which user exit is getting triggered when u carete ur PR. and thenafter write ur code in this user-exit only.
    Reward is useful.
    Regards,
    Harsha

  • User exit asking for access key in CMOD

    Hi Experts,
    I am trying to write source code for an user exit in CMOD by creating a project and assigning enhancement to it.
    When i click on user exit and press change it asks for access key .
    Can you please tell me if there is any other way to write source code inside it ?

    Hi Martina,
    Kindly go through this link below ,there few steps present to work on user exits:
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    Hope it helps
    Regrds
    Mansi

  • Application Logging in Standalone weblogic - quick questions

    Hi
    In JDeveloper, we could write our application logging to logs for debugging and viewable from JDeveloper.
    When we deploy to Standalone weblogic server, we cant find our logging.
    Of the 3 loggers (Msg Catalog, nonCatalog, Commons log API),
    Which logging mechanism is the best practice used logging for development environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Which logging mechanism is the best practice used logging for production environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Thanks

    hi,
    people commonly Log4J for their logging,Like Commons Logging, SLF4J, or the default Java Logging API. But if you're working with Oracle's Application Development Framework, there is another option as well: ADF Logging.
    ADF Logging is a logging mechanism, embedded in the ADF framework. It wraps the Java Logging API, but throws in a few extra methods and some JDeveloper and (Weblogic) Enterprise Manager features.
    the following one demo video from oracle site its very useful.
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF_Insider_Essentials/debug_part1/debug_part1.html
    regards
    siva

  • How to determine SLG1 Application Log Size

    Hi, Can anyone tell me how we might be able to determine the size of our SLG1 Application Logs on our BW System?
    We want to be sure they are not taking up too much space.  If they are we'll purge with SLG2, and if not then we will keep them around.
    Thanks!

    Hello,
    system does writes the application log in to the database.
    SAP_COLLECTOR_FOR_NONE_R3_STAT is designed to collect non ABAP Statistic Data in/for a central repository.
    look service.sap.com/notes and search for SAP_COLLECTOR_FOR_NONE_R3_STAT
    Hope it will hep you.
    Regards,

  • Urgent: USER exit for W2 Box 13 of Tax reporter 4.7

    Hi,
        I am working on tax reporter version 4.7 and while printing the W2 forms saw that the Box 13 (selection of Statutory employee or Retirment plan or third party sick pay ) is not ticked. I worked in one of the clients on ECC 6.0 last year whom had a custom user exit for this same box 13 of W2 which used to get ticked on W2 form depending on the logic in that user exit.
    I suggested to this present client that an user exit needs to be written, they asked me to write functional specs for the user exit, can someone help me in writing the functional specs for this W2 form Box 13 selection of Tax reporter on 4.7. what do I need to specify and how do i need to write the functional specs reflecting the logic of this Box 13 of W2 form in tax reporter. Please help me guys, its very urgent.
    I apprecite your answers.
    Thank you so much
    Tony

    Hi Oscar Romero,
    Sorry its an typo error. second range should be 001.2006 to 007.2006.
    1. I want to know how to create Multiple Interval(Range) value variable? - I have used selection option and created variable. Is it correct?
    2. Pls find my coding.
    when 'ZFISCYAC'.
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFYPEROP'.   ---> Value entered is 001.2005 - 012.2006
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-LOW4(3) = LOC_VAR_RANGE-LOW4(3).
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZSCENAR'.  -
    > Value entered 20060804, 20060705.
    *concatenate LOC_VAR_RANGE-LOW(4) '0' LOC_VAR_RANGE-LOW+4(2)
    *into L_S_RANGE-high.
    L_S_RANGE-high = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-high+4(1) = '0'.
    L_S_RANGE-high5(2) = LOC_VAR_RANGE-LOW4(2).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDLOOP.
    ENDIF.
    Final range should be for 20060804, "ZFISCAY" should be from 001.2005 to 008.2006
    For 20060705 range should be 001.2005 to 007.2006.
    *Coding for Filling variable "Fiscal year/Period Plan Multiple values
    when 'ZFISCYPL'.
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZSCENAR'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-LOW+4(2) = '00'.
    L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW4(2) + 01.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFYPEROP'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-high(4).
    L_S_RANGE-HIGH4(3) = LOC_VAR_RANGE-high4(3).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDLOOP.
    ENDIF.
    With same variable values entered as above plan value for variable "ZFISCPL" should be of range 009.2006 to 012.2006 for 20060804
    Range should be 008.2006 to 012.2006 for 20060705.
    Hope this is clear.
    Pls answer very urgent.
    Thanks.
    Bhuvana.

  • Reg user exits exit_saplogdl_005 and exit_saplogsl_007 for va01 tcode

    Hi All,
    I have a requirement to add new fields to additional dataB fields for the transactions va01,va02 and all that we can do with screens 4462 of main screen 8459 and we can write the code in the user exit userexit_move_field_to_vbap in program MV45AFZZ. But in our requirement they also mentioned we have to write the code in the fun mod exits  "exit_saplogdl_005" and "exit_saplogsl_007"
    These exits I am able to find only in my version ECC6.O not in 4.7 and all and also I don't find any parameters for this function module exits. Can any body throw some idea how I can use of this fun mod exits.
    Thanks&Regards
    Mahesh

    Hi All,
    I have a requirement to add new fields to additional dataB fields for the transactions va01,va02 and all that we can do with screens 4462 of main screen 8459 and we can write the code in the user exit userexit_move_field_to_vbap in program MV45AFZZ. But in our requirement they also mentioned we have to write the code in the fun mod exits  "exit_saplogdl_005" and "exit_saplogsl_007"
    These exits I am able to find only in my version ECC6.O not in 4.7 and all and also I don't find any parameters for this function module exits. Can any body throw some idea how I can use of this fun mod exits.
    Thanks&Regards
    Mahesh

Maybe you are looking for

  • Create file, and export it to Network drive?

    Ok. I have said this a few times - I am a java developer, and I am not that great at writing procedures, or function, but I try. Here is my situation. I would like a procedure that will query a table, and output this data into a file based on the que

  • Variable not defined: '_XDOXSLTCTX'

    Hi, This is Rama krishna. I have implemented a prototype for barcode generation service using BI Publisher API. I am using Jdeveloper 11g. I have created a small ADF Fusion application to consume the webservice. My application is working fine when I

  • InDesign CS4: Two column layout question

    I'm looking for the best way to handle a two-column layout where: • Column 1 contains tips, small images/thumbnails/icons, etc • Column 2 contains the meat of the educational material, and • Content in column 1 anchors/floats with the appropriate con

  • Sloooow MacBook Air

    My MacBook Air is slow. It is slow from start up. After entering the password at the login window it shows a beach ball. The screens do no open with a whoosh. They open staccato. First grey screen, then wait, then a window, then a wait, then sudden a

  • Why do I see in the preview panel black edge on sides of imported jpegs into premiere CS5

    We sized a jpeg in photoshop to 720 x 524 to import into premiere project frame size 720 x 480.  Proportions all look good, but there is a black edge on each side of the jpeg in the preview panel.  Will this show up when viewed on a tv screen once we