Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

ALV

Scenario -
1. User command subroutine need to be passed against I_CALLBACK_USER_COMMAND parameter
of the ALV function module to make the report interactive. If user_command is the name of the
subroutine, what will be the interface of this subroutine?
Ans.
FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.

2. What is the name of the function module which can be used to write the header of the ALV
report?
Ans.
REUSE_ALV_COMMENTARY_WRITE

3. IT_BSID is the internal table to be displayed in the report. IT_FCAT is the field catalog.
USER_COMMAND is the name of the subroutine to handle user command. Choose the most correct
option to generate the report in ALV grid format.
Ans.
CALL FUNCTION REUSE_ALV_GRID_DISPLAY
EXPORTING
i_callback_user_command = USER_COMMAND
i_callback_top_of_page = HEADER_PAGE'
i_structure_name = 'BSID'
it_fieldcat = IT_FCAT
TABLES
t_outtab = IT_BSID
EXCEPTIONS
program_error =1
OTHERS = 2.
IF sy-subre <> 0.
* Implement suitable error handling here
ENDIF.

4. Which of the following statements will display the document directly without displaying the initial
screen of FB03.
Ans.
CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

5. For the initial output to be displayed like the output screenshot provided in the scenario
description, which among the following options is the most appropriate way to create the structure
in the program to select data from the bsid table? NoTe: Consider additional fields which need not
be displayed but required for further processing also.
Ans.
Types: begin of ty bsid,
BUKRS type BUKRS,
KUNNR type KUNNR,
GJAHR type GJAHR,
BELNR type BELNR_D,
BUZEI type BUZEI,
BUDAT type BUDAT,
WAERS type WAERS,
MONAT type MONAT,
DMBTR type DMBTR,
WRBTR type WRBTR
End of ty_bsid.

6. If the ALV report is to be created with Object oriented ABAP, which of the following options
are correct to make the report interactive to display the details of the document.
Ans.
Create a local handler class to handle the "double_click" event of the ALV and call the
transaction to display the document from the handler method.

7. To validate the customer entered in the initial screen of the program, what would you do?
Ans.
Check the customer entered in the screen against KNA1 table using select single statement in
"AT SELECTION SCREEN" event

8. The ALV report is generated using OO ABAP Considering the following


variable/class/method names Object reference variable to display the ALV: obj_alv.
Handler class to handle the double_click event of ALV class: class_handler
Static method of the handler class to handle double_click event of ALV:
on_double_click Which of the following options is the correct way to register the
event handler?
Ans.
SET HANDLER class_handler=> on_double_click FOR obj_alv.

9. If the report is generated as ALV report, which of the following is true


Ans.
Field Catalog can be used to calculate total and subtotal automatically.

10. To Display the document, FB03 transaction needs to be called from the user command
subroutine. If the work area WA_BSID has all the fields as specified in the BSID table in the
scenano description,
Which of the following statements is required before calling transaction FB03 to pass data to
the screen of FB03 transaction using the work area WA_BSID.
Ans.
SET PARAMETER ID: ‘BLN’ FIELD WA_BSID-BELNR, 'BUK’ FIELD WA BSID-BUKRS, ‘GJR' FIELD
WA BSID-GJAHR.
SCENARIOS
Module pool programming

1. In order to exit out the screen if AT EXIT-COMAND needs to be used then function code of
which type needs to be selected?
A. EXIT
B. E
C. S
D. EX

2.After the application is ready in order to execute the application which option can be shown?
A. F8
B. CUSTOM T-CODE
C. EXECUTE IN NEW WINDOW
D. ALL THE ABOVE
E. NONE OF THE ABOVE

3.Team is planning to keep a check on the screen so that none of the fields can be left blank, they
decided to use chain-end chain for the same, Choose the correct syntax?
A. PROCESS BEFORE OUTPUT.
CHAIN.
FIELD Employeeid,
Employee name,
Email,
mobile number.
MODULE VALIDATE_INPUT.
ENDCHAIN.
B. PROCESS AFTER INPUT.
CHAIN.
FIELD Employeeid,
Employee name,
Email,
Mobile number.
MODULE VALIDATE_INPUT.
ENDCHAIN
C. PROCESS AFTER OUTPUT.
CHAIN.
FIELD
Employee_id,
ENDCHAIN.
CHAIN.
FIELD Employee name,
ENDCHAIN.
D. CHAIN
FIELD email,
ENDCHAIN.
CHAIN
FIELD Mobile number.
MODULE VALIDATE_INPUT.
ENDCHAIN.
MODULE VALID_INPUT.
4. in order to perform user defined checks in the application which of the following method can
be used?
A. issue error or warning message in PAI Module
B. issue error or warning message based on the outcomes.
C. Use VALUES statement in flow logic to define the value values.
D. All of the above.
E. None of the above.

5. In order to initialize the screens and responds to the user’s request on the screen which option
from below can be selected?
A. Screen
B. Flow logic
C. Dynpro.
D. Screen elements.

6.The screen has BACK EXIT and CANCEL button. Please find the correct syntax to create the
PF Status?
A. SET PF-STATUS ‘Z_STATUS’.
B. SET PF_STATUS ‘Z_STATUS’.
C. SET PF-STATUS Z_STATUS.
D. SET PF_STATUS ‘Z_STATUS’.

7.While creating the screen for entering the participant details choose which option is not
mandatory to enter in the screen attributes?
A. Short Description
B. Screen type
C. Next screen
D. Screen number
8. Consider the application is designed in a way that there are multiple screen, In order to control
the screen flow i.e. navigating from one screen to the other which all statements can be used. A.
SET SCREEN <Screen number>.
B. LEAVE SCREEN.
C. LEAVE TO SCREEN<SCREEN NUMBER>.
D. CALL SCREEN<SCREEN NUMBER>{STARTING AT X,Y}.

9. ABAP team wants to ensure that the mobile number entered on the screen should be a
valid number of 10 digit. Before saving it in the database table , choose the correct way of
writing the validation of the same?
A.PROCESS AFTER INPUT.
FIELD PHONENUMBER MODULE VALIDATE_PHONE.
B.PROCESS BEFORE OUTUT.
FIELD PHONENUMBER MODULE VALIDATE_PHONE.
C.PROCESS BEFORE INPUT.
MODULE VALIDATE_PHONE ON FIELD PHONENUMBER.
D.PROCESS ON VALUE REQUEST.
FIELD PHONENUMBER MODULE VALIDATE_PHONE.

10. In screen for input field employee number when user enters the value into it program
should check if that value is available in custom table? Where the logic should be written for the
same?
A. AT SELECTION SCREEN.
B. PAI.
C. INITIALIZATION.
D. START-OF-SELECTION.
INTERACTIVE ALV REPORT
1. User command subroutine need to be passed again I_CALLBACK_USER_COMMAND
parameter of the ALV function module to make the report interactive. If user command is the name
of the subroutine,, what will be the interface of this subroutine?
A. FORM user_command USING r_ucomm LIKE sy-ucom rs_selfield TYPE
slis_selfield.
B. FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE
slis_selfield.
C. FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE
slis_selfields.
D. FORM user_command USING r_ucom LIKE sy-ucomm rs_selfield TYPE
slis_selfields.

2. What is the name of the function module which can be used to write the header of the ALV
report?
A. REUSE_ALV_COMMENTARY_WRITE
B. REUSE_ALV_HEADER_WRITE.
C. REUSE_ALVHEADER_WRITE.
D. REUSE_ALVCOMMENTARY_WRITE.

3. IT_BSID is the internal table to be displayed in the report IT_FCAT is the field catalog.
USER_COMMAND is the name of the subroutine to handle user command. Choose the most
correct option to generate the report in ALV grid format. Answer:
CALL FUNCTION REUSE_ALV_GRID_DISPLAY
EXPORTING
i_callback_user_command = ‘USER_COMMAND’
i_callback_top_of_page = ‘HEADER_PAGE'
i_structure_name = 'BSID'
it_fieldcat = IT_FCAT
TABLES
t_outtab = IT_BSID EXCEPTIONS
program_error = 1 OTHERS
= 2.
IF sy-subre <> 0.
* Implement suitable error handling here
ENDIF.

4. Which of the following statements will display the document directly without displaying
the initial screen of FB03.
A. CALL TRANSACTION ‘FB03’ BYPASSING FIRST SCREEN
B. CALL TRANSACTION FB03 AND SKIP FIRST SCREEN.
C. CALL TRANSACTION FB03 BYPASSING FIRST SCREEN.
D. CALL TRANSACTION ‘FB03’ AND SKIP FIRST SCREEN.

5. For the initial output to be displayed like the output screenshot provided in the scenario
description, which among the following options is the most appropriate way to create the
structure in the program to select data from the bsid table? NoTe: Consider additional fields
which need not be displayed but required for further processing also.
Ans.
Types: begin of ty bsid,
BUKRS type BUKRS,
KUNNR type KUNNR,
GJAHR type GJAHR,
BELNR type BELNR_D,
BUZEI type BUZEI,
BUDAT type BUDAT,
WAERS type WAERS,
MONAT type MONAT,
DMBTR type DMBTR,
WRBTR type WRBTR

Max lines.
6. If the ALV report is to be created with Object oriented ABAP. Which of the following options are
correct to make the report interactive to display the details of the document

A. Create a local handler class to handle the “double_click” event of the ALV and call the transaction
to display the document from the handler method.

B. Create a global handler class to handle the “double_click” event of the ALV and call the
transaction to display the document from the handler method.

C. Create a local handler program to handle the “double_click” event of the ALV and call the
transaction to display the document from the handler method.

D. Create a local handler subroutine to handle the “double_click” event of the ALV and call the
transaction to display the document from the handler method.

7. To validate the customer entered in the initial screen of the program, what would you do ?

A. Check the customer entered in the screen against KNA1 table using select single statement in “AT
SELECTION-SCREEN” event.

B. Check the customer entered in the screen against KNA1 table using select single statement in
“AT SELECTION-SCREEN” output event.

C. Check the customer entered in the screen against KNA1 table using select * in “AT
SELECTIONSCREEN” event.

D. Check the customer entered in the screen against KNA1 table using select upto 1 rows
statement in “AT SELECTION-SCREEN” event.

8. The ALV report is generated using OO ABAP. Considering the following variable /class/method names
object reference variable to display the ALV: obj_alv, Handler class to handle the double_click evenet
of ALV class class_handler Static method of the handler class to to handle double_click event of ALV
on double_click Which of the following options is the correct way to register the event handler?

A. SET HANDLER class_handler=>on_double_click FOR obj_alv.


B. SETS HANDLER class_handler=>on_double_click FOR obj_alv.

C. REGISTER HANDLER class_handler=>on_double_click FOR obj_alv.

D. REGISTERS HANDLER class_handler=>on_double_click FOR obj_alv.

9. If the report is generated as ALV report, Which of the following is true

A. Field catalog can be used to calculate total and subtotal automatically

B. Field catalog cannot be used to calculate total and subtotal automatically

C. Field catalog can be used to calculating only total not subtotal

D. Field catalog cannot be used for calculating totals but can be used for calculating subtotals.

10. To Display the document FB03 transaction need to be called from the user command subroutine. If
the work area WA_BSID has all the fields as specified in the BSID table in the scenario description Which
of the following statements is required before calling transaction FB03 to pass data to the screen of FB03
transaction using the work area WA_BSID.

A. SET PARAMETER ID: ‘BLN’ FIELD WA_BSID-BELNR, ‘BUK’ FIELD WA_BSID-BUKRS, ‘GJR’ FIELD
WA_BSID-GJAHR

B. SET PARAMETER ID: ‘BENLR’ FIELD WA_BSID-BELNR, ‘BUKRS’ FIELD WA_BSID-BUKRS, ‘GJAHR’
FIELD WA_BSID-GJAHR

C. GET PARAMETER ID: ‘BELNR’ FIELD WA_BSID-BELNR, ‘BUKRS’ FIELD WA_BSID-BUKRS, ‘GJAHR’
FIELD WA_BSID-GJAHR

D. GET PARAMETER ID: ‘BLN’ FIELD WA_BSID-BELNR, ‘BUK’ FIELD WA_BSID-BUKRS, ‘GJR’ FIELD
WA_BSID-GJAHR
SMART FORMS:
1. What’s the procedure to upload a color logo in sap server?
A. GOTO CODE SE78->Graphics Folder->Select BMP->Upload image file path ->Select
Color image radio button -> execute.
B. GOTO CODE SE77-> Select BMP->Click on Import->Upload image file path ->Select
Color jpeg image radio button -> execute.
C. GOTO CODE SE78->Graphics Folder->Select BMP->Click on Import->Upload image
file path ->Select Color bitmap image radio button -> execute.
D. GOTO CODE SE78>Graphics Folder->Select BMP->Click on Import->Upload image
file path ->Select Color jpeg or bitmap image radio button -> execute.

2. A table is created in main window with line type (%LINE1). The table has 3
sections. What are those?
A. Header, Main and footer
B. Header area, Main and footer area
C. Header area, main area and footer area
D. Header, Main area and footer

3. Where can the input parameters be defined in the smart form?


A. The input parameters for smart form can be defined in Global Settings-> Interface.
B. The input parameters for smart form can be defined in Global Settings->Form Interface.
C. The input parameters for smart form can be defined in Global Settings->Global Definition
D. The input parameters for smart form can be defined in Global Settings->Form and Interface.

4. To Print multiple copies of the same document with different headings, which of the following
should be used?
A. Main window
B. Final window
C. Copies window
D. Secondary window

5. How to display amount in words in Smart Forms?


A. Using FM: word_amount
B. USING FM: spell_amount
C. USING FM: spellamount
D. USING FM: amount
6. Using fields in the form output specified in the scenario description, a global structure -
‘ZEKPO’ is created.
The tables tab of form interface has a parameter “IT_EXPO” Type assignment is selected as
“TYPE” and associated type as “ZEKPO”- refer “Reference screenshot 1” in scenario description.
At the time of activation of the form form system gives an error, how can you solve this error?
(Multiple Choice)
A. Table type should be used as the reference type for a table parameter.
B. Structure types should be used as the reference using LIKE keyword for a table parameter
C. Type group name used as the reference type for a table parameter
D. The structure used as reference type in the table parameter in the form should be declared in
the driver program.

Starting with structure

Assoc type mentioned below, structure of it is declared in se38(report/driver program)


7. Using above line item (given in scenario description). 7 cells are created in a line type and used
in the table. Within respective cells, text element is created and the data passed in header of the
table but is not printing the data in the output. What is the correct way to pass data to get proper
output.
A. Create a table line in main area and pass the data there.
B. Create a table line in main then pass data there.
C. Create a table line in main_area then pass data there.
D. Create a table line in main and area then pass data there.

8. Which of the following system fields can be used to display the current page number in Form.
A. &SFSY-PAGENO&
B. &SFSY-JOBPAGES&
C. &SFSY-FORMPAGE&
D. &SFSY-PAGE&

9. Paragraph format is created in the smart style. Where should this be assigned so that is
applicable to all fields in a smart form?
A. In form attributes, output options
B. In text, output options
C. Global definitions, output options
D. From attributes, output Options, text properties
10. Where can we declare a global variable within Smart form?
A. In global definitions, global data.
B. In form interface, global data.
C. In attribute, general attribute
D. In global definition, global data
Hana
1. As a part of migration, ABAP team is also changing the old syntax to ABAP to new syntax. They
have following code written:
Data: wa_final type ty_final.
Wa_final-name = 'ABC'.
Wa_final-city = "'Delhi'.
Wa_final-country = 'IN'.
How to write this with new syntax: (select one or more)
A. Data: wa_final type ty_final.
Wa_final = NEW #( name=’ABC’ city = ‘Delhi' country = ‘IN’ ).

B. Data: wa_final type ty_final.


Wa_final = NEW ( name = ‘ABC’ city = ‘Delhi' country = ‘IN’ ).

C. Data: wa_final type ty_final.


Wa_final = NEW #( name = 'ABC’, city = ‘Delhi', country = ‘IN’ ).

D. Data(Wa final) - value ty_final (


(name = ‘ABC’ city = 'Delhi' country = "IN' ).
).
2. If it is required to write AMDP as a code push-down technique and the type definition and method
definitions are already done correctly, which is the correct syntax for method implementation
CLASS zcl_amdp_po IMPLEMENTATION.
method get_data BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING ekpo ekbe.
it_data = select ep. ebeln, ep. ebelp, ep. menge as
ordered_qty ek.menge as issued_qty,
ep.menge = ek.menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep. ebeln = ek. ebeln and
ep. ebelp = ek. Ebelp
where ek. vgabe = '1' and
ek. bewtp = 'E';
endmethod.
ENDCLASS.

In using line only two tables, . should ~be considered and comma after issued_qty

B. CLASS zcl_amdp_po IMPLEMENTATION. method


get_data BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING ekpo ekbe.
it_data = select ep.ebeln, ep.ebelp, ep.menge as
ordered_qty ek.menge as issued_qty.
ep.menge = ek.menge as pending_qty from ekpo as ep
inner join ekbe as ek on ep.ebeln = ek.ebeln and ep.ebelp =
ek.ebelp where ek.vgabe = '1' and ek.bewtp = 'E';
endmethod.
ENDCLASS.
c. . CLASS zcl_amdp_po IMPLEMENTATION. method
get_data BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT OPTIONS READ-ONLY
USING ekpo ekbe. it_data = select ep.ebeln, ep.ebelp,
ep.menge as ordered_qty ek.menge as issued_qty
ep.menge = ek.menge as pending_qty from ekpo as ep inner
join ekbe as ek on ep.ebeln = ek.ebeln and ep.ebelp =
ek.ebelp where ek.vgabe = '1' and ek.bewtp = 'E';
endmethod.
ENDCLASS.
3. If the team decides to use open SQL, which is the correct syntax?
A. select ep~ebeln, ep~ebelp,
ep~menge as ordered_qty
ek~menge as issued_qty.
ep~menge – ek~menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep~ebeln = ek~ebeln and
ep~ebelp = ek~ebelp
where ek~vgabe = '1' and
ek~bewtp = 'E’
into table @data(it_data).
B. select ep.ebeln, ep.ebelp, ep.menge as ordered_qty
ek.menge as issued_qty. ep.menge – ek.menge as
pending_qty from ekpo as ep inner join ekbe as ek
on ep.ebeln = ek.ebeln and ep.ebelp = ek.ebelp
where ek.vgabe = '1' and ek.bewtp = 'E’ into
table @data(it_data).
C. select ep~ebeln, ep~ebelp, ep~menge as ordered_qty
ek~menge as issued_qty
ep~menge – ek~menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep~ebeln = ek~ebeln and ep~ebelp
= ek~ebelp where ek~vgabe = '1' and
ek~bewtp = 'E’ into table
@data(it_data).
D. select ep~ebeln, ep~ebelp, ep~menge as ordered_qty
ek~menge as issued_qty, ep~menge – ek~menge
as pending_qty from ekpo as ep inner join ekbe as
ek on ep~ebeln = ek~ebeln and ep~ebelp =
ek~ebelp where ek~vgabe = '1' and ek~bewtp =
'E’
into table @data(it_data).

4. If it is required to write AMDP as a code push-down technique, which is the correct syntax for types
definition written in Public section.
types: BEGIN OF ty_po,
ebeln type ebeln,
ebelp type ebelp,
Ordered_qty type MENGE_D,
issued_qty type MENGE_D,
pending_qty type MENGE_D, end
of ty_po.
types: et_data type STANDARD TABLE OF ty_po with ******

5. ***** required to display the output CDS view in ALV IDA format then what will be the correct syntax:
(ABAP name: ‘ZPO_ABAP_QTY’ HANA name : ‘ZPO_QTY’).
Ans.
cl_salv_gui_table_ida=>create_for_cds_view(‘ZPO_QTY’)->fullscreen( )->display******

6. Name the interface that should be implemented in AMDP class.


A. if_amdp _marker_hdb
B. if_marker_amdp_hdb
c. if_hdb _marker_amdp
d. if_amdp_hbd_marker

I am hdb

7. Which standard package contains sample ALV IDA programs.


Ans: SALV_IDA_TEST
SALV_IDA_GUI_TEST
SALV_IDA_ALV_TEST None
of the above.

8. If the team decides to go for CDS view, choose the correct syntax:
Ans:
// CDS zpo_qty
@AbapCatalog.sqlViewName: ‘ZPO_ABAP_QTY’
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText label: ‘Pending Ordered Qty’
define view zpo_qty as select from ekpo as ep
inner join ekbe as ek
on ep. Ebeln = ek.ebeln and
ep.ebelp = ek.ebelp (
ep.ebeln,
op.ebelp,
ep.menge as ordered_qty.
ek.menge as issued_qty,
ep.menge - ek.menge as pending_qty
)
where ek.vgabe = '1' and ek.bewtp = 'E'

; no semi colon last to third line(pending_qty)


9. Which is correct syntax to check whether internal table is empty?
A. select ebeln, ebelp,
menge
from ekko
into @DATA(it_data)
UP TO 50 ROWS.
If line_exits(it_Data).
Write: ‘Table is not empty’.
Endif.
10. If it is required to consume CDS view in ABAP report then which CDS view name can be used
without any warning?
A. Name specified after define view name
B. Name specified with annotation : @abapcatalog
C. Both the names can be used.
D. None of the above

BDC SCENARIO
1. After reading the data from file it needs to be transferred to an internal table . which is the
best way to declare the internal table for the structure in the requirement given

A. types begin of ty_data,


Bsart type eban-bsart,
Matnr type eban-Matnr,
Menge type eban-Menge,
Werks type eban-werks,
End of ty_data.
DATA : it_data type standard table of ty_data.
B. DATA : it_data type standard table of bdcdata.

C. DATA : IT_DATA type standard table of string.

D. All three will work

E. None

2. How to populate the bdc structure and internal table from material number from file.

A. Lw_bdcdata-program = ‘SAPMM06B’.
Lw_bdcdata-dynpro = ‘0160’
Lw_bdcdata-dynbegin = ‘x’
Append lw_bdcdata to it_bdcdata
Clear lw_bdcdata

B. Lw_bdcdata-program = ‘EBAN-MATNR’.
Lw_bdcdata-dynpro = ‘lw_data-matnr’
Append lw_bdcdata to it_bdcdata
Clear lw_bdcdata

C. Lw_bdcdata-fnam = ‘MATNR’.
Lw_bdcdata-fval = ‘lw_data-matnr’
Append lw_bdcdata to it_bdcdata
Clear lw_bdcdata

D. Lw_bdcdata-fnam = ‘EBAN-MATNR’
Lw_bdcdata-FVAL = ‘lw_data-matnr’
Append lw_bdcdata to it_bdcdata
Clear lw_bdcdata

fnam, FVAL

3. If u are using CALL TRANSACTION method, how to capture error/warning/success messages


and display in output? Choose the right code.

A. CALL TRANSACTION ‘ME51’ using t_bdcdata


MODE w_mode
UPDATE ‘S’
MESSAGES IN t_msg.
B. CALL TRANSACTION ‘ME51’ using t_bdcdata
MODE w_mode
UPDATE ‘S’
MESSAGES t_msg.

C. CALL TRANSACTION ‘ME51’ using t_bdcdata


MODE w_mode
UPDATE ‘S’
MESSAGES APPENDING INTO t_msg.

D. CALL TRANSACTION ‘ME51’ using t_bdcdata


MODE w_mode
UPDATE ‘S’
MESSAGES INTO t_msg.

4. In source file imagine there are 10000 recors maximum at a time. Clients want to upload them
online into database but using t-code ME51. It should be through a custom program also which
will display the captured messages immediately after execution which bdc answer is suitable for
this?

A. Session method
B. Call transaction
C. Both
D. None

5. if u are using SESSION method. How to use bdc insert function module with minimum
parameters so that it will insert data into session

A. CALL FUNCTION ‘BDC_GROUP_INSERT’


EXPORTING
TCODE = ‘ME51’
TABLES
Dynprotab = it_bdcdata.

B. CALL FUNCTION ‘BDC_INSERT’


EXPORTING
TCODE = ‘ME51’
TABLES
Dynprotab = it_bdcdata.
C. CALL FUNCTION ‘BDC_DATA_INSERT’
EXPORTING
TCODE = ‘ME51’
TABLES
Dynprotab = it_bdcdata.

D. CALL FUNCTION ‘BDC_INSERT_SESSION’


EXPORTING
TCODE = ‘ME51’
TABLES
Dynprotab = it_bdcdata.

6. How to download error records into given file?


A. Use GUI_UPLOAD function module with flag to download
B. Use GUI_DOWNLOAD function module
C. C. Use DOWNLOAD_FILE function module
D. None.

7. Imagine there are 1000 records in source file and suppose call transaction method is used in
bdc program. There was a error in 500th record and dint create PR for that. How to process
the error records?
A. It is not possible to process error records in call transaction method.

B. in a new file, place errored records after correcting them and then process again with
BDC method

C. Create those records manually in ME51

D. None of the above


Long option

8. Data should be updated through tcode ME51. What is the best way to understand ME51.
A. Create data manually using ME51 and familiarize with it.
B. Do recording and generate source code
C. populate data into BDC structure and call functions
D. Run session/call transaction in foreground mode.
9. How to get the technical information of material?
A. ME51-> material field->F4->Technical information
B. ME51->material field->F1
C. ME51->material field->F4
D. ME51->material field->F1->Technical information
10. The source file is comma separated as u can see in sample. How to read data from it ?
A. CALL FUNCTION ‘GUI_UPLOAD’
EXPORTING
Filename = ‘c:\users\<xxx>\desktop\data.txt’
Has_field_separator = ‘,’
TABLES
Data_tab = it_data

B. CALL FUNCTION ‘GUI_UPLOAD’


EXPORTING
Filename = ‘c:\users\<xxx>\desktop\data.txt’
Has_field_separator = ‘X’
TABLES
Data_tab = it_data

C. CALL FUNCTION ‘GUI_UPLOAD’


EXPORTING
Filename = ‘c:\users\<xxx>\desktop\data.txt’
Has_field_separator = ‘X’
TABLES
Data_tab = it_data
Loop at it_data into lw_data
SPLIT lw_data AT ‘,’ INTO WA_FIELDS-BSART
Filename = ‘c:\users\<xxx>\desktop\data.txt’
Has_field_separator = ‘X’
TABLES
Data_tab = it_data

D. CALL FUNCTION ‘GUI_UPLOAD’


EXPORTING
Filename = ‘c:\users\<xxx>\desktopdata.txt’
Has_field_separator = ‘,’
TABLES
Data_tab = it_data AT ‘,’ INTO WA_FIELDS-BSART
Loop at it_data into wa_data
SPLIT lw_data AT ‘,’ INTO WA_FIELDS-BSART
Wa_fields-matnr
Wa_fields-menge
Wa_fields-werks
*other source code to populate BDC internal table is continued
E. CALL FUNCTION ‘GUI_UPLOAD’
EXPORTING
Fieldname = ‘c:\users\<xxx>\desktop\data.txt’
Has_field_separator = ‘X’
Field_separator = ‘,’
TABLES
Data_tab = it_data

Two Tables
SMARTFORM

Scenario -
1. What’s the procedure to upload a color logo in sap server?
Ans. GOTO CODE SE78->Graphics Folder->Select BMP->Click on Import->Upload image file path
->Select Color bitmap image radio button -> execute.

2. A table is created in main window with line type (%LINE1). The table has 3
sections. What are those?
A. Header, Main and footer
B. Header area, Main and footer area
C. Header area, main area and footer area
D. Header, Main area and footer
OPTIONS: D

3. Where can the input parameters be defined in the smart form?


ANS. The parameters for smart form can be defined in Global Settings->Form Interface.

4. To Print multiple copies of the same document with different headings, which of the
following should be used?
ANS: COPIES WINDOW

5. How to display amount in words in Smart Forms?


ANS: USING FM: spell_amount
6. Using fields in the form output specified in the scenario description, a global
structure - ‘ZEKPO’ is created.
The tables tab of form interface has a parameter “IT_EXPO” Type assignment is selected as
“TYPE” and associated type as “ZEKPO”- refer “Reference screenshot 1” in scenario description.
At the time of activation of the form form system gives an error, how can you solve this error?
(Multiple Choice)
A. Table type should be used as the reference type for a table parameter.
B. Structure types should be used as the reference using LIKE keyword for a table parameter
C. Type group name used as the reference type for a table parameter
D. The structure used as reference type in the table parameter in the form should
be declared in the driver program.

ANS: B and D
Assoc type mentioned below, structure of it is declared in se38(report/driver program)

7. Using above line item (given in scenario description). 7 cells are created in a line type and used
in the table. Within respective cells, text element is created and the data passed in header of the
table but is not printing the data in the output. What is the correct way to pass data to get proper
output.
A. Create a table line in main area and pass the data there.
B. Create a table line in main then pass data there.
C. Create a table line in main_area then pass data there.
D. Create a table line in main and area then pass data there.
ANS. CREATE A TABLE LINE IN MAIN AREA AND THEN PASS DATA THERE

8. Which of the following system fields can be used to display the current page number
in Form.
A. &SFSY-PAGENO&
B. &SFSY-JOBPAGES&
C. &SFSY-FORMPAGE&
D. &SFSY-PAGE&
ANS: &SFSY-PAGE&

9. Pargraph format is created in the smart styles .where should this be assigned so that is
applicable to all fields in a smart form?
A. In form attributes, output options
B. In text, output options
C. Global definations, output options
D. From attributes, output Options, text properties
ANS: IN FORM ATTRIBUTES, OUTPUT OPTIONS

10. Where can we declare a global variable within Smartform?


A. In global definitions, global data.
B. In form interface, global data.
C. In attribute, general attribute
D. In global definition, global data
ANS: IN GLOBAL DEFINITIONS, GLOBAL DATA
BDC

1. After reading the data from file, it needs to be transferred to an internal table. Which is the best
way to declare the internal table for the structure in the requirement given?

A. TYPES: BEGIN OF ty_data,


bsart TYPE eban-bsart,
matnr TYPE eban-mater,
menge TYPE eban-menge,
werks TYPE eban-werks,
END OF ty_data.
DATA: lt_data TYPE STANDARD TABLE OF ty_data.
B. DATA: It_data TYPE STANDARD TABLE OF bdcdata.
C. DATA: It_data TYPE STANDARD TABLE OF string.
D. All three will work
E. None

Ans. A. TYPES: BEGIN OF ty_data,


bsart TYPE eban-bsart,
matnr TYPE eban-mater,
menge TYPE eban-menge,
werks TYPE eban-werks,
END OF ty_data.
DATA: lt_data TYPE STANDARD TABLE OF ty_data.
2. How to populate the BDC structure and internal table for material number from file?
A. lw_bdcdata-program = ‘SAPMMO6B’
Iw_bdcdata-dynpro = ‘0106’.
Iw_bdcdata-dynbegin = ‘X’.
APPEND lw bdcdata TO lt_bdcdata.
CLEAR lw_bdcdata.
B. lw_bdcdata-program="EBAN-MATNR
lw_ bdcdata -dynpro=w_data-matnrA
PPEND Iw_bdcdata TO It_ bdcdata.
CLEAR lw_ bdcdata.
C. lw_bdcdata-fnam = ‘MATNR’.
lw_bdcdata –fval = lw_data-matnr.
APPEND lw_ bdcdata TO lt_ bdcdata.
CLEAR lw_bdcdata.
D. lw_bdcdata-fnam = ‘EBAN-MATNR’.
lw_bdcdata-fval = lw_data-matnr.
APPEND Iw_bdcdata TO_bdcdata.
CLEAR Iw_bdcdata.
Ans. D
3. If you are using CALL TRANSACTION method, how to capture error/warning/success messages and
display in output? Choose the right code.
Ans.
CALL TRANSACTION 'ME51' USING t_bdcdata
MODE w_mode
UPDATE 'S'
MESSAGES INTO t_msg.
4. In source file imagine there are 10000 records at the maximum at a time. Clients want to upload
them online into database but using t-code ME51. It should be through a custom program also which
will display the captured messages immediately after execution. Which BDC option is suitable for
this?
Ans. Call Transaction

5. If you are using SESSION method. How to use BDC insert function module with minimum
parameters so that it will insert data into session?
Ans.
CALL FUNCTION ‘BDC_INSERT’.
EXPORTING
Tcode = ‘ME51’.
TABLES
Dynprotab = lt_bdcdata.

6. How to download error records into given file?


Ans. Use GUI_DOWNLOAD function module

7. Imagine there are 1000 records in source file and suppose call transaction method is used in BDC
program. There was an error in 500th record and didn’t create PR for that. How to process the error
records?
Ans. In a new file, place errored records after correcting them and then processagain with BDC
program

8. Data should be updated through Tcode ME51. What is the best way to understand ME51?
Ans. Do recording and generate source code.

9. How to get the technical information of Material?


Ans. ME51->Material field->F1->Technical Information
10. The source code is comma separated as you can see in example. How to read data from it?
Ans.
CALL FUNCTION
‘GUI_UPLOAD’ EXPORTING
Filename = ‘C:\Users\<xxx>\Desktop\data.txt’
has_field_separator = ‘X’
TABLES
data_tab = lt_data
LOOP AT lt_data INTO lw_data.
SPLIT lw_data AT ‘,’ INTO wa_fields_bsert
wa_fields-
matnr wa
fields-menge
wa_fields-
werks
*other source code to populate BDC internal table is continued.
HANA
1. As a part of migration, ABAP team is also changing the old syntax to ABAP to new syntax.
They have following code written:
Data: wa_final type ty_final.
Wa_final-name = 'ABC'.
Wa_final-city = "'Delhi'.
Wa_final-country = 'IN'.
How to write this with new syntax: (select one or more)
A. Data: wa_final type ty_final.
Wa_final = NEW #( name=’ABC’ city = ‘Delhi' country = ‘IN’ ).

B. Data: wa_final type ty_final.


Wa_final = NEW ( name = ‘ABC’ city = ‘Delhi' country = ‘IN’ ).

C. Data: wa_final type ty_final.


Wa_final = NEW #( name = 'ABC’, city = ‘Delhi', country = ‘IN’ ).

D. Data(Wa final) - value ty_final (


(name = ‘ABC’ city = 'Delhi' country = "IN' ).
).
Ans: A, D
2. If it is required to write AMDP as a code push-down technique and the type definition and method
definitions are already done correctly, which is the correct syntax for method implementation
Ans:
CLASS zcl_amdp_po IMPLEMENTATION.
method get_data BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING ekpo ekbe.
it_data = select ep.ebeln, ep.ebelp, ep.menge as ordered_qty
ek.menge as issued_qty,
ep.menge = ek.menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep.ebeln = ek.ebeln and
ep.ebelp = ek.ebelp
where ek.vgabe = '1' and
ek.bewtp = 'E';
endmethod.
ENDCLASS.

3. If it is required to write AMDP as a code push-down technique and the type definition and method
definitions are already done correctly, which is the correct syntax for method implementation
Ans:
CLASS zcl_amdp_po IMPLEMENTATION.
method get_data BY DATABASE PROCEDURE
FOR HDB
LANGUAGE SQLSCRIPT
OPTIONS READ-ONLY
USING ekpo ekbe.
it_data = select ep.ebeln, ep.ebelp, ep.menge as ordered_qty
ek.menge as issued_qty,
ep.menge = ek.menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep.ebeln = ek.ebeln and
ep.ebelp = ek.ebelp
where ek.vgabe = '1' and
ek.bewtp = 'E';
endmethod.
ENDCLASS.
4. If the team decides to use open SQL, which is the correct syntax?
Ans:
select ep~ebeln, ep~ebelp, ep~menge as ordered_qty
ek~menge as issued_qty.
ep~menge – ek~menge as pending_qty
from ekpo as ep inner join ekbe as ek
on ep~ebeln = ek~ebeln and
ep~ebelp = ek~ebelp
where ek~vgabe = '1' and
ek~bewtp = 'E’
into table @data(it_data).

5. If it is required to write AMDP as a code push-down technique, which is the correct syntax for
types definition written in Public section.
Ans.
types: BEGIN OF ty_po,
ebeln type ebeln,
ebelp type ebelp,
Ordered_qty type MENGE_D,
issued_qty type MENGE_D,
pending_qty type MENGE_D,
end of ty_po
types: et_data type STANDARD TABLE OF ty_po with ******

6. ***** required to display the output CDS view in ALV IDA format then what will be the correct
syntax: (ABAP name: ‘ZPO_ABAP_QTY’ HANA name : ‘ZPO_QTY’).
Ans.
cl_salv_gui_table_ida=>create_for_cds_view(‘ZPO_QTY’)->fullscreen( )->display******

7. Name the interface that should be implemented in AMDP class.


Ans. if_amdp _marker_hdb

8. Which standard package contains sample ALV IDA programs.


Ans: SALV_IDA_TEST
9. If the team decides to go for CDS view, choose the correct syntax:
Ans:
// CDS zpo_qty
@AbapCatalog.sqlViewName: ‘ZPO_ABAP_QTY’
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText label: "Pending Ordered Qty”
define view zpo_qty as select from ekpo as ep
inner join ekbe as ek
on ep. Ebeln = ek.ebeln and
ep.ebelp ek.ebelp (
ep.ebeln,
op.ebelp,
ep.menge as ordered_qty.
ek.menge as issued_qty,
ep.menge - ek.menge as pending_qty

)
where ek.vgabe = '1' and ek bewtp = 'E'

10. Which is correct syntax to check whether internal table is empty?


Ans:
select ebeln, ebelp, menge
from ekko
into @DATA(it_data)
UP TO 50 ROWS.
If line_exits(it_Data).
Write: ‘Table is not empty’.
Endif.

11. If it is required to consume CDS view in ABAP report then which CDS view name can be used
without any warning?
Ans: Name specified after define view name

You might also like