Thursday, October 1, 2020

What are the ways to find the Exits in SAP.

 What are the ways to find the Exits?


How to find the Exits in SAP.

                      I.        Using the Package name of the applications

                    II.        Using the T-code SE84

Ø  Find the package name of the required T-code.

Ø  Execute the T-code SE84.

Ø  Expand Enhancement folder

Ø  Double click on enhancements

Ø  Enter the required package name/Exit name

Ø  Click on execute icon

                   III.        Using the Find function in standard programs.

                  IV.        Using the standard Tables  MODSAP & MODACT.


Steps for LSMW in SAP.

 What are the steps for LSMW?

Steps for LSMW in SAP.

Ans: There are totally 14 steps in LSMW.

1.    Maintain object attributes

2.    Maintain source structures

3.    Maintain source fields

4.    Maintain structure relations

5.    Maintain field mapping conversion rules

6.    Maintain fixed values, translations & user-defined routines

7.    Specify files

8.    Assign files

9.    Read data

10.  Display read data

11.  Convert data

12.  Display converted data

13.  Create batch input session

14.  Run batch input session

What are the ways to debug the Smart Form in SAP ABAP.

 What are the ways to debug the Smart Form?


 Debug the Smart Form in SAP ABAP.

1St Way: - By setting the Session Break point in the Generated Function module.

Ø  The SMARTFORMS can be debug by setting the Session Break points at the required statement line in the system Generated Function module.

Ø  The system generated internal table %TEXT contains the following fields which are filled with the text node contents at Run time to debug text elements.

Field name

Description

TDFORMAT

Tag column of the text elements

TDLINE

Contents of the text element/text node

       2nd Way:-  By setting the Static Break points in the SMARTFORMS.

Ø  The SMARTFORMS can be debug by setting the Static Break points in the required program lines /initialization node under global definitions of the SMARTFORM. The statement BREAK followed by user name can be used.

Main components in Smart Form in SAP ABAP.

 What are the main components in Smart Form?

Main components in Smart Form in SAP ABAP.

Ans: The main components are, 1. Global Settings       2. Pages & Windows

           1. Global Settings: It is used to maintain the global settings, definitions which can be applied          across the mart forms. It is collection of Form Attributes, Form Interface & Global Definition

                      I.        Form Attributes: These are used to maintain the smart form attributes & output such are page format, style name etc. The default style for smart form is ‘SYSTEM’.                                                

                    II.        Form Interface: These are used to declare the variables, work areas & internal tables 

        which are needed to transfer the data from print program to layout. It is the system                       generated function module with all the parameters except changing parameters.

III. Global Definitions: It is used to maintain the global definitions which can be used across        the different Global definitions.

                    a) Global Data: It is used to maintain the global data definitions such are variables, work                                           areas, Internal Tables etc.

     b) Types: It is used to define the types which can be referred to declare internal tables &                    work areas.

     c) Field Symbols: It is used to define the field symbols.

     d) Initialization: It is processed before the smart form pages & windows are processed. It                           is used to extract all the required data from the database table &                                             process the extracted data. Import & Export parameters must be                                        specified before they are used.

     e) Form routines: It is used to define the subroutines which can be called across the                                                           smart form. It is used to define the currency/quantity fields as like the                                             DDIC tables/structures. 

       f) Currency/Quantity Field: It is used to define the Currency/Quantity Fields as like the                                                                 DDIC tables/structures.

            2. Pages & Windows: It is used to design the different page formats & windows. Following                                               are the different nodes in smart forms.

a)    Windows: They are positioned on the pages. Following are different type of windows.

Ø  Main Window: It is used to display the continuous text on the pages. This window is the  default widow. Without main window also we can design Smart forms.

Ø  Secondary window: It is used to print the different contents on each page (similar to variable window in SAP Scripts).

Ø  Copies window: It is used to the print the same document with multiple

                           copies with different headings.

Ø  Final window: This is used to print the total amount after all the lines or line items are printed.

b)    Graphics: It is used to create a graphic node (window) to display the graphics/logos.

c)    Address: It is used to define the address node/window to display/print the organization address/personal address/work place add/ress.

Ø  The address can be determined dynamically also using an option Determine Dynamically.

d)    Text: It is used to display/print the contents of the different symbols/fields.

e)    Table: A table is used to print the multiple entries/dynamic data of an internal table. The Table node can be used as template to display static record by un-checking the checkbox internal table. Line types can be created under Table node.

f)     Template: A Template is used to display the static data (single record). This node does not have the separate header, main area & footer whereas, the table node contains the different sessions such are header, main area & footer. The template node can be used as table by defining it under loop node to display the dynamic data as like the table node.

g)    Flow logic: The flow logic nodes are used to control the nodes & define the program lines in smart forms. Following are the different flow logic nodes.

                                        I.        Loop:  It is used to process the corresponding nodes based on the number of entries of an internal table.

                                      II.        Program lines: It is used to write ABAP source code. Input & Output parameters must be filled with the data variables before they are used.

                                     III.        Alternative: It is used to control the corresponding nodes based on the specified condition. It is used to process the alternative either True/False process blocks based on the SET conditions.

                                    IV.        Command: This node is used to go to a new page based on the specified conditions. This is used to break the page based on the condition.       

Wednesday, September 30, 2020

Difference types of Windows in SAP ABAP.

Difference types of Windows in SAP ABAP. 

What are the difference types of Windows?

Ans:    Windows: - They are used to define the different types of windows.

Ø  Following are the different types of windows.

·         Main Window: It is the default widow. It is used to display the continuous text on the pages. Without main window we can’t design SAP scripts. The system generates the pages dynamically for main window. Up to 99 main windows can be created in a form. The window type is ‘MAIN’.

·         Constant Window: This window contains the static content which can be formatted only once to print/display the same contents on all the pages.

·         Variable Window: It is used to print the data based on the window size. It can be formatted for each page to print/display the different contents. Without a variable window also we can design the SAP script.

·         Graphic Window: It is used to print/display the graphics/logos on the page.

Module screen flow statements in SAP ABAP.

Module screen flow statements in SAP ABAP.

Module screen flow statements?

Ans: This statement is used in flow logic to call the define process module pool programs.

Syntax: [FIELD<screen-field>]MODULE<module-name>.

Additions:

      I.        ….AT EXIT-COMMAND: This command is used to trigger the dialogue module in case of push button or menu item with the function type ‘E’ exit is pressed.

    II.        …AT CURSOR-SELECTION: This addition is used to trigger the corresponding module when the cursor is placed on the input field of a screen. It can also be used to trigger corresponding module in case of a push button or menu item with f-type ‘S’ (system) or CS (cursor selection) is pressed.

   III.        CHAIN…ENDCHAIN: This statement is used in flow logic to define the process chains. It can be used to make all the screen input fields enables to enter input data.

Useful additions to CHAIN…ENDCHAIN statement:

      I.        MODULE ON CHAIN-REQUEST: The module with ON CHAIN-REQUEST is used to trigger the corresponding module on the specified screen fields (in the sequence).

    II.        MODULE ON CHAIN INPUT: The module ON CHAIN INPUT is used to check the individual conditions of the screen fields in the sequence.

Q) what is the use of at exit command in mpp?

Ans: At exit Command is mainly used to quit the program.

This command is used to trigger the dialogue module in case of push button or menu item with the function type ‘E’ exit is pressed.

Scenario:

I have five input fields in my screen, all the five fields are mandatory

 i have to go back to the program (LEAVE PROGRAM).

Normally if there is any one mandatory fields in screen if am triggering any event,

that time the system automatically throws an error like  “Please fill in the mandatory fields”.

In that case the AT EXIT COMMAND will be used.

Events associated with Screen Painter in SAP ABAP.

What are the events associated with Screen Painter?.


Events associated with Screen Painter in SAP ABAP.

            1. PROCESS BEFORE OUTPUT (PBO):

Ø  This event is triggered before the screen is displayed.

Ø  It can also be triggered while performing any action on the screen.

Ø  This is used to provide the default values to the screen fields.

Ø  It can also be used to format the screen elements dynamically.

            2. PROCESS AFTER INPUT (PAI):

Ø  This event is triggered after the Input values are provided to the screen.

Ø  This event is used to validate the input data on the screens.

Ø  It can also be used to process the screen data based on the performed action          (pressed push button menu item etc)

          3. PROCESS ON HELP-REQUEST (POH):

Ø  This event is triggered when the function key F1 or help icon (?) is pressed.

Ø  This event is used to provide the help documentation on the screen fields.

Ø  The T-code:   SE61/SO72 is used to maintain help documentation.

Ø  The standard function module ‘HELP_OBJECT_SHOW’ is used to display the maintain help documentation.

           4. PROCESS ON VALUE-REQUEST (POV):

Ø  This event is triggered in case of in case of function key F4 or search help icon is pressed.

Ø  This event is used to populate & display the custom search help on screen input fields.

Ø  The standard function module “F4IF_INT_TABLE_VALUE_REQUEST” is used to display the populated internal table data as search help. 

Differences between SELECT SINGLE and UPTO 1 ROWS in SAP ABAP.

What are the differences between SELECT SINGLE and UPTO 1 ROWS?


Differences between SELECT SINGLE and UPTO 1 ROWS in SAP ABAP.

SELECT SINGLE

UPTO 1 ROWS

1. It extracts single record from the data base table

1. It extracts all the records into a buffer and moves the first record in to an application program

2. It doesn’t require END SELECT statement

2. It requires END SELECT

 3. Use this one, in case of all key fields can be considered. To read exact record from database table we need to provide all key fields.

3. Use this one, in case of not possible to use all the key fields. We can read appropriate record from database table; we may not need to provide all key fields.

4. It is slower because it is a construct to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search

4. It is faster because you are not using all the primary key fields.

Difference between ATNEW and ONCHANGE OF in SAP ABAP.

What is the difference between ATNEW and ONCHANGE OF?

Difference between ATNEW and ONCHANGE OF.

AT NEW

ON CHANGE OF

1. They must be used within the loop statements.

1. It can be used within the loop statement & outside of the loop statements also

2. It considers preceding fields also

2. It doesn't consider

3. It can’t be used on more than one field using the SET operator ‘OR’

3. It can be used on the multiple fields using the SET operator ‘OR’

4. The work area is impacted by replacing with Asterisk (*******)marks

4. It doesn’t impact the Work Area