adsense

Sunday, 6 October 2013

Message flow design/Outbound adapter call/Mobile Bridge




Message flow design

 



§The validation module, outbound module & mobile bridge can be created in the same function group
§In an actual real scenario (eg: sales document transactions) the outbound module is called from the update processing
§The validation module function is created in ABAP workbench 
 
 
 
§Typical importing parameters of the validation module  would be OPTIONS of type SMW3FOPT (used for partial data processing)
§The export parameters should contain a STATUS parameter to return the processing state (success, error) of the bdoc to the flow controller
§Typical changing parameters would be
-TRANSACTION_MESSAGE (mbdoc classic part)
-MESSAGE_EXT (mbdoc extension part)
-ERROR_SEGMENTS (to pass error messages in processing)
-OBJECT_LINKS to link the application object to the bdoc message (using BOR)
-HEADER which contains control record fields like bdoc id, bdoc type, bdoc state, sender & receiver information
 

Outbound adapter call

  
§The validation logic is coded in the validation function module
§The logic would be to read the incoming mbdoc data & check the data as per defined validation rules
§If a check fails, then an error is passed to the STATUS parameter & the corresponding error message fields are filled
§After all the checks are successful, the outbound adapter call is made.
§The outbound adapter call is made by calling method PROCESS_OUTBOUND of class CL_SMW_MFLOW
§The bdoc header, body , & bdoc type are the main parameters to be passed
§
§
  
 
 
 

Mobile Bridge

 
§After the outbound call, the mobile bridge function module is designed
§The main importing parameter is bdoc HEADER of type SMW3_FHD
§Main exporting parameter is STATUS
§Main changing parameters would be TRANSACTION_MESSAGE (mbdoc classic part),MESSAGE_EXT (mbdoc extension part),ERROR_SEGMENTS (to pass error messages in processing)
§The mapping logic is coded in the function module
§The main mapping logic would be to
-Extract the data from mbdoc structure & pass to the sbdoc structure
-Set the sendbits for all changed fields
§Use fm SMO_SNDBITS_SETX  to set sendbits for changed fields, use fm SMO_SNDBITS_GETX to get changed fields from sendbits
-Set the sbdoc task field (1 for update, 2 insert, 3 delete)
§Trigger the sbdoc flow  first by setting the sbdoc header using ABAP OO class CL_SMW_SFLOW –method SET_HEADER_FIELDS & the call the sbdoc outbound flow  (method PROCESS_NOTIFICATION for delta )
-
§
-
 
 
 
 
 

No comments:

Post a Comment