Friday, July 24, 2009

LSMW steps

Simple Steps to create the LSMW
By Giridhar Pujari
Go to transaction LSMW.

Click on “Create Entry”.
Create Project:
Click on “Continue”.
Create ‘Subproject’:
Click on “Continue” and create Object.

Click on Continue.
Click on Continue again.

1. Select the first step “Maintain Object Attributes” and click on “Execute”.
Here mention object and method in standard batch/Direct input radio button and press enter ,it will give standard program name . SAVE and go back.



Save and go back .
2. Select the step “Maintain Source Structures ” and click on “Execute”.

Save and Go back.


3. Select “Maintain Source Fields” and Execute
Place cursor on structure name and click on

Here mention the what ever fields we require and flat file should be in the same structure .
Save and come back.

Save and come back.
4 . Select “Maintain Structure Relations” and Execute :

Here to maintain structure relations click on BGR00 and ‘click relation ship’ as shown in above screen shot it will assigned to structure. Repeat this for all required relations in that screen.
5: Maintain field mappings and conversion rules ;

Nothing should be done in this step .(we will go for this step rarely).

6. specify files :
Here to specify files take file from legacy data ( on the pc front end ) .


click on legacy data and click create button. And browse for your flat file on your pc . (create flat file for your structure in second step.). here in imported data it will take only 45 characters .
7 : Assign Files

To assign files click cursor on structure and click assignment .it will assign to file .
8: Read Data

9: Display read data
10: Convert Data
11. Display converted data.

12. create the batch input session to create session.
13. Run the batch input session to create session.

Dynamic Variants

Created by Giridhar Pujari

Let us understand ‘What is Dynamic Variant?’ Dynamic Variant consists of selection variable for a selection screen item where in a formula can be defined. For example: On the selection screen of a report, take a Date field, which needs to be dynamic. From Date should be ‘Current date – 15’ and To Date should be ‘Current Date’. In this way the report when run with this variant, it would be possible to retrieve all those records which are past 15 days entries from now.
Please find below the procedure to define DYNAMIC Variant.

Scenario: Explain the creation of Dynamic Variant for report selection screen.

ECC:
Step:1 Go to T-code SE38 to specify program name and select ‘Variant’ radion button and Create
And click the attributes then it leads to below screen
Step 2: Click the selection variable and click on Dynamic date calculation
Step 3: Hit the next button “ Name of the Variable and choose your option to create the dynamic Variant.
Step4: you will see the popup with options , just choose the current date if you are looking date filed.

----If it is 3.1 to 4.6 then please follow the below steps

Step 1: Go to transaction SE38 to specify the Program name and select ‘Variant’ radio button and ‘Display’.
Then it will lead you to next screen ‘ABAP:Variants –Initial Screen’ as shown below: Specify the variant which needs to be created or changed.

Step2: Specify all those values which are static on the selection screen in this step. Then click ‘Variant Attributes’ to define selection variable for ‘Date Created’ on the selection screen.

Step 3: In this step, provide suitable meaning for the variant. As we need to define selection variable for ‘Date created’ item on selection screen, check the box under L as shown in the selection screen below:

Step 4: In the previous step, select ‘Selection Variables’ on the menu. It leads to the next screen as shown below. As we have decided to create selection variable for ‘Date created’ item only, in this screen you get to see the variable as ‘Date created’. Here you are provided with three options.
T: Table variable from TVARV
D: Dynamic Date Calculation
B: User defined Variables.
From the provided options as per our requirement select ‘D’ option. This can be done by clicking the Traffic lights under ‘D’as shown below to know that the particular option is selected.
Now click the black arrow as shown in the screenshot below and you will be prompted with search help of different formulas for the selection variable.

Step 5: Find the suitable formula as ‘Current date – xxx, current date + yyy’ and select it. This will lead you to the next screen to enter the values for xxx and yyy. So, provide values as 15 for xxx and 0 for yyy. Save the variant and this will conclude the creation of dynamic variant with the help of selection variable. This variant can also be used in the background jobs.