Академический Документы
Профессиональный Документы
Культура Документы
Applies to:
Webdynpro ABAP. For more information, visit the Web Dynpro ABAP homepage.
Summary
This document shows the sales data flow from Header to Invoice details based on User Input using FPM
Framework.
Author:
Tulasi Palnati
Author Bio
Tulasi Palnati is an Enterprise Portal Consultant at Yash Technologies, Hyderabad-India
Table of Contents
Step 1: Create Webdynpro Component .......................................................................................................... 3
Step 2: Create context in component controller .............................................................................................. 3
Step 3: Create views and windows ................................................................................................................. 9
Step 4: Map the context of controller to the View Header and design the layout as follows ........................ 11
Step 5: Embed the Select_options Standard component in the Used components ..................................... 12
Step 6: Map the context of controller to the View LINE_ITEM and design the layout as follows ................ 15
Step 7: Map the context of controller to the View CONDITION and design the layout as follows................ 16
Step 8: Map the context of controller to the View DELIVERIES and design the layout as follows............... 17
Step 9: Map the context of controller to the View INVOICE and design the layout as follows ..................... 18
Step 10: Embed the Standard Interface IF_FPM_BUILDING_BLOCK in our component implemented
interfaces ....................................................................................................................................................... 19
Step 11: Save all and activate the Component ............................................................................................. 20
Step 12: Create Application and save it in Package. .................................................................................... 21
Step 13: Open the Package and expand the Web Dynpro applications folder............................................. 22
Step 14: Application and Component Configuration Settings to display the application using FPM ............ 23
Step 15: Process the Events of FPM in Component Controller .................................................................... 32
Step 16: Test the Application ........................................................................................................................ 35
Related Content ................................................................................................................................................ 41
Disclaimer and Liability Notice .......................................................................................................................... 42
Click on add attributes from structure and select the fields in the below screen shot
Right click on INVOICE NODE and select add attributes from structure. Give structure name LIPS and select
the fields in the below screen shot
Window
LINE_ITEM
LINE_ITEM_WIN
CONDITIONS
CONDITIONS_WIN
DELIVERIES
DELIVERIES_WIN
INVOICE
INVOICE_WIN
Step 4: Map the context of controller to the View Header and design the layout as follows
Go to Component Controller and give global attribute M_HANDLER with ref to IF_WD_SELECT_OPTIONS
Go to window and embed the Standard WIND_SELECTION_SCREEN into VIEW CONTAINER of HEADER
view
Step 6: Map the context of controller to the View LINE_ITEM and design the layout as follows
Step 7: Map the context of controller to the View CONDITION and design the layout as follows
Step 8: Map the context of controller to the View DELIVERIES and design the layout as follows
Step 9: Map the context of controller to the View INVOICE and design the layout as follows
Step 10: Embed the Standard Interface IF_FPM_BUILDING_BLOCK in our component implemented
interfaces
Go and check in the component controller methods tab all the interface methods will be available .
: FPM_WINDOW
Default
: DEFAULT
Step 13: Open the Package and expand the Web Dynpro applications folder
Select the Webdynpro application and right click on it select create/change configuration
Step 14: Application and Component Configuration Settings to display the application using FPM
Give configuration ID as ZSALES_APPLCONFIG
Click on Create.
Click on create and new window will open and save the component configuration in the package.
New Window for configuration for particular component will open with Default RoadMap with buttons.
Select the Main Step From Hierarchy and Properties will available in right side.
Give Mainstep ID :Header Details and Mainstep Name: Header Details
In Right Side, click on Add Main Step button automatically one more road map will be added change the
Main Step id and Main Step name: Line Items
Add few more steps same as above for Conditions View, Deliveries View and Invoice View and screenshot
as follows:
Save the Configuration and Select the Header Details Step and Click on Add Toolbar Element.
New Popup will be open. Application Specific buttons will be there.
Select the Other Function Button and click on Ok.
Repeat above process for one more Function.
Select the buttons in the application title and Change the button properties
For 1st Button:
Give Label HEADER DETAILS and FPM Event ID HEADER
For 2nd Button:
Give Label ITEM DETAILS and FPM Event ID LINE_ITEM
Select the Line Items Step and Click on Add Toolbar Element.
New Popup will be open. Application Specific buttons will be there.
Select the Other Function Button and click on Ok.
Select the button in the application title and Change the button properties
Give Label Condition and FPM Event ID CONDITION
method PROCESS_EVENT .
DATA lo_nd_vbak TYPE REF TO if_wd_context_node.
DATA lo_el_vbak TYPE REF TO if_wd_context_element.
DATA ls_vbak TYPE wd_this->element_vbak.
lo_nd_vbak = wd_context->get_child_node( name = wd_this->wdctx_vbak ).
lo_el_vbak = lo_nd_vbak->get_element( ).
lo_el_vbak->get_static_attributes(
IMPORTING
static_attributes = ls_vbak ).
DATA lo_nd_vbap3 TYPE REF TO if_wd_context_node.
DATA lo_el_vbap3 TYPE REF TO if_wd_context_element.
DATA ls_vbap3 TYPE wd_this->element_vbap.
lo_nd_vbap3 = wd_context->get_child_node( name = wd_this->wdctx_vbap ).
lo_el_vbap3 = lo_nd_vbap3->get_element( ).
lo_el_vbap3->get_static_attributes(
IMPORTING
static_attributes = ls_vbap3 ).
CASE io_event->mv_event_id.
WHEN 'HEADER'.
DATA :
lo_nd_vbak1 TYPE REF TO if_wd_context_node,
lt_vbak
TYPE wd_this->elements_vbak,
lt_range TYPE REF TO data,
lt_range1 TYPE REF TO data,
lo_fpm TYPE REF TO if_fpm.
FIELD-SYMBOLS:
posnn
rfmng
meins
FROM vbfa
INTO CORRESPONDING FIELDS OF TABLE lt_vbfa
WHERE vbelv EQ ls_vbap3-vbeln
AND posnv EQ ls_vbap3-posnr
AND vbtyp_n EQ 'J'.
lo_nd_vbfa->bind_table( lt_vbfa ).
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event_by_id( cl_fpm_event=>GC_EVENT_NEXT_STEP ).
WHEN 'INVOICE'.
DATA:
lo_nd_invoice TYPE REF TO if_wd_context_node,
lt_invoice
TYPE wd_this->elements_invoice.
lo_nd_invoice = wd_context->get_child_node( 'INVOICE' ).
SELECT
vrp~vbeln
vrp~posnr
lps~vbeln
lps~posnr
FROM lips AS lps
INNER JOIN vbrp AS vrp
ON vrp~vgbel EQ lps~vbeln
AND vrp~vgpos EQ lps~posnr
INTO table lt_invoice
WHERE lps~vgbel EQ ls_vbap3-vbeln
AND lps~vgpos EQ ls_vbap3-posnr.
lo_nd_invoice->bind_table( lt_invoice ).
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event_by_id( cl_fpm_event=>GC_EVENT_NEXT_STEP ).
ENDCASE.
endmethod.
Output:
If you dont want default buttons should display make it as invisible by opening the application in
configuration mode (by adding the application path with this parameter &sap-config-mode=X ).
Select the buttons which you dont want to display Right click on it and select Settings for current
configuration.
Give some Selection Screen Input Sales Organization 1000 and Distribution Channel 10 to 12
Select any header Details in the Table and Click on Line Items automatically it navigates to Second Screen
with line Items of particular header
Select the particular Item and Click on Condition automatically it navigates to Next screen with Conditions of
particular line item.
Select the particular Item and Click on Deliveries automatically it navigates to Next screen with Deliveries of
particular line item.
Select the particular delivery Item and Click on Invoice automatically it navigates to Next screen with Invoice
Details particular line item.
Related Content
WebDynpro ABAP Wiki's
WebDynpro ABAP Homepage
For more information, visit the Web Dynpro ABAP homepage