Saturday, 4 February 2017

SAP SHORTCUTS AND WHAT IS SAP MEANINGS

abap collections

BASICS FIRST KNOW TOTAL SAP KEYS ON TITLES

FIRST TO KNOW ABOUT 


ECC - ENTERPRISE CENTRAL COMPONENT.


ERP -ENTERPRISE RESOURCE PLANNING


SAP - SYSTEMS APPLICATIONS AND PRODUCTS IN DATA                                                                     PROCESSING


 ABAP -ADVANCE BUSINESS APPLICATION PROGRAMMING


ABAP/4 - MEANS 4TH GEN LANGUAGE


IDES -INTERNET DEMONSTRATION AND EVALUTION SYSTEM


IDE - INTEGRATED DEVELOPMENT ENVIRONMENT


ITS - INTERNET TRANSACTION SERVER

FIRST LOG ON SAP SOFTWARE BY USING USER ID AND PASSWORD LANGUAGE IS MANDITARY



AT FIRST SAP SCREEN OPENS WITH

1. SCREEN HEADER

2.MENU BAR

3.STANDARD TOOLBAR

4.TITLE BAR

5.APPLICATION TOOLBAR

6.SCREEN BODY

7.STATUS BAR

8.COMMAND FIELD


1. SCREEN HEADER : DISPLAYING LIKE CURRENT SYS NAME AND SESSION AND


MAXIMISE OR MINIMISE.


2.MENU BAR: USED FOR PERTICULAR ACTIVE FUNCTIONALITIES. IT PERFORM SYS

 FUNCTIONALITIES.

3.STANDARD TOOLBAR : HAVING COMMAND FIELD AND STANDARD BUTTONS ARE

                                                                                       SAP STANDARD MENU SCREEN BUTTON
                                                                                     
                                                                                       SAP USER MENU SCREEN BUTTON


SAP STANDARD MENU SCREEN BUTTON : TO ACCESS SAP MENU FOLDER , THE

EQVIVALENT OF SAP R/3 MENU


SAP USER MENU SCREEN BUTTON: TO ACCESS THE ROLES MENU FOLDERS TO WHICH

 THE SYS HAVE AUTHORIZATION.


STANDARD TOOLBAR BUTTONS ARE ENTER,SAVE,BACK,EXIT,CANCEL


,PRINT,FIND,SEARCH,HELP ETC.

KEYS SHORTCUTS -: ENTER -PRESS ENTER KEY
                                     
                                       SAVE - CTRL  S

                                      BACK - F3

                                      EXIT- SHIFT F3

                                     CANCEL - F12

                                     PRINT - CTRL P

                                     FIND - CTRL F
                         
                                     HELP - F1 ETC............................................................................................


4.TITLE BAR : DISPLAYS THE NAME OF THE SCREEN U R WORKING IN.


5.APPLICATION TOOLBAR : THE EXECUTABLE BUTTON APPEARS ON THE FIRST


POSITION OF THE APPLICATION TOOLBAR. FOR OTHER INFORMATION REQ USE

GETTING STARTED->SAPBUTTONS.


6.SCREEN BODY : SCREEN BODY CONTAINS NAVIGATION AREA AND NON-ACTIVE

WORK AREA.


NAVIGATION AREA : WHERE MENU AND FAVIRIOTES FOLDERS LOCATED.

OPEN FOLDER UNTILL U C TRANSACTION NAME AND DOUBLE CLICK TO OPEN AND

START TANSACTION.

 For example, the navigation path for Create a Requisition is: - User Menu - Role zmit - Purchasing - Requisitions - Create a Requisition

WORK AREA : HAVING FIELD REQUIRE TO GIVE,,SOME ARE DEFAULTY,,SOME ARE

OPTIONAL ENTRIES.


7.STATUS BAR : BOTTOM OF SCREEN IT DISPLAYS SESSION NAMES AND SYS MSG 

INFORMATION.

                               SAP FREQUENTLY USED BUTTONS






Monday, 27 June 2016

BRIEF DISSCUSSION ABOUT DATA DICTINORY

DATA DICTINORY(SE11):


AT FIRST IF U LOGIN SAP MENU  THEN U SEE COMMAND BOX ON THE LEFT UPPER TOP CORNER.

IN THAT COMMAND BOX IS USEFUL FOR TRANSACTION DATA OVER SAP SYSTEM BY USING TRANSACTION CODES(T-CODES)

FIRST TYPE SE11 T-CODE ON COMMAND BOX AND PRESS ENTER.

THEN DATA DICTINORY SCREEN APPEARS .


ABAP DICTINORY COMPLETELY INTEGRATED WITH ABAP WORKBENCH(SE80).

THE FOLLOWING R THE DIFFRENT DATA OBJECTS:


1) TABLE
2)VIEW
3)DATA TYPE
4)TYPE GROUP
5)DOMAIN
6)SEARCH HELP
7)LOCK OBJECT


TABLE:   ITS HAVING ROWS AND COLUMNS. IN TABLE CREATION FIRST FILL COLUMNS OF LEFT SIDE AND GIVE DATA TYPE FOR EACH COLUMN ON RIGHT SIDE.


TABLE IS AN INDEXED FILE: THE MAIN INDEX IS CALLED PRIMARY KEY.

PRIMARY KEY = NOT NULL + UNIQUE.
WE USE PRIMARY KEY   PURPOSE IS THERE R SO MANY TABLES, EACH TABLE HAVING RELATIONSHIP WITH OTHER SO WE GIVE PRIMARY KEY TO RELATE ALL TABLES.

IF THE PRIMARY KEY OF ONE TABLE, IF IT EXSISTS IN THE OTHER TABLE THEN ITS CALLED FOREIGN KEY.

THE MAIN FUNCTION OF FOREIGN KEY IS DATA INTIGRITY.

THERE R ALMOST 8000 TABLES IN ECC SYSTEM. FOLLOWING TYPES OF TABLES R AVAILABLE:


1)TRANSPARENT TABLES: THIS HAVING SAME STRUCTURE IN DICTINORY AND DATABASE. WE ALSO USE STANDARD OPEN SQL.

2)POOLED AND 3) CLUSTER TABLES: THESE R LOGICAL TABLES .HAVING RECORDS OF TRANSPARENT TABLES ALSO.

THESE R NOT MANAGABLE DIRECTLY USING DATABASE SYSTEM TOOLS. CANNOT USE NATIVE SQL.



A) TABLE FIELDS DEFINE FIELD NAMES AND DATA TYPES. U MUST SECIFY REFERENCE FIELDS MEANS FORMAT UNWANTED SELECTION.

B)DELIVARY CLASS: CONTROLS AND TRANSPORT DATA FOR INSTALLATION, UPGRADATION AND CLIENT COPY BETWEEN CUSTOMERS.

USED FOR EXTEND TABLE MAINTAINANCE.

TYPES:  1) A   C   L    G    E    S    AND    W.

MOSTLY USE A AND C.


C)TABLE/VIEW MAINTAINANCE: TABLE IS DISPLAYED IN TOOLS OR NOT WE USE.

VALUES POOSIBLE : DISPLAY/MAINTAINCE ALLOWED.

         DISPLAY/MAINTAINCE ALLOWED WITH RESTRICTIONS.

         DISPLAY/MAINTAINCE NOT ALLOWED.


D)FOREIGN KEY: DFINE RELATIONSHIP BETWEEN TABLE AND OTHER FIELDS.

E)TECHNICAL SETTINGS: CONTROL HOW TABLE CREATED IN DATABASE.

1)HOW TABLE HANDLED
2)WEATHER TABLE BUFFERD R NOT
3)CHANGES TO DATA RECORD OF TABLE WILL BE LOGGED.



  BUFFERING TYPE MEANS  HOW MANY TABLE RECORDS WILL BE LOADED INTO BUFFER WHEN TABLE ENTRY IS ACCESSED.


LOGGING MEANS CHANGES TO TABLE ENTRIES SHOULD BE LOGGED,  SWITCH TO LOGON ,CHANGE TABLE RECORD LONG TIME.

E)INDEX : TO SPEED UP DATA SELECTION ,SECONDARY INDEXES CREATED FOR TABLE.

INDEX IS COPY OF DATABASE TABLE,REDUCE TO CERTAIN FIELDS.

SORTING USE TO FASTER ACCESS DATA RECORDS OF TABLE, USING BINARY SEARCH.

                 VIEW AND TYPES

VIEW CAN BE USED IN ABAP PROGRAMS FOR DATA SELECTION. NORMALLY WE USE APPLICATION OBJECTS DEPENDENT, MEANS NOT REQUIRED FIELDS HIDDEN AND MINIMISE INTERFACES.

IS DERIVED FROM ONE OR MORE TABLES.

1) DATABASE VIEW
2)PROJECTION VIEW
3)MAINTAINCE VIEW
4)HELP VIEW


DATABASE VIEW: IS THE DICTINORY OBJECT WHICH CAN USE TO GET DATA FROM MORE THAN ONE TABLE.

ITS CONTAIN ONE TABLE, MAINTAINCE STATUS CAN BE USED TO DETERMINE IF DATA RECORDS CAN ALSO BE INSERTED IN THE VIEW.

CONTAIN MORE THAN ONE, IF U ONLY READ DATA.

PROJECTION VIEW: HIDE  TABLE FIELDS. THIS CAN MINIMISE INTERFACES. A PROJECTION VIEW CONTAIN EXACTLY ONE TABLE.


EX: WHEN U ACCESS DATABASE,YOU CAN READ  AND WRITE THE FIELD CONTENTS ACTUALLY NEEDED.


HELP VIEW: CAN BE USED AS SELECTION METHOD IN SEARCH HELPS.

MAINTAINANCE VIEW: PERMITS U TO MAINTAIN THE DATA DISTRIBUTED ON SEVERAL TABLESFOR ONE APPLICATION OBJECT AT ONE TIME.

                    DATA TYPE

USER-DEFINED DATA TYPES CAN BE STORED IN THE ABAP DICTINORY. THESE USER-DEFINED TYPES PROVIDES SAME FUNCTIONALITY AS THE LOCAL TYPES CAN BE DEFIENED IN DATA DICTIONARY.


 DEFINE IN GLOBALLY ACESS IN ABAP TYPE.


THERE R THREE DIFFERENT TYPE CATEGEROIES:

.DATA ELEMENTS: ELEMENTARY TYPES AND REFERENCE TYPES.

.STRUCTURES: COMPONENTS ALSO HAVE TYPE.

.TABLE TYPE DEFINE STRUCTURE AND FUNCTIONAL ATTRIBUTES OF AN INTERNAL TABLE.

               TYPE GROUP

USED IN POOL DEFINATIONS.KEY WORD FOR PROGRAMS IS 'TYPE-POOLS'.

1)SLIS: USED IN ALV (ABAP LIST VIEWER REPORTS)
2)TRUXS: BDC PROGRAMS WITH EXCEL DATA


              DOMAIN

A DOMAIN DESCRIBES TECHNICAL ATTRIBUTES OF FIELD, SUCH AS DATA TYPES AND NUMBER OF POSITIONS OF FIELD.TECHNICAL FIELDS COMBINED IN DOMAIN.


   

        SEARCH HELP

OBJECT WITH INPUT HELPS.
TYPES ARE:

1)ELEMENTARY  :  IMPLEMENT SEARCH PATH FOR POSSIBLE ENTRIES.

2)COLLECTIVE : CONTAIN SEVERAL ELEMENTARY SEARCH HELPS. PROVIDES SEVERAL ALTERNATIVE POSSIBLE ENTRIES.

3)APPEND : CAN ENHANCED BY COLLECTIVE SEARCH HELPS DELIVERED BY SAP WITH CUSTOMER-SPECIFIC SEARCH PATHS WITHOUT REQUIRE MODIFICATION.

4)SEARCH HELP EXIT : SPECIFY THE NAME OF A FUNCTION MODULE TO BE CALLED THE SEARCH HELP PROCESS.


                     LOCK OBJECT

 IS VIRTUAL LINK OF SEVERAL SAP TABLES WITH IS USED TO SIMULTANEOUS ACCESS BY THE TWO USERS TO THE SAME SET OF DATA.

LOCK REQUEST FOR PROGRAMMERS FOR ONLINE TRNSACTIONS BY CALLING CERTAIN FUNCTION MODULES FROM LOCK OJECTS.


Read Lock (Shared Locked)
   protects read access to an object. The read lock allows other  transactions read access but not write access to the locked area of the table

- Write Lock (exclusive lock) 
   protects write access to an object. The write lock allows other  transactions neither read nor write access to the locked area of the  table.

- Enhanced write lock (exclusive lock without cumulating) 
  works like a write lock except that the enhanced write lock also  protects from further accesses from the same transaction.

You can create a lock on a object of SAP through transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.



Friday, 1 January 2016

Skip to end of metadata
Go to start of metadata

The LSM Workbench is an R/3-based tool that supports you when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.

The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs.
Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction
To start working with the LSM Workbench, use transaction LSMW:

Click on the create button to create new project, subproject and the object. As shown below. 
 
Project, Subproject and Object:

On the initial screen, you can create a new project, corresponding subprojects and objects via Edit -> Create new entry.
-          Project: An ID with a maximum of 10 characters to name your data transfer project. If you want to transfer data from several legacy systems, you may create a project e.g. for every legacy system.
-          Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute.
-          Object: An ID with a maximum of 10 characters to name the business object.
In the initial screen, All objects provides a list of all projects created already. My objects displays a list of all objects you created personally. All objects of the project displays all objects of the selected project as tree structure. Project documentation displays any documentation written for the individual popups and processing steps. you can print the project documentation out, send it and save it in various file formats.

Click on the execute button once the project, subproject and the object are created. 
Click Back.Now record usingBatch Input RecordingData Migration - Step by Stepvia Batch Input Recording

Step 1: Maintain Object attributes

In this example, you will be updating the Material master records with the help of recording a transaction (MM01). Choose radio buttonBatch Input Recordingand click on the recording overview icon to record the R/3 transaction. Enter theRecordingname asMM01_REC2, the description asMM01 Recording method, and the transaction code asMM01.
  
Click on create to record the transaction.

 

Click on Done.


Click on Done to actually start recording the transaction.
Enter the fields required for recoding a transaction successfully.



Note that the fields are populated with default values. The values you entered when you recorded the transaction are set by default.
*Double-click on the fieldRMMG1-MATNRand enter the name asMATNRand the description asMATERIAL NUMBERand remove the default as shown below:



Repeat this step for all fields.Similarly, double-click on all other fields with default values and make appropriate changes. Once you have made changes, the recording overview screen looks as shown below:


Click on SAVE to save the recording. The click on BACK icon to the main screen. Save the while going back to the main screen.
After completing the recoding the system will automatically take you to the second step as shown below:



 Step 2. Maintain Source Structures
Click on CREATE to create a source structure. Give a name and a description to the source structure as shown below:
 



Save the source structure and go to the main screen.
Step 3. Maintain Source Fields
In this step, you need to list what fields are present in the source structure. The easiest way is to click on 'Table Maintenance' icon to enter Fieldname, Type and Length for each field as shown:



Save while coming back to the main screen.
Step 4: Maintain Structure Relations
Execute a step to 'Maintain Structure Relations'. Since, there is only one Source and Target Structure, the relationship is defaulted automatically.


Save while coming back to the main screen.
Step 5: Maintain field mapping and conversion rules
Keep cursor on field 'MATNR' and click on 'Assign Source field' icon to choose source field MATERIAL from structure MM01V6 as shown 



Similarly, assign 'Source Field' rules to the remaining fields.
Once all the fields are mapped, you should have an overview screen as shown 


Save while coming back to the main screen.
Step 6: Maintain fixed values, translations, user-defined routines
You can also maintain re-usable translations and user-defined routines, which can be used across conversion tasks. In this case, that step is not required.

Step 7: Specify files
In this step, we define how the layout of the input file is. The input file is a [Tab] delimited with the first row as field names. It is present on my PC (local drive) as C:\MM3.txt.
Double Click on the legacy data.

Save while going to main screen.
Create an Excel with your data and save it as a Tab-delimited text file on your local drive (C(smile) and name it MM3.txt.
IMPORTANT
****The Structure of the flat file should be proper otherwise data will not be uploaded.. All the mandatory fields should be present in the flat file for the required transaction
Step 8: Assign files
Execute step 'Assign Files' and the system automatically defaults the filename to the source structure.
Save while going to main screen.
Step 9: Read data
In this step, LSMW reads the data from the source file (from your PC's local drive). You have the option to read only selected rows and convert data values to internal format.
Here 1 to 2 represents the number of rows to be read from the flat file. If you don't specify any number the system will read all the rows from the flat file. We have 2 rows in the flat file hence from 1 to 2.
  
After we execute the data read from the flat file is as shown below. 
Step 10: Display read data
This step is optional. If required, you can review the field contents for the rows of data read.


Step 11: Convert data
This is the step that actually converts the source data (in source format) to a target format. Based on the conversion rules defined, source fields are mapped to target fields. 


Click BACK to come back to main screen.

Step 12: Display Converted data
Again this is an optional step to view how the source data is converted to internal SAP format.

Step 13: Create batch input session
Once the source data is converted in an internal format, you can create a batch session to process updates.

Click EXECUTE button to execute a batch inout session.
Step 14: Run Batch Input Session
You can execute the BDC session by Run Batch input session. Executing a batch input session is a standard SM35 transaction for managing BDC sessions. Once you have successfully executed the batch input session, the Material master records are updated in the system. You can confirm this by viewing the Material master records (MM03). 
Select the session and click on the PROCESS icon.

You can Process the session in foreground or background or can only display errors.
Select the Processing Mode and then click on the PROCESS tab to executive the session.
After the session is completely processed you can confirm this by viewing the Material master records (MM03) or in the table MARA.

Thursday, 17 December 2015

 ABAP Report Programming



SAP-ABAP supports two types of Programs -  Report Programs & Dialog Programs. Report Programs are used when large amounts of data needs to be displayed.


Use of Report Programs

  1. They are used  when data from a number of tables have to be selected and processed before presenting
  2. Used when reports demand  a special format
  3. Used when the report has to be downloaded from SAP to an Excel sheet to be distributed across.
  4. Used when the report has to be mailed to a particular person
Important Points to Note About Report Program


  • Report Programs are always Executable Programs. Program Type is always 1.
  • Every Report program corresponds to a particular Application Type i.e. either with Sales & Distribution, FI - CO etc. It can also be Cross Application i.e. type '*'.
  • Report Programming is an Event-driven programming.
  • The first line of a report program is always Report <report-name>.
  • In order to suppress the list heading or the name of the program the addition No Standard Page Headingis used.
  • The line size for a particular report can be set by using the addition line-size <size>.
  • The line count for a particular page can be set by using the addition line-count n(n1). N is the number of lines for the page and N1 is the number of lines reserved for the page footer.
  • To display any information or error message we add a message class to the program using the addition:Message-id <message class name>. Message classes are maintained in SE91.


Therefore an ideal report program should start with:
?
1
2
3
4
5
6
7
Report <report name> no standard page heading
 
line-size <size>
 
line-count <n(n1)>
 
message-id <message class>.

Selection Screen

"Selection screen"  is the screen where one specifies the input values for which the program should run.

The selection screen is normally generated from the
  1. Parameters
  2. Select-Options
Syntax
?
1
2
3
4
5
6
Selection-screen begin of screen <screen #>
selection-screen begin of block <#>  with frame title <text>
.........
.........
selection-screen end of block <#>
selection-screen end of screen <screen #>
Parameters

Parameters helps one to do dynamic selection. They can accommodate only one value for one cycle of execution of the program.
Syntax

Defining parameters as a data type
?
1
Parameters p_id(30) type c.

Defining parameters like a table field.
?
1
Parameter p_id like <table name>-<field name>.

Parameters can be Checkboxes as well as Radiobuttons.
?
1
2
Parameters p_id as checkbox.Parameters p_id1 radiobutton group <group name>.
Parameters p_id2  radiobutton group <group name>.

Parameters can be listbox.
?
1
Parameter p_id like <table name>-<field name> as listbox
Select Options

A Select-Option is used to input a range of values or a set of values to a program

Syntax
?
1
select-options s_vbeln for vbak-vbeln.

Events in an ABAP Report Program

ABAP report programs are event driven programs. The different events in a report Program are:
Load-of-program
  • Triggers the associated event in an internal session after loading a program of type 1, M, F, or S.
  • Also runs the associated processing block once and once only for each program and internal session.
  • The processing block LOAD-OF-PROGRAM has roughly the same function for an ABAP program of type 1, M, F or S as a constructor has for classes in ABAP Objects
Initialization.
  • This event is executed before the selection screen is displayed .
  • Initialization of all the values.
  • You can assign different values other than the values defaulted on the selection screen .
  • You can fill your selection screen with some values at runtime.
At Selection-Screen.
  • The event is processed when the selection screen has been processed (at the end of PAI ).
  • Validation & Checks of inputted values happen here
Start-of-Selection.
  • Here the program starts selecting values from tables.
End-of-selection.
  • After all the data has been selected this event writes the data to the screen.
Interactive Events
  • Used for interactive reporting. It is used to create a detailed list from a basic list.

Formatting the report

ABAP allows the reports to be formatted as the user wants it to be. For example, "Alternate Lines" must appear in different colors and the "Totals" line should appear in Yellow.

Syntax
?
1
2
3
Format Color n
 
Format Color n Intensified On
n may correspond to various numbers

Please note that there are other additions along with format as well
?
1
FORMAT COLOR OFF INTENSIFIED OFF INVERSE OFF HOTSPOT OFF INPUT OFF

Interactive Programming

  • Using Interactive Programming users  can actively control the data retrieval and display of data
  • Used to  create a detailed list from a very basic list
  • The detailed data is written on a secondary list.
  • The secondary list may either completely overlay the first screen or one can display it in a new screen
  • The secondary lists can be themselves interactive.
  • The first list may also call a transaction.
  • There are different events associated with interactive programming.
Some commands used for interactive programming
Hotspot
If one drags the mouse over the data displayed in the repor the cursor changes to a Hand with an Outstretched Index finger. An hotspot can be achieved using the FORMAT statement.
?
1
Syntax:      Format Hotspot On (Off).
Hide
This command helps you to store the field names based on which one will be doing further processing to get a detailed list. It is written directly after the WRITE statement for a field. When a row is selected the values get automatically filled in the variables for further use.
?
1
Syntax:     Hide <field-name>.

Logical Databases

  • Instead of using "Select" queries you can use logical database to retrieve data for a program.
  • Logical databases are created by transaction SE36
  • The name of a logical database can be up to 20 characters long. It may begin with a namespace prefix.
  • The data is selected by another program and one can access the data using GET <table-name> command which places the data in the work area <table-name>.
Advantages of a logical database over normal Select queries.
  1. It offers check conditions to see whether the input is correct, complete and plausible
  2. It contains central authorization checks for database access
  3. Enhancements such as improvement in performance immediately apply to all reports which use logical database.