bdc demo on using table control
Post on 02-Jun-2018
219 Views
Preview:
TRANSCRIPT
-
8/10/2019 Bdc Demo on Using Table Control
1/75
Demo on using Table Control
By Raghav Vakada, MouriTech Solutions
*&---------------------------------------------------------------------*
*& Report Z_DB_TABLECONTROL **& *
*&---------------------------------------------------------------------**& *
*& **&---------------------------------------------------------------------*
REPORT Z_DB_TABLECONTROL.
TABLES: MARA.
CONTROLS MATERIAL TYPE TABLEVIEW USIN SCREEN !"#.TYPES: BEIN O$ ST_MARA%
MATNR TYPE MARA-MATNR% ERSDA TYPE MARA-ERSDA%
ERNAM TYPE MARA-ERNAM%
LAEDA TYPE MARA-LAEDA%
END O$ ST_MARA.DATA: IT_ST TYPE TABLE O$ ST_MARA%
WA_ST TYPE ST_MARA% IT_MARA TYPE MARA%
WA_MARA TYPE MARA% O_CODE LIE SY-UCOMM.
CALL SCREEN !"#.
*&---------------------------------------------------------------------*
*& Mo'()e V! INPUT*&---------------------------------------------------------------------*
* tet*----------------------------------------------------------------------*
MODULE V! INPUT.
CASE O_CODE.
W+EN ,SAVE,.WA_ST-MATNR MARA-MATNR.
WA_ST-ERSDA MARA-ERSDA.WA_ST-ERNAM MARA-ERNAM.
WA_ST-LAEDA MARA-LAEDA.MOVE-CORRESPONDIN WA_ST TO WA_MARA.
INSERT INTO MARA VALUES WA_MARA.
W+EN ,DELETE,.
WA_ST-MATNR MARA-MATNR.WA_ST-ERSDA MARA-ERSDA.
WA_ST-ERNAM MARA-ERNAM.WA_ST-LAEDA MARA-LAEDA.
MOVE-CORRESPONDIN WA_ST TO WA_MARA.
DELETE MARA $ROM WA_MARA.W+EN ,MODI$Y,.WA_ST-MATNR MARA-MATNR.
WA_ST-ERSDA MARA-ERSDA.WA_ST-ERNAM MARA-ERNAM.
WA_ST-LAEDA MARA-LAEDA.MOVE-CORRESPONDIN WA_ST TO WA_MARA.
MODI$Y MARA $ROM WA_MARA.
ENDCASE.
ENDMODULE. V! INPUT
-
8/10/2019 Bdc Demo on Using Table Control
2/75
*&---------------------------------------------------------------------*
*& Mo'()e E/IT INPUT
*&---------------------------------------------------------------------** tet
*----------------------------------------------------------------------*MODULE E/IT INPUT.
I$ O_CODE ,E/IT,.LEAVE PRORAM.
ENDI$.
ENDMODULE. E/IT INPUT
Cre0te 0 12ree3 45 3(64er !"# 03' pro78'e t9e o))o;83< 0ttr84(te1:
LAYOUT:
-
8/10/2019 Bdc Demo on Using Table Control
3/75
LM!T L"ST:
#LO$ LO%"&'
-
8/10/2019 Bdc Demo on Using Table Control
4/75
(&UT:
-
8/10/2019 Bdc Demo on Using Table Control
5/75
Display Logo on Screen
By Suresh Kumar Parvathaneni
You can display logo(s) on your screen using the custom control function. A custom control is an
area on the screen, created using the screen painter. Custom controls are used to embedcontrols. Container controls are instances of special global classes from the SAP ControlFramewor. !he global class for custom controls is called C"#$%C%S!'#C'!A&*+. !olin a custom control to a container control, pass the custom control name to theC'!A&*+#A* parameter of the container control constructor when you instantiate it. !hefollowing is a sample program to demonstrate the logo display using the custom control. !hisprogram was written in SAP.-C. esign a screen with the custom control, by nameP&C!%+*#C'!A&*+. &t has the following flow logic/
P+'C*SS 0*F'+* '%!P%!.'%"* S!A!%S#1211.3P+'C*SS AF!*+ &P%!.'%"* CAC*" A! *4&!5C'A.
!he $%& status SC+**211 has the functions 0AC6, *4&!, and CAC*" (all with type *).
&ode
+*P'+! 7S%+*S8#!*S! .
3 !ype declarations.....................
!YP*S pict#line(9:-) !YP* c.
3 data declarations......................
A!A /init,
container !YP* +*F !' cl#gui#custom#container,
editor !YP* +*F !' cl#gui#te;tedit,
picture !YP* +*F !' cl#gui#picture,
pict#tab !YP* !A0"* 'F pict#line,
url(9::) !YP* c.
CA"" SC+** 211.
3 ialog modules......................................
'%"* status#1211 '%!P%!.
S*! PF5S!A!%S
-
8/10/2019 Bdc Demo on Using Table Control
6/75
&F init is initial.
init =
-
8/10/2019 Bdc Demo on Using Table Control
7/75
Working with Check box (Module pool programming)
0y @iram Chellappa, ouri !ech Solutions
Scenario: We would design a screen with an input field for customer number and three
check boxes for Name, City and Address. Upon entering the customer number andselecting any of the check boxes, the corresponding data should be displayed
2) $o to !code S*B .
Clic on create and sae the program. De would write the code later.
9) $o to !code S*:2
-
8/10/2019 Bdc Demo on Using Table Control
8/75
&n the "ayout/
rag and drop the fields as shown below. (!he properties of each field can be seen on the righthand side of the screenshot)
-
8/10/2019 Bdc Demo on Using Table Control
9/75
Customer umber/
&nput field/
-
8/10/2019 Bdc Demo on Using Table Control
10/75
Chec bo;/ ame
Chec bo;/ C&!Y
-
8/10/2019 Bdc Demo on Using Table Control
11/75
Chec bo;/ Address
Push button/ isplay
-
8/10/2019 Bdc Demo on Using Table Control
12/75
Push button/ Cancel
) $o to S*B.
-
8/10/2019 Bdc Demo on Using Table Control
13/75
*nter the following code/
3E55555555555555555555555555555555555555555555555555555555555555555555533E +eport 7SC+**#*4!SC+** 3
3E 33E55555555555555555555555555555555555555555555555555555555555555555555533E 33E 33E5555555555555555555555555555555555555555555555555555555555555555555553
+*P'+! 7SC+**#*4!SC+** .A!A / 6%+ !YP* 6%+, A* !YP* C, C&!Y !YP* C, A+*SS !YP* C, '6#C'* "&6* SY5%C'.
A!A / A*2 !YP* A*2, '+!12 !YP* '+!12, A++ !YP* A++.A!A / D#A*2 !YP* A*2, D#'+!12 !YP* '+!12, D#A++ !YP* A++.
CA"" SC+** 211.
3E55555555555555555555555555555555555555555555555555555555555555555555533E odule C8*C6#@A"%*S &P%!3E55555555555555555555555555555555555555555555555555555555555555555555533 te;t
355555555555555555555555555555555555555555555555555555555555555555555553'%"* C8*C6#@A"%*S &P%!. &F '6#C'* *
-
8/10/2019 Bdc Demo on Using Table Control
14/75
*&F. &F C&!Y *
-
8/10/2019 Bdc Demo on Using Table Control
15/75
Demo on Tabstrips
0y @iram Chellappa, ouri !ech Solutions
In this document, we would work on creating a simple screen with a tabstrip on it.
$o to S*B !5code.
Create a 7 program.
Paste the below code in the source code.
REPORT ZTABSTRIP.
************************************************************************* DATA DECLARATIONS *
************************************************************************
DATA : NUMBER! TYPE I%
NUMBER= TYPE I%
RESULT TYPE I%N! TYPE I%N= TYPE I%
O_CODE LIE SY-UCOMM.
CONTROLS TABSTRIP TYPE TABSTRIP.
CALL SCREEN !##.CALL SCREEN !!#.
CALL SCREEN !"#.*&---------------------------------------------------------------------*
*& Mo'()e STATUS_#!## OUTPUT
-
8/10/2019 Bdc Demo on Using Table Control
16/75
-
8/10/2019 Bdc Demo on Using Table Control
17/75
ENDMODULE. STATUS_#!"# OUTPUT
ouble Clic on Gcall screen 211G.
*nter Short descriptions.
-
8/10/2019 Bdc Demo on Using Table Control
18/75
Come to Flow logic.
Clic on "ayout 0utton. or Press CtrlHFI.
Create A !ab Strip and Sub screens and place Sub screen in the appropriate tab strip.
-
8/10/2019 Bdc Demo on Using Table Control
19/75
*nter the name of the created !A0S!+&P and sub SC+**.
*nter the reJuired ame, !e;t, Function code.
-
8/10/2019 Bdc Demo on Using Table Control
20/75
*nter the '6#C'*.
-
8/10/2019 Bdc Demo on Using Table Control
21/75
ouble clic on CA"" SC+** 221.
$ie the short description.
Clic on SA@* , C8*C6, AC!&@A!* .
Clic on Flow logic and come to layout.
Create 9 &nput fields. *nter the name description and Format.
-
8/10/2019 Bdc Demo on Using Table Control
22/75
Clic on SA@* , C8*C6, AC!&@A!* .
ouble clic on CA"" SC+** 21.
-
8/10/2019 Bdc Demo on Using Table Control
23/75
$ie the S8'+! *SC+&P!&'. Clic on "AY'%! .
Create a te;t for +esult.
-
8/10/2019 Bdc Demo on Using Table Control
24/75
Clic on SA@* , C8*C6, AC!&@A!* .
Come 0ac !o Source Code.
Clic on SA@* , C8*C6, AC!&@A!* .
And *4*C%!*.
Result:
-
8/10/2019 Bdc Demo on Using Table Control
25/75
*nter the @alue on A = :1 and 0 = :1.
@iew the +esult on !ab9.
-
8/10/2019 Bdc Demo on Using Table Control
26/75
-
8/10/2019 Bdc Demo on Using Table Control
27/75
Working with Screen Painter
0y @iram Chellappa, ouri !ech Solutions
S&R! )A"!TR:*
creen painter is a tool in A!A" de# workbench used to create the screens using the
$%code &'(. )n the screen painter, you can define the following interface elements with
their associated attributes.(. )nput*+utput ields
-. ield Names
. Checkboxes/. 0adio !uttons
'. 1roup !oxes
2. ub screens.
3. "ushbuttons with No ixed "osition
and others
ST)*BY*ST) +MO #OR S&R! )A"!TR'
Create a 4 program in S-.
Click on a#e. We will write the code later in this.
-
8/10/2019 Bdc Demo on Using Table Control
28/75
1o to transaction S./.
&nter the created 0rogra1 na1eand screen nu12er.
&nter the short descri0tionand click on save'
-
8/10/2019 Bdc Demo on Using Table Control
29/75
Click on 3lo4logic tab.
Uncomment the statement MODULE STATUS_0100 .
-
8/10/2019 Bdc Demo on Using Table Control
30/75
5ouble click the 6 status_0100.
$he below screen will be displayed,
Click on yes.
ollowing pop%up screen appears. elect the 67demo8screen8painter9 6main program9and click on continue.
-
8/10/2019 Bdc Demo on Using Table Control
31/75
Click on yes.
creen would be displayed as follows:
-
8/10/2019 Bdc Demo on Using Table Control
32/75
Now come back to the transaction &'(. elect flow logic. Click in layout.
creen painter window will be displayed like this. ere we will design the re;uired
screen fields.
Clic on the middle icon dictionary K program fields window. 'r F-.
-
8/10/2019 Bdc Demo on Using Table Control
33/75
Following screen appears/
*nter the table name in the table field name.
Clic on get from dictionary.
-
8/10/2019 Bdc Demo on Using Table Control
34/75
Select the reJuired f ields from A+A table from dictionary. Clic on '6 or continue.
-
8/10/2019 Bdc Demo on Using Table Control
35/75
After placing the reJuired fields, you can iew the below screen.
Create the push button from the toolbo;.
-
8/10/2019 Bdc Demo on Using Table Control
36/75
Select the pushbutton, drag and drop the button onto the screen.
Create the other reJuired buttons in the same procedure mentioned aboe and assign the name,
te;t, and function code for each one.
-
8/10/2019 Bdc Demo on Using Table Control
37/75
After creating the screen clic on sae chec and actiate.
press !low logic button. .
Clic on tab *lement "ist enter '6#C'*.
-
8/10/2019 Bdc Demo on Using Table Control
38/75
Paste the below Code in created L program created earlier/
*&-------------------------------------------------------------------*
*& Report ZDEMO_SCREEN_PAINTER
*&*&-------------------------------------------------------------------*
*& De6o or S2ree3 P083ter.*& B5 V8?r0629e))0pp0.
*&-------------------------------------------------------------------*REPORT ZDEMO_SCREEN_PAINTER.
******************************************************************
* TABLE DECLARATIONS.****************************************************************** TABLES: MARA.
******************************************************************* DATA DECLARATIONS.
*****************************************************************DATA: MATNR TYPE MARA-MATNR%
ERSDA TYPE MARA-ERSDA% ERNAM TYPE MARA-ERNAM%
MTART TYPE MARA-MTART% MATL TYPE MARA-MATL%
DISPLAY TYPE C% SAVE TYPE C%
DELETE TYPE C%
CLEAR TYPE C%
E/IT TYPE C% O_CODE LIE SY-UCOMM.
CALL SCREEN !##.
MODULE STATUS_#!## OUTPUT.* SET P$-STATUS ,ZMENU,.
* SET TITLEBAR ,ZMENU_PAINTER,.
CASE SY-UCOMM.
-
8/10/2019 Bdc Demo on Using Table Control
39/75
W+EN ,E/IT,.
LEAVE PRORAM.
W+EN ,BAC,. LEAVE PRORAM.
W+EN ,DISPLAY,. SELECT SINLE ERSDA ERNAM MTART MATL $ROM MARA
INTO @MARA-ERSDA% MARA-ERNAM% MARA-MTART% MARA-MATLW+ERE MATNR MARA-MATNR.
W+EN ,CLEAR,.
CLEAR MARA.
ENDCASE.
ENDMODULE. STATUS_#!## OUTPUT "utput:
*nter aterial number 'n aterial Field. Clic on isplay.
aterial &nformation is displayed as shown below/
-
8/10/2019 Bdc Demo on Using Table Control
40/75
Display images on the screen
!y Aditya Niyogi,
-
8/10/2019 Bdc Demo on Using Table Control
41/75
Step %/ &n the P0' module of the screen, attach the following code. Please note that the obMectname is NwinnyO, please pass your own obMect name to the method/*&---------------------------------------------------------------------*
*& Mo'()e STATUS_### OUTPUT*&---------------------------------------------------------------------*
* tet
*----------------------------------------------------------------------*
MODULE STATUS_### OUTPUT. DATA: W_LINES TYPE I.
TYPES PICT_LINE@= TYPE C. DATA :
CONTAINER TYPE RE$ TO CL_UI_CUSTOM_CONTAINER%
EDITOR TYPE RE$ TO CL_UI_TE/TEDIT%
PICTURE TYPE RE$ TO CL_UI_PICTURE% PICT_TAB TYPE TABLE O$ PICT_LINE%
URL@= TYPE C. DATA: RAP+IC_URL@=.
DATA: BEIN O$ RAP+IC_TABLE OCCURS #% LINE@= TYPE /%
END O$ RAP+IC_TABLE.
DATA: L_RAP+IC_CONV TYPE I.
DATA: L_RAP+IC_O$$S TYPE I. DATA: RAP+IC_SIZE TYPE I.
DATA: L_RAP+IC_/STR TYPE /STRIN. .
CALL MET+OD CL_UI_C$W$LUS+. CREATE OBFECT:
-
8/10/2019 Bdc Demo on Using Table Control
42/75
CONTAINER E/PORTIN CONTAINER_NAME ,PICTURE_CONTAINER,%
PICTURE E/PORTIN PARENT CONTAINER.
CALL MET+OD CL_SS$_/S$_UTILITIESET_BDS_RAP+IC_AS_BMP E/PORTIN
P_OBFECT ,RAP+ICS, P_NAME ,WINNY,
P_ID ,BMAP, P_BTYPE ,BCOL,
RECEIVIN
P_BMP L_RAP+IC_/STR
* E/CEPTIONS* NOT_$OUND !
* INTERNAL_ERROR =* ot9er1 "
.
I$ SY-SUBRC G #.
* MESSAE ID SY-MSID TYPE SY-MSTY NUMBER SY-MSNO* WIT+ SY-MSV! SY-MSV= SY-MSV" SY-MSVH.
ENDI$. RAP+IC_SIZE /STRLEN@ L_RAP+IC_/STR .
L_RAP+IC_CONV RAP+IC_SIZE. L_RAP+IC_O$$S #.
W+ILE L_RAP+IC_CONV =.
RAP+IC_TABLE-LINE L_RAP+IC_/STR>L_RAP+IC_O$$S@=.
APPEND RAP+IC_TABLE. L_RAP+IC_O$$S L_RAP+IC_O$$S > =.
L_RAP+IC_CONV L_RAP+IC_CONV - =. ENDW+ILE.
RAP+IC_TABLE-LINE L_RAP+IC_/STR>L_RAP+IC_O$$S@L_RAP+IC_CONV.
APPEND RAP+IC_TABLE.
CALL $UNCTION ,DP_CREATE_URL, E/PORTIN
TYPE ,IMAE, SUBTYPE ,/-UNNOWN,
SIZE RAP+IC_SIZE LI$ETIME ,T,
TABLES
DATA RAP+IC_TABLE
C+ANIN URL URL.
CALL MET+OD PICTURE-LOAD_PICTURE_$ROM_URL E/PORTIN
URL URL.
CALL MET+OD PICTURE-SET_DISPLAY_MODE
E/PORTIN DISPLAY_MODE PICTURE-DISPLAY_MODE_$IT_CENTER.
ENDMODULE. STATUS_### OUTPUT
"utput/
-
8/10/2019 Bdc Demo on Using Table Control
43/75
-
8/10/2019 Bdc Demo on Using Table Control
44/75
Text dit control ! "sage and Demo
By Saikumar Bonakurthi, &nteg In!otech
As an A0AP deeloper, we all now that if we drop a field of type char and length 9:: in to theconentional screen painter it will be displayed in a single line. &t will not be good interface unlesswe proide a multi5line input field in the screen. !his can be achieed by te;t editor control.
!he following is our attempt to e;plain how to implement the te;t editor control on classicdynpros.
!e;t editor is displayed on screen using custom control. So we need a container for the customcontrol. And te;t editor control is implemented using class C"#$%!*4!*&!.
'ur declaration part contains
A!A/ "&*#"*$!8 !YP* & @A"%* 9:, *&!'+#C'!A&*+ !YP* +*F !' C"#$%C%S!'#C'!A&*+,
!*4!#*&!'+ !YP* +*F !' C"#$%!*4!*&!, !*4! !YP* S!+&$.
!hen call the screen (can be any number)
S!A+!5'F5S*"*C!&'. CA"" SC+**
-
8/10/2019 Bdc Demo on Using Table Control
45/75
%ncomment both P0' and PA& modules in flow logic screen
P+'C*SS 0*F'+* '%!P%!.'%"* S!A!%S#1211.3P+'C*SS AF!*+ &P%!.
'%"* %S*+#C'A#1211.
efine and implement both the modules in the main program itself.
&n P0' create obMect container *&!'+#C'!A&*+. !hen create te;t editor obMect bye;porting the container *&!'+#C'!A&*+.
C+*A!* '0>*C! *&!'+#C'!A&*+ *4P'+!&$ C'!A&*+#A* =
You can hide the toolbar and as well as status bar for the te;t editor control.
CA"" *!8' !*4!#*&!'+5?S*!#!''"0A+#'* *4P'+!&$ !''"0A+#'* = C"#$%!*4!*&!=?FA"S*.
CA"" *!8' !*4!#*&!'+5?S*!#S!A!%S0A+#'* *4P'+!&$ S!A!%S0A+#'* = C"#$%!*4!*&!=?FA"S*.
efine and create a $%& Status in the P0'.
S*! PF5S!A!%S
-
8/10/2019 Bdc Demo on Using Table Control
46/75
&n PA& of the screen 211, handle the sae and other user commands.
CAS* SY5%C'. D8*
-
8/10/2019 Bdc Demo on Using Table Control
47/75
!*4!#*&!'+ !YP* +*F !' C"#$%!*4!*&!, !*4! !YP* S!+&$.
S!A+!5'F5S*"*C!&'. CA"" SC+**
*4C*P!&'S C!"#*++'+ = 2 C!"#SYS!*#*++'+ = 9 C+*A!*#*++'+ = "&F*!&*#*++'+ = "&F*!&*#YP+'#YP+'#"&6 = :.
C+*A!* '0>*C! !*4!#*&!'+ *4P'+!&$ PA+*! = *&!'+#C'!A&*+ D'+D+AP#'* = C"#$%!*4!*&!=?D'+D+AP#A!#F&4*#P'S&!&' D'+D+AP#P'S&!&' = "&*#"*$!8
D'+D+AP#!'#"&*0+*A6#'* = C"#$%!*4!*&!=?!+%*.
3)8&* !''"0A+ A S!A!%S0A+
CA"" *!8' !*4!#*&!'+5?S*!#!''"0A+#'* *4P'+!&$ !''"0A+#'* = C"#$%!*4!*&!=?FA"S*.
CA"" *!8' !*4!#*&!'+5?S*!#S!A!%S0A+#'* *4P'+!&$ S!A!%S0A+#'* = C"#$%!*4!*&!=?FA"S*.
*&F.*'%"*. G S!A!%S#1211 '%!P%!3E55555555555555555555555555555555555555555555555555555555555555555555533E odule %S*+#C'A#1211 &P%!3E55555555555555555555555555555555555555555555555555555555555555555555533 te;t355555555555555555555555555555555555555555555555555555555555555555555553'%"* %S*+#C'A#1211 &P%!. CAS* SY5%C'. D8*
-
8/10/2019 Bdc Demo on Using Table Control
48/75
"*A@* P+'$+A. D8*
-
8/10/2019 Bdc Demo on Using Table Control
49/75
Splitter Controls and #raphs
By Swarna S, 'ata (onsultancy Services
*&-----------------------------------------------------------------*& Report Z_SPLIT_RAP+
*& A(t9or: S;0r30.S.@T0t0 Co31()t0325 Ser782e1* P(4)819e' 0t SAPTe293820).COM
*&-----------------------------------------------------------------
*& AS : S06p)e 2o'e or 2re0t83< 0 1p)8tter 12ree3 03'
-
8/10/2019 Bdc Demo on Using Table Control
50/75
832)('e 1tr(2t(re
-
8/10/2019 Bdc Demo on Using Table Control
51/75
RECEIVIN
CONTAINER CONT!.
*20))83< t9e 2o3t083er 6et9o' o t9e 1p)8tter 2)011*or t9e 1e2o3'
-
8/10/2019 Bdc Demo on Using Table Control
52/75
-
8/10/2019 Bdc Demo on Using Table Control
53/75
Screen shot of the splitter containers can be resized as shown below:
-
8/10/2019 Bdc Demo on Using Table Control
54/75
-
8/10/2019 Bdc Demo on Using Table Control
55/75
-
8/10/2019 Bdc Demo on Using Table Control
56/75
Table Control using Wi$ard in Module Pool Programming
0y @enatraman , &0
Prere)uisites:
!he readers must be able to create a module pool program and they should be familiar withscreen programming.
Purpose o! this tutorial:
!his is to demonstrate the step by step tutorial of how to mae use of table control with wiLard,where the deeloperOs effort to write code with table control without wiLard is aoided.
Introduction:
!able control with wiLard is the control proided by SAP, in which the users are not needed tocode separately for table control operations. &t generates automatically system generated code
for the following table control operations.
2. &nsertion9. eletion. Scrolling. First:. "ast-. e;tI. PreiousB. SelectR. Select all21. eselect22. eselect all
Step 2/ Create an internal table and wor area, which we are going to deploy in table control.
Step 9/ Create a screen called NR111O.
-
8/10/2019 Bdc Demo on Using Table Control
57/75
&nput the screen number as R111.
Fill up the screen attribute alues.
-
8/10/2019 Bdc Demo on Using Table Control
58/75
Step / $o to the layout of the screen, where you can find the table control with wiLard. rag anddrop the table control with wiLard to the layout of the screen.
'nce you drag and drop the control a popup will appear.
Press Continue. &n the ne;t screen enter the table control name as N!0C#R111O or your ownname.
-
8/10/2019 Bdc Demo on Using Table Control
59/75
&n the ne;t screen you input the internal table and wor area which has been created earlier.
ote/ 0efore it is done, you must actiate the page, in which you hae declared the internal tableand wor area. !hen only this table control screen will tae its properties.
!he ne;t screen will automatically retriee the fields aailable in the internal table and show.De hae to select those fields, which and all should be displayed in table control.
-
8/10/2019 Bdc Demo on Using Table Control
60/75
&f you hae declared any character field for table control line selection, that should not beselected in this screen.
Select the inputKoutput attributes as N&nput controlO and gie the field for selection of tablecontrol rows. Select the multiple line selection.
-
8/10/2019 Bdc Demo on Using Table Control
61/75
Clic on Continue. !he table control with auto generated code will automatically becreated.
!his will automatically create P0' E PA& modules for table control operations.
-
8/10/2019 Bdc Demo on Using Table Control
62/75
Step / For testing this tutorial, write a simple Juery to populate the internal table of tablecontrol and test the input controls associated with it.
-
8/10/2019 Bdc Demo on Using Table Control
63/75
!he e;pected output will be lie
Summary :
As a result of this tutorial, the user will be able to
2. %se table control with wiLard in module pool programming and
9. Create table control operations with system generated code.
-
8/10/2019 Bdc Demo on Using Table Control
64/75
%pen the text editor when click the button in table control
0y Phani iwaar, Yash !echnologies
!he reJuirement is for eery combination of endor and contract number, payment term te;tshould be maintained in the 75!able. !his payment term te;t is opened in te;t editor so that usercan enter long te;t (more than :11 characters). !o achiee this, we put the button in paymentterm te;t field in table control and wheneer user clics on button te;t editor will be opened.
Step2/ Create 75!able with name 7C'!+AC! with the following fields.
Step9/ Create the table maintenance generator for the aboe created table 7C'!+AC! (Pleasereferhttp:**www.saptechnical.com*'utorials*+B+P*'ableaintenance*demo.htm )
Step/ $o to S1 and proide the !ableK@iew name created and clic on aintain button asshown.
http://www.saptechnical.com/Tutorials/ABAP/TableMaintenance/demo.htmhttp://www.saptechnical.com/Tutorials/ABAP/TableMaintenance/demo.htmhttp://www.saptechnical.com/Tutorials/ABAP/TableMaintenance/demo.htm -
8/10/2019 Bdc Demo on Using Table Control
65/75
!he following screen will appear.
Step/ ow we hae to add the field payment term te;t as follows.
ow open the table 7C'!+AC! in change mode and go to table maintenance generator asshown.
-
8/10/2019 Bdc Demo on Using Table Control
66/75
!he following screen will appear.
ow clic on the -n.r.'e/tbutton. !hen the following screen appears.
-
8/10/2019 Bdc Demo on Using Table Control
67/75
Clic on the ain programbutton.
ow go to screen 1112 as shown.
-
8/10/2019 Bdc Demo on Using Table Control
68/75
ow go to layout editor.
rag and drop the button and te;t field to layout editor from the panel as shown.
Properties of the button/
-
8/10/2019 Bdc Demo on Using Table Control
69/75
Properties of te;t field
Sae and actiate the screen painter.
ow go to !low logic.
-
8/10/2019 Bdc Demo on Using Table Control
70/75
Drite the following code.
*----------------------------------------------------------------*
***INCLUDE LZCONTRACTI#! .*----------------------------------------------------------------*
*&--------------------------------------------------------------*
*& Mo'()e TE/T_EDITOR INPUT
*&---------------------------------------------------------------** tet
*----------------------------------------------------------------*MODULE tet_e'8tor INPUT.
DATA
-
8/10/2019 Bdc Demo on Using Table Control
71/75
I$ "@!#. !"@!#.
CONCATENATE
-
8/10/2019 Bdc Demo on Using Table Control
72/75
* tet
*-----------------------------------------------------------------*
* -- p! tet* G-- p= tet
*----------------------------------------------------------------*$ORM e3ter_1t_9e0' .
1t_t9e0'-t'o4e2t ,ZTEST_ID,. 1t_t9e0'-t'8' ,ZTS, .
1t_t9e0'-t'1pr01 15-)03
-
8/10/2019 Bdc Demo on Using Table Control
73/75
* tet
*----------------------------------------------------------------*
* -- p! tet* G-- p= tet
*----------------------------------------------------------------*$ORM 2re0te_tet .
CALL $UNCTION ,CREATE_TE/T, E/PORTIN
8' ,ZTS,
)03*C! & using the transaction code S&01as follows.
&nitial screen of SAPscript Settings (S*I:) is as shown below.
Clic on (hangebutton.
!he following screen appears.
-
8/10/2019 Bdc Demo on Using Table Control
74/75
Select create button to create obMect.
Clic on "kbutton.
!he following screen appears.
Clic on the SA@* button.
Clic on !e;t &s button to create !e;t &.
-
8/10/2019 Bdc Demo on Using Table Control
75/75
Clic on Create button.
Clic on ' button.
Clic on SA@* button.
Step:/ *;ecute the transaction code created for table maintenance.
Clic on the button aintain !e;t then te;t editor will be opened.
top related