Friday, 27 December 2013

ABAP Shot Cuts Part 1


·        Comment/UN-comment lines
Comment allows you to apply a comment from a selected block.
UN-comment removes the comment from a selected block.
You can set these features by clicking with the secondary mouse button in the code and choosing Format -> Comment Lines or UN-comment lines.
You can also set them using:
  • CTRL+ < for Comment
  • CTRL+ > for UN-comment.
·        Indent/UN-indent lines(Increase and Decrease tab space)
This feature allows you to indent lines in the code by a certain number of spaces. 
You can increase or decrease line indent by clicking with the secondary mouse button in the code and choosing Format -> Increase Line Indent  or Decrease Line Indent.
You can also by using TAB and decrease the line indent by using SHIFT+TAB.
You can also Use:
  • TAB for increase the line indent
  • SHIFT+TAB for decrease the line indent
·        Case changing (upper/lower/capitalize/invert)
This feature allows you to switch between cases when you code.
You can switch between cases by clicking with the secondary mouse button in the code and choosing Format -> Change Case.
You can also change cases using:
¡        CTRL+L for Lower Case
¡        CTRL+U for Upper Case
¡        CTRL+J for Capitalize
¡        CTRL+T for Sentential
¡        CTRL+K for Invert Case
·        Sort lines
This feature allows you to select lines in your source and sort them alphabetically.
You can set it by clicking with the secondary mouse button in the code and choosing Format -> Sort Lines.

EX:


 


·        Join lines
This feature allows you to merge the text of two or more lines.
You can set it by clicking with the secondary mouse button in the code and choosing Format -> Join Lines.

EX:
 

 



Thursday, 14 November 2013

LSMW through Direct input method

Requirement :
Migration of material master data.

Process:
Go to LSMW transaction


Provide Project, Subproject and Object names and click on create.


Click on execute button.


The following screens will displayed.


Click on execute button to maintain object attributes.
Here we have four options.
  1. Direct input method,
  2. Batch input recording,
  3. BAPI &
  4. IDOC method.
As we are implementing direct input method for Material master creation select “Standard batch/Direct input” radio button.
Provide object and method, based on this selection program name is automatically displayed.
For Material master creation provide input 0020 for Object and 0000 for Method program name is automatically displayed.
After providing input click on save button and come back. 


 
Execute Maintain source structure for specifying structure for source.

 

Put cursor on source structure then click on create structure button


Provide structure name and description then click on continue button.


Structure will be created.


Execute “Maintain source fields”. To provide fields to map.

 

Put cursor on source field and click on Table Maintenance


Following screen will be displayed.


Enter the field name, type and length, based on these values description is automatically generated
Then click on save button and go back.


Following screen will be displayed .Now click on save button and go back.


Execute “Maintain structure relations” to maintain relation between source structure and database structure.


Following screen will be displayed.
 

Provide relation by putting cursor on structure and click on relationship button or by double clicking source structures we can provide relation.


Follow the above step to provide relation for the required structures then save and go back.


Execute “Maintain Field Mapping and Conversion Rule” to map the fields.


Following screen will be displayed.


Go to Extras and select Auto-Field Mapping.


Following screen will be displayed. If you are confirm with the fields mapping then select “No conformation” else select “With conformation” radio button then click on continue button.


Mapping will get completed and following information is displayed.


Field mapping will be done then the following screen appears. Click save and go back.
 

Put cursor on “TCODE” and click on “RULE” button to provide TCODE.


 
Provide TCODE “MM01” for Material master creation.
 

Following screen will appear.


Execute “Maintain Fixed Values, Translations, User-Defined Routines” if you want to maintain fixed value or any translations or User-defined routines.


Execute “Specify Files” to specify input data file path.


As we are getting input data file from presentation server put cursor on “Legacy Data On the PC (Front end)” and click on add entry for adding the path. If we want to get data from application server then put the cursor on “Legacy Data On the R/3 server (application server)” and click on add entry for fetching the file.


Following screen will be displayed.


Provide file path and description.
In “File Contents” tab select “Data for one Source structure (table)” if you are using single structure else for multiple structures select “Data for Multiple Source structure (Seq.File) radio button.
In “Delimiter” tab select any one of the options which provides information about field separators in your input data file.
In “File Structure” tab, if you provide field names in input file select “Field names at start of file “ else select “Field Order Matches Source Structure Definition” check box.

 

The following screen will be displayed. Save the data and go back.


Execute “Assign file”.