Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create a T - Code for LSMW

Former Member
0 Kudos

Hi,

I want to Create T-code for which i Did LSMW.

My Requirement is i want to give t-code for user it should be started from specify files.

so that he can complete rest of the things to upload the data.

Thanks In Advance

For helpful Answer Points will be rewarded.

Ramesh

6 REPLIES 6

Former Member
0 Kudos

Hi,

1.LSMW is a Tool ,it's not a Program or ABAP object.

So ,it is not possible to create a TCode for the LSMW.

Regards,

Shiva

former_member183994
Active Participant
0 Kudos

Sometimes you have to give to an experienced user access to LSMW, so I did a workaround:

In screen where all steps are shown, click on 'User menu' pushbutton and then hide all steps a user should not see, so Specify files step should be first.

Former Member
0 Kudos

Hi Ramesh

LSMW is directly did at production server itself, it doesn't requires any transport request and any quality check.

Also it is one time requirement which is done at initial stage of implementation to upload master data to database tables.

So, it's not case of using T.Code by the users.

If you found it helpful to you.

Please do reward.

Thanks

Suren

Former Member
0 Kudos

LSMW itself is the Transaction code for LSMW.

No need of assigning any Tcode for LSMW and you can't assign

Former Member
0 Kudos

Hi. I have the same requirement today, after searching solution in forums without success, I have to figure it out myself.

YES, IT CAN BE DONE.

I assump that you already have a functionable LSMW project

1. Open your desired LSMW project and go to Extras->User Menu.

2. Select the following unselected steps there

- Generate Read Program

- Display Read Program

- Generate Conversion Program

- Display Conversion Program

3. Run the step Generate Read Program  then Generate Conversion Program to generate programs and then active them

4. Run step Display Read Program and copy the program name in Report field

5. Run step Display Conversion Program and copy the program name in Report field

6. With the 2 newly generated programs, you can try to run them using SE30 (Program mode)

7. Assign T-code for these programs

8. For the Create batch input step, you can run it in LSMW and try to get the program code in the task bar. In my case it is /SAPDMC/SAP_LSMW_BI_RECORDING

Now you already have 3 T-codes with 3 separate steps in a specific LSMW project, you can consider to assign them to the desired users.

Good luck

Harry 

0 Kudos

Hello,

There are two other ways to create Tcodes for any LSMW conversion object.

1. Write an ABAP program using below code and create a new Tcode using SE93. The program can also have parameters in the selection-screen for Project, Sub-Project and Object.

Type-pools: TUMLS.

DATA: Gv_proj TYPE  tumls_project VALUE 'ZPROJECT_MM',     

      Gv_subproject TYPE  tumls_subproj VALUE 'ZSUBPROJECT_MM',     

      Gv_object TYPE  tumls_objectnew VALUE 'ZOBJECT_MM'.

CALL FUNCTION '/SAPDMC/LSM_OBJ_STARTER' 

EXPORTING  

project                  = Gv_proj   

subproj                  = Gv_subproject  

object                     = Gv_object

*   X_CALLED_FROM_DXWB       = ' '

* EXCEPTIONS

*   NO_SUCH_OBJECT           = 1

*   OTHERS                   = 2.

IF NOT sy-subrc is initial.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

2.  Second method to create a Tcode for LSMW is using the steps below provided.


a. Create Z-Tcode with Parameter Transaction(SE93).

b. In the default values for area, give transaction 'LSMW' and check the box for 'skip initial screen'.

c. In the name of screen field area section, provide the following.

/SAPDMC/LSSCREEN-PROJECT = <Z-Project>

/SAPDMC/LSSCREEN-SUBPROJ = <ZSub-Project

/SAPDMC/LSSCREEN-OBJECT        = <Zobject>

d. Save and Activate

Hope this helps.

G