Views

SAP ABAP on HANA sample practice Questions

Sample ABAP on HANA certification Questions

Question No 1:

Your ABAP program contains an Open SQL join of two client-dependent tables. You want to replace this with a native SQL SELECT statement. Which of the following changes to the SELECT statement can you use to retrieve the same data as before? There are 2 correct answers to this question. 

A. Include the client field in the WHERE condition.
B. Use the CLIENT SPECIFIED addition.
C. Include the client field in the join condition.
D. Include the client field in the field list.

Answer : A & C
___________________________________________________________________________________________
Question No 2:

Which of the following are performance recommendations when using SAP HANA? There are 2 correct answers to this

A. Avoid transferring large result sets between database and client applications.
B. Move data-intensive calculations from the database to an application  server.
C. Filter data in lower layers.
D. Define indexes on the columns that are used in calculations

Answer : A & C

___________________________________________________________________________________________
Question No 3: 

In SAP HANA, tables are stored in row store by default. Is this sentence True or False.

Answer: False.
In HANA, tables are stored in column store by default.

___________________________________________________________________________________________
Question No 4:

It is not possible to create secondary index in SAP HANA database, Is this true or false.

Answer: False.

___________________________________________________________________________________________
Question No 5:

What should you do to follow the code-to-data approach to programming? There are 2 correct answers to this question.

A. Aggregate data on the database, and transfer the results to the ABAP layer.
B. Transfer all data from the database to the ABAP layer, and then aggregate the results.
C. Perform expensive calculations on the ABAP application server.
D. Perform expensive calculations on the database.

Answer: A & D.

___________________________________________________________________________________________
Question No 6:
When using ABAP Database Connectivity(ADBC) to issue native SQL calls to the database, which of the following methods of class CL_SQL_RESULT_SET retrieves the tabular result of the native SQL call?

A. GET_METADATA
B. NEXT_PACKAGE
C. SET_PARAM
D.SET_PARAM_TABLE

Answer: B

___________________________________________________________________________________________
Question No 7:

List down the four main concepts of the SAP HANA database? There are 3 correct answers to this question

A. Object store
B. Compression
C. Tools combinations
D. Partitioning
E. Column Store

Answer: B D E.

___________________________________________________________________________________________
Question No 8:

How to call the stored procedures in ABAP code? Please choose the correct answer. 
A. Native SQL
B. CDS view
C. Only SQL
D. Open SQL

Answer: A.

Stay tuned. Will continue..

How to debug Outbound IDOC/ How to get FM name attached to an Outbound IDOC

 How to debug Outbound IDOC/ How to get FM name attached to an Outbound IDOC

First we need to know the partner type , partner number and message type.

To get the above mentioned idoc details.

1.    Go to Tcode WE02 and pass the idoc number in the selections screen and execute. ( you can also pull data with the information which u have in your hand)



2. Now take the partner type, partner number and message type



To get the FM name attached to that idoc:

3.    Go to Tcode WE20

4.    In the left hand side, all the partner profiles (under the tab 'Partner profile') will be display, expand our partner type node.



5.    Find our partner number from the list and double click on it, All the information related to the selected partner type will be displayed on the right hand side.

6.    You can see a table control with heading 'Outbound', scroll that table double click our message type. It will take us to an another screen.


7.    From there select the tab 'Message control' , you can see the process code, double click on that.


8.    It will navigate to FM details.



9.    For debugging, put a break point inside the FM and explore!!

Just put the break point in the FM will not stop the debugger, follow the below steps

  • Go to the transaction from which the IDOC is getting triggered/ generated (E.g. ME22 or  VL02). Here this is billing doc, so going to tcode vf02
  • Go to the messages/output types for the document you select  
    • ( In ME22 use menu Header->Messages, 
    • in VL02N go to  Extras-> delivery output ->Header/Item ). in VF02, Goto -> header-> output

  • There you will be able to see the list of output types. Double click on the output type which is triggering our idoc.
  • In the Output window choose an existing message and  press Repeat output (Or create a new message)

  • It will create another row with traffic light yellow color

  • Select the row and click on Further data and  change the dispatch time to : 1 Send with periodically scheduled job

  • Then save and come out of the document else idoc will not get process since document is locked.
  • Then Go to SE38, run the program RSNAT00.
  • In the selection screen choose transmission medium 6 EDI and enter any further selection criteria.
  • Then execute it..!







Workflow : Introduction

Go to T-code – SWDD. (Workflow builder)

Workflow builder:

 Workflow builder is the business workflow tool for creating, editing and displaying the workflow definition. By default, the builder shows the last workflow worked in the builder.

The workflow builder is divided into different areas like Information Area, Navigation Area, Step Types, Graphical Model, Results of Syntax check etc. as shown below.

·       In the Information Area, the information about the workflows like workflow number, version and the status of the workflow are displayed.

·         In the navigation area, all the steps of workflow definition are displayed in sequence.



·         The Step Types appear in the Objects section of the workflow builder. This object section consists of following options in the dropdown, one which can be viewed in the workflow builder. E.g. in the current case, Step Types are displayed.

·         At the bottom of the workflow builder, the syntax check results are shown as either informatory, warning or error messages.

In the Graphical view, the actual definition of workflow is build by dragging the steps from the steps list or by right clicking the step directly on undefined one. The default steps in every workflow are Workflow Started, Undefined step and Workflow Completed. 


Workflow - Agents

There are mainly 3 groups of Agents:
  • Possible Agents
  • Responsible Agents
  • Excluded Agents
Apart from these 3 groups, there are 2 other categories of agents:
  • Recipients
  • Actual Agents
Possible Agents
  • These are people who can execute a task.
  • Defined in the “Task” level
  • Best practice to assign possible agents, is to sync with Security Roles
  • A task can be marked as “General Task” to allow anyone to execute the work item.
  • There are different ways to assign possible agents.
    • For SAP provided workflows, we can assign possible agents using IMG.
    • When we are displaying a task, we can use the following menu path
      • Additional data –> Agent assignment –> Maintain
      • The transaction is PFTC_DIS.
    • From task profile section of organization plan
    • From profile generator (Roll Maintenance);  Transaction PFCG
    • From workflow builder during step definition.
Responsible Agents
  • Responsible agents are people who you want to execute a particular work item.
  • Responsible agents are usually assigned in workflow step level, but can also be assigned at the task level via default agent determination rules
  • Usually responsible agents are determined during runtime using two main ways
    • Expressions
      • In expressions, the data needed for agent determination is stored in workflow containers, which later is used in computations and agent is determined based on container values.
    • Rules
      • In rules, agents are determined dynamically when work items are created.
      • We can bind data from workflow to the rules to provide data for agent determination computations.
  • For a work item to be forwarded to a responsible agent, the agent should also be a possible agent.
Excluded Agents
  • Excluded agents are people who should not receive the work item for execution
  • Excluded agents are always assigned by an expression to the workflow step
  • Typically we put all excluded agents in a multi-line container in the workflow container, and use an expression to assign the list of excluded agents to a particular step.
Recipients
  • Recipients are agents who receive a work item.
  • Recipients are
    • Possible Agents
    • Responsible Agents
    • Are Not Part of Excluded Agents
  • If there are no possible agents, then nobody will receive the work item.
  • If no responsible agents are determined, the system checks to see if any default agents are defined in the task level.
  • Recipients can forward work items to another agent. Whether or not the recipient can forward the work item is determined by the attribute of task.
    • General Task
      • Work item can be forwarded to anyone and executed by anybody
    • General Forwarding
      • Work item can be forwarded to any user.
    • No General Forwarding
      • Work item can only be forwarded to possible agents.
    • No Forwarding
      • Work item cannot be forwarded.
Actual Agent
  • Actual agent is the agent that is currently processing a work item or the user who has last processed a work item.
Assigning Multiple Agents to Work Items
  • Many agents can be assigned to a single work item.
  • The work item shows up in all agents inbox, and disappears from everyone else when one agent reserves or executes a work item.
  • Sometimes we need every agent to make an active decision from particular process. To do this, we can create one work item per agent.
Deadline and Notification Agents
Deadline Agents
  • Deadline agents are people who receive work item when a deadline has exceeded for a work item
  • These agents are entered in the deadline Of workflow step.
Notification Agents
  • Notification agents are people who are notified when a work item is completed.
  • Usually entered in notification tab of workflow step.
Agent assignment using organizational structure
  • Every workflow agent must have a userid.
  • Assigning userid directly for task may be very high maintenance.
  • Organizational plan helps in simplifying this issue.
  • Every SAP application server comes with basic organizational plan
Basic organization Plan
Organizational Units
  • Represents a group of people such as 18, section, Department, work area, lab, help desk, or shared service Centre.
Jobs
  • A job described functional role within the organization.
Positions
  • Position represents a headcount placement.
Users
  • Users is the actual userid of a person.
  • Workflow task can be linked to one or more Organization units, positions, jobs, or users.
Extended Organization Plan
  • SAP my HR comes with extended organization plan
  • Extended organizational plan includes personal numbers
    • A person represents a PERNR
    • a person may be assigned to one or more positions.
    • A user is assigned to a person by setting up info type 105 (Communication)
  • From workflow perspective, extended organizational plan has following benefits
    • Much more data in organizational plan to help make decisions.
    • “Evaluation paths” can be custom built and used as rules to find organization objects.
Reassign Work Items from One Agent to Another
  • If a user changes job or position, existing work item may need reassignment.
  • Typically, only served work item needs reassignment.
  • We can find outstanding work items for the user using transaction : SWI5. This transaction should be run before removing the user
  • We can find orphaned work items using transaction : SWI2_ADM1
Temporary Substitution of Agents
Sometimes will need to temporarily substituted the agent. This can be done in two ways:
  • The HR substitute relationship A210
  • User Substitution (Table: HRUS_D2)
The HR substitute relationship A210
  • We create substitute for a position using A210 relation between position and substitute.
  • All work items for that position are made available to the substitute.
User Substitution Using Table HRUS_D2
  • This is usually maintained from user’s inbox using menu path
   Inbox –> Settings –> Workflow Settings –> Maintain Substitutes
  • We can also create entries directly using ABAP
Substitute itself can be of two types:
Active Substitutes
  • In active substitution, work items are automatically forwarded or appear in the substitutes inbox.
Passive Substitute (also called adopt Substitute)
  • Require the substitutes to explicitly choose to see original agents work item
Refreshing Organisational Plan an Environment
  • The organisation plan is buffered for efficiency.
  • Changing an organisation plan will not immediately be updated in the buffer, and hence can create confusion especially for workflows using the plan for agent determination.
  • Typically buffer is refreshed at midnight.
  • Alternatively, in development systems, we can trigger refreshing of buffer using transaction: SWU_OBUF
  • It should be noted that the buffer afresh is a resource intensive process
  • When writing your own programs for buffer afresh, following function modules can be handy:
    • RH_WF_OM_INDICES_TIMESTAMP_RFS
    • RH_TASK_INBOX_VIEW_REFRESH
    • RH_TASK_AGENTS_INDEX_REFRESH

Triggering workflow when a PM notification is created ( through IW21 transaction)

This scenario is based on PM Notification. The following are the conditions to be followed in this scenario.

1.       The workflow should trigger when the notification is closed.
2.       The notification type should be M1.
3.       If the PM notification creator and the one who closes the notification are different, then send mail to Notification creator with subject “PM Number is closed by <closer name>.
4.       If the creator doesn’t see the mail in 10 minutes, then resend the mail.

The following are the transactions that we needed to use:
SWDD – Workflow Definition (here the workflow creation will take place)
SBWP – SAP Inbox (here we can check both the mail and the reminder mail)
IW22 – Change notification
SWO1 - Object Builder

--------------------------------------------------------------------------------------------------------------

Steps to follow:

1.     Go to tcode SWDD – when we open SWDD, the recently created workflow opens up.



 1.     To create a new workflow click on create new workflow button:

1.     Now our workflow builder screen looks as shown below; layout will be reset to the initial stage with 3 modes.
a.       Workflow started
b.      Workflow completed

c.       Undefined


1.     We have to create 2 Container elements: Containers elements will store the values in the workflow.
a.       To create a container element: double click the “double click to create” option.


a.       Here we need to pass the notification details to the workflow. So create the first container element as BUS2038 of BOR type. (BO for PM notification is BUS2038)



Note: Go to the Properties Tab and in the parameter settings check the Import checkbox for both the container elements.


a.     Create the second container element as creator of the type workflow initiator with table name as WFSYST and fieldname as INITIATOR. (Don’t forget to check the import parameter).

            Workflow container will look as shown below:


1.     Then click on Hat icon (Basic data/ start condition).

The tab with basic data opens up. Enter the Workflow name and Workflow description and change the release status to Released. And save it. 


a.       Click on the Start Events tab – here we will give our start conditions.


a.       Give the category as BO, object type as BUS2012 and event as CLOSED (This can be select from the search help). Because workflow should trigger when the notification is closed.


b.      Now press the Active button, then the active button goes green.


a.       Similarly, click on binding button. Click tick mark, and the binding button goes green color.


a.     Now click the Condition Tab. Here we have to specify the condition that “PM notification type should be ‘M1’.
                                          i.    Click on Maintenance notification.
                                         ii.    Under that, double click on Notification type
                                        iii.    Then click on ‘=’ under operators tab,
                                        iv.    And finally enter the type ‘M1’ under the tab constant.
                                         v.    We will get the condition in the last rectangular window.

                                        vi.    Click on ‘tick’ mark to proceed.



1.     Now SAVE and go back. 


1.     Now the workflow should look like this.


1.     Now double click (Or right clickà create) on the un-defined step, Click on step type ‘condition’. Here we have to put a condition of checking where creator and the one who closes the notification are not-equal/equal.





The below screen will appear.  Give the step name & click on “Click here to create new condition

Give the following condition:


The container variable creator will contain the value of one who created the notification and workflow initiator will contain the value of one who close the notification.

Now the screen will look as shown below. Give the outcomes and click on ‘Transfer and go to graphic’.


1.     Now the workflow will as shown below.



1.     Now if both the creator and closer are same, we don’t have to do anything. Otherwise, we have to send a mail with deadline monitoring of 10 minutes.


For that right click on “Both are different line”, and create an activity.



1.     In the click on, create task option.

1.     It will take us to another screen (we can create a task using the tcode PFTC)
Fill in the following details and save the task.
Here ABBR is the name of the task.
NAME is the description of the task.
RELEASE STATUS should always be released
WORK ITEM TEXT will act as the subject line of task, as we have to send a mail with this description as the subject line.



will be continued...






Contact Form

Name

Email *

Message *