Based on the symptoms and discussion, here’s a comprehensive solution addressing all the synchronization focus areas:
Event-Driven Synchronization with BAdI:
Your BAdI implementation is triggering correctly, which is good. However, you need to enhance it to include retry logic and error handling. Modify the BAdI implementation to:
// Pseudocode - Enhanced BAdI implementation:
1. Detect service parts list change event
2. Create sync message with unique message ID
3. Add message to outbound queue with priority flag
4. Set retry parameters: max_retries=3, retry_interval=300s
5. Log event details for audit trail
// On failure: message remains in queue for retry
The retry mechanism ensures that temporary network issues don’t cause permanent sync failures. Also configure the BAdI to filter events properly - you only want to sync changes that affect active service parts, not every minor update.
OData Service Configuration for Real-Time Updates:
The OData service needs both pull and push capabilities. Configure the service for bidirectional communication. In transaction /IWFND/MAINT_SERVICE, verify that the SERVICE_PARTS_SRV service has ‘Notification Support’ enabled. Register callback URLs for the mobile app so the service can push notifications when data changes. The callback configuration should include: Mobile backend URL, authentication method (OAuth 2.0 recommended), timeout settings (30 seconds), and retry policy.
Additionally, implement delta sync capability in the OData service. Instead of sending the entire parts list on each update, send only the changes (additions, modifications, deletions). This reduces data transfer volume and speeds up sync, especially important for mobile devices with limited bandwidth.
Message Queue Setup for Reliable Delivery:
The ‘Waiting’ status in SXMB_MONI indicates queue processing issues. Check the queue configuration in transaction SMQR. Verify that: Queue is active and not paused, Maximum queue size isn’t exceeded, Queue processing job is scheduled and running, Destination system is reachable. Most importantly, configure the queue with persistence - messages should be stored reliably even if the destination system is temporarily unavailable.
Implement message queue monitoring alerts. Configure alerts in transaction RZ20 to notify administrators when: Messages remain in queue longer than 15 minutes, Queue size exceeds threshold, Message processing error rate exceeds 5%. This proactive monitoring prevents sync issues from going undetected.
Mobile Application Sync Mechanisms:
The mobile app needs intelligent sync logic. Implement a three-tier sync strategy:
Tier 1 - Real-time push: When the mobile device has good connectivity, receive push notifications from the OData service and immediately update the local parts list. This provides instant updates when conditions are ideal.
Tier 2 - Periodic pull: Every 30 minutes, the mobile app polls the OData service for updates. This catches any push notifications that were missed due to connectivity issues. Use delta queries with timestamps to minimize data transfer.
Tier 3 - On-demand sync: Before each service call, the technician can manually trigger a sync to ensure they have the latest parts list. This is the safety net for critical situations.
Implement local caching on the mobile device with version tracking. Each parts list update includes a version number. The mobile app stores the current version and compares it against the server version during sync. If versions don’t match, trigger a full reconciliation.
For offline scenarios (technicians in areas with no connectivity), implement conflict resolution. If a technician makes changes offline and those changes conflict with server updates, use a ‘server wins’ strategy for parts list data since the PLM system is the source of truth. Log conflicts for review.
Finally, implement comprehensive logging on both sides. The PLM system should log: When parts list changes occur, when sync messages are created, when messages are successfully delivered. The mobile app should log: When sync attempts occur, what data was received, any errors encountered. These logs are essential for troubleshooting sync issues.
Test the complete sync flow end-to-end with various scenarios: normal updates, rapid successive updates, network interruptions, mobile app offline/online transitions, and high-volume updates. Verify that in all scenarios, the mobile app eventually receives the correct current parts list, even if there are temporary delays.
This draft is based on general SAP PLM knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.