You are on page 1of 10

ADVICES Technical Perspective

CL Advices - Technical Perspective

Architecture
Entities involved :
# Entity Advice Maintenance 1 Maintenance of format in front end The tags that are to be displayed in the advice and their position and format are defined An XML is maintained for each message format. The data pick up logic for the particular advice is defined in the XML This package builds a procedure for each advice based on the format defined and the logic defined in the XML These are fired at the time of generation of the advices Objective

2 XML

3 Mspks_Adv_gen

4 Individual procedures for each advice

Advices - Technical Perspective Advices - Technical Perspective

22

Architecture
M A I N T E N A N C E Format Maintenance In front end Data Pick up Logic defined in XML

MSPKS_ADV_GEN Package creates a procedure for each advice

E V E N T

Individual procedures are called at the time of advice generation

User editable Factory shipped


3

Advices - Technical Perspective

Format maintenance in front end

Advice Tags

End user can edit the description, media, product, branches allowed and can delete tags not needed by them. Any addition of new tag is not allowed for the end user.
Advices - Technical Perspective Advices - Technical Perspective 4
4

Adding new tags


Work flow for adding new advice tags

Step I : Creating data pick up logic and defining the same in XML

Step II : Incorporating the tags in the message format

Step III: Executing the stubs which call the advice generation
package which modifies / creates the procedure for that advice.

Advices - Technical Perspective

Adding new tags


Step I : Creating data pick up logic and defining the same in XML Structure of XML file <?xml version="1.0" ?> <!--<!DOCTYPE advice SYSTEM "advtags.dtd" >--> <advice advice_name="CL_INIT_ADV"> Name of the advice List of the input parameters
<param_list> <parameter data_type="V">in_branch_code</parameter> <parameter data_type="V">in_account_number</parameter> </param_list>

<global_tags>

List of the global tags. These can be used through out the XML

<group group_name="account_customer_master"> Data pertaining to like tables are grouped together


Advices - Technical Perspective 6

Adding new tags


A sample group Requirement : Local currency equivalent for components
<group group_name ="lcy_details"> === Denotes group begin <query><![CDATA[ === Denotes start of query select component_name,sum(abs(amount)) as acamt ,sum(abs(lcy_amount)) as lcyamt from cltb_event_entries where account_number = :parameter.in_account_number and branch_code = :parameter.in_branch_code and lcy_amount > 0 group by component_name order by component_name ]]></query> === Denotes end of query <tag_list> <tag tag_desc="Component"> <tag_name>component</tag_name> <val>:lcy_details.component_name</val> </tag> <tag tag_desc="Lcy Equivalent"> <tag_name>lcyamount</tag_name> <val>:lcy_details.lcyamt</val> </tag> </tag_list> </group>
Advices - Technical Perspective 7

=== Denotes list of tags

=== This is the tag name & used in format

Adding new tags


Step II : Incorporating the new tags in the Advice format After completing the data pick up logic in XML, add the new tags in the message format in front end maintenance screen.
THE LOCAL CURRENCY EQUIVALENT CHART FOR ALL COMPONENTS ============================================================ COMPONENT LCY EQUIVALENT ============================================================ #LOOP: lcy_details _COMPONENT:{L,17,@5,1,}_ _LCYAMOUNT:{R,22,@46,1,'99G999G999G999G99D00'}_ #ENDLOOP

Free format Text

Loop construct for displaying multiple lines

Group name as defined in the XML


Name of the advice tag as defined in the XML

Click here to see front end

Advices - Technical Perspective

Adding new tags


Step III: Executing the stubs which call the advice generation package which modifies / creates the procedure for that advice. These stubs can be run for individual advices or for all at once. A sample stub
DECLARE res BOOLEAN; p_errcode VARCHAR2(11); p_errmsg VARCHAR2(255); BEGIN Dbms_Output.put_line(' ------> --------------------------------------------------------'); global.pr_init('HOB', 'SISHIR1'); res := MSPKS_ADV_GEN.FN_GENERATE_FORMAT_PROC('CL_INIT_ADV', 'CL_INIT_ADV','ENG', p_errcode, p_errmsg); IF res THEN Dbms_Output.put_line(' ------> Result is TRUE'); ELSE Dbms_Output.put_line(' ------> Result is FALSE'); END IF; Dbms_Output.put_line(' ------> Error code is <' || TO_CHAR(p_errcode) || '>'); Dbms_Output.put_line(' ------> Error message is <' || p_errmsg || '>'); Dbms_Output.put_line(' ------> --------------------------------------------------------'); END;

Advices - Technical Perspective

Q&A

Advices - Technical Perspective

10

You might also like