Professional Documents
Culture Documents
There is only one rule in this part of the Game never give
access to &NC&
)
Events:
Classical Reports generates the Basic List and
Interactive reports generates the Up to 20 Secondary
Lists.
Initialization: is the event to get assign the value as a
default(nothing but the initialization of the variable).
It is the first event to trigger but if your program
contains parameters or Select Options it trigger but
not show the output on the list.
For parameters you can assign values to them in
their declaration. But you cannot do this for selectoptions.
e.g 1. PARAMETERS datum TYPE sy-datum
DEFAULT sy-datum.
2. INITIALIZATION.
S_MATNR-OPTION = 'EQ'.
S_MATNR-SIGN
= 'I'
S_MATNR-LOW
= '1
'APPEND S_MATNR.
3.
INITIALIZATION.
so_pdate-low = sy-datum.
append so_pdate.
AT SELECTION SCREEN:
when user enters the values in the fields of the
selection screen and clicks on execution button,this
event gets triggered.this event is basically for checking
the value entered by the user for the field of the
selection screen i.e data validity checking.this event is
for entire selection screen.
AT SELECTION-SCREEN OUTPUT :
This is used for the dynamic field validation
like if u dont want a field in selection screen to be an
input field. event is triggered. allows you to modify the
selection screen directly before it is
displayed.Therefore, this event is not suitable for
setting selection screen default values
Field Catalog:
Field catalog is a format description of the display area.
The field catalog contains more than 60 fields, some of
which are only used internally. The field catalog is defined
in the Data Dictionary through table type LVC_T_FCAT.
e.g
fieldcatalog-fieldname
= 'MATNR'.
fieldcatalog-seltext_m
= 'Material Number'.
fieldcatalog-col_pos
= 4.
fieldcatalog-outputlen = 10.
Workflow:
Workflow, as the name suggests, means flow of work, may
be from one person
to another person. It is in fact a sequence of connected
activities resulting in
exchange of information.
The workflow definition is the set of rules that determine
the path that the process
takes.
DESCRIPTION
SWDD
Workflow builder
PFAC
Rule Maintainance
PFTC
Task Maintainance
SWIA
SWI1
SWEL
SWO1
BOR
SWUD
SWUE
Trigger event
SWUI
Start workflows
SWUS
Start tasks
SBWP
Business Workplace
Link: http://www.saptraininghouse.com/2012/customerexits-in-sap-sap-transactions-smod-cmod/
DATABASE
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.
2.
TABLE BUFFER:
a.
b.
3.
a.
Internal tables
Use HASHED tables where-ever possible.
Otherwise SORTED tables. STANDARD tables should be
the last choice.
b.
c.
d.
4.
a.
Miscellaneous
PERFORM : When writing a subroutine, always
provide type for all the parameters. This reduces the
overhead which is present when system determines on it's
own each type from the formal parameters that are
passed. It also makes for more robust programming.
What is the difference between SELECT SINGLE and
SELECT ... UP TO 1 ROWS?
BAPI
TABLES:
Standard Table - the most commonly used type of table.
You can sort and resort this table anytime. You can have
duplicate records in them. Recommend that when
accessing these tables, you sort them by a key and then
READ via a BINARY SEARCH - better performance. When
you write to this table the record is "appended" to the end
of the table. In order to maintain the sort sequence (if any)
you must use the SORT command again.
= gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_pf_status_set = 'SET_PF_STATUS' "see
FORM
is_layout
= gd_layout
it_fieldcat
= fieldcatalog[]
i_save
= 'X'
tables
t_outtab
= it_ekko
exceptions
program_error
others
=1
= 2.
Folder Node:
1. It just use to combine diferrent node into logical
groups.
2. It can be used for page protection by checking the
page protect check box. So that everything in folder will
be printed on same page.
To display Icon in smartform ... create text - > editor > menu bar - > Insert - > characters - > SAP Icons or SAP
Symbols
Main Features of Smart Forms
1. Smart forms are created in a utility, 'Form Builder'
which is very user-friendly compared to the
environment for SAPscript creation.
2. The form logic is represented by a hierarchy structure
(tree structure) that consists of individual nodes,
such as nodes for global settings, nodes for texts,
nodes for output tables, or nodes for graphics. To
make changes, use Drag&Drop, Copy&Paste, and
Table - Output of a table containing
application data
Alternative- Branches depending on
condition.
Command - Executes special commands
(next page, paragraph numbering, printer
control)
Folder- Combines successor nodes to logical
groups
Complex Section- Combines all attributes of
the node types template, table, loop, folder
Program Lines - Executes ABAP program
code (for example, conversion routines
Template: This node is to be used for displaying
a table whose layout and number of rows and
columns is determined before run-time.
5. Basic Nodes
6. Graphic, Address and Text fall under this category. A
'text' node can be created only as a successor of a
formname = 'Z_SMARTFORM'
IMPORTING
fm_name = lv_fm_name
CALL FUNCTION lv_fm_name
*How do you convert a Smartform Output to PDF
output?
There is a tricky solution here.But let's keep that for the
last. Let us first discuss the conventional way of getting a
PDF output for Smartform. For that you need to keep in
mind the following two function modules and their
importing/exporting parameters:
CONVERT_OTF
CONVERT_OTF_2_PDF
In the Driver program, import the parameter
'job_output_info' from the Smartform FM and utilize that
info in 'OTF' parameter of the two aforementioned function
modules.
Here is one more and probably the easiest way to see PDF
output for a Smartform.
Type PDF! in the command prompt and hit enter :).
the internet . Make sure you read one understand it all the
way . Sending IDoc from client 800 to say client 810 on
the same server is easy . If possible ,Try an exercise in
which you send an IDoc from one system to another
system.
Lets get started . Hope you get some value in these pages
:)
Question 1: What is ALE ?
ALE stands for Application Link Enabling. As it's name
indicates , it links two systems.
ALE is a technology that can enable exchange of data
between two different Systems ( Sap - Sap OR Sap - Non
Sap). ALE technology enables distributed yet integrated
installation of SAP systems.
ALE architecture comprises of 3 layers :
Application layer refers to the application data ( SD , MM
, FI or data for any SAP application ) . In this layer the data
is collected to be distributed and then sent to the
distribution layer.
Distribution layer determines to whom should the data
generated by the application layer has to be distributed
i.e. it is in the distribution layer that the recipient is
determined , the data is formatted or filtered and then an
actual is created.
Communication layer takes the responsibility of
delivering the Idoc to the receiving system and
communicates to the receiving system via tRFC , File ports
, FTP or TCP/IP etc.
ALE uses IDoc as a vehicle to transfer data between
two systems.
Question 2: What is EDI ?
EDI stands for Electronic Data Interchange. It refers to the
electronic exchange of business data in a structured
send or receive.
Partner profiles can be maintained in WE20.
Question 9: What is a distribution model in ALE IDocs ?
The distribution model describes how ALE messages flow
between different logical systems.
You can mention the sender and receiver logical systems,
the message type to be distributed and also distribute
data(IDocs) based on certain conditions by using the
distribution model.
The ALE layer uses the distribution model to control which
systems will receive the information(IDocs) and also filter
the data based on certain conditions.
Distribution Models can be created and maintained in
transaction BD64.
Question 10: What are process codes ?
In ALE ie, the data requested system is receiver and the
data already presented system is sender ie, from where
we are having the data,
we need a program to tranfer required data into idoc-( idoc is just a data container ) in sender side this
program logic is in a function module it is configured in
we41.
ie this will transfer the data from database to idoc---in sender side it is a process code
Function exit
FORM EXITs. The user exits
Screen Exit
are generally collected in
Menu Exit
includes and attached to the
Field Exit
standard program by the SAP. Example: CALL Customer
User-exits are empty
function xxx
subroutines that SAP
INCLUDE xxx.
Developers have provided for You modify this include.
you. You can fill them with
link : http://wiki.scn.sap.com/wiki/pages/viewpage.action?
pageId=189893877
User exits can be found in the following ways:
Go to Object Navigator (SE80), select Package and put
VMOD. You will find all the includes for user exits in SD.
What is the difference between RFC and BAPI?
BAPI
RFC
Just as Google offers
RFC is nothing but a remote
Image/Chart/Map APIs OR
enabled function module. So if
Facebook offers APIs for
there is a Function Module in
Comment/Like, SAP offers APIs in SAP system 1 on server X , it
the form of BAPIs. BAPI is a
can be called from a SAP
No Business Object is
associated with a RFC.
Call Transaction
Call transaction method is
when the data volume is low
BDC
BDC is relatively slower than
BAPI.
BAPI directly updates
BDC goes through all the
database.
screens as a normal user
would do and hence it is
slower.
No such processing options are Background and Foreground
available in BAPI.
processing options are
available for BDC.
BAPI would generally used for
BDCs would be preferred for
small data uploads.
large volumes of data upload
since background processing
option is available.
For processing errors, the
Errors can be processed in
Return Parameters for BAPI
SM35 for session method and
should be used. This
in the batch input program for
parameter returns exception
Call Transaction method.
messages or success
messages to the calling
program.
Question 6: What is the difference between macro
and subroutine?
Macro
Macro can be called only in
the program it is defined.
Macro can have maximum 9
parameters.
Macro can be called only after
its definition.
Subroutine
Subroutine can be called
from other programs also.
Can have any number of
parameters.
This is not true for
Subroutine.
ABAP Memory
When you are using the EXPORT
IMPORT Statements, you are
using the ABAP Memory.
ABAP Memory is User and
Transaction Specific.What does
this mean? The data stored in
ABAP memory can be accessed
only in one session. If you are
creating another session, you
cannot use ABAP memory.
Important
Question 8: What is the difference between AT
SELECTION-SCREEN and AT SELECTION-SCREEN
OUTPUT?
AT SELECTION-SCREEN is the PAI of the selection screen
whereas
AT SELECTION-SCREEN OUTPUT is the PBO of the selection
screen.
Question 9: What is the difference between SYINDEX and SY-TABIX?
Remember it this way TABIX = Table.
So when you are looping over an internal table, you use
SY-TABIX.
When you use DO ENDDO / WHILE for looping, there is
no table involved.
So you use SY-INDEX.
For READ statement, SY-INDEX is used.
Question 10: What is the difference between VIEW
and a TABLE?A table physically stores data.
A view does not store any data on its own. It can contain
data from multiple tables and it just accesses/reads data
from those tables.
Question 11: What is the difference between
Customizing and Workbench request?A workbench
request is client independent whereas a Customizing
request is client dependent.
Changes to development objects such as Reports, Function
Modules, Data Dictionary objects etc. fall under
Workbench requests.
Changes in SPRO / IMG that define system behavior fall
under customizing requests.
An example would be defining number ranges in SPRO.
In short, generally a developer would end up creating a
Workbench request and a Functional Consultant would
create a Customizing request.
Screen
AT SELECTION SCREEN: PAI for Selection Screen
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE
AT USER-COMMAND: When user click on say buttons in
application toolbar. SY-UCOMM
AT LINE SELECTION: Double click by user on basic
list. SY-LISEL
AT PF##: When User Presses any of the Function Keys
TOP-OF-PAGE DURING LINE SELECTION
Question 17:
What events do you know in Module Pool
Programming?
PBO: you know this . If not you should know this . That's
basic.
PAI: You know this. If not you should know this . That's
basic.
POV: Process on Value request i.e. when you press F4.(
F4IF_INT_TABLE_VALUE_REQUEST)
POH: Process on help request i.e. when you press F1.
Question 18: Can you show multiple ALVs on a
Single Screen?
Yes, there are multiple ways of doing this:
1.
2.
3.
Lets discuss about tables EKKO (PO header) and EKPO (PO
line item).
Can you have an entry in table EKPO without having an
entry in table EKKO?
In other words can you have PO line items without the PO
header?
How does this happen? The answer is foreign key
relationship.
So foreign keys come into picture when you define
relationship between two tables.
Important
Question 27: How do you find BADI?
Approach1:
Go to Class CL_EXITHANDLER in SE24 ---> Put a
breakpoint in method GET_INSTANCE.Now go and
execute your transaction code for which you want to find
BADI.
You will find the BADI in the changing parameter
exit_name:
Approach 2:
Go to Tcode SE84 Enhancements BADIs Definitions.
Find the package for the Tcode for which you are finding
the BADI.
Enter it as shown and hit execute:
SLIS :
Description
AT LINESELECTION
AT USERCOMMAND
Event
Description
TOP-OF-PAGE
DURING LINESELECTION
SYLSIND
SYLIST1
SY-LILLI
SYLISEL
SYCURO
W
SYCUCOL
SYCPAGE
SYSTARO
SY-
STACO
SYUCOM
M
SYPFKEY
5.
6.
7.
8.
WARANTY Tables:
PNWTYH : Warranty Claim Header
PNWTYV : Warranty Claim Version
PVWTY : Warranty Claim Item
BGMK Master warranty header
BGMP Master warranty item
BGMS Text item master warranty
BGMT Master warranty text
BGMZ Warranty counter information
Purchasing Tables:
ABAP VS ABAP HR
ABAP HR forms an integral part of ABAP.
Modules in SAP-HR
Personnel Management (PA)
Recruitment (PB)
Infotype Defination:
Units of related information in the Human Resource
Management System.
Uses of Infotype:
To group related data fields together.
Maintain employee information by date.
Structures:
PNPCE
PAP
Personnel Administration,
Time Management & Payroll
Recruitment
PCH
:
Organizational Management,
Personal
Development,
Event Management
Description
SE30
(ABAP
Runtime
Analysis)
must
be
checked
to
measure/compare
program
performance/runtime if program has
multiple inefficient databases selects or
complicated internal table operations
Use transaction ST05 (SQL Trace) to see
what indices your database accesses are
using. Check these indices against your
where clause to assure they are
significant. Check other indices for this
table and where you have to change your
where clause to use it. Create new
indices if necessary, but do not forget to
check the impact by consulting onsite
coordinator.
TYPE (data element) command is used
while declaring the fields whenever
feasible instead of LIKE. Remember not
always the data element name matches
with the table field name
Internal Table is defined with TYPE
STANDARD TABLE OF & Work-Areas is
used instead of header lines
Global variables are minimized by
declaring local variables or by passing
variables
through
parameters
&
arguments
while
creating
internal
subroutine(s)
In SELECT statement, only the required
fields are selected in the same order as
they
reside
on
the
database
table/structure/view
For selecting single row from a database
table, SELECT UP to 1 Rows is used.
Select Single is used only when full
consumption
Sorted table is used for range accesses
involving table key or index accesses
Fields specified in the WHERE condition
with the critical operators NOT and <>
(negative SQL statements) cannot be
used for a search using database
indexes. Whenever possible formulate
SQL statements positively
When coding IF or CASE, testing
conditions are nested so that the most
frequently true conditions are processed
first. Also CASE is used instead of IF when
testing
multiple
fields
equal
to
something
LOOP AT ITAB INTO WORKAREA WHERE K
= XXX should be used instead of LOOP
AT ITAB INTO WORKAREA / CHECK ITAB-K
= XXX.
Also READ TABLE INTO WORKAREA
should be used instead of only READ
TABLE.
After the APPEND statement inside a
loop, the work area that has been
appended is cleared
Internal tables, Work areas & Global
Variables are freed when no longer
needed (e.g. using the FREE / REFRESH
command), especially when the tables
are large or the program is a batch
program
Do not delete the records of internal
table inside the Loop End loop.
ITAB
WHERE
DELETE ITAB.
ENDLOOP.
Use: DELETE
00001011.
ITAB
WHERE
EQUNR
data
from
the
locks
set
at
the
Ex: BDC,LSMW
SLIS:
SLIS is the predefined type-group which contains
predefined data types for Building ALV report. So when
you doing ALV , you need write this statement.
<b>Session:</b>
1.Asynchronous Processing.
2.Synchronous database updates.
3.Transfer of data for multiple transactions.
4.Best suited for bulk transfer.
5.Automatic errror handling.
6.SAP's standard approach for data transfer
using 'SAPLMGMM'
'0060'.
perform bdc_field
using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field
using 'BDC_OKCODE'
'/00'.
----
----
----
Insert field
----
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
10)LUW
11)implicit and explicit commit- update , inert and delete
call commit implicit no need to call explicit.
12)explicit and implicit enhancementImplicit- If you are using ECC6.0 or higher please do the
following steps
take a program in se38 ..Once you are inside in the top
menu
"EDIT" -> Enhancement options -> click on Show Implicit
Enhancement options
If there is an option available we can see it highlighted in
the program which will most probably at the bottom of the
program or in function modules whereit will appear like
if sy-subrc = 0.
"Does not enter the inner loop
v_kna1_index = sy-tabix.
loop at lt_kna1 into wa_kna1 from v_kna1_index. "Avoiding Where clause
if wa_kna1-kunnr <> wa_vbpa-kunnr. "This checks whether to exit out
exit.
endif.
****** Your Actual logic within inner loop ******
endloop. "KNA1 Loop
endif.
endloop. " VBPA Loop
Ex:
In Text Node
In Type Field select Include Text
Then u can see
Text Name
Text Object
Text ID
Language
Comparing Strings
Similarly to the special statements for
processing strings, there are special comparisons that you
can apply to strings with types C, D, N, and T. You can use
the following operators:
<operator>
Meaning
CO
Contains Only
CN
CA
Contains Any
NA
CS
Contains String
NS
contains No String
CP
Matches pattern
NP
Field Symbols:
Generally, we use the explicit work area to process the
internal table like appending & modifying records. We can
reduce the time and improve the performance of the
program by using the field-symbols. When we use the
LOOP construct with the explicit work area, system need
to engage the resources to put the required record in the
work area, process it and move it back to the table if the
needed. This additional processing time could be saved by
using the field-symbol. By using the field-symbols we can
save this additional time and improve the performance.
Field-symbols are similar to dereferenced pointers in C.
While using the field-symbol, system uses the same
memory allocated to that particular field in the record
instead of moving it to work area and processing.
work area:
LOOP AT ITAB INTO WA.
WA-FLAG = 'X'.
MODIFY ITAB FROM WA.
ENDLOOP.
Field Symbols;
LOOP AT ITAB ASSIGNING <WA>.
<WA>-FLAG = 'X'.
ENDLOOP.
Runtime: 91 microseconds