Programme SAP RLOY_CARD_ORDERING_EXTERNAL - Loyalty Management: Card Ordering

Purpose
This report is used to order all the cards in the system that are in thestatus 'Created' for printing . Only the cards that are under 'Active'memberships and 'Released' programs and whose valid to date has stillnot lapsed, are considered.
This report selects all such cards and changes thier status to 'Ordered'while also transferring related data of the selected cards to csv files.These csv files are sent to the external card service provider to ordercards for printing.
This report is run in the background only.

Features
During each execution of this report, three new csv files are created asattachments under the respective loyalty program entered, which contain:
1. Data of cards selected during the execution for ordering.
2. Data of memberships to which the selected cards belong.
3. All the data (as maintained in the Customizing activity, CustomerRelationship Management -> Marketing -> Loyalty Management ->Memberships -> Membership Cards -> Define Membership Card Types,Layouts, and Status -> Define Card Types) of the card types assigned tothe selected cards
The attributes of cards, memberships, or card types transferred to thefiles as well as the labels of the columns in the files are defined inthe Customizing activity, Customer Relationship Management -> Marketing-> Loyalty Management -> Memberships -> Membership Cards -> DefineMembership Card Types, Layouts, and Status -> Define Card OrderingHeader Labels.
This report changes the status of all selected cards as described aboveto 'Ordered'.
Also this report implements parallel processing for better performanceand the parallel processing parameters used are the values maintained inthe Customizing activity, Customer Relationship Management -> Marketing-> Loyalty Management -> Processing Settings -> Define Batch ProcessingParameters for the parameters:
1. SERVER_GROUP_BATCH
2. BATCH_CURSOR_SIZE
3. BATCH_RECORDS_PER_WP
BADIs: By default, only the card, membership and card type data istransferred to csv files. The following BADI is used to transfer moredata related to these selected cards, Customer Relationship Management-> Marketing -> Loyalty Management -> Business Add-Ins for LoyaltyManagement -> BAdI: Collection of Extra Cards for Ordering.
The BADI method COLLECT_ORDERING_CARD_DATA is used to collect more datarelated to each of the selected cards while the methodTRANSFER_ORDERING_CARD_DATA is be used to transfer this extra data alsoto files.

Selection
The inputs to this report are:
1. Loyalty Program: This parameter is mandatory. Only a 'Released'loyalty program ID can be entered here.
2. Card Type: This parameter is optional . Only a card type that isassociated with the type of the loyalty program entered in the aboveparameter can be entered in this field. The association of loyaltyprogram types and card types is maintained in the Customizing activity,Customer Relationship Management -> Marketing -> Loyalty Management ->Loyalty Programs -> Define Profiles for Loyalty Program Types

Output
The status of all the selected cards, according to the inputs providedduring report execution, is changed to 'Ordered' and all relevant datais transferred to csv files .
If any errors occur during the report execution, they are logged in theapplication log which can be viewed through transaction SLG1 for theobject CRMLOY and subobject MSH.