How to use dynamic variables in the variants?

SAP users must be running number of reports on a daily basis. There are number of selection parameters like dates and periods etc. are to be entered. Every time, entering these values must be cumbersome task. However, following small trick would let the system dynamically select the dates based on the values maintained in the variable of the variant.
File 1.png
Would like to run this report on a daily basis, however, the open items (open at key date) has to be dynamically changed when running, we can create variant with dynamic variables. Click on “save” button.
File 2.png
Give Name and Description and Variant Name.
File 3.png
File 4.png
For Dynamic Variables, SAP has provided some standard variables, we can use them. Select “D” for this purpose.
File 6.png
The above are the standard variables created by SAP for this purpose. Now for this purpose, I am selecting Current Date. Anything beyond these standard variables, we may have to create customized variables.

I am selecting “Current Date” for this purpose.
File 7.png

Click on save button

File 8.png

You can please see the dynamic variant.

For example, if we schedule this job to run on a daily basis, the system would dynamically take the “Current Date” into “Open at Key Date” Field and run the report.

How to view depreciation simulation for future number of years

SAP PathSAP Easy Access à SAP Menu à Accounting à Financial Accounting à Fixed Assets à Information System à Depreciation Forecast à Depreciation on Capitalized Assets (Depreciation Simulation)
SAP Transaction CodeS_ALR_87012936


This report gives the depreciation simulation for future years by asset wise. There are also options in order to get the depreciation on monthly, quarterly and yearly basis. The is very useful report for the teams working in Fixed Assets area in order to report the simulated depreciation figures for future number of years.

Enter Selection Parameters


Field NameDescription
Company CodeCompany in which the report is required to be executed
Report DateLast working day of the future year
Display VariantSelect 1_SAP_1_LINE (which is more convenient for output display)
Summary ReportOptional – Select this box only if intend to display the balances for Summary per asset class

Click on  "Explode" button in order to expand the selection screen details.


Field NameDescription
List AssetsThis will show the list of details by asset
Evaluation PeriodThis will evaluation the simulation by period

Click on Execute Button


However, the above report showing the output data without columns optimized and limited up to few years.


From the menu bar, select: Settings à Optimize Column Width


The above report is now showing with column with optimized. However, still the depreciation simulation up to 2020 is not included in the report.

Now, we need to change our layout in order to bring those fields into the report.

Change the Layout (Ctrl+F8)




Now the proposed depreciation values for the future years are available in the report. Please note that this report not only brings the depreciation values, it can also bring the APC values and Net Book Values for the future years. However, the layout needs to be accordingly changed and include the fields that required to be shown in the output for reporting purpose. 

How to download Batch Input Session Log?

File 2.png
Now click on “Print” button

Now the log will shown in a report form as shown below:
File 3.png
You can now download the file from the menu, select: System
List Save Local file as shown below:
File 4.png

Select “Spreadsheet” option and download to the required location on your computer.

Many consultants think that this is very easy to download. But, in reality, I asked number of times to many consultants, however, they have no clue how to download it. Hope this tip would surely be helpful.

How to bring back different download options from SAP to Excel?

There is an option that number of list reports (for example S_ALR_87009712) can be downloaded into excel. When we are exporting such reports to excel, you will find a check box called “Always use selected format”. Once you have selected this check box, then this will be saved in the buffer for that user. The user will miss an option to download the report in other available formats. There is no clue how this can be cancelled. Following tip would help you bring back the available option (provided you have sufficient authorisation). Otherwise, you will need to contact the users who have the authorisation to do this for you.
File 1.png
You will have different options how you can download your report into excel file. However, there is a check box called “Always Use Selected Format”. If you have inadvertently selected this check box, from the next time, the report can only be selected with said following excel format that you have selected. Other options are not available in future and the report will be downloaded in default way to this format. Furthermore, the system will not give you any popup to select other options.
File 2.png
In such cases, there is an option to delete the “Always Use Selected Format” entries that are buffered, so that next time when you are downloading, as usual, the system will give you a pop up to select the relevant option. For doing this, you should have access to transaction codes SE38 or SA38
transaction codes (mostly given to the developers only). If you do not have access or unable to get the access, you should request the users / consultants who have access to delete the buffered entries for your user ID.

You need to go to transaction code SA38.
File 4.png
Please select “Delete” if you want to deleted “Change” in order to “Change” the buffer entries. It is preferred to selected “Delete” button, as we are intended to delete the buffer entries already saved. Pleas enter the Client Name and User Name in the “General Data Selection” In “ALV Data” context area, please keep as defaulted.
File 5.png
You will get an information box as shown above, click on “OK” (Green Tick Mark)

Please select the entry and click on “delete” button.
File 6.png
You will get the following pop-up box, please click on “Y” for “yes”
File 7.png
*Action successfully completed"
File 8.png

How to add net due date as selection criteria in Line Item Reports?

There is always a requirement to get the line items between a due date when executing FBL1N and FBL5N. But, surprisingly, this is not available either in the dynamic selection or the selection screen. Screen shot of FBL1N is shown below (before making the trick). However, a small trick will fetch the “Net Due Date” field as one of the selection parameters on the above mentioned transaction codes. This would help the users to get the open items which are due between certain net due dates.


You are required to visit SU3 in order to change your user parameters.


Go to “Parameters” Tab and scroll down further to enter the last line. Please enter FIT_DUE_DATE_SEL as the parameter ID and parameter
value as “X”.

After entering, please press “X” on your key board. Then the screen should look appear as follows:


Click on Save Button in order to save the changes.

Now please go to FBL1N or FBL5N and check the selection screen.



Now, you will see the “Net Due Date” field as one of the “Selection Parameter” on FBL1N and FBL5N

SAP - LSMW for Functional Consultants in simple step-by-step way

Legacy System Migration Workbench (LSMW) is handy tool for data uploads. In most of the big projects there is a separate development / data migration team is available. However, at times, it would be responsibility of the functional consultant to load the data such as vendor master, customer master and asset master etc. It would be real handy for a functional consultant to know LSMW (at least recording method) and it would help them to successfully complete the task. Hope this document would help many of our functional consultants, as I am seeing number of questions around LSMW. The simple rule is: Follow this document and practice is for number of times possible, then you will become master.

Go to Transaction Code "LSMW" and follow the following steps:
Give some Unique name for Project, Subproject and Object. Click Create (Shift+F1). Now execute or press CTRL+F8.

Give the description for Project, Sub Project and Object and say OK. Now execute or press CTRL+F8.
Select Maintain Object Attributes and Execute (CTRL+F8)

Click Display / Change (it will make you to change). Select the Radio Button Batch Input Recording. Now click on  “Goto” –
Recordings Overview. Click on Create Recording (Ctrl+F1).


Click OK


Give Required Transaction Code (In this case it is FK01)

Create Vendor or Make changes for Entering Withholding tax details in the Vendor.

Press Enter

Press Enter


Click on Save Button.


Recording is saved now. Click on “Default All” Button.


Ctrl+Y, a + will come. With this, you can drag and copy whatever you want.  In case if any field is appearing twice you
need to change the field name by double clicking on that. Otherwise, your uploading will get failed.

the fileds to an excel file. 


Remove the Blank Rows.


Now the field name and descriptions are in one Column. I.e., “A”. You need to
segregate that. To do that, select Column “A” and Select in Excel “Data” – Text
to Column as shown in the following graph.


Now Select the fixed with and say “Next”.


Select Fixed Width and click next.


Keep columns wherever you want by clicking.

Now say Next and then again say “Finish”. Now all fields and texts are divided into two Columns.


Now copy the fields and texts as shown in the Sheet1 (Ctrl+C)


to Sheet2

the cursor in the Sheet 2 (A1) and then


in Transpose as shown below and say OK.


Now all your rows will become your columns as shown in the blow Screen.


fill the required details exactly as shown below. You should note that you have
to enter ‘0001 for payment method instead of 0001, since if you straight enter
0001 it will become 1, therefore you must ensure whenever it is starting with
“0” should be preceded with ‘.


select the whole sheet2.

all grids.

No colors should be there in the sheet.

No letter should be typed in different colors. All are in normal color only.

Keep the columns to “LEFT” Margin.


=> Cells => Number => General as shown in the following screenshot.


Now say OK.
Now copy the whole Sheet2 and paste it in the Sheet3.   Then
delete the header rows as shown below:


this file to your Hard Disk with a simple name. In this case I saved as Vendor.


go to “SAVE AS” in Excel, and

as Text (Tab Delimited) as shown in the above screen shot.


Click on OK button as shown below.


Click on "YES" button as shown below.

Now, Click on "NO" button as shown below.

Press F3 or Click on Back Button.


Now, Click on "YES" to save.

You will reach the below screen.
Again, press F3 or click on back Button.


F4 in the Recording Button, your structure will be populated. In this case it


Now click on Save on Ctrl+S to save your recording.

After saving your recording click Back button or press Ctrl+F3 to go back.



Now you will observe that few steps have been disappeared. Only few steps are left
out. This is because of the recording mode that you have been selected. Ideally
there should not be any Idoc related steps should be visible.


Now Step1 is being completed and the system automatically takes you to second step.
Now press CTRL+F8 or Executed.


Click on Display / Change Button or press Ctrl+F1

Now create a Structure by clicking “Create Structure” or Ctrl+F4.


Give Source Structure Name and Description

Your Source Structure Name and Description is shown. Click on Save button


Now Press F3 or Click back button to go back.

Now the second step is completed and system automatically takes you to third step.
Click CTRL+F8 or Press Execute Button, which will take to maintain source fields.


Click on Display / change as shown above OR press Ctrl+F1.

Now press on Table Maintenance as shown above by keeping your cursor on the Source
Structure (in blue color in the above screen shot).


Copy those Fields from Sheet1 and copy it here. (from your excel file)


In case if your fields are came twice in recording, none of the field should be
similar. As already advised that change the field names to different field
names. Whatever, field names that you have changed in the structure should also
appear here. Meaning that in case these fields does not map with your changed
fields in your Structure, uploading will fail.


Enter the Field Type as “C” – Characteristic and Length as 60. If you know the length
enter the exact length. If you do not enter the maximum length 60. You should
not enter the length less than the actual length of the field.

Say “Save”.


Press "Enter". Save the results and Press
F3 or Click on back button to go back.


Now Click Save in this screen and again press F3 to go back.


Now system will automatically takes you to fourth screen.

Click CTRL+F8 or Click on Execute Button.


Select the Structure and click on Display / change button or press Ctrl+F1


Click on Relationship (Ctrl+F4)


it is customary step, you should go to this step. And say OK for the message
that the system has issued. “A source structure is already assigned to target
structure VENDRECO”.

Now press Save and PressF3 or Click on back button to go back.
It will take you to the next screen automatically.


Press CTRL+F8 or Click on Execute Button.


In the above screen, select the structure and then click display / change or (Ctrl+F1).

Again Select the Structure,


Go select the auto filed mapping as showing above in the above screen shot.

Say “OK” with this 50 number screen. Do not make any changes.


Keep on Pressing “Accept Proposal” for all the proposal as shown above.

Your entire field mapping should appear as above. Each field should have four rows as above.

Once it is being completed the system issues a statement that “Auto Field Mapping is completed”


Click Save (Ctrl+S) and go back (F3).



Nothing to do with “Maintain Field Values, Transactions, User Defined Routines”


Now Go to “Specify Files” Screen Manually and press “Ctrl+F8” or Execute Button.

Select the first row and click on Display / change Button.


Now Click on Add Entry “Ctrl+F2” as shown above.


Select the “TEXT (Tab Delimited)” file that you have already created and say Open.

Your file has come and Enter some relevant “Name”
Select “Tabulator” Radio Button and say OK.



Now Save (Ctrl+S) and press F3 or Back Button to go back.

Now the system will take you to next step i.e., “Assign Files”. Press Ctrl+F8 or
press Execute Button.


Select Source Structure (as shown in blue colour above) and press Display / Change
Button (Ctrl+F1).


Click on Assignment  (Ctrl+F2)
Though it is a customary step, you need to visit this step compulsory. The system will
issue a message stating that “A file has already been assigned to source
structure “VENDOR_RECORDING”. Say Ok.
Click on Save (Ctrl+S) and Press F3 or click on back button.


The system will take you to next step i.e., “Read Data”. Click on Execute or Press Ctrl+F8.



Remove the Checks for

Fields -> 1234.56

Value -> YYYYMMDD as shown above. There should not be any check in the above
two check boxes.


Click on Execute (F8)


The system will tell that total 8 records are being read.

Now Click on Back Button or press F3 TWICE, which will take you to initial screen.

Now the system takes you to next step “Display Read Data”
Click on Execute or Press Ctrl+F8.


Here you give the number of lines in your text file and say OK.

Click on Any one row and see whether the fields in SAP and columns in your Text File
are matching.



Once you are satisfied that everything is matching and going fine, press F3 or Click
on Back button TWICE, which will take you to initial screen.


Now you are automatically in “Convert Data” Screen.

PressCtrl+F8 or Click on Execute Button.

Just press F8 or Execute Button.


The following screen will appear. See the screen and press Back Button (F3) twice,
which will take you to initial screen.


Now the system will automatically takes you to “Display Converted Data”.

Press Ctrl+F8 or Click on Execute Button.


Enter the number of lines From 1 to 8 in this case, to see how it is showing in
Converted Data and Say Ok. (Click on Rite Tick).


Click on any one of the converted data line and see how the data is going.


If you are satisfied that everything is going fine, then Click on Go back button
(F3) TWICE, which will take you to initial screen.


You will be automatically taken to “Create Batch Input Session”.
Click Ctrl+F8 or press “Execute” Button.

Select "Keep Batch input Folder(s)?

Just Click on Execute Button (F8).

One Batch input session will be created. The system will state that “1 batch input
folder with 8 transactions created” will be issued. Say OK. (Click Right),
which will take you to initial screen.


Click Ctrl+F8 or Press on Execute Button.


Now you are in SM35 Screen. Select the line that is being created to upload and
press Execute (F8) button as shown above.


Select “Background” Radio Button.


Check in:

Extended log

Expert Mode

Dynpro Standard Size


As shown above and the click on “Process” button.


See the log and click on Line, if there are any problems in your log.

Click on back button (F3) to come out of the session FOUR TIME, which will take you
to Easy Access Screen.



Go to Report

Now You are Viewing the vendor records that you are uploaded. You can also follow
the same steps for Change also.

Please let me know if you have any doubts.