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

Control Break Statements, explain about them in SAP ABAP.

What are the Control Break Statements, explain about them?.

Control Break Statements, explain about them in SAP ABAP.

Ans :-

Control Break statements: - They are used to control the data flow of an internal table.

Ø  The Control break statements start with AT and ends with ENDAT.

Ø  These statements should be used within the LOOP statements only

Ø  Following are the different types of Control break statements.

·         AT FIRST: - This event is triggered at the first record of an internal table. This is used to display the Header information.

·         AT NEW: - This event is triggered at the first record of each block. This is used to display the individual headings.

·         AT END OF: - This event is triggered at the last record of each block. This is used to display the total/sub totals in the internal table.

·         AT LAST: - This event is triggered at the last record of an internal table.

·         ON CHANGE OF: - It is a special control break statement which can be used outside of the                                loop statement also.

Ø  It is almost similar to AT NEW statement but it doesn't consider the preceding fields.

Ø  It can be used on the multiple fields using SET operators (AND, OR, BETWEEN).

Events associated with Interactive Reports in SAP ABAP.

 Events associated with Interactive Reports.

What are the events associated with Interactive Reports?

Ans :- Following are the EVENTS associated with the Interactive Reports .

Ø  AT LINE-SELECTION: This event is triggered at the time of user clicks on any record of any list. It is used to provide the detailed list based on the current list.

The system field SY-LSIND holds the Index of the next drill down list.

Ø  AT USER-COMMAND: This event is triggered at the time of user clicks on any menu item. This event is used to provide the additional functionality based on the selected push button.

Ø  TOP-OF-PAGE DURING LINE-SELECTION: This event is triggered with the first WRITE/ULINE/SKIP of the drill down list. It is used to provide the column headings for the drill down list.

Ø  AT PF: This event is triggered when the function key is pressed. This event is used to provide the additional functionality based on the selected menu item.

Ø   SET PF-STATUS: This event is triggered at the time of attaching our own GUI to the list. It is used to call the menu status.

Ø  Up to 35 Push buttons can be created on the Application tool bar.

Explain about Loop termination statements in SAP ABAP.

Explain about Loop termination statements?

Explain about Loop termination statements in SAP ABAP.

Ans :-  The following statements are used to come out of the loops and continue with the next    

             loop statements.

·         EXIT: - This statement is used to come out of the loop statement and continue with the  next statement line outside of the loop statements in the program.

·         STOP: - This statement is used to stop the Loop process along with the next part of the  loop statement.

·         CONTINUE: - This statement is used to stop the current loop process and continue with  the next loop process.

·         CHECK: - This statement is used to check the specified conditions and continue with the next loop process.

Ø  CHECK = CONDITION + CONTINUE.

Types of execution modes in SAP ABAP.

Types of execution modes in SAP ABAP.

What are the types of execution modes?

Ans:  There are 2 types of execution mode to execute a program or the transaction codes.

1. Foreground: It is used to execute the programs or the transaction codes directly by pressing  execute icon or F8 function key. It requires user interaction.

2. Background: This execution mode is used to execute the programs or the transaction codes   periodically such as Hourly, Daily, Weekly, Monthly etc in background. It doesn’t require any user interaction. The variants must be created before the programs are scheduled in back ground.

Ø  The T-code SM36 is used to define the background jobs &

Ø  The T-code SM37 is used to check the status of the background jobs.

The standard function modules JOB_OPEN -> To open back ground job

JOB_SUBMIT -> To submit job in back ground

JOB_CLOSE -> To close scheduled job.

Debug Background Jobs in SAP ABAP.


How to debug Background Jobs?

Debug Background Jobs SAP ABAP.

Ans: The Background jobs can be debugging using the command ‘JDBG’.

Ø  Execute the T-code SM37

Ø  Check the required background job to be debugged.

Ø  Enter JDBG in the Command field & Press Enter

Ø  Keep on pressing F7 until the required program is stopped.

Ø  Use the Function keys F5/F6/F7 to check the program Line by line/Block by Block once it is reached.

Classical & New debugger Differences in SAP ABAP.

 Differences between Classical & New debugger?


Classical & New debugger Differences in SAP ABAP.

Ans:

Classical debugger

New debugger

1.It is the old debugger

1.It is introduced from the version ECC 5.0

2.It runs on the same session to check & resolve the issues in the program

2.It runs on the separate session

3. It has Lots of limitations such as different desktops are not there, no separate sections for local , global Variables etc

3.It is very efficient tool to check lots of actions such as different desktops, separate actions for local & global Variables & objects at a time


Single Step F5
: The function key F5 is used to check Line By Line of the program.

Execute F6: The function key F6 is used to check Block By Block of the program.

Return F7: The function key F7 is used to Return from the source code of the process blocks such                 as sub-routines, function modules, methods etc.

Continue F8: The function key F8 is used to jump from one break point into the next break point                         then execute once the last break point is reached & then execute.

Debugger, Break points and Watch points in SAP ABAP.

Explain about Debugger, Break points and Watch points?

Debugger, Break points and Watch points in SAP ABAP.

Ans :-  Debugger :- This tool is used to check the program line by line & block by block for finding          and rectifying errors or bugs.

     Break Points:- These are Statement based. They are used to stop the program in the         debugger tool for checking line by line or block by block.

·         Break points are of 4 types. We can place up to 30 break points in the program.

1. Session Break Point: An icon set/delete breakpoint icon or click on statement line at       gray color vertical selection in the source code.

2. Static Break Point: The ABAP statement BREAK-POINT/BREAK <user_name> is used      to set the Static break point. The ABAP statement BREAK-POINT               should not be used since all the users are stopped.                                                              3. Dynamic Break Point: They are used to check the program in case of not possible to    find a location. The command /H is used to set dynamic break points.  The program is stopped at the first statement line of the performed action.

4. External Break Point: They are used to check the cross application components such

     as RFC, BAPI from one system to another. An icon set or delete external break points  is used to set or delete external break-points.

Watch Points: - These are Condition based. They are used to stop the program once the set condition is reached. The Watch points can be set inside the debugger tool. We can place up to 9 watch points in the program. We can reduce debugging time using watch points.

Different parameters in Function Modules and Explain in SAP ABAP.

What are the different parameters in Function Modules and Explain about them?

Different parameters in Function Modules and Explain in SAP ABAP. 

Ans:    Following are the different types of Parameters in Function Modules

Ø  Attributes:

It contains technical properties of a function module such are type of function module, function group.

Ø  Import parameters :

      They are imported from the calling program to the function module.

Ø  Export parameters:

                                These are used to exported the data from the function module to the calling                                      programs.

Ø  Changing parameters:

These are imported from the calling program, changed them in the function modules & exported/returned to the calling program. (Import -> Change -> Export)

Ø  Tables:

These can be used to import & export only for internal tables.

Ø  Exceptions:

They are used to raise/handle the messages in the function module based on return code (SY-SUBRC).

Ø  Source code: It is used to write central ABAP source code.