User defined routines in lsmw

hi all,
Can anyone explain the significance of user defined routines in lswm. In which scenario we use user defined routines. Can anyone explain userdefined routines with an example.
thanxs
hari

Hi,
     Go to the transaction code LSMW. Create a new object. In the "Maintain object attributes" part, you define what standard object routine that you want to use. Here are a few from 46c
0001   Long texts         
0010   GL a/c master record
0020   Material master    
0030   Material BOM       
0035   LIFO Layer         
0040   Vendor master      
0050   Customer master    
0060   Purchasing info rec.
0070   Condition record   
0080   Purchase requisition
0085   Purchase Order     
0090   Sales documents    
0100   Financial documents
0105   LockBox            
0110   Goods movement     
0120   Manual reservation 
0130   Classification     
0140   Class              
0150   Characteristic     
0160   Fixed assets       
0170   Routing            
0180   Planned indep.reqmts
0190   Doc. purch. info re
0210   Storage bin (WM)  
0220   Warehouse stock (WM
0240   Inspection plans(QM
0250   Bank data         
0260   Work center       
0300   Rental unit       
0310   Lease-Out         
0320   Business entity   
0330   Property          
0400   Equipment          
0410   Message (IH)       
0420   Confirmation (IH)  
0425   Measuring point    
0430   Measuring document 
0440   Functional location
0450   Object link        
0460   Maintenance plan   
0470   Equipment task list
0480   FnctnlLoc.TaskList 
0490   Gen.task list      
0555   HR master data     
0600   PostCode,Loc.,St.,..
0602   PostCode,Loc.,St.,..
0610   Cities             
0612   Locations          
0620   Postal codes       
0622   Postal codes       
0630   Districts          
0632   Districts          
0640   Streets            
0642   Streets            
0650   P.O. boxes         
0652   P.O. boxes         
0777   Personnel Planning 
0800   Do not use!        
Each object has several methods under it, some for Batch input, or direct input, or some for Create, Change, Delete. It really depends on the object.
refer the link:
Lsmw
<b>Reward points</b>
Regards
Message was edited by:
        skk

Similar Messages

  • About user defined routine in lsmw

    Hi,
    When we create user defined routine in lsmw.
    it ask for input parameter and out put parameter.
    after that it will create one  subroutine.
    But how to map input parameter  of sub routine with source field.
    thanks,
    Jigar

    Hi Jigar,
    when you have selected a project and a subproject your first screen
    will be the personal menu of the LSMW. You will find here a step-by-step-wizard
    which you have to execute in sequence. If a step is executed the cursor is automatically positioned on the next step.
    Choose 'Maintain field mapping and conversion rules'.
    If the mapping is displayed set the cursor on the field you want to edit.
    Press the button 'Rule' on the button bar above the mapping.
    You will get a Popup where you can select 'User-defined routine (reusable)' (that is the last radio button).
    Regards,
    Ralf
    > But how to map input parameter  of sub routine with
    > source field.

  • LSMW  - Maintain Fixed Values, Translations, User-Defined Routines

    Hi all,
    I know a little about LSMW.I can perform all the steps and I have uploaded from flatfile to standard tables for transaction XK01. I just want to know what we can perform in sixth step.If I want to write a user defined routine how can I do that ? Can anyone explain me with a simple example and detailed description.
    Regards,
    Vijay.

    hi, you means the 'Maintain fixed values, translations, user-defined routines'.
    You can definite some fixed values and translations rule in this step.
    And go back to the 'Maintain field mapping and conversion rules' steps.
    You can utility these pre-defined in the data mapping.
    E.G.
    You defined a fixed valued name 'BUKRS'
    Through click the button in the application bar in step 5,
    you can use a FV_BUKRS in data mapping.
    FV_BUKRS is the name of the fixed value name in data mapping.
    thanks

  • LSMW User define routine translation

    hi gurus,
    I'm trying to load assets using LSMW. Everything is working fine except a minor issue. I'm trying to upload the vendors' for assets by using translation. There are some valid vendor codes which I've maintained in translation table. However there are some invalid vendor codes from legacy system (the asset is very old and the company doesn't deal with the vendor no more). For these invalid codes I want to assign a constant value but since I've not maintained the translation for these codes, LSMW issues an error during conversion. How can I create a user defined routine to assign the invalid vendor codes that I haven't maintained in the table to a constant value. thanks

    In the step u201CMaintain Field Mapping and Conversion Rulesu201D declare global variables in the
    u201CGlobal Data Definitions and Declarationsu201D section after you select all the checkboxes in the Popup window u201CDetermine Layoutu201D from the menu path u201CExtras / Layoutu201D. 
    Here is a example of the global data declaration :
    __GLOBAL_DATA__
    DATA: cTmp(250) TYPE C, iTmp TYPE I.
    TYPES: BEGIN OF stBase.
      TYPES : MESSAGE(250) TYPE C,MESSAGET
              INCLUDE TYPE ZCAFSMMUPLDFMT.
      TYPES : EWFIELDS(2000) TYPE C.
    TYPES: END OF stBase.
    Then, at the bottom of the u201CDisplay Field Mapping and Conversion Rulesu201D  screen you can enter your User ABAP Routine within the u201CForm Routine (ABAP routines)u201D node.  Below is a example of a routine :
    FORM urOutputE1MARCM CHANGING pOut.
      pOut = 0.
      CLEAR waTmpE1MARCM.  FREE itTmpE1MARCM.
      MOVE-CORRESPONDING E1MARCM TO waTmpE1MARCM.
      APPEND waTmpE1MARCM TO itTmpE1MARCM.
      iTmp = 0.
      iTmp = STRLEN( waTmpE1MARCM ).
      IF iTmp > 0.
        REPLACE ALL OCCURRENCES OF REGEX '/' IN TABLE itTmpE1MARCM WITH '
        iTmp = 0. CLEAR waTmpE1MARCM.
        MOVE-CORRESPONDING itTmpE1MARCM TO waTmpE1MARCM.
        LOOP AT itTmpE1MARCM INTO waTmpE1MARCM. ENDLOOP.
        iTmp = STRLEN( waTmpE1MARCM ).
        IF iTmp > 0.
          pOut = 1.
        ELSE.
          pOut = 0.
        ENDIF.
      ENDIF.
    ENDFORM.
    You can then call the routine within your mapping.  I used the example a in the u201C__END_OF_RECORD__u201D node of a IDoc Segment to control whether or not the Segment is to be outputted or not.
    PERFORM urOutputE1MARCM CHANGING iTmp.
    IF iTmp > 0.
       transfer_record.
    ENDIF.
    I hope this helps some.

  • LSMW Fixed, Translations and User defined routines??????

    Hi Experts,
      I have another questions here.. I can see the step called Maintain Fixed values, Translation and User defined routines in LSM Workbench, why is it used, when its used and where???
    If its possible can someone give me examples for this particular step...
    Well, I wanted to award some points to experts like RICH, CHRISTIAN AND ZHENGLIU, but my screen is not showing the points radio button.  But I will award, as soon as possible.
    Thanks and waiting for your replies.
    Regards,
      -Ken C

    Also check http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/7a/5e3d38faba11d1b40f006094b944c8/frameset.htm
    Hope you'll find your answers..
    Cheers !!!

  • LSMW user-defined routine error

    Hi,
      I have a problem with the routines in the LSMW. This is want I am doing:
    1. created a project & subproject.
    2. copied 4-5 objects from another project
    3. copied all the user routines.
    4. ran the objects fine.
    After a few days I have copied a new object from the old project and used one of the routines. It gives out the message "HANDLE is not defined under DATA". As I know, this is an lsmw global variable so it should work. This variable can be found in one of the routines. I deleted all the routines and copied them again and it work.
    Today I needed a new object, copied it, and it gives again this error; recopied the subroutines...still, error persist.
    Please help,
    Thank you very much in advanced
    LE: Is there any way to adapt your conversion program, after you made modifications to the field mapping?
    Message was edited by:
            Daniel BALTA

    Hello Chris,
    I have already done that and I still get this error, but only for this object. I have never declared this data "handle", but here is how 2 conversion programs look like (same project/subproject):
    The program that works:
    Counters
    data:
      g_cnt_UPLOAD  type i.
    Counter ct_xxxxxxxxxx: number of transferred records
    data:
      ct_IBIPEQUI  type i,
      cs_IBIPEQUI  type i.
    Global data definitions and data declarations
    __GLOBAL_DATA__
    DATA: objnr LIKE equi-objnr.
    DATA: handle TYPE balloghndl.
    INCLUDE zpmxi_appl_log.
    DATA: BEGIN OF wa_tplnr OCCURS 0 ,
          tplnr(50),
          END OF wa_tplnr.
    parameters:
      p_filept no-display,
      p_trfcpt no-display,
      p_packge(5) type n no-display.
    Select-option for wildcard value in file names
    And the program that doesn't work:
    Counter ct_xxxxxxxxxx: number of transferred records
    data:
      ct_BIKSSK  type i,
      cs_BIKSSK  type i,
      ct_BIAUSP  type i,
      cs_BIAUSP  type i.
    parameters:
      p_filept no-display,
      p_trfcpt no-display,
      p_packge(5) type n no-display.
    Select-option for wildcard value in file names
    How do you explain this?

  • Using user-defined transport recording routine with table maintenance view?

    Hi,
    I have  a table that is maintained through a maintenance view. I need to record the changes to a dedicated transport object (not TABU) with my own recording routine instead of teh standard recording routine.Could someone tell me which/how the events can be used to achieve this?
    Regards
    Rachana

    Hi Rajeev,
    I have changed TMG to choose the option - User defined routine. And I have created a new transport object in SOBJ for the table. Is this enough to record the object to the transport as the object i defined instead of TABU? Do I need to write some subroutine for any view event to achieve this? Do you mean to use the menu option to include the object to a request?
    I have a bigger problem where this view is actually part of a view cluster. Even in that case is teh above steps enough?
    Regards
    Rachana

  • Problem about user-defined resource in RAC

    i do what doc says ,to create user-defined resource ,
    [oracle@rac1 ~]$ crs_profile -create network1 -t application -a /opt/ora/product/10.2.0/crs_1/bin/usrvip -o oi=eth0,ov=192.168.40.221,on=255.255.255.0
    [oracle@rac1 ~]$ crs_register network1
    [root@rac1 bin]# ./crs_setperm network1 -o root
    [root@rac1 bin]# ./crs_setperm network1 -u user:oracle:r-x
    [oracle@rac1 ~]$ crs_start network1
    Attempting to start `network1` on member `rac2`
    Start of `network1` on member `rac2` succeeded.
    $ crs_profile -create chk_slp -t application -B /opt/action_chkslp -d "test for crs" -r
    network1 -l application2 -a /opt/chkslp.scr -o ci=5,ft=2,fi=12,ra=2
    the command do not create /opt/chkslp.scr file ,so when i run crs_register chk_slp ,it will fail
    [oracle@rac1 admin]$ crs_register chk_slp
    Action Script `/opt/chkslp.scr` does not exist!
    CRS-0213: Could not register resource 'chk_slp'.
    i do not know why,anyone can help

    Hi Jigar,
    when you have selected a project and a subproject your first screen
    will be the personal menu of the LSMW. You will find here a step-by-step-wizard
    which you have to execute in sequence. If a step is executed the cursor is automatically positioned on the next step.
    Choose 'Maintain field mapping and conversion rules'.
    If the mapping is displayed set the cursor on the field you want to edit.
    Press the button 'Rule' on the button bar above the mapping.
    You will get a Popup where you can select 'User-defined routine (reusable)' (that is the last radio button).
    Regards,
    Ralf
    > But how to map input parameter  of sub routine with
    > source field.

  • What the best way to create User defined table with ADDON purpose

    Hi folks, how are you ?
    I´m beginner in development to business one, and I m studying to develop ISV addons.
    But, during my exercises and analisys, I learned that have two ways to create tables and fields in business one. One way is throght by wizard in business one using Tools Menu > Configuration Tools > User Defined Tables >
    Obs: I ´m using Business One Patch Level 9.
    Other way, is create the tables and fields using DI API
    But, my question is. When I develop one addon, or one UDO form that uses one set of user defined tables or used defined fields that where created by the first way (by wizard in B1), how I deploy this in other business one installation ? The package process will ensure the creation of this tables in another enviroment or I must implement the creation of user defined tables using DI API so that this code is called during the installation?
    If in cases of addon develop I must use DI API to create user defined tables, How can I use my classes with this responsibility in package process ?
    Thanks my friends.

    Hi Renan,
    You just need to put your logic in to the startup of your application, after you've established your connection to the UI API and DI API. All this will be triggered in the constructor of your main class.
    namespace MyNamespace
    public class MyAddon
      bool runAddon = true;
      bool initialised = false;
      const string ADDON_NAME = "My Addon";
      public static void Main()
            MyAddon addOn = new MyAddon();
            if(runAddon)
                  System.Windows.Forms.Application.Run();
            else
             Application.Exit();
      public MyAddon()
            // Connect to SBO session for UI
            if(!SetApplication()) runAddon = false;
      private bool SetApplication()
            // Code goes in here to establish UI API and DI API connections
            // See SDK samples for examples
            // You should also define and filter the UI API events your addon will trap at this stage and create any menus
            // Call your routine to check if the required UDFs/UDTs exist on this company
            initialised = CheckInitialisation();
            if (!initialised)
               //  AddOn not yet intialised on this company so prompt the user to run the intialisation process
              int iResponse = app.MessageBox("The " + ADDON_NAME + " addon will now create all required fields and tables."
                                             + System.Environment.NewLine + System.Environment.NewLine
                                             + "WARNING: It is strongly recommended that all other users are logged out of this company "
                                             + "before running this process. Are you sure you wish to continue?", 2, "Yes", "No", "");
              if (iResponse == 1) initialised = InitialiseAddOn(); // Call your routine to create the objects
            return true;
    Kind Regards,
    Owen

  • Where are User Defined Functions and Stored Procedures kept in SQL Server?

    Hi,
    I have a growing list of Stored Procedures and User-Defined Functions in SQL Server, and would like to be able to list all my user SP and UDF easily.
    Is it possible to write a query to list all SP and UDF?
    I saw the following specimen code in an SQL book, but am not sure this is what I need because I could not make it work.
    SELECT *
        FROM INFORMATION_SCHEMA.ROUTINES
    WHERE SPECIFIC_SCHEMA = N'CustomerDetails'
        AND SPECIFIC_NAME = N'apf_CusBalances'
    I tried:
    SELECT *
        FROM INFORMATION_SCHEMA.ROUTINES
    but it does not work.
    Suppose all my SP are named following this pattern:
        dbo.usp_Storeproc1
    How would I modify the above code? or is there a better code?
    Thanks
    Leon Lai

    Hi ,
    try this to get list of all stored procedures:
    SELECT *
    FROM sys.procedures where name like 'dbo.usp%'
    Thanks,
    Neetu

  • Display of document line items with user defined fields

    Hi all,
    I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained  optinal for entry in the screen layout. I posted one document with user defined fields and saved.
    Now the document is updated in BSEG table. I then display the document, and it display the doucment
    But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
    I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
    But still i couldnt display my line items in detail.
    Any solutions
    Thanks in advance
    Ram

    Yes your are looking at the correct sap note.
    Things look pretty straight forward in the notes documentation.
    1)Extend the VBKRED structure with the fields you want.
    2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
    For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
    In your case you need to  extend VBKRED_EX1 structure rather than VBKRED.
    Regards,
    ravi

  • User Defined Field in Material master

    Hi Friends,
    Can we add any user defined fields in any views in  material master (preferably with F4 help)
    If so, please let me know how to do it and its impact.
    Regards
    Ram

    Hi Ramachandran,
    Of course. 
    1.  If there is an existing Material Class, use it, unless modifying that class interferes with existing business processes.  Otherwise create a new class using CL01.  Use class type 001.
    2.  Create a characteristic using CT04 that represents your new field.  The characteristic will be your new field name and the description will be the description.
    3.  Using CL02, assign the characteristic to the existing material class, or to the new one you just created in step 1.
    4.  If this is a new system, you will have to create user instructions as to how to maintain the field.  The field will exist in the Classification view of the Material master in MM01/02/03, and the contents can be edited just like any field.
    5.  If this is an existing system, you will have to populate this field in all of the existing material masters.  Depending on the size and complexity of data, you may have to create a Legacy System Migration Workbench (transaction LSMW) project to bring all the fields up to date.
    As far as F4 help, depends on where you want to see it.  Within the classification view of the material master, it is possible to establish a validation in CT04 that will require your users to pick from an established validation list when they select the F4 key.  If you want F4 help in other places, you should consult your ABAP'ers, who should be able to set this up for you.
    Impact of a new characteristic/class is zero.  Impact of adding a characteristic to an existing class is dependent on your current use of the existing classes.  Writing reports which use these data is a well understood technique within the ABAP community.  Although the field will not exist in MARA table, it can still give you the same functionality as if it did.
    I do not recommend that you add a field to MARA, even though this is possible.  Although hotpack upgrades will leave a customer generated MARA field alone, whatever functionality you create to use this new field will be endangered with every OSS note and every hotpack upgrade you install.  Since Characteristics and Classes are considered master data, SAP hotpacks pretty much leave them alone.
    Regards,
    DB49

  • Uploading Data in a User Defined table

    Hello Experts,
    I have a user defined table YFEED_TABLE_2 as a local object in the System. i want to upload some data from TEXT file to the table using LSMW TCode..
    But after selecting  u201CMaintain Object Attributesu201D in LSMW transaction...in the "STANDARD BATCH/INPUT METHOD", I have select an Object like Vendor master, material master,...few more are there...
    i don't know which object to Choose...how could i know that object is mapped to the target table  YFEED_TABLE_2 ...
    Please Help....
    Anupam...

    >
    Ankur Parab wrote:
    > Hi,
    > Use BDC recording method in LSMW and do a recording of SM30 transaction to maintain data in your Z table.
    >
    > Regards,
    > Ankur Parab
    Please tell me the procedure to perform BDC recording in LSMW & do a recording of SM 30 transaction???
    COuld please also tell me how to perform a new recording in transaction SHDB???
    Please Help...
    Anupam.,...

  • 8i personal : error when Create user defined aggregate function

    Hi,
    I have problem on creating user defined aggregate function.
    I try to create the sample aggregate function "SecondMax" from 9i developer guide(append at the end of this post).
    It's work to create object type and the type body, but
    there is error when I create the aggregate function..
    "CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;"
    I am using 8i personal now.. is that the syntax of create function in 9i is different from that in 8i?
    Example: Creating and Using a User-Defined Aggregate
    This example illustrates creating a simple user-defined aggregate function SecondMax() that returns the second-largest value in a set of numbers.
    Creating SecondMax()
    Implement the type SecondMaxImpl to contain the ODCIAggregate routines.
    create type SecondMaxImpl as object
    max NUMBER, -- highest value seen so far
    secmax NUMBER, -- second highest value seen so far
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number,
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl,
    value IN number) return number,
    member function ODCIAggregateTerminate(self IN SecondMaxImpl,
    returnValue OUT number, flags IN number) return number,
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl,
    ctx2 IN SecondMaxImpl) return number
    Implement the type body for SecondMaxImpl.
    create or replace type body SecondMaxImpl is
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number is
    begin
    sctx := SecondMaxImpl(0, 0);
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl, value IN number)
    return number is
    begin
    if value > self.max then
    self.secmax := self.max;
    self.max := value;
    elsif value > self.secmax then
    self.secmax := value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN SecondMaxImpl, returnValue OUT
    number, flags IN number) return number is
    begin
    returnValue := self.secmax;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl, ctx2 IN
    SecondMaxImpl) return number is
    begin
    if ctx2.max > self.max then
    if ctx2.secmax > self.secmax then
    self.secmax := ctx2.secmax;
    else
    self.secmax := self.max;
    end if;
    self.max := ctx2.max;
    elsif ctx2.max > self.secmax then
    self.secmax := ctx2.max;
    end if;
    return ODCIConst.Success;
    end;
    end;
    Create the user-defined aggregate.
    CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
    Using SecondMax()
    SELECT SecondMax(salary), department_id
    FROM employees
    GROUP BY department_id
    HAVING SecondMax(salary) > 9000;

    This could be a x64/x86 problem. Try following this thread
    [GetCompanyService|GetCompanyService] and recompile your code for the platform you need.

  • Changing existing Material Group  user defined names  to new mat groups

    Hi Gurus,
    My client is using conventional Material Groups user defined names for ages in their system.
    Now they have requested us to workout for switching over to UNSPSC material groups Global Standardization.
    While carrying out the exerice, they have asked us to completely clean up the entire system to replace the new material group with old in all Masterdata, transaction data including statistics table in pr, po, stock and in everything
    If any one of you have carried out this exercise and if you have any useful documentation, please inform me
    Thanks and Best Regards,
    Mohan

    Hi,
    If you change the Material groups in Material master the system the system will not update the PR/PO/Stock or others.
    You need to change all the documents to update the New Material groups.
    For Material master update you can use the LSMW.
    You can update the PR/PO also but if the PR/PO is subjected to Release Strategy then you need to derelease then change the material group then update and if it is based on the Material group then while update the new release strategy will apply and you have to change everything.
    Think of that if you have huge data then it is very difficult to change all the documents. if the data is Less you can proceed .
    Instead of deleting old material groups just add the new material groups and use them in future for all your process.
    rgds
    Chidanand

Maybe you are looking for

  • ADConnector v9.1.1 and Windows 2008 R2 - Supported? (OIM 9.1.0.2)

    Below is my question around the OIM AD connector version 9.1.1 and its support with Windows Server 2008 R2. From the AD Connector Documentation I can see that Active Directory 2008 is a supported target system by the OIM connector v9.1.1. There is no

  • Airport Blank, Time displayed is wrong, spinning wheel of death›

    Hi Guys This is the second time this has happened in the last 3 days. My airport icon along the top toolbar is blank, even though clearly i am on the internet right now and it's working, and also the time is 50mins out. I went into System Preferences

  • OS X Mavericks on Mac Pro 2,1 and other customization

    Hello, So my friend and I want to give a Mac Pro 2,1 (from 2007-2008) a new life as editing machine for pictures and video. To be up to date with the latest software and stuff we wanted to upgrade to Mavericks, but it seems that it's not supported? L

  • Performance tuning for ECC5

    Hi, Can any one guide me how to do the performance tuning in an ECC5, MSSQL2000,Windows 2003 system Here the RAM size is 3.5 gb. Page file size was 9 gb(i increased that to 11.5 gb (3*RAM+ 1 gb) Also increased the abap/buffer size to 400000. Regards,

  • Migrating a website from 2008 R2 to 2012 ( iis 8.5)

    Hi Need help with the following scenario. I need to move the entire website from 2008 R2 to new 2012 server, please find the details below. Web site number : 1 Current Server 2008 R2 ( iis 7.5) Destination : 2012 ( iis 8.5 )  Is there any migration t