Вы находитесь на странице: 1из 15

inding out the BADIs to implement to full fill the requirement of adding custom fields to the

Vendor Master.
SPRO ! "ogistics ! #eneral ! Business Partner ! Vendors ! $ontrol ! Adoption of
$ustomers O%n Master Data &ields 'last Option( ! Prepare Modification&ree )nhancement
of Vendor Master Record '$lic* on IM# Acti+it, Documentation(

Information :
Prepare Modification&ree )nhancement of Vendor Master Record
Use
-ou can enhance the master data of ,our customers and +endors '&I and "O( in order to
add additional information. .o do this/ ,ou de+elop su0screens to %hich ,ou add the required
fields. -ou can access ,our su0screens in the master records of the 0usiness partner +ia
integrated 0uttons1 there/ ,our screens are integrated on ta0 page. -ou can assign up to 23 ta0
pages4su0screens to each 0utton. 5ith a change of release/ upgrade/ or a support pac*age/ ,ou
cop, ,our o%n su0screens and data and the rele+ant ta0les %ithout ha+ing to ma*e an,
modifications.
In this IM# acti+it,/ ,ou prepare the modificationfree transfer of enhancements from ,our
0usiness partner masters.
Activities
In the follo%ing/ 60usiness partner6 indicates 6customer6 and 6+endor6.
7. $hoose )dit screen group 80usiness partner!/ and define a t%o digit alphanumeric *e,
and a name for each of the required screen groups. .he name of the screen group appears
later in the form of a push0utton on the initial screens of ,our 0usiness partner master
data.
.o use ,our enhancement/ that is/ ,our 0utton is +isi0le/ acti+ate it %ith the BADI Processing
Master Data )nhancements %ith method $9)$:;ADD;O<;A$.IV) 'see step 2 0elo%(.
7. $hoose <ame ta0 page/ and for each screen group/ enter the data required for the ta0
pages.
&or each screen group ,ou can create a ma=imum of 23 ta0 pages.
<ote the follo%ing>
5ith Ordinal num0er/ ,ou control the order of the ta0 pages.
5ith the &unction code/ at runtime/ the s,stem identifies the ta0 page selected 0, the user.
.he <ame appears as heading on the ta0 page.
.he Icon 'optional( appears ne=t to the heading on the ta0 page.
-ou call up the ta0 pages in the 0usiness partner master data +ia the corresponding
push0utton. )ach ta0 page contains ,our customerspecific su0screen on %hich ,ou can process
,our 0usiness partner data.
-ou integrate ,our su0screens using the filterdependent BADI $ustomer Su0screens1 choose
,our screen group as filter 'see step 2 0elo%(.
7. .o lin* ,our su0screens and data to the standard application/ use the follo%ing BADIs>
Business AddIn> Processing Master Data )nhancements
'$?S.OM)R;ADD;DA.A4V)<DOR;ADD;DA.A(
Business AddIn> $ustomer Su0screens
'$?S.OM)R;ADD;DA.A;$S4V)<DOR;ADD;DA.A;$S(
Business AddIn> Processing Master Data )nhancements %ith Batch Input
'$?S.OM)R;ADD;DA.A;BI4V)<DOR;ADD;DA.A;BI(
-ou can access the BADIs in the Implementation #uide directl, under this IM# acti+it,1 for
more information see the documentation for the rele+ant BADIs and their methods.
Now Go back to the IMG Screen. Actual activities Starts here!
&@
$lic* on continue on the Information POP?P as*ing for $aution> .he ta0le is cross
client
AA Define a t%o digit alphanumeric *e, and a name for each of the required screen groups.
AA .his name of the screen group appears later in the form of a P?S9B?..O< on the
initial screens of ,our 0usiness partner master data.
POST View after doing this activity in XK! "XK#$ XK%&
Once Added the screen group. Select the custom screen group from the list and then dou0le clic*
on the "a0el .a0 Pages Item from the tree of Dialog structures.

'ere yo( add yo(r own c(sto) tabs* yo( can add as )any n()ber of tabs yo(
need$ as of now we are adding on+y one tab with tab,na)e-.escri/tion
"0a/tion-1ab+ed& 0(sto) Tab.
A. 5e %ill see in later Screen shots ho% it loo*s li*e in Vendor Master B
.his is the ta0 to %hich %ill need to add to A su0screen '-). .O $R)A.)( %hich %ill 0e
displa,ed upon clic*ing the custom screen group 0utton from the +endor master ta0.
AAA <o%/ -our screen group and the ta0 to %hich ,ou need to add the su0screen is read,.
AA "ets create the su0screen %hich ,ou need to add to created ta0.
A &or this -ou need to create a functionpoll '5ill e=plain %h, &unction Pool and its
Importance(.
"ets create it using the .code SE80,

7. So )nter the name of the functionpool 4 function group and create it.
3. $reate the su0 screen CDDD'an, num0er( %hich should not collide %ith the screen
num0ers in the main program of E:D74D34D2

.

2. On the su0screen add the custom fields li*e> -ou can add man, fields ,ou %ant.
F. .his is the screen field %e add is enhanced structure item of "&A7.
)nhancement of structure is as fallo%s >
$lic* on the append structure form the goto menu item
&rom the pop up clic* on the $reate 0utton to add the custom structure.
#i+e the name of the structure to append.
Add the custom fields > GG&I)M;.-P) onl, field no% 0ut can add man, fields here.
Acti+ate the structure and then use this element to insert it on to the screen.

H. <o% go to the program logic %rite the logic for this particular screen.
"i*e 0elo% > sa, ,ou %ant to ma*e all these items to 0e in displa, mode %hen ,ou are in E:D2
and rest for E:D7 and E:D3 it should 0e in )dit mode.
$ode>
MOD?") STATUS_1100 O?.P?..
A S). P&S.A.?S I========I.
A S). .I.")BAR I===I.
A IMPOR. act .O g;a*t,p &ROM M)MOR- ID IGGA$.I. J chec* the e=ported acti+it, t,pe A and change
accordingl, the screen A elements.
A "OOP A. S$R))<.
A I& g;a*t,p K IAI. 6 Displa,
A screeninput K IDI.
A )<DI&.
A MODI&- S$R))<.
A )<D"OOP.


"OOP A. S$R))<.
I& SYTCODE )L IE:D2I.6 Displa,
screeninput K IDI.
)"S)I& SYTCODE )L IE:D7I OR SYTCODE )L IE:D3I.
screeninput K I7I.
)<DI&.
MODI&- S$R))<.
)<D"OOP.
)<DMOD?"). 6 S.A.?S;77DD O?.P?.

M. 2s we are going to work with 132# Str(ct(re at r(n ti)e yo( need to add this +ine
.AB")S> LFA1. To the f(nction /oo+s TOP Inc+(de.
N. <o% Implement the fist BADI> V)<DOR;ADD;DA.A
#oto S)7@.
A. )nter the definition'Interface( of the BADI as V)<DOR;ADD;DA.A . O $lic* on
displa,.
In the 42.I dis/+ay screen. 0+ick on I)/+e)entation )en( Ite) O choose the
dis/+ay to see a++ the i)/+e)entations. 4(t now 0+ick on 0reate o/tion fro) the
)en( +ist.
5nter the Na)e of the 42.I I)/+e)entation na)e "2ny Na)e& and c+ick on P Mark.
6. In this 42.I enhance-rede7ne the )ethod CHECK_ADD_ON_ACTIVE in yo(r
s(bc+ass-I)/+e)entation
0ode8
method IF_EX_VENDOR_ADD_DATAQCHECK_ADD_ON_ACTIVE.
6 If the screen group is ur custom screen group ,ou ha+e to acti+ate it manuall,
if I_SCREEN_GROUP K IG$I. 6 chec* the import parameter for the screen group name.
e_add_on_ac!"e K IEI. 6 Acti+ate it 0, setting the return parameter
endif.
endmethod.
AA <o% ,our screen group is acti+e. So no% ,ou can see the screen group as 0utton on =*D74D34D2 %ith a 0utton and
%hen u clic* on the 0utton %ill ta*e dump screen 0ecause the screen su0screen is still not added to the ta0 that ta0
is not called ,et.

C. <o% Implement the other BADI VENDOR_ADD_DATA_CS:
#oto S)7@.
)nter the definition'Interface( of the BADI as VENDOR_ADD_DATA_CS
In the 42.I dis/+ay screen. 0+ick on I)/+e)entation )en( Ite) O choose the
dis/+ay to see a++ the i)/+e)entations. 4(t now 0+ick on 0reate o/tion fro) the
)en( +ist.

7D. In this Implementation %e %ill call the screen %hen the screen group is our custom screen
group.
here %e handle the each indi+idual custom screen groups.
.o do this1 In this BADI %e %ill enhance4redefine the method GET_TAXI_SCREEN in ,our
su0class4Implementation
$OD)>
method IF_EX_VENDOR_ADD_DATA_CSQGET_TAXI_SCREEN.
I& #$_"a$ K IG$I 6$hec* the import parameter screen group if it is ur custom screen group name
A<D !_a%!_#code K IG&IRMI. 6And import parameter &$OD) for .a0 > for custom .a0 &unction code
6 If these t%o are true then
e_&c'een K ICDDDI. 6set the changing parameter su0screen to custom su0screen num0er u created in &#
GMM;G$
e_('o)'a* K ISAP"GMM;G$I. 6&unction #roup 'Main program name of the function group GMM;G$(
e_+eade'&c'een_$a,o- K I I.6&ilter if u %ant to ma*e it. as of no% its glo0al.
)<DI&.
endmethod.

77. <o% ,our screen field is read, and displa,ed on E:D74D34D2 0ut to SET/ET the +alue of
these elements ,ou ha+e to redefine4enhance4implement the methods S).;DA.A to set the +alue
entered to "&A74 'all other runtime structure( runtime structure and #).;DA.A to get data from
the "&A74 'all other runtime structure( runtime structure and set it to the screen element from this
same BADI Implementation.
S).;DA.A> Method implementation.
In this %e ha+e onl, the import parameters %hich are structures and to set the runtime
structure li*e "&A7. 5e ha+e to do it from outside so to do this %e %ill e=port +alue from
this method through the &M call %hich is %ritten in the &unction #roup GMM;G$ and in
%hich %e %ill set the +alue 'ne% +alue entered on the screen( to "&A7 runtime structure.
$OD)>
method IF_EX_VENDOR_ADD_DATA_CSQSET_DATA.
$A"" &?<$.IO< IG;S).;&IRM;.-P)I
)EPOR.I<#
!"_..#!'*_,(e K I_LFA1..#!'*_,(e J sent here
.
endmethod.
$ode>
!_SET_"IR#_T$%E:
&?<$.IO< /_SET_FIR0_TYPE.
A6
A6A6"ocal Interface>
A6 IMPOR.I<#
A6 R)&)R)<$)'IV;GG&IRM;.-P)( .-P) GG&IRM;.-P)
A6
6 "&A7GG&IRM;.-P) is the screen field name.
LFA1//FIR0_TYPE K IV_//FIR0_TYPE. Jset here
)<D&?<$.IO<. #).;DA.A> Method implementation.
In this method %e ha+e to set the su0screen +alue to the +alue %hich is there in the
"&A7. But here I ha+e access to the s;lfa7 %hich is screen structure/ 0ut to set the +alue
of this entr, %e need access to this runtime structure so %e %ill do it %ith the help of &M
%hich is %ritten in the &unction #roup GMM;G$.
$OD)>
method IF_EX_VENDOR_ADD_DATA_CSQGET_DATA.
DA.A $"_..#!'*_,(e .-P) ..#!'*_,(e.
$A"" &?<$.IO< IG;#).;&IRM;.-P)I
IMPOR.I<#
EV_//FIR0_TYPE K $"_..#!'*_,(e
.
S_LFA1..#!'*_,(e K $"_..#!'*_,(e.
endmethod.
$OD)>
!_ET_"IR#_T$%E:
&?<$.IO< /_GET_FIR0_TYPE.
A6
A6A6"ocal Interface>
A6 )EPOR.I<#
A6 R)&)R)<$)')V;GG&IRM;.-P)( .-P) GG&IRM;.-P)
A6
6"&A7GG&IRM;.-P) is the screen field name.
EV_//FIR0_TYPE K LFA1//FIR0_TYPE.
)<D&?<$.IO<.

So 0, no% ,ou got to *no% %h, %e added the ta0les statement > .AB")S > "&A7. .o the main program of
the &unction #roup GMM;G$.
73. So no% E:D3 loo* li*e.
72. .o add more fields follo% the same procedure from 0eginning or can add custom fields to
e=isting enhanced structure and can add the fields as elements and do the coding in set an get
methods and &unction Modules corresponding to the set and get methods .

Вам также может понравиться