Post on 18-Feb-2018
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 1/13
Defining a Range in Module Pool Program
By Kishor Kumar, Oxient Technologies
Introduction: This article will discuss in detail how to create a Range in Module Pool Program.
Requirement and scenario: Before breaking the ice, I would like to describe kernel of the topic.
When we create a range, at the same time create an internal table then it have four components
• Sign
• Option
• Low
• High
These all four component have the corresponding value.
!teps to be followed:
!tep " : #reate a program in !$%& and program t'pe should be (odule pool )( t'pe* after that save +activate the program .
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 2/13
!tep: -o to transaction !$" and write the same program name which 'ou have created in !$%& andthen create screen for program.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 3/13
!tep%: !elect !creen t'pe as /ormal !creen, after that click 0a'out button
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 4/13
Step4: Choose one text field, two input/output field and box for background.
nd gi!e the input field name similar to MLOW and MHIGH.
!tep : /ow go to !$"" and create search help for input1output field .
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 5/13
Step " : Create search help #
!tep2: /ow go to !$"340a'out34 and fill this search help name on both input1outputattribute windows.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 6/13
!tep&: /ow go 5low 0ogic and double click on module 6ser7command78999.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 7/13
!tep 8 : efine user7command78999 in main program .
Step10 : Write the following code…………..*&---------------------------------------------------------------------*
*& Module Pool ZSAPMZ_A!"#_$!_MPP
*&
*&---------------------------------------------------------------------**&
*&*&---------------------------------------------------------------------*
P%"AM ZSAPMZ_A!"#_$!_MPP.'P#-P%%(S:S($S.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 8/13
A)(#S : MAA .
AA :M(%W+1,M/$"/+1,.
AA :M(%W1+1,M/$"/1+1,.AA: )#"$! % _MAA %2S 1
MA! 'P# MAA-MA! #SA 'P# MAA-#SA
#!AM 'P# MAA-#!AM PSA 'P# MAA-PSA
M)S/ 'P# MAA-M)S/
#! % _MAA.
AA : )#"$! % A!"# %2S 0 S$"!+1
%P$%!+3 (%W+1,
/$"/+1,
#! % A!"# .
AA : _A 'P# A)(# % S($S_$#(A_A(4 W_A 'P# S($S_$#(A_A(4
W_(A'% 'P# S($S_(A'%2_A(4 .*&---------------------------------------------------------------------*
*& Module 2S#_%MMA!_5000 $!P2*&---------------------------------------------------------------------*
* te6t
*----------------------------------------------------------------------*
M%2(# 2S#_%MMA!_5000 $!P2. AS# S'-2%MM.
W/#! 77.8-%# % #!# )2%! A(( 2!$%! 7%!4#S$%!_#9$_MA!1_$!P27 8%!4#S$%! %2$!# % M(%W
#9P%$!"
$!P2 M(%W
$MP%$!" %2P2 M(%W1
#9#P$%!S (#!"/_#% 1
%/#S 3 .
$ S'-S2) ;< 0.
M#SSA"# $ S'-MS"$ 'P# S'-MS"' !2M)# S'-MS"!%
W$/ S'-MS"41 S'-MS"43 S'-MS"4= S'-MS"4>. #!$.
A(( 2!$%! 7%!4#S$%!_#9$_MA!1_$!P278%!4#S$%! %2$!# % M/$"/ #9P%$!"
$!P2 M/$"/
$MP%$!"
%2P2 M/$"/1 #9#P$%!S
(#!"/_#% 1
%/#S 3 . $ S'-S2) ;< 0.
M#SSA"# $ S'-MS"$ 'P# S'-MS"' !2M)# S'-MS"!%
W$/ S'-MS"41 S'-MS"43 S'-MS"4= S'-MS"4>.
#!$.******************************************************************
* (%"$A((' )2$( A $!#!A( A)(# +A!"#******************************************************************
A!"#-S$"! 7$7. 8 $ % #
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 9/13
A!"#-%P$%! 7)7.
A!"#-(%W M(%W1 .
A!"#-/$"/ M/$"/1 . APP#! A!"# .8APP#! AA $! $!#!A( A)(#
****************************************************************** P#%M #/_AA .
P#%M $SP(A'_AA . #!AS#.
#!M%2(#. 8 2S#_%MMA!_5000 $!P2
*&---------------------------------------------------------------------*
*& or? #/_AA*&---------------------------------------------------------------------*
* te6t*----------------------------------------------------------------------*
* --< p1 te6t
* ;-- p3 te6t
*----------------------------------------------------------------------*%M #/_AA .
S#(# MA! #!AM
#SA PSA
M)S/
%M MAA
$!% %#SP%!$!" $#(S % A)(# _MAA W/## MA! $! A!"# .
#!%M. 8 #/_AA*&---------------------------------------------------------------------*
*& or? $SP(A'_AA
*&---------------------------------------------------------------------*
* te6t*----------------------------------------------------------------------*
* --< p1 te6t* ;-- p3 te6t
*----------------------------------------------------------------------*%M $SP(A'_AA .
(#A4# % ($S-P%#SS$!" .
W_A-A)!AM# 7MAA7.
W_A-$#(!AM# 7MA!7. W_A-S#(#9_M 7M@teri@l !o7.
APP#! w_fc@t to t_c@t . W_A-A)!AM# 7MAA7.
W_A-$#(!AM# 7#SA7.
W_A-S#(#9_M 7re@ted %n7.
APP#! w_fc@t to t_c@t . W_A-A)!AM# 7MAA7.
W_A-$#(!AM# 7#!AM7.
W_A-S#(#9_M 7!@?e of Peron7. APP#! w_fc@t to t_c@t . W_A-A)!AM# 7MAA7.
W_A-$#(!AM# 7PSA7.
W_A-S#(#9_M 7M@inten@nce t@tu7.
APP#! w_fc@t to t_c@t . W_A-A)!AM# 7MAA7.
W_A-$#(!AM# 7M)S/7. W_A-S#(#9_M 7$ndutrB ector7.
APP#! w_fc@t to _A.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 10/13
W_(A'%-Z#)A 797.
W_(A'%-%(W$/_%P$M$Z# 797.
A(( 2!$%! 7#2S#_A(4_"$_$SP(A'7 #9P%$!"
* $_$!#A#_/#C 7 7* $_)'PASS$!"_)2# 7 7
* $_)2#_A$4# 7 7* $_A(()AC_P%"AM 7 7
* $_A(()AC_P_SA2S_S# 7 7
* $_A(()AC_2S#_%MMA! 7 7
* $_A(()AC_%P_%_PA"# 7 7* $_A(()AC_/M(_%P_%_PA"# 7 7
* $_A(()AC_/M(_#!_%_($S 7 7* $_S22#_!AM# 7MAA7
* $_)AC"%2!_$ 7 7
$_"$_$(# 7MA#$A( #P%7
* $_"$_S#$!"S $S_(A'%2 W_(A'%
$_$#(A _A* $_#9(2$!"
* $_SP#$A(_"%2PS * $_S%
* $_$(#
* $S_S#(_/$#
* $_#A2( 797* $_SA4# 7 7
* $S_4A$A! * $_#4#!S
* $_#4#!_#9$
* $S_P$!
* $S_#P#P_$ * $_S##!_SA_%(2M! 0
* $_S##!_SA_($!# 0* $_S##!_#!_%(2M! 0
* $_S##!_#!_($!# 0* $_/M(_/#$"/_%P 0
* $_/M(_/#$"/_#! 0
* $_A(4_"AP/$S
* $_/'P#($!C * $_A_$#(A
* $_#9#P_D$!% * $_SA(4_2((S##!_AAP#
* $MP%$!"
* #_#9$_A2S#_)'_A((#
* #S_#9$_A2S#_)'_2S# A)(#S
_%2A) _MAAEF
* #9#P$%!S* P%"AM_#% 1* %/#S 3
.
$ S'-S2) ;< 0.
* M#SSA"# $ S'-MS"$ 'P# S'-MS"' !2M)# S'-MS"!%* W$/ S'-MS"41 S'-MS"43 S'-MS"4= S'-MS"4>.
#!$.#!%M. 8 $SP(A'_AA
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 11/13
!tep"": ;fter coding save + activate the program.
!tep": go to T3code !$8% and create T3code for program <!;=(<7R;/-$7I/7(==
;nd fill required information
!tep"%: Write program name and screen no of program and save it .
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 12/13
!tep"> : $?ecute the t3code <(==7R;/-$.
7/23/2019 ABAP_Defining a Range in Module Pool Program
http://slidepdf.com/reader/full/abapdefining-a-range-in-module-pool-program 13/13
!tep": ;fter filling (aterial /o range, =ress Enter Button.
Result: