Advertisement
Guest User

Untitled

a guest
Feb 4th, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.70 KB | None | 0 0
  1. private def execute(user: User, blobId: String, parentInstance: String, f: (SapFunction) => Unit) = {
  2.     val function = SapFunction("/SSC/HTML5_CALL_TO_SAP", user)
  3.     function.setImportParameters(Map(
  4.       "I_BLOBID" -> blobId,
  5.       "I_PARENT_INSTANCE" -> parentInstance
  6.     ))
  7.  
  8.     f(function)
  9.  
  10.     function.execute() map {
  11.       response: SapResponse =>
  12.         SapAnswerService.loadSapAnswer(response.exportParameters, response.tableParameters.getTable("T_MESSAGES"), response.tableParameters.getTable("T_SCREEN_MARKED_ROWS"))
  13.     }
  14.   }
  15.  
  16.   val f = ((sapFunc: SapFunction) => {
  17.     sapFunc.importParameterList.setValue("I_INPUT_VALUE", value)
  18.   })
  19.   execute(user, blobId, parentInstance, f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement