You are on page 1of 38

Sales data flow based on User Input using FPM Framework

This document shows the sales data flow from Header to Invoice details based on User Input using FPM
Framework.
Step 1: Create Webdynpro Component
Step 2: Create context in component controller
Create a node !"# with cardinalit$
%..n
Click on add attributes from structure.
Create node !"P with Cardinalit$ %..n
Click on add attributes from structure and select the fields in the below screen shot

Create node #&' with Cardinalit$ (..n
Click on add attributes from structure and select the fields in the below screen shot

Create node !F" with Cardinalit$ (..n
Click on add attributes from structure and select the fields in the below screen shot
Create node I'&IC) with Cardinalit$ (..n and Click on &# .
*ight click on I'&IC) '&+) and select add attributes from structure. ,ive structure name -IP. and select the
fields in the below screen shot


*ight click on I'&IC) '&+) and select add attributes from structure. ,ive structure name -IP. and select the
fields in the below screen shot

Step 3: Create views and windows
Create / iews to the corresponding 0indows as below1
iew 0indow
-I')2IT)M -I')2IT)M20I'
C&'+ITI&'. C&'+ITI&'.20I'
+)-I)*I). +)-I)*I).20I'
I'&IC) I'&IC)20I'


Step 4: Map the context of controller to the View eader and desi!n the layo"t as follows
Step #:
$mbed the Select%options Standard component in the &sed components
,o to Component Controller and give global attribute M2H"'+-)* with ref to IF20+2.)-)CT2&PTI&'.
Cop$ the below code in the 0++&I'IT3 4 method of component controller
method WDDOINIT .
+"T" lo_cmp_usage T5P) *)F T& if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF lo_cmp_usage->has_actie_component( ) I. I'ITI"-.
lo_cmp_usage->c!eate_component( ).
)'+IF.
+"T" lo_inte!facecont!olle! T5P) *)F T& iwci_wd!_select_options .
lo_inte!facecont!olle! = wd_this->wd_cpifc_select_options( ).
wd_this->m_handle! = lo_inte!facecont!olle!->init_selection_sc!een(
).
data"
lt_!ange T5P) *)F T& data#
lt_!ange$ T5P) *)F T& data.
C"-- M)TH&+ wd_this->m_handle!->c!eate_!ange_ta%le
)6P&*TI',
i_t&pename = 7#&*,7
8 i2length 9
8 i2decimals 9
!eceiing
!t_!ange_ta%le = lt_!ange
.
C"-- M)TH&+ wd_this->m_handle!->c!eate_!ange_ta%le
)6P&*TI',
i_t&pename = 7T0),7
!eceiing
!t_!ange_ta%le = lt_!ange$
.
C"-- M)TH&+ wd_this->m_handle!->add_selection_field
)6P&*TI',
i_id = 7#&*,7
8 i2within2block 9 MC2I+2M"I'2!-&C#
8 i2description 9
8 i2is2auto2description 9 "!"P2T*U)
it_!esult = lt_!ange
.
C"-- M)TH&+ wd_this->m_handle!->add_selection_field
)6P&*TI',
i_id = 7T0),7
8 i2within2block 9 MC2I+2M"I'2!-&C#
8 i2description 9
8 i2is2auto2description 9 "!"P2T*U)
it_!esult = lt_!ange$.
endmethod.
,o to window and embed the .tandard 0I'+2.)-)CTI&'2.C*))' into I)0 C&'T"I')* of H)"+)* view
Step ': Map the context of controller to the View ()*$%)+$M and desi!n the layo"t as follows
Step ,: Map the context of controller to the View C-*.)+)-* and desi!n the layo"t as follows
Step /: Map the context of controller to the View .$()V$0)$S and desi!n the layo"t as follows
Step 1: Map the context of controller to the View )*V-)C$ and desi!n the layo"t as follows
Step 12: $mbed the Standard )nterface )3%34M%5&)(.)*6%5(-C7 in o"r component implemented
interfaces
Click on *eimplement button.
,o and check in the component controller methods tab all the interface methods will be available .
Step 11: Save all and activate the Component
Step 12: Create 8pplication and save it in 4ac9a!e:
,ive the Component name1 FPM2,"F2C&MP&')'T
Interface iew 1 FPM20I'+&0
+efault 1 +)F"U-T
'ote1
0hatever application $ou had created that will not be available in 0ebd$npro Component it will be available in
Package.
Step 11: -pen the 4ac9a!e and expand the Web.ynpro applications folder
.elect the 0ebd$npro application and right click on it select create:change configuration

Step 12: 8pplication and Component Confi!"ration Settin!s to display the application "sin! 34M
,ive configuration I+ as ;."-).2"PP-C&'FI,
Click on Create.
'ew 0indow will open.
Here give the name for Component Configuration 3an$ name41;."-).2C&MP2C&'FI,
Click on .ave and click on ,o to Component Configuration automaticall$ it navigates to another window.


Click on create and new window will open and save the component configuration in the package.

'ew 0indow for configuration for particular component will open with +efault *oadMap with buttons.
.elect the Main .tep From Hierarch$ and Properties will available in right side.
,ive Mainstep I+ 1Header +etails and Mainstep 'ame1 Header +etails
In *ight .ide< click on "dd Main .tep button automaticall$ one more road map will be added change the Main .tep
id and Main .tep name1 -ine Items
"dd few more steps same as above for Conditions iew< +eliveries iew and Invoice iew and screenshot as
follows1
.ave the Configuration and .elect the Header +etails .tep and Click on "dd Toolbar )lement.
'ew Popup will be open. "pplication .pecific buttons will be there.
.elect the &ther Function !utton and click on &k.
*epeat above process one more time for one more Function.
.elect the buttons in the application title and Change the button properties
For %st !utton1
,ive -abel H)"+)* +)T"I-. and FPM )vent I+ H)"+)*
For =nd !utton1
,ive -abel IT)M +)T"I-. and FPM )vent I+ -I')2IT)M
.elect the -ine Items .tep and Click on "dd Toolbar )lement.
'ew Popup will be open. "pplication .pecific buttons will be there.
.elect the &ther Function !utton and click on &k.
.elect the button in the application title and Change the button properties
,ive -abel Condition and FPM )vent I+ C&'+ITI&'

.elect the C&'+ITI&'. .tep and Click on "dd Toolbar )lement.
'ew Popup will be open. "pplication .pecific buttons will be there.
.elect the &ther Function !utton and click on &k.
.elect the button in the application title and Change the button properties
,ive -abel +eliver$ and FPM )vent I+ +)-I)*5
.elect the +)-I)*I). .tep and Click on "dd Toolbar )lement.
'ew Popup will be open. "pplication .pecific buttons will be there.
.elect the &ther Function !utton and click on &k.
.elect the button in the application title and Change the button properties
,ive -abel I'&IC) and FPM )vent I+ I'&IC)
.ave the Configuration +ata.
)>pand the Header +etails .tep from hierarch$. .elect UI!! and change the properties.
,ive Component 'ame 1? 5our Component 'ame@ 3here 5H%%AB2."-).2+)T"I-.4
0indow 'ame 1 ?0indow name@ 3here 5H%%AB2."-).2+)T"I-.4
*epeat the same for all the Main .teps as follows.
Step 13: 4rocess the $vents of 34M in Component Controller
,o to Component controller and +ouble Click on Process2)vent Method
Cop$ the below code in Process2)vent Method.
.ave and activate it.

method '(O)*++_*,*NT .
+"T" lo_nd_%a- T5P) *)F T& if_wd_conte.t_node.
+"T" lo_el_%a- T5P) *)F T& if_wd_conte.t_element.
+"T" ls_%a- T5P) wd_this->element_%a-.
lo_nd_%a- = wd_conte.t->get_child_node( name = wd_this->wdct._%a- ).
lo_el_%a- = lo_nd_%a-->get_element( ).
lo_el_%a-->get_static_att!i%utes(
IMP&*TI',
static_att!i%utes = ls_%a- ).
+"T" lo_nd_%ap/ T5P) *)F T& if_wd_conte.t_node.
+"T" lo_el_%ap/ T5P) *)F T& if_wd_conte.t_element.
+"T" ls_%ap/ T5P) wd_this->element_%ap.
lo_nd_%ap/ = wd_conte.t->get_child_node( name = wd_this->wdct._%ap ).
lo_el_%ap/ = lo_nd_%ap/->get_element( ).
lo_el_%ap/->get_static_att!i%utes(
IMP&*TI',
static_att!i%utes = ls_%ap/ ).
C".) io_eent->m_eent_id.
0H)' 7H)"+)*7.
+"T" "
lo_nd_%a-$ T5P) *)F T& if_wd_conte.t_node#
lt_%a- T5P) wd_this->elements_%a-#
lt_!ange T5P) *)F T& data#
lt_!ange$ T5P) *)F T& data#
lo_fpm T5P) *)F T& if_fpm.
FI)-+-+012O3+"
4fs> T5P) "'5 T"!-) #
4fs5> T5P) "'5 T"!-).
lo_nd_%a-$ = wd_conte.t->get_child_node( 7!"#7 ).
C"-- M)TH&+ wd_this->m_handle!->get_!ange_ta%le_of_sel_field
)6P&*TI',
i_id = 7#&*,7
!eceiing
!t_!ange_ta%le = lt_!ange
.
"..I,' lt_!ange->6 to 4fs>.
C"-- M)TH&+ wd_this->m_handle!->get_!ange_ta%le_of_sel_field
)6P&*TI',
i_id = 7T0),7
!eceiing
!t_!ange_ta%le = lt_!ange$
.
"..I,' lt_!ange$->6 to 4fs5>.
.)-)CT 6
F*&M %a-
into )O((*+'ONDIN7 FI)-+. &F T"!-) lt_%a-
0H)*) -o!g in 4fs>
&* tweg in 4fs5>.
lo_nd_%a-$->%ind_ta%le( lt_%a- ).
0H)' 7-I')2IT)M7.
lo_fpm = cl_fpm_facto!&=>get_instance( ).
lo_fpm->!aise_eent_%&_id( cl_fpm_eent=>7)_*,*NT_N*8T_+T*' ).
+"T""
lo_nd_%ap T5P) *)F T& if_wd_conte.t_node#
lt_%ap T5P) wd_this->elements_%ap.
lo_nd_%ap = wd_conte.t->get_child_node( 7!"P7 ).
.)-)CT 6
F*&M %ap I'T& )O((*+'ONDIN7 FI)-+. &F T"!-) lt_%ap
0H)*) ,2*3N )C ls_%a--%eln.
lo_nd_%ap->%ind_ta%le( lt_%ap ).
0H)' 7C&'+ITI&'7.
+"T" "
lo_nd_-on T5P) *)F T& if_wd_conte.t_node#
lt_-on T5P) wd_this->elements_-on.
lo_nd_-on = wd_conte.t->get_child_node( 7#&'7 ).
.)-)CT 6 F*&M
-on
into )O((*+'ONDIN7 FI)-+. &F T"!-) lt_-on
0H)*) -num )C ls_%a---num
"'+ -posn )C ls_%ap/-posn!.
lo_nd_-on->%ind_ta%le( lt_-on ).
lo_fpm = cl_fpm_facto!&=>get_instance( ).
lo_fpm->!aise_eent_%&_id( cl_fpm_eent=>7)_*,*NT_N*8T_+T*' ).
0H)' 7+)-I)*57.
+"T""
lo_nd_%fa T5P) *)F T& if_wd_conte.t_node#
lt_%fa T5P) wd_this->elements_%fa.
lo_nd_%fa = wd_conte.t->get_child_node( 7!F"7 ).
.)-)CT %el
posn
%eln
posnn
!fmng
meins
F*&M %fa
I'T& )O((*+'ONDIN7 FI)-+. &F T"!-) lt_%fa
0H)*) %el )C ls_%ap/-%eln
"'+ posn )C ls_%ap/-posn!
"'+ %t&p_n )C 7D7.
lo_nd_%fa->%ind_ta%le( lt_%fa ).
lo_fpm = cl_fpm_facto!&=>get_instance( ).
lo_fpm->!aise_eent_%&_id( cl_fpm_eent=>7)_*,*NT_N*8T_+T*' ).
0H)' 7I'&IC)7.
+"T""
lo_nd_inoice T5P) *)F T& if_wd_conte.t_node#
lt_inoice T5P) wd_this->elements_inoice.
lo_nd_inoice = wd_conte.t->get_child_node( 7I'&IC)7 ).
.)-)CT
!p9%eln
!p9posn!
lps9%eln
lps9posn!
F*&M lips ". lps
INN*( D&I' %!p ". !p
&' !p9g%el )C lps9%eln
"'+ !p9gpos )C lps9posn!
I'T& table lt_inoice
0H)*) lps9g%el )C ls_%ap/-%eln
"'+ lps9gpos )C ls_%ap/-posn!.
lo_nd_inoice->%ind_ta%le( lt_inoice ).
lo_fpm = cl_fpm_facto!&=>get_instance( ).
lo_fpm->!aise_eent_%&_id( cl_fpm_eent=>7)_*,*NT_N*8T_+T*' ).
)'+C".).
endmethod.
Step 13: +est the 8pplication
,o to Package and )>pand 0eb+$npro Folder.
)>pand the "pplication Configurations Folder. .elect the particular application and click on Test.
-"tp"t:
If $ou donEt want default buttons should displa$ make it as invisible b$ opening the application in configuration
mode 3b$ adding the application path with this parameter FsapGconfigGmode96 4.
.elect the buttons which $ou donEt want to displa$ *ight click on it and select .ettings for current configuration.
,ive some .election .creen Input .ales &rganiHation %((( and +istribution Channel %( to %=
.
.elect an$ header +etails in the Table and Click on -ine Items automaticall$ it navigates to .econd .creen with line
Items of particular header
.elect the particular Item and Click on Condition automaticall$ it navigates to 'e>t screen with Conditions of
particular line item.
.elect the particular Item and Click on +eliveries automaticall$ it navigates to 'e>t screen with +eliveries of
particular line item.
.elect the particular deliver$ Item and Click on Invoice automaticall$ it navigates to 'e>t screen with Invoice +etails
particular line item.

You might also like