SlideShare a Scribd company logo
• Modularization techniques is used to avoid repetitive
coding.
• The advantage of modularization is:
1. Readability.
2. Code reusability.
3. Providing structure to our code.
• Organizing ABAP code can be done by using INCLUDE
reports and local MACRO's (DEFINE statement). Typical
examples can be found in Module Pools and Function
Groups with TOP-includes and special includes for PBO
events, PAI events etc.
• Processing blocks that are called from ABAP programs:
1. Subroutines
2. Function modules
3. Methods , using these 3 we can re-use the code.
1. Macros
2. Includes
3. Subroutines
4. Function modules
5. Methods
• If you want to reuse the same set of statements more
than once in a program, you can include them in a
macro.
• Syntax :
DEFINE <macro>.
<statements>
END-OF-DEFINITION.
• To use a macro, use the following form:
<macro> [<p1> <p2> ... <p9>].
• Ex :
DATA : result TYPE I,
N1 TYPE I VALUE 6,
N2 TYPE I VALUE 5.
DEFINE OPERATION.
RESULT = &1 &2 &3.
OUTPUT &1 &2 &3 RESULT.
END-OF-DEFINITION.
DEFINE OUTPUT.
WRITE :/ ' THE RESULT OF &1 &2 &3 =' , &4.
END-OF-DEFINITION.
OPERATION N2 + N1.
OPERATION N2 - N1.
OPERATION N2 * N1.
• Include programs allow you to manage complex
programs in an orderly way. Function groups and module
pools use include programs to store parts of the program
that belong together. The ABAP Workbench supports you
extensively when you create such complex programs by
creating the include programs automatically and by
assigning them unique names.
• Include Programs :
1. These are sub-programs which contains a set of re-
usable statements .
2. These programs can not be executed directly.
3. These include programs must be embedded inside a
main program for execution.
4. These programs dosen`t contain parameter interface,
that is no importing and exporting parameters.
• Syntax :
INCLUDE <include name>.
Example:
TYPES : BEGIN OF TY_MARA,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MEINS TYPE MARA-MEINS,
MBRSH TYPE MARA-MBRSH,
END OF TY_MARA.
DATA : IT_MARA TYPE TABLE OF TY_MARA.
DATA : WA_MARA TYPE TY_MARA.
SELECT MATNR MTART MEINS MBRSH FROM MARA INTO TABLE
IT_MARA.
LOOP AT IT_MARA INTO WA_MARA .
WRITE :/ WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MEINS,
WA_MARA-MTART.
ENDLOOP.
• Using include.
INCLUDE ZMAIN.
INCLUDE ZSELCTION.
INCLUDE ZPRINT.
• A subroutine is a block of code introduced by FORM and
concluded by ENDFORM.
• Subroutines are normally called internally, i.e. called from
the same program in which it is defined. But it is also
possible to call a subroutine from an external program.
• A subroutine can be called using PERFORM statement.
• 2 types :
1. External subroutines.
2. Internal subroutines.
1. Internal Subroutines :
Syntax :
PERFORM <subroutine name>.
• A subroutine can be defined using FORM and ENDFORM
statements.
Syntax :
FORM <subroutine name>.
...
ENDFORM.
Ex :
• Ex:
PERFORM sub_display.
FORM sub_display.
WRITE:/ 'Inside Subroutine'.
ENDFORM.
• 2. External Subroutine :
• Use to call external program.
• Syntax :
Perform <subroutine name > <program name>.
or
Perform < subroutine name > in program <program name>.
Ex:
Zprg1 :
FORM SUB1.
WRITE : ' SUBROUTINE 1'.
ENDFORM.
Zprg2 :
FORM SUB2.
WRITE : / ' SUBROUTINE 2'.
ENDFORM.
Zprg3 :
PERFORM SUB1(ZPRG1).
PERFORM SUB2 IN PROGRAM ZPRG2.
• Using , changing and Tables are used to pass the data in
subroutine.
• There are 3 ways of passing variables.
1. Pass by reference: The formal parameter has no
memory of its own. During a subroutine call, only the
address of the actual parameter is transferred to the
formal parameter. The subroutine works with the field
from the calling program. If the value of the formal
parameter changes, the contents of the actual
parameter in the calling program also change.
Syntax:
Ex:
DATA : NUM TYPE I VALUE 5,
FAC TYPE I VALUE 0.
PERFORM FACT USING NUM CHANGING FAC.
WRITE : / 'FACTORIAL' , NUM , '=' , FAC.
*&---------------------------------------------------------------------*
*& Form FACT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_NUM text
* <--P_FAC text
*----------------------------------------------------------------------*
form FACT using p_num TYPE I
changing p_fac TYPE I.
p_fac = 1.
WHILE p_NUM GE 1.
p_fac = p_fac * p_NUM.
p_NUM = p_NUM - 1.
ENDWHILE.
endform. " FACT
• For calling by reference, USING and CHANGING are
equivalent. For documentation purposes, you should use
USING for input parameters which are not changed in the
subroutine, and CHANGING for output parameters which
are changed in the subroutine.
• To avoid the value of an actual parameter being changed
automatically, you must pass it by value.
• Pass by value :
The formal parameter occupies its own memory space.
When you call the subroutine, the value of the actual
parameter is passed to the formal parameter. If the value of
the formal parameter changes, this has no effect on the
actual parameter.
• Syntax : Input parameters that passes the value.
• Output parameters that passes value :If the subroutine
concludes successfully, that is, when the ENDFORM
statement occurs, or when the subroutine is terminated
through a CHECK or EXIT statement, the current value
of the formal parameter is copied into the actual
parameter.
• If the subroutine terminates prematurely due to an error
message, no value is passed.
Syntax :
Ex:
DATA : NUM TYPE I VALUE 5,
FAC TYPE I VALUE 0.
PERFORM FACT USING NUM CHANGING FAC.
WRITE : / 'FACTORIAL' , NUM , '=' , FAC.
*&---------------------------------------------------------------------*
*& Form FACT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_NUM text
* <--P_FAC text
*----------------------------------------------------------------------*
form FACT using value(p_num) TYPE I
changing p_fac TYPE I.
p_fac = 1.
WHILE p_NUM GE 1.
p_fac = p_fac * p_NUM.
p_NUM = p_NUM - 1.
ENDWHILE.
endform. " FACT
• Passing Parameters by Value and Result:
• Pass by value and result is very similar to pass by value.
Like pass by value, a new memory area is allocated and
it holds an independent copy of the variable. It is freed
when the subroutine ends, and that is also when the
difference occurs.
• When the endform statement executes, it copies the
value of the local memory area back into the original
memory area. Changes to the parameter within the
subroutine are reflected in the original, but not until the
subroutine returns.
• The copy always takes place unless you leave the
subroutine by using one of two statements:
• stop
• message ennn
• Actual Parameters:
Actual parameters declared in main program.
• Formal Parameters :
Formal parameters declared in subroutine to store the values of
actual parameters.
--------------------------------------------------------------------------------
• Using in internal Subroutine:
Syntax :
Perform <subroutine name > using < actual parameters>.
Form <subroutine name > using <formal parameters>.
---
Endform.
• Ex:
DATA: A TYPE I VALUE 100,
B TYPE I VALUE 50,
C TYPE I.
C = A + B.
WRITE : / 'IN MAIN PROGRAM'.
WRITE : / A , '+' , B , '=' , C.
PERFORM SUB1 USING A B.
FORM SUB1 USING E TYPE I
F TYPE I.
DATA : Y TYPE I.
E = E / 2.
F = F / 2.
Y = E + F.
WRITE : / 'IN SUBROUTINE '.
WRITE: / E , '+' , F , '=' , Y.
ENDFORM.
• Formal parameters can have any valid ABAP data type.
• We can specify the type of a formal parameter using the TYPE or
LIKE.
• can specify the type either generically or in full.
• Generic type :
If you specify a generic type, the type of the formal parameter is either
partially specified or not specified at all. Any attributes that are not
specified are inherited from the corresponding actual parameter when
the subroutine is called.
• any, c, numeric, or index table.
• The actual parameter need only have the selection of attributes
possessed by the formal parameter. The formal parameter adopts its
remaining unnamed attributes from the actual parameter.
• Note that formal parameters inherit the attributes of their
corresponding actual parameters dynamically at runtime, and so they
cannot be identified in the program code.
• types: begin of t_line,
col1 type c,
col2 type c,
end of t_line.
data : wa type t_line,
itab type hashed table of t_line with unique key col1,
key(4) type c value 'col1'.
wa-col1 = 'x'.
wa-col2 = 'k'.
insert wa into table itab.
wa-col1 = 'y'.
wa-col2 = 'm'.
insert wa into table itab.
wa-col1 = 'z'.
wa-col2 = 'n'.
insert wa into table itab.
perform demo using itab.
*&---------------------------------------------------------------------*
*& Form DEMO
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_ITAB text
*----------------------------------------------------------------------*
form DEMO using p_itab type any table.
read table p_itab into wa with table key (key) = 'x'.
write : / wa-col1 , wa-col2.
endform. " DEMO
• Note: The table key is addressed dynamically in the subroutine.
• However, the static address
• READ TABLE p WITH TABLE KEY col1 = 'X' INTO wa.
• is syntactically incorrect, since the formal parameter P does not adopt the key of table itab until runtime.
• Type full : If you specify the type fully, all of the technical
attributes of the formal parameter are defined with the
subroutine definition.
• d, f, i, string, t, xstring.
• The technical attributes of the actual parameter must
match the attributes of the formal parameter.
• Typed parameters have three advantages:
• They are more efficient. Less CPU is needed to allocate
memory for a typed parameter than an untyped one.
• They help prevent coding errors. Because you cannot
pass a parameter of an incompatible type, the syntax
checker will point out the error to you if you try to pass an
incompatible parameter.
• They help prevent runtime errors. For example, if your
program accepts an untyped variable and performs an
arithmetic operation on it, it is possible to pass character
data to that subroutine. If this happens at runtime, a short
dump will result.
• Using in External Subroutines :
Syntax :
Perform < subroutine name > (program name ) using
<actual parameters>
or
Perform <subroutine name > in program(program name )
using
<actual parameters>
• Ex:
Zprg4:
DATA: A TYPE I VALUE 100,
B TYPE I VALUE 50,
C TYPE I.
C = A + B.
WRITE : / 'IN MAIN PROGRAM'.
WRITE : / A , '+' , B , '=' , C.
PERFORM SUB1 USING A B.
PERFORM SUB2 IN PROGRAM ZPRG2 USING A B.
FORM SUB1 USING E TYPE I
F TYPE I.
DATA : Y TYPE I.
E = E / 2.
F = F / 2.
Y = E + F.
WRITE : / 'IN SUBROUTINE '.
WRITE: / E , '+' , F , '=' , Y.
ENDFORM.
FORM SUB2 USING H TYPE I
J TYPE I.
DATA : K TYPE I.
H = H / 2.
J = J / 2.
K = H + J.
WRITE : / 'IN EXTERNAL SUBROUTINE : '.
WRITE: / H , '+' , J , '=' , K.
ENDFORM.
• You can use one of two methods to pass an internal table
to a subroutine:
1. Pass with header line
2. Pass body only
• If the internal table has a header line, method 1 passes
both the header line and the body to the subroutine.
Method 2 passes only the body to the subroutine.
• If the internal table doesn't have a header line, you can
also use both methods. However, method 1 will behave a
little differently-it will automatically create a header line
for the internal table within the subroutine.
• summarizes the effect of each of these methods on
internal tables with and without header lines.
• the syntax for each method of passing an internal table to
a subroutine.
• Table with header line.
DATA : ITAB LIKE MAKT OCCURS 5 WITH HEADER LINE .
SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR.
PERFORM S1 TABLES ITAB.
LOOP AT ITAB.
WRITE : / ITAB-MATNR , ITAB-SPRAS , ITAB-MAKTX.
ENDLOOP.
form S1 tables p_itab structure MAKT.
"Insert correct name for <...>.
READ TABLE p_itab INDEX 3.
IF SY-SUBRC = 0.
p_itab-MATNR = '000000027'.
MODIFY p_itab INDEX 3.
ENDIF.
endform. " S1
• How to Pass an Internal Table Without a Header Line to a Subroutine and
Automatically Create a Header Line.
TABLES : MAKT.
DATA : ITAB LIKE MAKT OCCURS 5 .
SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR.
PERFORM S1 TABLES ITAB.
LOOP AT ITAB INTO MAKT.
WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX.
ENDLOOP.
form S1 tables p_itab structure MAKT.
"Insert correct name for <...>.
READ TABLE p_itab INDEX 3.
IF SY-SUBRC = 0.
p_itab-MATNR = '000000027'.
MODIFY p_itab INDEX 3.
ENDIF.
endform. " S1
• How to Pass an Internal Table Without a Header Line to a Subroutine:
TABLES : MAKT.
DATA : ITAB LIKE MAKT OCCURS 5. " INTERNAL TABLES WITHOUT WORK AREA.
SELECT * FROM MAKT UP TO 5 ROWS INTO TABLE ITAB ORDER BY MATNR.
PERFORM : S1 USING ITAB,
S2 USING ITAB,
S3 USING ITAB,
PRINT TABLES ITAB.
END-OF-SELECTION.
WRITE : / 'END OF SELECTION'.
PERFORM PRINT TABLES ITAB.
*&---------------------------------------------------------------------*
*& Form S1
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_ITAB text
*----------------------------------------------------------------------*
form S1 using VALUE(p_itab) LIKE ITAB. " PASS BY VALUE
" ALSO YOU CAN USE LIKE ITAB[]
DATA : WA LIKE LINE OF P_ITAB.
READ TABLE P_ITAB INTO WA INDEX 1.
IF SY-SUBRC = 0.
WA-MATNR = '100'.
MODIFY P_ITAB FROM WA INDEX 1.
ENDIF.
endform. " S1
form S2 using p_itab LIKE ITAB. " CALL BY REFERENCE
DATA: WA LIKE LINE OF p_itab.
READ TABLE p_itab INTO WA INDEX 3.
IF SY-SUBRC = 0.
WA-MATNR = '300'.
MODIFY ITAB FROM WA INDEX 3.
ENDIF.
endform. " S2
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form S3 CHANGING VALUE(p_itab) LIKE ITAB. " CALL BY VALUE AND RESULT
DATA : WA LIKE LINE OF P_ITAB.
READ TABLE ITAB INTO WA INDEX 5.
IF SY-SUBRC = 0.
WA-MATNR = '700'.
MODIFY ITAB FROM WA INDEX 5.
ENDIF.
endform. " S3
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form PRINT tables p_itab structure MAKT.
"Insert correct name for <...>.
LOOP AT P_ITAB.
WRITE : / P_ITAB-MATNR , P_ITAB-SPRAS , P_ITAB-MAKTX.
ENDLOOP.
endform. " PRINT
• Passing Internal table to internal subroutine:
Syntax :
Perform <subroutine name> tables <internal table name>.
Form <subroutine name> tables <internal table name>.
-----
Endform.
TYPES : BEGIN OF T_MARA,
MATNR TYPE MARA-MATNR,
ERSDA TYPE MARA-ERSDA,
ERNAM TYPE MARA-ERNAM,
END OF T_MARA.
DATA: ITAB TYPE TABLE OF T_MARA.
PERFORM FETCH.
PERFORM DISPLAY TABLES ITAB.
FORM FETCH .
SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE ITAB.
ENDFORM.
FORM DISPLAY TABLES P_ITAB LIKE ITAB.
DATA : WA LIKE LINE OF ITAB.
LOOP AT P_ITAB INTO WA.
WRITE : / WA-MATNR , WA-ERSDA , WA-ERNAM.
ENDLOOP.
ENDFORM. " DISPLAY
• Passing Internal table to external subroutine :
• Syntax :
Perform <subroutine name>(program name) tables
<internal table name>
or
Perform <subroutine name> in program < program name
>tables <internal table name>
• Ex:
TABLES : MAKT.
DATA : ITAB LIKE MAKT OCCURS 5 .
SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR.
PERFORM S1 TABLES ITAB.
PERFORM S2(ZPRG2) TABLES ITAB.
LOOP AT ITAB INTO MAKT.
WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX.
ENDLOOP.
*&---------------------------------------------------------------------*
*& Form S1
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_ITAB text
*----------------------------------------------------------------------*
form S1 tables p_itab structure MAKT.
"Insert correct name for <...>.
READ TABLE p_itab INDEX 3.
IF SY-SUBRC = 0.
p_itab-MATNR = '000000027'.
MODIFY p_itab INDEX 3.
ENDIF.
endform. " S1
------------------------------------------------------------
REPORT ZPRG2.
*&---------------------------------------------------------------------*
*& Form S2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_ITAB text
*----------------------------------------------------------------------*
form S2 tables p_itab structure MAKT.
"Insert correct name for <...>.
READ TABLE p_itab INDEX 5.
IF SY-SUBRC = 0.
P_ITAB-MATNR = '0000'.
MODIFY p_itab INDEX 5.
ENDIF.
endform. " S2
• It is very similar to an external subroutine in 3 ways:
1. Both exist within an external program.
2. Both enable parameters to be passed and returned.
3. Parameters can be passed by value, by value and result, or by
reference.
• The major differences between function modules and external
subroutines:
1. Function modules have a special screen used for defining
parameters-parameters are not defined via ABAP/4 statements.
2. tables work areas are not shared between the function module and
the calling program.
3. Different syntax is used to call a function module than to call a
subroutine.
4. Leaving a function module is accomplished via the raise statement
instead of check, exit, or stop.
• Transaction code SE37 (Function Builder) .
• Function groups act as containers for function modules
that logically belong together.
• Function modules allow you to encapsulate and reuse
global functions in the SAP System.
• The SAP System contains several predefined functions
modules that can be called from any ABAP program.
• Function modules also play an important role during
updating and in interaction between different SAP
systems, or between SAP systems and remote systems
through remote communications.
• Function groups are containers for function modules. You
cannot execute a function group.
• Ex :function group name zfungroup .
• Give short description name and save .
• To activate the function group , go to SE38 .
• SAPL<function group name > and click on activate.
• System will create :
1. A main program.
2. A top include .
3. A UXX include .
4. A function module include.
• To create function module :
1. SE37
2. Function module and give function group name , short
description.
3. Save .
• To pass parameters to a function module, we must define
a function module interface.
1. Import parameters are variables or field strings that
contain values passed into the function module from the
calling program. These values originate outside of the
function module and they are imported into it.
• Export parameters are variables or field strings that
contain values returned from the function module. These
values originate within the function module and they are
exported out of it.
• Changing parameters are variables or field strings that
contain values that are passed into the function module,
changed by the code within the function module, and
then returned. These values originate outside the
function module. They are passed into it, changed, and
passed back.
• Table parameters are internal tables that are passed to
the function module, changed within it, and returned. The
internal tables must be defined in the calling program.
• An exception is a name for an error that occurs within a
function module. Exceptions are described in detail in the
following section.
• The methods for passing parameters to function modules
are very similar to those for passing parameters to
external subroutines.
• By default:
1. Import and export parameters are passed by value.
2. Changing parameters are passed by value and result.
3. Internal tables are passed by reference.
• We can cause import, export, and changing parameters
to be passed by reference by placing a tickmark in the
Reference check box on the Import/Export Parameters
screen.
• 3 types:
1. Normal functional Module: These are works within the
system.
2. Remote-Enabled Module : function module that can be
called from other SAP or non –SAP system. Ex : BAPI.
3. Update Function Module : It is basically used to bundle
distributed updates within different programs spots, to
one place (in FM). Update module in attributes of FM
simply flags the FM not to be executed directly ,
hence can be only be excuted in update work process
(using IN UPDATE TASK addition when calling FM) or
in dialog work process (using SET UPDATE TASK
LOCAL statement).
• Normal Function Module :
• REPORT ZSTESR.
• PARAMETERS : p_vbeln TYPE VBAK-VBELN.
• DATA : WA TYPE VBAK.
• CALL FUNCTION 'ZTESTFUN'
• EXPORTING
• P_VBELN = p_vbeln
• IMPORTING
• WA = WA
• .
• WRITE : / WA-VBELN , WA-ERDAT , WA-ERNAM , WA-
NETWR.
• Ex : 2.
• Message class (SE91).
• 5 types.
1. Error message. E
2. Information message. I
3. Status message. S
4. Warning message. W
5. Abort message. A
Syntax:
Message <message id >001(message class name) with ‘
<content>’ .
• Message can divide into 4 parts.
• To show values along with message use place holder.
• Ex:
Message E001(zmessage) with p_bzirk.
• In message class add using &.
• Maximum 4 values can display in message.
• REPORT ZCUST MESSAGE-ID ZMEESTAB.
• PARAMETERS : CUSTOM TYPE KNA1-KUNNR.
• DATA : ITAB TYPE TABLE OF VBAK,
• WA TYPE VBAK.
• START-OF-SELECTION.
• CALL FUNCTION 'ZTEST_TABLE'
• EXPORTING
• CUST = CUSTOM
• TABLES
• ITAB = ITAB[]
• EXCEPTIONS
• BLANK = 1
• NO_SALES = 2
• OTHERS = 3
• .
• IF SY-SUBRC = 1.
• MESSAGE I000.
• ELSEIF SY-SUBRC = 2.
• MESSAGE E001.
• ENDIF.
• LOOP AT ITAB INTO WA.
• WRITE : / WA-VBELN , WA-KUNNR ,WA-BSTNK, WA-BSTDK.
• ENDLOOP.
• tables : vbak.
data : itab type table of vbak.
select-options : k_vbeln for vbak-vbeln.
CALL FUNCTION 'ZTES_SEL'
EXPORTING
s_vbeln = k_vbeln
tables
itab = itab
.
LOOP AT itab into vbak.
write :/ vbak-VBELN , vbak-ERDAT, vbak-ERNAM , vbak-
SUBMI.
ENDLOOP.
•
• Field symbols are pointers in C.
• They are used to store the address of variable.
• Used to increase the performance .
• Syntax :
Field symbols <fs> [typing].
• Assigning is the keyword to assign the field symbol to
variable.
• Unassign is the keyword to unassign the field symbol to
variable.
• Ex:
tables : kna1.
types : begin of t_kna1,
kunnr type kna1-kunnr,
land1 type kna1-land1,
name1 type kna1-name1,
end of t_kna1.
data : it_kna1 type table of t_kna1.
field-symbols <fs> type t_kna1.
select-options : p_kunnr for kna1-kunnr.
perform fetch.
perform display.
form FETCH .
select kunnr land1 name1 from kna1 into table it_kna1 where kunnr in p_kunnr.
endform. " FETCH
*----------------------------------------------------------------------*
form DISPLAY .
LOOP AT it_kna1 assigning <fs>.
write : / <fs>-kunnr , <fs>-land1 , <fs>-name1.
ENDLOOP.
endform. " DISPLAY

More Related Content

What's hot

Top 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.comTop 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.com
bigclasses.com
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
Ankit Sharma
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
Pradipta Mohanty
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
Satheesh Kanna
 
Sap Adobe Form
Sap Adobe FormSap Adobe Form
Sap Adobe Form
Techneon AIS
 
ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
sapdocs. info
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
OOPS ABAP.docx
OOPS ABAP.docxOOPS ABAP.docx
OOPS ABAP.docx
JayantaPatra16
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
Jugul Crasta
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
scribid.download
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
sapdocs. info
 
Internal tables
Internal tables Internal tables
Internal tables
Jibu Jose
 
SAP-ABAP/4@e_max
SAP-ABAP/4@e_maxSAP-ABAP/4@e_max
SAP-ABAP/4@e_max
Bhuvnesh Gupta
 
Abap function module help
Abap function module helpAbap function module help
Abap function module helpKranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONKranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script formsKranthi Kumar
 

What's hot (20)

Top 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.comTop 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.com
 
Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Sap Adobe Form
Sap Adobe FormSap Adobe Form
Sap Adobe Form
 
ABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type GroupABAP Message, Debugging, File Transfer and Type Group
ABAP Message, Debugging, File Transfer and Type Group
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
OOPS ABAP.docx
OOPS ABAP.docxOOPS ABAP.docx
OOPS ABAP.docx
 
SAP Adobe forms
SAP Adobe formsSAP Adobe forms
SAP Adobe forms
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
ABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.infoABAP for Beginners - www.sapdocs.info
ABAP for Beginners - www.sapdocs.info
 
Internal tables
Internal tables Internal tables
Internal tables
 
SAP-ABAP/4@e_max
SAP-ABAP/4@e_maxSAP-ABAP/4@e_max
SAP-ABAP/4@e_max
 
Abap function module help
Abap function module helpAbap function module help
Abap function module help
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
Basic Debugging
Basic DebuggingBasic Debugging
Basic Debugging
 
07 sap scripts
07 sap scripts07 sap scripts
07 sap scripts
 

Viewers also liked

Passing table to subroutine
Passing table to subroutinePassing table to subroutine
Passing table to subroutineRajee Chandru
 
Sap abap-data structures and internal tables
Sap abap-data structures and internal tablesSap abap-data structures and internal tables
Sap abap-data structures and internal tables
Mustafa Nadim
 
0105 abap programming_overview
0105 abap programming_overview0105 abap programming_overview
0105 abap programming_overview
vkyecc1
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
Jefferson Mutuva
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
PeterHBrown
 
Sap abap ppt
Sap abap pptSap abap ppt
Sap abap pptvonline
 
Sap abap
Sap abapSap abap
Sap abap
Jugul Crasta
 
Steel India Limited Business Blue print
Steel India Limited Business Blue printSteel India Limited Business Blue print
Steel India Limited Business Blue printLav Memories
 
SAP ALE Idoc
SAP ALE IdocSAP ALE Idoc
SAP ALE Idoc
Jugul Crasta
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
sapdocs. info
 
Ale edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoAle edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoIvs Naresh
 
Fico bbp final
Fico bbp final Fico bbp final
Fico bbp final
poonam_sri
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questionsKranthi Kumar
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
sapdocs. info
 
Sap abap ale idoc
Sap abap ale idocSap abap ale idoc
Sap abap ale idocBunty Jain
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
Uttam Agrawal
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed Notes
Akash Bhavsar
 
ABAP Open SQL & Internal Table
ABAP Open SQL & Internal TableABAP Open SQL & Internal Table
ABAP Open SQL & Internal Table
sapdocs. info
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
Garuda Trainings
 

Viewers also liked (20)

Passing table to subroutine
Passing table to subroutinePassing table to subroutine
Passing table to subroutine
 
Sap abap-data structures and internal tables
Sap abap-data structures and internal tablesSap abap-data structures and internal tables
Sap abap-data structures and internal tables
 
0105 abap programming_overview
0105 abap programming_overview0105 abap programming_overview
0105 abap programming_overview
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
 
Maximizing SAP ABAP Performance
Maximizing SAP ABAP PerformanceMaximizing SAP ABAP Performance
Maximizing SAP ABAP Performance
 
Sap abap ppt
Sap abap pptSap abap ppt
Sap abap ppt
 
Sap abap
Sap abapSap abap
Sap abap
 
Steel India Limited Business Blue print
Steel India Limited Business Blue printSteel India Limited Business Blue print
Steel India Limited Business Blue print
 
SAP ALE Idoc
SAP ALE IdocSAP ALE Idoc
SAP ALE Idoc
 
Open SQL & Internal Table
Open SQL & Internal TableOpen SQL & Internal Table
Open SQL & Internal Table
 
Ale edi i_doc.sapdb.info
Ale edi i_doc.sapdb.infoAle edi i_doc.sapdb.info
Ale edi i_doc.sapdb.info
 
Fico bbp final
Fico bbp final Fico bbp final
Fico bbp final
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Badi document
Badi documentBadi document
Badi document
 
Sap abap ale idoc
Sap abap ale idocSap abap ale idoc
Sap abap ale idoc
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
SAP ABAP - Needed Notes
SAP   ABAP - Needed NotesSAP   ABAP - Needed Notes
SAP ABAP - Needed Notes
 
ABAP Open SQL & Internal Table
ABAP Open SQL & Internal TableABAP Open SQL & Internal Table
ABAP Open SQL & Internal Table
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
 

Similar to SAP Modularization techniques

Modularisation techniques new
Modularisation techniques newModularisation techniques new
Modularisation techniques new
Jeet Thombare
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statement
sapdocs. info
 
PSPC-UNIT-4.pdf
PSPC-UNIT-4.pdfPSPC-UNIT-4.pdf
PSPC-UNIT-4.pdf
ArshiniGubbala3
 
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...
Chapter 5   modularization & catch statement (paradiso-a45b1d's conflicted co...Chapter 5   modularization & catch statement (paradiso-a45b1d's conflicted co...
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...marco_paradiso
 
C program that prompts user to enter two floating point t.pdf
  C program that prompts user to enter two floating point t.pdf  C program that prompts user to enter two floating point t.pdf
C program that prompts user to enter two floating point t.pdf
aoneonlinestore1
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmig
Appili Vamsi Krishna
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.
NabeelaNousheen
 
Functions
FunctionsFunctions
CHAPTER THREE FUNCTION.pptx
CHAPTER THREE FUNCTION.pptxCHAPTER THREE FUNCTION.pptx
CHAPTER THREE FUNCTION.pptx
GebruGetachew2
 
user-definedfunctions-converted.pptx
user-definedfunctions-converted.pptxuser-definedfunctions-converted.pptx
user-definedfunctions-converted.pptx
ZaibunnisaMalik1
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONS
Dr.YNM
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on lineMilind Patil
 
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
info706022
 
CH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptxCH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptx
sangeeta borde
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
Arunkumar Gurav
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
RSathyaPriyaCSEKIOT
 
Unit 7. Functions
Unit 7. FunctionsUnit 7. Functions
Unit 7. Functions
Ashim Lamichhane
 
3 Function & Storage Class.pptx
3 Function & Storage Class.pptx3 Function & Storage Class.pptx
3 Function & Storage Class.pptx
aarockiaabinsAPIICSE
 
Ch9 Functions
Ch9 FunctionsCh9 Functions
Ch9 Functions
SzeChingChen
 
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptx
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptxChapter 1_C Fundamentals_HS_Tech Yourself C.pptx
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptx
ssuser71a90c
 

Similar to SAP Modularization techniques (20)

Modularisation techniques new
Modularisation techniques newModularisation techniques new
Modularisation techniques new
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statement
 
PSPC-UNIT-4.pdf
PSPC-UNIT-4.pdfPSPC-UNIT-4.pdf
PSPC-UNIT-4.pdf
 
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...
Chapter 5   modularization & catch statement (paradiso-a45b1d's conflicted co...Chapter 5   modularization & catch statement (paradiso-a45b1d's conflicted co...
Chapter 5 modularization & catch statement (paradiso-a45b1d's conflicted co...
 
C program that prompts user to enter two floating point t.pdf
  C program that prompts user to enter two floating point t.pdf  C program that prompts user to enter two floating point t.pdf
C program that prompts user to enter two floating point t.pdf
 
User defined functions in C programmig
User defined functions in C programmigUser defined functions in C programmig
User defined functions in C programmig
 
User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.User_Defined_Functions_ppt_slideshare.
User_Defined_Functions_ppt_slideshare.
 
Functions
FunctionsFunctions
Functions
 
CHAPTER THREE FUNCTION.pptx
CHAPTER THREE FUNCTION.pptxCHAPTER THREE FUNCTION.pptx
CHAPTER THREE FUNCTION.pptx
 
user-definedfunctions-converted.pptx
user-definedfunctions-converted.pptxuser-definedfunctions-converted.pptx
user-definedfunctions-converted.pptx
 
Verilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONSVerilog TASKS & FUNCTIONS
Verilog TASKS & FUNCTIONS
 
Lecture11 abap on line
Lecture11 abap on lineLecture11 abap on line
Lecture11 abap on line
 
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
 
CH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptxCH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptx
 
Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1Oracle plsql and d2 k interview question1
Oracle plsql and d2 k interview question1
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
 
Unit 7. Functions
Unit 7. FunctionsUnit 7. Functions
Unit 7. Functions
 
3 Function & Storage Class.pptx
3 Function & Storage Class.pptx3 Function & Storage Class.pptx
3 Function & Storage Class.pptx
 
Ch9 Functions
Ch9 FunctionsCh9 Functions
Ch9 Functions
 
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptx
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptxChapter 1_C Fundamentals_HS_Tech Yourself C.pptx
Chapter 1_C Fundamentals_HS_Tech Yourself C.pptx
 

More from Jugul Crasta

SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
Jugul Crasta
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
Jugul Crasta
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
Jugul Crasta
 
Basic programming
Basic programmingBasic programming
Basic programming
Jugul Crasta
 
Sap architecture
Sap architectureSap architecture
Sap architecture
Jugul Crasta
 
Sap erp introduction
Sap erp introductionSap erp introduction
Sap erp introduction
Jugul Crasta
 

More from Jugul Crasta (6)

SAP Smart forms
SAP Smart formsSAP Smart forms
SAP Smart forms
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
SAP Batch data communication
SAP Batch data communicationSAP Batch data communication
SAP Batch data communication
 
Basic programming
Basic programmingBasic programming
Basic programming
 
Sap architecture
Sap architectureSap architecture
Sap architecture
 
Sap erp introduction
Sap erp introductionSap erp introduction
Sap erp introduction
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

SAP Modularization techniques

  • 1.
  • 2. • Modularization techniques is used to avoid repetitive coding. • The advantage of modularization is: 1. Readability. 2. Code reusability. 3. Providing structure to our code. • Organizing ABAP code can be done by using INCLUDE reports and local MACRO's (DEFINE statement). Typical examples can be found in Module Pools and Function Groups with TOP-includes and special includes for PBO events, PAI events etc. • Processing blocks that are called from ABAP programs: 1. Subroutines 2. Function modules 3. Methods , using these 3 we can re-use the code.
  • 3. 1. Macros 2. Includes 3. Subroutines 4. Function modules 5. Methods
  • 4. • If you want to reuse the same set of statements more than once in a program, you can include them in a macro. • Syntax : DEFINE <macro>. <statements> END-OF-DEFINITION. • To use a macro, use the following form: <macro> [<p1> <p2> ... <p9>].
  • 5. • Ex : DATA : result TYPE I, N1 TYPE I VALUE 6, N2 TYPE I VALUE 5. DEFINE OPERATION. RESULT = &1 &2 &3. OUTPUT &1 &2 &3 RESULT. END-OF-DEFINITION. DEFINE OUTPUT. WRITE :/ ' THE RESULT OF &1 &2 &3 =' , &4. END-OF-DEFINITION. OPERATION N2 + N1. OPERATION N2 - N1. OPERATION N2 * N1.
  • 6. • Include programs allow you to manage complex programs in an orderly way. Function groups and module pools use include programs to store parts of the program that belong together. The ABAP Workbench supports you extensively when you create such complex programs by creating the include programs automatically and by assigning them unique names. • Include Programs : 1. These are sub-programs which contains a set of re- usable statements . 2. These programs can not be executed directly. 3. These include programs must be embedded inside a main program for execution. 4. These programs dosen`t contain parameter interface, that is no importing and exporting parameters.
  • 7. • Syntax : INCLUDE <include name>. Example: TYPES : BEGIN OF TY_MARA, MATNR TYPE MARA-MATNR, MTART TYPE MARA-MTART, MEINS TYPE MARA-MEINS, MBRSH TYPE MARA-MBRSH, END OF TY_MARA. DATA : IT_MARA TYPE TABLE OF TY_MARA. DATA : WA_MARA TYPE TY_MARA. SELECT MATNR MTART MEINS MBRSH FROM MARA INTO TABLE IT_MARA. LOOP AT IT_MARA INTO WA_MARA . WRITE :/ WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MEINS, WA_MARA-MTART. ENDLOOP.
  • 8. • Using include. INCLUDE ZMAIN. INCLUDE ZSELCTION. INCLUDE ZPRINT.
  • 9. • A subroutine is a block of code introduced by FORM and concluded by ENDFORM. • Subroutines are normally called internally, i.e. called from the same program in which it is defined. But it is also possible to call a subroutine from an external program. • A subroutine can be called using PERFORM statement. • 2 types : 1. External subroutines. 2. Internal subroutines.
  • 10. 1. Internal Subroutines : Syntax : PERFORM <subroutine name>. • A subroutine can be defined using FORM and ENDFORM statements. Syntax : FORM <subroutine name>. ... ENDFORM. Ex : • Ex: PERFORM sub_display. FORM sub_display. WRITE:/ 'Inside Subroutine'. ENDFORM.
  • 11. • 2. External Subroutine : • Use to call external program. • Syntax : Perform <subroutine name > <program name>. or Perform < subroutine name > in program <program name>.
  • 12. Ex: Zprg1 : FORM SUB1. WRITE : ' SUBROUTINE 1'. ENDFORM. Zprg2 : FORM SUB2. WRITE : / ' SUBROUTINE 2'. ENDFORM. Zprg3 : PERFORM SUB1(ZPRG1). PERFORM SUB2 IN PROGRAM ZPRG2.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. • Using , changing and Tables are used to pass the data in subroutine. • There are 3 ways of passing variables. 1. Pass by reference: The formal parameter has no memory of its own. During a subroutine call, only the address of the actual parameter is transferred to the formal parameter. The subroutine works with the field from the calling program. If the value of the formal parameter changes, the contents of the actual parameter in the calling program also change. Syntax:
  • 18. Ex: DATA : NUM TYPE I VALUE 5, FAC TYPE I VALUE 0. PERFORM FACT USING NUM CHANGING FAC. WRITE : / 'FACTORIAL' , NUM , '=' , FAC. *&---------------------------------------------------------------------* *& Form FACT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_NUM text * <--P_FAC text *----------------------------------------------------------------------* form FACT using p_num TYPE I changing p_fac TYPE I. p_fac = 1. WHILE p_NUM GE 1. p_fac = p_fac * p_NUM. p_NUM = p_NUM - 1. ENDWHILE. endform. " FACT
  • 19. • For calling by reference, USING and CHANGING are equivalent. For documentation purposes, you should use USING for input parameters which are not changed in the subroutine, and CHANGING for output parameters which are changed in the subroutine. • To avoid the value of an actual parameter being changed automatically, you must pass it by value.
  • 20. • Pass by value : The formal parameter occupies its own memory space. When you call the subroutine, the value of the actual parameter is passed to the formal parameter. If the value of the formal parameter changes, this has no effect on the actual parameter. • Syntax : Input parameters that passes the value.
  • 21. • Output parameters that passes value :If the subroutine concludes successfully, that is, when the ENDFORM statement occurs, or when the subroutine is terminated through a CHECK or EXIT statement, the current value of the formal parameter is copied into the actual parameter. • If the subroutine terminates prematurely due to an error message, no value is passed. Syntax :
  • 22. Ex: DATA : NUM TYPE I VALUE 5, FAC TYPE I VALUE 0. PERFORM FACT USING NUM CHANGING FAC. WRITE : / 'FACTORIAL' , NUM , '=' , FAC. *&---------------------------------------------------------------------* *& Form FACT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_NUM text * <--P_FAC text *----------------------------------------------------------------------* form FACT using value(p_num) TYPE I changing p_fac TYPE I. p_fac = 1. WHILE p_NUM GE 1. p_fac = p_fac * p_NUM. p_NUM = p_NUM - 1. ENDWHILE. endform. " FACT
  • 23. • Passing Parameters by Value and Result: • Pass by value and result is very similar to pass by value. Like pass by value, a new memory area is allocated and it holds an independent copy of the variable. It is freed when the subroutine ends, and that is also when the difference occurs. • When the endform statement executes, it copies the value of the local memory area back into the original memory area. Changes to the parameter within the subroutine are reflected in the original, but not until the subroutine returns. • The copy always takes place unless you leave the subroutine by using one of two statements: • stop • message ennn
  • 24. • Actual Parameters: Actual parameters declared in main program. • Formal Parameters : Formal parameters declared in subroutine to store the values of actual parameters. -------------------------------------------------------------------------------- • Using in internal Subroutine: Syntax : Perform <subroutine name > using < actual parameters>. Form <subroutine name > using <formal parameters>. --- Endform.
  • 25. • Ex: DATA: A TYPE I VALUE 100, B TYPE I VALUE 50, C TYPE I. C = A + B. WRITE : / 'IN MAIN PROGRAM'. WRITE : / A , '+' , B , '=' , C. PERFORM SUB1 USING A B. FORM SUB1 USING E TYPE I F TYPE I. DATA : Y TYPE I. E = E / 2. F = F / 2. Y = E + F. WRITE : / 'IN SUBROUTINE '. WRITE: / E , '+' , F , '=' , Y. ENDFORM.
  • 26. • Formal parameters can have any valid ABAP data type. • We can specify the type of a formal parameter using the TYPE or LIKE. • can specify the type either generically or in full. • Generic type : If you specify a generic type, the type of the formal parameter is either partially specified or not specified at all. Any attributes that are not specified are inherited from the corresponding actual parameter when the subroutine is called. • any, c, numeric, or index table. • The actual parameter need only have the selection of attributes possessed by the formal parameter. The formal parameter adopts its remaining unnamed attributes from the actual parameter. • Note that formal parameters inherit the attributes of their corresponding actual parameters dynamically at runtime, and so they cannot be identified in the program code.
  • 27. • types: begin of t_line, col1 type c, col2 type c, end of t_line. data : wa type t_line, itab type hashed table of t_line with unique key col1, key(4) type c value 'col1'. wa-col1 = 'x'. wa-col2 = 'k'. insert wa into table itab. wa-col1 = 'y'. wa-col2 = 'm'. insert wa into table itab. wa-col1 = 'z'. wa-col2 = 'n'. insert wa into table itab. perform demo using itab. *&---------------------------------------------------------------------* *& Form DEMO *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_ITAB text *----------------------------------------------------------------------* form DEMO using p_itab type any table. read table p_itab into wa with table key (key) = 'x'. write : / wa-col1 , wa-col2. endform. " DEMO • Note: The table key is addressed dynamically in the subroutine. • However, the static address • READ TABLE p WITH TABLE KEY col1 = 'X' INTO wa. • is syntactically incorrect, since the formal parameter P does not adopt the key of table itab until runtime.
  • 28. • Type full : If you specify the type fully, all of the technical attributes of the formal parameter are defined with the subroutine definition. • d, f, i, string, t, xstring. • The technical attributes of the actual parameter must match the attributes of the formal parameter. • Typed parameters have three advantages: • They are more efficient. Less CPU is needed to allocate memory for a typed parameter than an untyped one. • They help prevent coding errors. Because you cannot pass a parameter of an incompatible type, the syntax checker will point out the error to you if you try to pass an incompatible parameter. • They help prevent runtime errors. For example, if your program accepts an untyped variable and performs an arithmetic operation on it, it is possible to pass character data to that subroutine. If this happens at runtime, a short dump will result.
  • 29. • Using in External Subroutines : Syntax : Perform < subroutine name > (program name ) using <actual parameters> or Perform <subroutine name > in program(program name ) using <actual parameters>
  • 30. • Ex: Zprg4: DATA: A TYPE I VALUE 100, B TYPE I VALUE 50, C TYPE I. C = A + B. WRITE : / 'IN MAIN PROGRAM'. WRITE : / A , '+' , B , '=' , C. PERFORM SUB1 USING A B. PERFORM SUB2 IN PROGRAM ZPRG2 USING A B. FORM SUB1 USING E TYPE I F TYPE I. DATA : Y TYPE I. E = E / 2. F = F / 2. Y = E + F. WRITE : / 'IN SUBROUTINE '. WRITE: / E , '+' , F , '=' , Y. ENDFORM.
  • 31. FORM SUB2 USING H TYPE I J TYPE I. DATA : K TYPE I. H = H / 2. J = J / 2. K = H + J. WRITE : / 'IN EXTERNAL SUBROUTINE : '. WRITE: / H , '+' , J , '=' , K. ENDFORM.
  • 32. • You can use one of two methods to pass an internal table to a subroutine: 1. Pass with header line 2. Pass body only • If the internal table has a header line, method 1 passes both the header line and the body to the subroutine. Method 2 passes only the body to the subroutine. • If the internal table doesn't have a header line, you can also use both methods. However, method 1 will behave a little differently-it will automatically create a header line for the internal table within the subroutine.
  • 33. • summarizes the effect of each of these methods on internal tables with and without header lines. • the syntax for each method of passing an internal table to a subroutine.
  • 34.
  • 35. • Table with header line. DATA : ITAB LIKE MAKT OCCURS 5 WITH HEADER LINE . SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR. PERFORM S1 TABLES ITAB. LOOP AT ITAB. WRITE : / ITAB-MATNR , ITAB-SPRAS , ITAB-MAKTX. ENDLOOP. form S1 tables p_itab structure MAKT. "Insert correct name for <...>. READ TABLE p_itab INDEX 3. IF SY-SUBRC = 0. p_itab-MATNR = '000000027'. MODIFY p_itab INDEX 3. ENDIF. endform. " S1
  • 36. • How to Pass an Internal Table Without a Header Line to a Subroutine and Automatically Create a Header Line. TABLES : MAKT. DATA : ITAB LIKE MAKT OCCURS 5 . SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR. PERFORM S1 TABLES ITAB. LOOP AT ITAB INTO MAKT. WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX. ENDLOOP. form S1 tables p_itab structure MAKT. "Insert correct name for <...>. READ TABLE p_itab INDEX 3. IF SY-SUBRC = 0. p_itab-MATNR = '000000027'. MODIFY p_itab INDEX 3. ENDIF. endform. " S1
  • 37. • How to Pass an Internal Table Without a Header Line to a Subroutine: TABLES : MAKT. DATA : ITAB LIKE MAKT OCCURS 5. " INTERNAL TABLES WITHOUT WORK AREA. SELECT * FROM MAKT UP TO 5 ROWS INTO TABLE ITAB ORDER BY MATNR. PERFORM : S1 USING ITAB, S2 USING ITAB, S3 USING ITAB, PRINT TABLES ITAB. END-OF-SELECTION. WRITE : / 'END OF SELECTION'. PERFORM PRINT TABLES ITAB. *&---------------------------------------------------------------------* *& Form S1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_ITAB text *----------------------------------------------------------------------* form S1 using VALUE(p_itab) LIKE ITAB. " PASS BY VALUE " ALSO YOU CAN USE LIKE ITAB[] DATA : WA LIKE LINE OF P_ITAB. READ TABLE P_ITAB INTO WA INDEX 1. IF SY-SUBRC = 0. WA-MATNR = '100'. MODIFY P_ITAB FROM WA INDEX 1. ENDIF. endform. " S1
  • 38. form S2 using p_itab LIKE ITAB. " CALL BY REFERENCE DATA: WA LIKE LINE OF p_itab. READ TABLE p_itab INTO WA INDEX 3. IF SY-SUBRC = 0. WA-MATNR = '300'. MODIFY ITAB FROM WA INDEX 3. ENDIF. endform. " S2 *&---------------------------------------------------------------------* *----------------------------------------------------------------------* form S3 CHANGING VALUE(p_itab) LIKE ITAB. " CALL BY VALUE AND RESULT DATA : WA LIKE LINE OF P_ITAB. READ TABLE ITAB INTO WA INDEX 5. IF SY-SUBRC = 0. WA-MATNR = '700'. MODIFY ITAB FROM WA INDEX 5. ENDIF. endform. " S3 *&---------------------------------------------------------------------* *----------------------------------------------------------------------* form PRINT tables p_itab structure MAKT. "Insert correct name for <...>. LOOP AT P_ITAB. WRITE : / P_ITAB-MATNR , P_ITAB-SPRAS , P_ITAB-MAKTX. ENDLOOP. endform. " PRINT
  • 39. • Passing Internal table to internal subroutine: Syntax : Perform <subroutine name> tables <internal table name>. Form <subroutine name> tables <internal table name>. ----- Endform.
  • 40. TYPES : BEGIN OF T_MARA, MATNR TYPE MARA-MATNR, ERSDA TYPE MARA-ERSDA, ERNAM TYPE MARA-ERNAM, END OF T_MARA. DATA: ITAB TYPE TABLE OF T_MARA. PERFORM FETCH. PERFORM DISPLAY TABLES ITAB.
  • 41. FORM FETCH . SELECT MATNR ERSDA ERNAM FROM MARA INTO TABLE ITAB. ENDFORM. FORM DISPLAY TABLES P_ITAB LIKE ITAB. DATA : WA LIKE LINE OF ITAB. LOOP AT P_ITAB INTO WA. WRITE : / WA-MATNR , WA-ERSDA , WA-ERNAM. ENDLOOP. ENDFORM. " DISPLAY
  • 42. • Passing Internal table to external subroutine : • Syntax : Perform <subroutine name>(program name) tables <internal table name> or Perform <subroutine name> in program < program name >tables <internal table name>
  • 43. • Ex: TABLES : MAKT. DATA : ITAB LIKE MAKT OCCURS 5 . SELECT * FROM MAKT INTO TABLE ITAB UP TO 5 ROWS ORDER BY MATNR. PERFORM S1 TABLES ITAB. PERFORM S2(ZPRG2) TABLES ITAB. LOOP AT ITAB INTO MAKT. WRITE : / MAKT-MATNR , MAKT-SPRAS , MAKT-MAKTX. ENDLOOP. *&---------------------------------------------------------------------* *& Form S1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_ITAB text *----------------------------------------------------------------------* form S1 tables p_itab structure MAKT. "Insert correct name for <...>. READ TABLE p_itab INDEX 3. IF SY-SUBRC = 0. p_itab-MATNR = '000000027'. MODIFY p_itab INDEX 3. ENDIF. endform. " S1 ------------------------------------------------------------
  • 44. REPORT ZPRG2. *&---------------------------------------------------------------------* *& Form S2 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_ITAB text *----------------------------------------------------------------------* form S2 tables p_itab structure MAKT. "Insert correct name for <...>. READ TABLE p_itab INDEX 5. IF SY-SUBRC = 0. P_ITAB-MATNR = '0000'. MODIFY p_itab INDEX 5. ENDIF. endform. " S2
  • 45.
  • 46. • It is very similar to an external subroutine in 3 ways: 1. Both exist within an external program. 2. Both enable parameters to be passed and returned. 3. Parameters can be passed by value, by value and result, or by reference. • The major differences between function modules and external subroutines: 1. Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements. 2. tables work areas are not shared between the function module and the calling program. 3. Different syntax is used to call a function module than to call a subroutine. 4. Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
  • 47. • Transaction code SE37 (Function Builder) . • Function groups act as containers for function modules that logically belong together. • Function modules allow you to encapsulate and reuse global functions in the SAP System. • The SAP System contains several predefined functions modules that can be called from any ABAP program. • Function modules also play an important role during updating and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
  • 48. • Function groups are containers for function modules. You cannot execute a function group.
  • 49. • Ex :function group name zfungroup . • Give short description name and save . • To activate the function group , go to SE38 . • SAPL<function group name > and click on activate. • System will create : 1. A main program. 2. A top include . 3. A UXX include . 4. A function module include.
  • 50. • To create function module : 1. SE37 2. Function module and give function group name , short description. 3. Save . • To pass parameters to a function module, we must define a function module interface. 1. Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
  • 51. • Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it. • Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back. • Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program. • An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
  • 52. • The methods for passing parameters to function modules are very similar to those for passing parameters to external subroutines. • By default: 1. Import and export parameters are passed by value. 2. Changing parameters are passed by value and result. 3. Internal tables are passed by reference.
  • 53. • We can cause import, export, and changing parameters to be passed by reference by placing a tickmark in the Reference check box on the Import/Export Parameters screen.
  • 54. • 3 types: 1. Normal functional Module: These are works within the system. 2. Remote-Enabled Module : function module that can be called from other SAP or non –SAP system. Ex : BAPI. 3. Update Function Module : It is basically used to bundle distributed updates within different programs spots, to one place (in FM). Update module in attributes of FM simply flags the FM not to be executed directly , hence can be only be excuted in update work process (using IN UPDATE TASK addition when calling FM) or in dialog work process (using SET UPDATE TASK LOCAL statement).
  • 56.
  • 57. • REPORT ZSTESR. • PARAMETERS : p_vbeln TYPE VBAK-VBELN. • DATA : WA TYPE VBAK. • CALL FUNCTION 'ZTESTFUN' • EXPORTING • P_VBELN = p_vbeln • IMPORTING • WA = WA • . • WRITE : / WA-VBELN , WA-ERDAT , WA-ERNAM , WA- NETWR.
  • 58. • Ex : 2.
  • 59.
  • 60. • Message class (SE91).
  • 61. • 5 types. 1. Error message. E 2. Information message. I 3. Status message. S 4. Warning message. W 5. Abort message. A Syntax: Message <message id >001(message class name) with ‘ <content>’ .
  • 62. • Message can divide into 4 parts. • To show values along with message use place holder. • Ex: Message E001(zmessage) with p_bzirk. • In message class add using &. • Maximum 4 values can display in message.
  • 63. • REPORT ZCUST MESSAGE-ID ZMEESTAB. • PARAMETERS : CUSTOM TYPE KNA1-KUNNR. • DATA : ITAB TYPE TABLE OF VBAK, • WA TYPE VBAK. • START-OF-SELECTION. • CALL FUNCTION 'ZTEST_TABLE' • EXPORTING • CUST = CUSTOM • TABLES • ITAB = ITAB[] • EXCEPTIONS • BLANK = 1 • NO_SALES = 2 • OTHERS = 3 • . • IF SY-SUBRC = 1. • MESSAGE I000. • ELSEIF SY-SUBRC = 2. • MESSAGE E001. • ENDIF. • LOOP AT ITAB INTO WA. • WRITE : / WA-VBELN , WA-KUNNR ,WA-BSTNK, WA-BSTDK. • ENDLOOP.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68. • tables : vbak. data : itab type table of vbak. select-options : k_vbeln for vbak-vbeln. CALL FUNCTION 'ZTES_SEL' EXPORTING s_vbeln = k_vbeln tables itab = itab . LOOP AT itab into vbak. write :/ vbak-VBELN , vbak-ERDAT, vbak-ERNAM , vbak- SUBMI. ENDLOOP. •
  • 69. • Field symbols are pointers in C. • They are used to store the address of variable. • Used to increase the performance . • Syntax : Field symbols <fs> [typing]. • Assigning is the keyword to assign the field symbol to variable. • Unassign is the keyword to unassign the field symbol to variable.
  • 70. • Ex: tables : kna1. types : begin of t_kna1, kunnr type kna1-kunnr, land1 type kna1-land1, name1 type kna1-name1, end of t_kna1. data : it_kna1 type table of t_kna1. field-symbols <fs> type t_kna1. select-options : p_kunnr for kna1-kunnr. perform fetch. perform display. form FETCH . select kunnr land1 name1 from kna1 into table it_kna1 where kunnr in p_kunnr. endform. " FETCH *----------------------------------------------------------------------* form DISPLAY . LOOP AT it_kna1 assigning <fs>. write : / <fs>-kunnr , <fs>-land1 , <fs>-name1. ENDLOOP. endform. " DISPLAY