0% found this document useful (0 votes)
123 views43 pages

BSP WD Appli

The document describes the structure and components of a front-end application. It discusses that a window is mandatory and acts as a page, with only one window displayed at a time. It describes component controllers that have business logic classes ending in ".IMPL", and contexts with context classes ending in ".CTXT" that contain context nodes. Context nodes can be value nodes referring to dictionaries or model nodes referring to BOL structures.

Uploaded by

Mohinder Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views43 pages

BSP WD Appli

The document describes the structure and components of a front-end application. It discusses that a window is mandatory and acts as a page, with only one window displayed at a time. It describes component controllers that have business logic classes ending in ".IMPL", and contexts with context classes ending in ".CTXT" that contain context nodes. Context nodes can be value nodes referring to dictionaries or model nodes referring to BOL structures.

Uploaded by

Mohinder Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 43

CREATE

ONE WINDOW IS MANDATORY FOR FRONT END APPLICATION.


IT WILL CREATE CLASSES FOR FRONT END APPLICATION
WINDOW ACTS AS PAGE AND ONLY ONE WINDOW CAN BE DISPLAYED AT A
TIME.IF COMPONENT DOESNOT HAVE WINDOW THEN IT PURELY USED FOR
BACKGROUND PURPOSE ONLY.

COMPONENT CONTROLLER:
EXTENSION FOR THIS IS .DO.
FOR EVERY CONTROLLER HAVE ONE CLASS WHICH HAVE BUSINESS
LOGIC.
CLASS FOR COMPONENT CONTROLLER IS ALSO CALLED AS
IMPLEMENTATION CLASS AND WHICH END WITH .IMPL
CONTEXT :
MEMORY G IVEN TO THE CONTROLLER CONTAINS ONE CONTEXT CLASS
WHICH IS END WITH .CTXT.
CONTEXT CONTAINS CONTEXT NODES
CONTEXT NODE :IS A STRUCTURE OR WORK AREA SO CONTEXT HAVE MULTIPLE
CONTEXT NODES REFER TO DICTIONARY STRUCTURE OR BOL
STRUCTURES.
THERE ARE TWO TYPES OF NODES
1) VALUE NODE :-> STRUCTURE THAT REFER TO DICTIONARY THAT ARE
VALUE NODE
2) MODEL NODE:- STRUCTURE THAT REFER TO BOL ARE CALLED
MODEL NODES
WINDOW CONTAINS WINDOW CONTROLLER CONTAINS CLASS
CONTEXT CONTAINS CONTEXT CLASS CONTEXT NODE
CUSTOM CONTROLLER:

VIEW2

ADJUST THE LAYOUT

CODE FOR VIEW1


<%@page language="abap" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<thtmlb:grid cellSpacing = "1"
columnSize = "8"
height
= "100%"
rowSize
= "6"
width
= "100%" >

<thtmlb:gridCell colSpan
= "3"
columnIndex = "1"
rowIndex = "1" >
<thtmlb:label design = "LABEL"
for = "//PARTNER/NAME_FIRST"
text = "First Name:" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "5"
columnIndex = "4"
rowIndex = "1" >
<thtmlb:inputField disabled = "<%= PARTNER->GET_I_NAME_FIRST( ) %>"
id
= "NAME_FIRST"
maxlength = "31"

size
value
</thtmlb:gridCell>

= "20"
= "//PARTNER/NAME_FIRST" />

<thtmlb:gridCell colSpan
= "3"
columnIndex = "1"
rowIndex = "2" >
<thtmlb:label design = "LABEL"
for = "//PARTNER/NAME_LAST"
text = "Last Name:" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "5"
columnIndex = "4"
rowIndex = "2" >
<thtmlb:inputField disabled = "<%= PARTNER->GET_I_NAME_LAST( ) %>"
id
= "NAME_LAST"
maxlength = "31"
size
= "20"
value
= "//PARTNER/NAME_LAST" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "8"
columnIndex
= "1"
horizontalAlignment = "LEFT"
rowIndex
= "3" >
<thtmlb:button design = "EMPHASIZED"
id
= "DISPLAY"
onClick = "DISPLAY"
text = "Display Full Name" />
</thtmlb:gridCell>
</thtmlb:grid>

ADJUST LAYOUT FOR VIEW2

<%@page language="abap" %>


<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<thtmlb:grid cellSpacing = "1"
columnSize = "8"
height
= "100%"
rowSize
= "6"
width
= "100%" >
<thtmlb:gridCell colSpan
= "3"
columnIndex = "1"
rowIndex = "1" >
<thtmlb:label design = "LABEL"
for = "//PARTNER/NAME1_TEXT"
text = "Full Name: " />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "5"
columnIndex = "4"
rowIndex = "1" >
<thtmlb:inputField disabled = "<%= PARTNER->GET_I_NAME1_TEXT( ) %>"
id
= "NAME1_TEXT"
maxlength = "31"
size
= "20"
value
= "//PARTNER/NAME1_TEXT" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "3"
columnIndex = "1"
rowIndex = "2" >
<thtmlb:label design = "LABEL"
for = "//PARTNER/NAME_FIRST"
text = "First Name: " />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "5"
columnIndex = "4"
rowIndex = "2" >
<thtmlb:inputField disabled = "<%= PARTNER->GET_I_NAME_FIRST( ) %>"
id
= "NAME_FIRST"
maxlength = "31"
size
= "20"
value
= "//PARTNER/NAME_FIRST" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "3"
columnIndex = "1"
rowIndex = "3" >
<thtmlb:label design = "LABEL"
for = "//PARTNER/NAME_LAST"
text = "Last Name: " />
</thtmlb:gridCell>
<thtmlb:gridCell colSpan
= "5"
columnIndex = "4"
rowIndex = "3" >
<thtmlb:inputField disabled = "<%= PARTNER->GET_I_NAME_LAST( ) %>"
id
= "NAME_LAST"
maxlength = "31"
size
= "20"
value
= "//PARTNER/NAME_LAST" />
</thtmlb:gridCell>

<thtmlb:gridCell colSpan
= "8"
columnIndex
= "1"
horizontalAlignment = "LEFT"
rowIndex
= "4" >
<thtmlb:button design = "EMPHASIZED"
id
= "BACK"
onClick = "BACK"
text = "Back" />
</thtmlb:gridCell>
</thtmlb:grid>

method GET_NAME1_TEXT.
DATA: current TYPE REF TO if_bol_bo_property_access.
DATA: dref TYPE REF TO data.
value =
'ValueNode PARTNER not bound'.

"#EC NOTEXT

if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
*-------------Additional code---------------------------------------------DATA dref1 TYPE REF TO data.
DATA dref2 TYPE REF TO data.
dref1 = current->get_property( 'NAME_FIRST' ).
dref2 = current->get_property( 'NAME_LAST' ).
*Create a Field symbol (Pointer)
FIELD-SYMBOLS: <l_data1> type DATA.
FIELD-SYMBOLS: <l_data2> type DATA.
*Assign address to Field Symbol
assign dref1->* to <l_data1>.
assign dref2->* to <l_data2>.
*-------------------------------------------------------------------------TRY.
dref = current->get_property( 'NAME1_TEXT' ).

"#EC NOTEXT

CATCH cx_sy_ref_is_initial.
RETURN.
ENDTRY.
IF dref IS NOT BOUND.
value = 'PARTNER/NAME1_TEXT not bound'.

"#EC NOTEXT

RETURN.
ENDIF.
TRY.
value = if_bsp_model_util~convert_to_string( data_ref = dref
attribute_path = attribute_path ).
CATCH cx_bsp_conv_illegal_ref.
FIELD-SYMBOLS: <l_data> type DATA.
assign dref->* to <l_data>.
*
please implement here some BO specific handler coding
*
conversion of currency/quantity field failed caused by missing
*
unit relation
*
Coding sample:
*
provide currency, decimals, and reference type
*
value = cl_bsp_utility=>make_string(
*
value = <l_data>
*
reference_value = c_currency
*
num_decimals = decimals
*
reference_type = reference_type
*
).
value = '-CURR/QUANT REF DATA MISSING-'.
CATCH cx_root.
value = '-CONVERSION FAILED-'.
"#EC NOTEXT
ENDTRY.
*------------------------------------------------------------------*Concatenate to get full name
Concatenate <l_data1> <l_data2> into value separated by space.
*------------------------------------------------------------------endmethod.

PRESS THE display full name BUTTON

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy