on 06-24-2011 9:32 PM
Hi everybody,
I'm trying to do an usage decision with bapi BAPI_INSPLOT_SETUSAGEDECISION using Co 3.0 .net connector but I'm having some problems with it. The code excecutes without problems, and a successfull message is returned, but no update was made.
Here I have the code I'm using.
Dim struDatosDecision As IRfcStructure = DecisionEmpleoAPI.GetStructure("UD_DATA")
Dim struReturn1 As IRfcStructure = DecisionEmpleoAPI.GetStructure("RETURN")
DecisionEmpleoAPI.SetValue("NUMBER", NumLote)
struDatosDecision.SetValue("INSPLOT", NumLote)
struDatosDecision.SetValue("UD_SELECTED_SET", "01")
struDatosDecision.SetValue("UD_PLANT", "B001")
struDatosDecision.SetValue("UD_CODE_GROUP", "01")
struDatosDecision.SetValue("UD_CODE", "PC")
struDatosDecision.SetValue("UD_FORCE_COMPLETION", "X") ' Fuerza la Decisión del Empleo
Try
DecisionEmpleoAPI.SetValue("UD_DATA", struDatosDecision)
DecisionEmpleoAPI.Invoke(_ecc)
CommitLote.Invoke(_ecc)
struReturn1 = DecisionEmpleoAPI("RETURN").GetValue
I found my self the solution.
I was missing a rfcsessionManager.begin - endcontext. I hope it will help somebody
RfcSessionManager.BeginContext(_ecc)
DecisionEmpleoAPI.GetValue("UD_DATA")
DecisionEmpleoAPI.SetValue("UD_DATA", struDatosDecision)
DecisionEmpleoAPI.Invoke(_ecc)
CommitLote.Invoke(_ecc)
RfcSessionManager.EndContext(_ecc)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.