Tuesday, September 10, 2019

Difference between a check table and a value table??

Value Table
This is maintained at Domain Level.

When ever you create a domain , you can entered allowed values. 
For example  you go to Domain   SHKZG - Debit/credit indicator.  Here only allowed values is H or S.
Whenever you use this Domain, the system will forces you to enter only these values.
This is a sort of master check . To be maintained as a custmization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.
 
Check table
For example you have Employee master table & Employee Transaction table.
When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table.
This is nothing but a Parent & Child relationship .  Here data can be maintained at client level , no development involved.
As per DBMS what we call foreign key table, is called as check table in SAP.

There is 1 more important Difference in Value Table and Check Table is that:
1. The contents of the check will be used as an input help (F4 Help) for a particular field on which a check table is assigned.
But the contents of Value Table are never used in Input Help.
The Hierarchy which decides from where to used the Input Help is:
1. Input help defined explicitly in ABAP Program or Dialog Module.
2. Input Help Attached to the referenced Database Table field.
3. Using the contents of Check Table as an input help if neither (1) or (2) help is there.
4. Input help from Fixed value or Value range given in Domain.

Thursday, February 14, 2019

How to download classical report in SAP ABAP ?

Before the start, you need to know what is the classical report, function module, At User command,
set PF Status and SY-UCOMM.
Firstly we clear all concepts and then start the actual code of download classical report's.
Classical Reports:
  • Classical Reports are reports which contain both selection-screen and output screen.
  • SAP ABAP is an event-driven programming language, ABAP programs executed based on events, not line-by-line.  
Function Modules:
  • Function Modules are sub-programs which contains a set of re-usable statements with importing, exporting parameters, exceptions. Unlike include programs Function Modules can be executed independently.
  • You can find the function builder with transaction code SE37.

set pf-status:

  • This event will trigger whenever a user clicks on any custom buttons of the GUI.
  • Syntax: set pf-status. "Triggers user command
 At User Command:
  • This event will trigger whenever a user clicks on any function buttons.
  • Syntax: AT USER-COMMAND. "Triggers user command.
SY-UCOMM:
  • SY-UCOMM is a system variable. It contains the latest user action triggered. It is used for doing the functions what the user wishes to do at that particular event. You can use it in menus and other places. This is mainly used for <pfstatus>.
Create a classical report and download that report in the local machine.
*&---------------------------------------------------------------------*
*& Report  ZCLASSICALDOWN
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZCLASSICALDOWN.

TABLES: MARA.  “ Table Name

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: S_MTART TYPE MARA-MTART. “take the input from User material type(FERT)
SELECTION-SCREEN END OF BLOCK B1.
TYPES: BEGIN OF TY_MARA,
        MATNR TYPE MARA-MATNR,  “ Material Number.
        MTART TYPE MARA-MTART,    “ Material Type.
        MATKL TYPE MARA-MATKL,     “ Material Group.
  END OF TY_MARA.
DATA: IT_MARA TYPE TABLE OF TY_MARA. “ Internal table of MARA Table.
DATA: WA_MARA TYPE TY_MARA. “ work-area of MARA Table.

START-OF-SELECTION.
  SET PF-STATUS 'MENU'. “ when you double click on the menu, It will trigger in se51 i.e menu painter and create Download button on GUI.

  SELECT MATNR MTART MATKL FROM MARA INTO TABLE IT_MARA WHERE MTART = S_MTART.  “ fetch data from MARA table into Internal table.

 “ Movie data from Internal table to Work-area.

  LOOP AT IT_MARA INTO WA_MARA.
    WRITE: / WA_MARA-MATNR,WA_MARA-MTART, WA_MARA-MATKL. “ print data
  ENDLOOP.

AT USER-COMMAND.
           IF SY-UCOMM = 'DOWN'.
           CALL FUNCTION 'GUI_DOWNLOAD'   “ call function for downloading the report or we can data.
           EXPORTING
**        BIN_FILESIZE                    =
           FILENAME                        = 'E:\MARA TAB\MARA10.TXT'   “ path of file where data will be stored.
           FILETYPE                        = 'ASC'
**        APPEND                          = ' '
**        WRITE_FIELD_SEPARATOR           = ' '
**        HEADER                          = '00'
**        TRUNC_TRAILING_BLANKS           = ' '
**        WRITE_LF                        = 'X'
**        COL_SELECT                      = ' '
**        COL_SELECT_MASK                 = ' '
**        DAT_MODE                        = ' '
**        CONFIRM_OVERWRITE               = ' '
**        NO_AUTH_CHECK                   = ' '
**        CODEPAGE                        = ' '
**        IGNORE_CERR                     = ABAP_TRUE
**        REPLACEMENT                     = '#'
**        WRITE_BOM                       = ' '
**        TRUNC_TRAILING_BLANKS_EOL       = 'X'
**        WK1_N_FORMAT                    = ' '
**        WK1_N_SIZE                      = ' '
**        WK1_T_FORMAT                    = ' '
**        WK1_T_SIZE                      = ' '
**      IMPORTING
**        FILELENGTH                      =
      TABLES
            DATA_TAB                        = IT_MARA  " Internal Table
**        FIELDNAMES                      =
**      EXCEPTIONS
**        FILE_WRITE_ERROR                = 1
**        NO_BATCH                        = 2
**        GUI_REFUSE_FILETRANSFER         = 3
**        INVALID_TYPE                    = 4
**        NO_AUTHORITY                    = 5
**        UNKNOWN_ERROR                   = 6
**        HEADER_NOT_ALLOWED              = 7
**        SEPARATOR_NOT_ALLOWED           = 8
**        FILESIZE_NOT_ALLOWED            = 9
**        HEADER_TOO_LONG                 = 10
**        DP_ERROR_CREATE                 = 11
**        DP_ERROR_SEND                   = 12
**        DP_ERROR_WRITE                  = 13
**        UNKNOWN_DP_ERROR                = 14
**        ACCESS_DENIED                   = 15
**        DP_OUT_OF_MEMORY                = 16
**        DISK_FULL                       = 17
**        DP_TIMEOUT                      = 18
**        FILE_NOT_FOUND                  = 19
**        DATAPROVIDER_EXCEPTION          = 20
**        CONTROL_FLUSH_ERROR             = 21
**        OTHERS                          = 22
**              .
            IF SY-SUBRC = 0.
                        MESSAGE: 'DATA SUCCESSFULLY DOWNLOADED' TYPE 'S'. “Pass the message so you will gate notification when file gate downloaded.
            ENDIF.
ENDIF.




Previous Topic                                                                                                                                          Next Topic

Tuesday, February 5, 2019

What is SAP ?

What is SAP?
SAP stands for System application & product, Is the name of the company as well as the software itself.
SAP is the ERP (Enterprise Resource Planning) system that aims to integrate all the different modules in the company.As well as we can say it's a 'Centralized system'.
SAP is well-known for its Enterprise Resource Management (ERM) and data management programs.
Before SAP comes in the picture we use Decentralized system.
Let's look at Decentralized system first.















Let's look at the same business process for Centralized System.
In this Case, all departments update a Central Information System.



















Key benefits of the centralized system are:

  • It Eliminates the duplication, discontinuity, and redundancy in data.
  • Provides information across departments in real time.
  • Increases productivity, better inventory management, promotes quality, reduced material cost, effective human resources management, reduced overheads boosts profits.
  • Better customer interaction and increased throughput. It also improves customer service.
  • SAP Software is a centralized enterprise management system also known as Enterprise Resource Planning.
SAP Modules:
SAP Financial Accounting (FI)
SAP FI module as the term suggests deals in managing financial transactions within enterprises. This financial accounting module helps employees to manage data involved in any financial and business transactions in a unified system.
SAP Controlling (CO)
SAP CO module is another important SAP modules offered to enterprises. The controlling module supports in the process works of planning, reporting and monitoring operations of businesses. It involves methods to view and organize costs that are required for financial reporting. The controlling module enables one to plan, track, perform and report about costs.
SAP Sales and Distribution (SD)
SAP SD modules deal in managing all transactions ranging from inquiries, proposals, quotations, pricing and more. The sales and distribution module helps greatly in inventory control and management. SAP SD module consists of master data, system configuration, and transactions.
SAP Production Planning (PP)
SAP PP module is another important module that includes software designed specifically for production planning and management. This module also consists of master data, system configuration and transactions in order to accomplish plan procedure for production. SAP PP module collaborate with master data, sales, and operations planning, distribution resource planning, material requirements planning, Kanban, product cost planning and so on while working towards production management in enterprises.
SAP Materials Management (MM)
SAP MM module as the term suggests manages materials required, processed and produced in enterprises. Different types of procurement processes are managed with this system. Some of the popular sub-components in SAP MM module are vendor master data, consumption-based planning, purchasing, inventory management, invoice verification and so on.
SAP Quality Management (QM)
SAP QM module helps in the management of quality in productions across processes in an organization. This quality management module helps an organization to accelerate their business by adopting a structured and functional way of managing quality in different processes. SAP QM module collaborates in procurement and sales, production, planning, inspection, notification, control, audit management and so on.
SAP Human Capital Management (HCM)
SAP HCM module enhances the work process and data management within the HR department of enterprises. Right from hiring a person to evaluating one’s performance, managing promotions, compensations, handling payroll and other related activities of an HR is processed using this module. The task of managing the details and task flow of the most important resource i.e. human resource is managed using this SAP ERP HCM module.
SAP Advanced Business Application Programming (ABAP)
ABAP is one of the many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting.ABAP establish integration between independent software.
SAP Basis
SAP Basis is the technical foundation that enables SAP applications to function. It consists of middleware programs and tools that support the interoperability and portability of SAP applications across systems and databases.
SAP Basis is essentially the system administration platform for SAP environments from SAP R/3 through SAP S/4HANA. Its purpose is to make sure that all SAP systems in the environment run smoothly and consistently.
SAP Warehouse Management (WM)
Definition and mapping of the physical warehousing structure in the system.
Processing goods movements like – receipts, issues, and stock transfers.
Maintain up to date stock inventories in the Warehousing complex at storage bin level
                                                                                                                                             Next Topic

Monday, February 4, 2019

What is the ERP ?

What is the ERP definition?

ERP is nothing but 'Enterprise Resource Planning'.Think about all the core processes needed or department's to run a company: finance, HR, manufacturing, supply chain, services, procurement, and others. At its most basic level, ERP 'Integrates' these processes into a single system.
Benefits of ERP:
  • Higher productivity.
  • better insights.
  • Accelerated reporting.
  • Lower risk.
  • Simpler IT.
  • Improved Agility.
How do ERP systems work?
An ERP system also called an ERP suite, is made up of different enterprise resource planning applications that talk to each other and share a database.
Each application (aka ERP module) typically focuses on one business area. You can combine different modules to meet your needs. Finance & Accounting, human resources, sales, marketing, Inventory, Purchase, Customer Relationship Management(CRM), Engineering/ Production, Supply Chain Management (SCM) and logistics are popular starting points. There are also modules specific to industries – from manufacturing to retail.
Types of ERP:
  • Cloud ERP.
  • On-Premise ERP.
  • Hybrid ERP.

ERP Modules:













                                                       




Previous Topic                                                                                  Next  Topic

Thursday, January 31, 2019

What is difference between .include and .append structure?

Include structure:-
allows adding one or more structure into structure or table. Also placed positioning anywhere.Up to 6 include structure can be used in a table.
IT Requires Database Utility.
Append structure:-
can be placed only at the end of a structure or table which also stops further insertion of fields. Only one append structure can be used.
Append structure is used to add additional fields to standard SAP tables.
Append structure cannot be used with cluster and pooled tables.Append structure is included in a table/structure using.APPENDThe name of an append structure can begin with ZZ / YY.
The extra fields are added only at the end of the table structure.
Notes: Data element of Append structure start with 'ZZ' or 'YY'. 
Append and Include structure. 
previous topic                                                                                               Next Topic                                

Sunday, January 27, 2019

How to create a Include Structure in SAP SE11?

Include structure.

Prerequisite: User should know how to create a Database table.
Example if we need to maintain Temporary and Permanent address in the table. For this, we will define all address related fields in a structure and will include this structure twice in the table.
Include structure: allows adding one or more structure into structure or table. Also placed positioning anywhere. Up to 6 include structure can be used in a table. Include structure is used to include the structure to the custom table.
What is structure?
The structure is a list of fields defined under a name, which is used to process data at run-time in SAP ABAP applications.
Structures are two types one is global structure and another one is local structure. The local structure can be created in ABAP programs and global structure can be created in the data dictionary and can be reusable in different objects.
Step's to create  a structure in the data dictionary.
Go to SE11, select Data Type radio button and click on create button.
A pop up will open, select structure radio button and continue.
Provide a short description, add some fields, Maintain enhancements category, Save and Activate the structure
The structure is created, now we can use this structure in our ABAP programs & database tables.
Now include structure is created we can add to a table or database table.
.Include  structure name.
exp: Field(.include) data element (ZSAP_STRUCTURE).
Add Include structure to a table an Activate table.

Previous topic...                                                                                             Next Topic

Thursday, January 24, 2019

How to create a database table in SAP ABAP SE11?

SAP ABAP transparent table.

A table can be created in two ways, one is bottom to top approach and another one is top to bottom approach.
A) Top to Bottom:- In this approach, first table fields are defined and later domain and data element are defined.
B) Bottom to Top:- In this approach, the first domain and data element are defined and later table will be created.
In this example, we are going to learn how to create SAP transparent table by using Top to bottom approach.
Step 1: Go to SE11 T-code, provide table name( ZSTUDENT_TABLE) & Click on create button.
(NOTE:- Table name must start with 'Z' or 'Y' letter.)

When you click on 'Create' button it goes on next screen. Provide a short description, delivery class (A), Display Maintenance Allowed and select fields tab.
SAP transparent table

Select Fields tab, add a field STUDENT_NO, data element as ZSTUDENT_NO and check Key and Initial Value checkboxes
A table must contain at least one key field, without a key field we are not able to create a table.

Double click on data element ZSTUDENT_NO (Not yet created), a pop up will open, click yes and one more information message will come press enter.
Now a pop up will come asking to create date element, click yes.
Provide a short description, click on the field label an enter field label and save.
Enter domain name 'ZSTUDENT_NO' an double click on that & click on yes
Provide a short description, data type, no. Characters, save and activate that domain.
Similarly, Create remaining fields with data elements and domains as showing below.
Once all fields are created click on 'Technical Settings' button or provide se13 Tcode and maintain technical setting for the same table.

Provide data class and size category in the technical setting a click save button.


Maintain Enhancement category, Extras -> Enhancement category ->Can be enhanced(charater-type or numeric).

Click on Save, Check, and Active button.
Now add entries to table.
Utilities(M) -> Table Contents -> Create entries.
Now you will gate next screen for creating entries.
Enter the required data and click on save button.
Once you have done with creating entries go back an click on Utilities(M) -> Table Contents -> display. You will gate all the data you have already entered.


   Previous Topic                                                                          Next Topics..