Programme SAP BBP_LIMIT_XPRA400 - XPRA for Conversion Limit to Item

Purpose
Conversion of limit purchase orders with limit set at header level tolimit purchase orders with limit set at item level:
For all limit purchase orders for which the limit is assigned to thedocument header, a new item with item category 'LIMI' (limit item) isgenerated. Purchasing information is stored for this new limit item.This information is determined from the document header and the limitset.
In addition, a new limit item in the link handler is assigned to therelevant limit set. The link between the document header and the limitset in the link handler is deleted. Also, an account assignment set inthe limit purchase order is also assigned to the new limit item in thelink handler and the previous link to the document header in the linkhandler is deleted.
An object linkage between the new limit item and the relevant shoppingcart item is created.

Integration
The conversion and updating occur in one client. If a client has beensuccessfully updated, then an entry is made in table T77ZZ. This ensuresconsistency. For example,, if the XPRA crashes during an execution, thenew XPRA run starts again with the last client processed.
Conversion within a client works as follows:
First, all limit purchase orders are identified using the database tableCRMD_LINK. For these purchase orders, all the information required tocreate the new limit items is determined via the database tablesCRMD_ORDERADMIN_H, BBP_PDHGP, BBP_PDLIM and CRMD_LINK.
Then, an entry is made in the internal table GT_CRMD_ORDER_LINK for eachlimit item to be generated; the entry includes all the information thathas been determined for this limit purchase order. An entryis only madeif all the required information from the limit purchase order isavailable. If, for example, the limit set specified in the link handler(Table CRMD_LINK) does not exist in table BBP_PDLIM, then the systemoutputs a warning message specifying the GUID, and the relevant limitpurchase order is not converted. If, however, an account assignment setis not assigned to a limit purchase order, a conversion does occurbecause a limit purchase order is consistent even without an accountassignment.
The new limit items are finally generated from the internal tableGT_CRMD_ORDER_LINK. Only the relevant information is transferred totables CRMD_ADMIN_I and BBP_PDIGP for the new limit items. As before,the update of the changed links between limit purchase order and limitset and between limit purchase order and account assignment set isprepared in the link handler CRMD_LINK. An object linkage is created.
If at least one new limit item has been generated, then the database isupdated. Otherwise, the relevant client receives a warning message. Ifthe database update could not be completed successfully, an errormessage is output and the entire client is not converted.
Once the update of the new limit items has been completed, all messagesare written to a log and this is output when the report has finished.

Prerequisites
The XPRA is only carried out in EBP Releases EBP 1.0, EBP 2.0, EBP 3.0and EBP 3.5. As of Release EBP 4.0, the limit purchase orders arealready based on the structures with limit set at item level.