Posts

Showing posts from November, 2020

Paralell Processing with ABAP [REV]

SPTA framework aRFC/ bgRFC SPTA framework SPTA framework is the most sophisticated and secured framework for parallel processing provided by SAP. If we want to handle multiple records and want to update/check multiple database tables in parallel, in that case, using conventional way to invoke parallel processing is difficult and there can be some ABAP memory issue. But in SPTA framework there are build in security for all the ABAP memory related issues so it is very secure. Also, SPTA framework is very easy to implement and all the parallel processing work is handled by SAP we do not need to bother how to handle it. In this way, it is also a very sophisticated framework. FM SPTA_PARA_PROCESS_START_2 The FM is used to set up parallel processing.  The parameter user_param can be used for import/export parameters. We need to create a new separate subroutine pool program with the routines before, after and in_rfc  call function 'SPTA_PARA_PROCESS_START_2'       exporting         se

ABAP Daemon Framework

Use ABAP Daemons, to implement event handling .   ABAP Daemons are long-living ABAP session s. The application server takes care that once an ABAP Daemon was started , there is no limit for the lifetime of such ABAP session.   Even if there is an ABAP runtime error, or a work process in the application server crashes, the ABAP Daemon session gets restarted immediately . ABAP Daemons have event-driven programming model (similar to ABAP Channels) which contains the typical event handler API for your implementation needs with such methods like on_start, on_message, on_error etc. You can start an ABAP Daemon and send messages to it. Please consider, that each ABAP Daemon runs under a given user, and therefore the messages to it can be sent only within the same client. If you need to send the system-wide messages to your ABAP Daemon you can use ABAP Messaging Channel (AMC). ABAP Daemons are available with SAP NetWeaver AS ABAP 7.52. The startup configuration was added to ABAP Daemons in A

Debugging

Image
How to debug the field symbol? via a breakpoint How to catch an exception?  I create a new exception dynamically. Since I don’t know the exact name of exception, I can only create a breakpoint based on CX_ROOT, which is super class of all class based exceptions. then all that I can do is just F8, F8 and F8… Soon ( ten seconds later) I found one exception raised in a suspicious method GET_TABLE_CONTENT. Then I click “Display Trigger Location”, the debuger displays the method GET_P_ASSOC_OBJ_DEF_ATTRIB which leads to the exception CX_SY_NO_HANDLER. Wait.. isn’t this trouble-maker method developed by myself? After going through BSP framework code I learnt that BSP framework will first try to determine the cell type by calling our property getter method ( PREFIX GET_P_XXX). Only the successful determination of field type can trigger the successive call of content getter method ( PREFIX GET_XXXX) to retrieve the cell content. By the way, if the method which trigger the exception is not owne

Condition Contract Management

Image
Sales Purchasing Introduction to Condition Contract Management . Sales  The sales rebate processing capabilities of Settlement Management support you in providing rebate incentives to customers and paying rebates on schedule. You can define, monitor, and modify sales rebate agreements flexibly based on customer, product, and volume-based sales commitments.   Concepts When you create a new condition contract, you specify the condition contract type. To which business partner the agreement belongs, for example, a customer or a supplier. How the business volume is determined. How settlement documents are created. Which rebate and accruals conditions you can specify. Process flow  Creating Sales Rebate Agreements To define sales rebate agreements, you create customer condition contracts. You can create condition contracts without any reference to a document or as the successor of an existing condition contract. Monitoring Sales Rebate Agreements To monitor the life cycle of sales rebate ag

SAP for Automotive: Business processes

Image
Processes in the Component Supplier Industry Scheduling agreement processing with forecast and JIT delivery schedules Scheduling Agreement Processing with Forecast Delivery Schedule and Delivery Order Scheduling Agreement Processing with External Service Agent Scheduling Agreement Processing with Sequenced JIT Calls (Just in Sequence) Scheduling Agreement Processing Processing Summarized JIT calls Processing Planning delivery schedule (PDS/ Internal call) Packing in production Returnable packing Handling unit management HU creation for deliveries with mobile app  Planned HU creation Packing a delivery  Goods receipt Automotive goods receipt Multi-Level Goods Receipt Proof of Delivery at Goods Receipt for Inbound Deliveries Profiles in Goods Receipt for Automotive Automatic Determination of Purchasing Document Determination of the Unloading Point and the Unloading Zone Operational Procurement and Material Flow Procurement Using Scheduling Agreements Supply to production: Push Supply to

JIT call ( Call structure, IDoc type )

Image
Call structure JIT call types Call for assembly Call for discrete materials  Summarized JIT calls (pick up sheets) Summarized Range Call  Internal Calls (Buffer Storage Location)  SEQJIT structure Call structure Three levels Call header  ( Identification: JIT customer, external call number + sequence number ) The  components groups  represent the material, or the assembly ( Control: Unloading point, Time of requirements, CGM ) The  call components  are the materials that the JIT customer transmits to you in a JIT call. A call component contains a reference to the scheduling agreement item in a JIT scheduling agreement. JIT call types Calls for assemblies : The JIT customer transmits  all call components for a vehicle . This is a departure  from an order-related BOM . Example: The customer transmits the components  of four-door modules with one call . The system carries out a  components group material determination and then the components group determination . It assigns each  call co