on 2011 Mar 09 2:02 PM
Hi
Forgive me if this seems to be an obvious question but I'm at a loss as to why this is happening.
I am using the .netconnector 3 and executing BAPI_PERSDATA_CHANGE. The issue seems to be when converting the parameter values of OBJECTID, SUBTYPE, LOCKINDICTAOR and RECORDNUMBER from an empty string constructor.
using the code below it appears that the values being passed to SAP for the fields above are all null and not the specified values of empty string and "000" for RECORDNUMBER. Consequently the call is failing with a message indicating that not all fields have been supplied.
Does anyone know how to pass an empty string and the value "000" through the .net connector?
Sample code
IRfcFunction fbapi = repo.CreateFunction("BAPI_PERSDATA_CHANGE");
fbapi.SetValue("EMPLOYEENUMBER", "10500000");
fbapi.SetValue("VALIDITYBEGIN", "19800101");
fbapi.SetValue("VALIDITYEND", "99991231");
fbapi.SetValue("FIRSTNAME", "ROBERT");
fbapi.SetValue("MIDDLENAME", "BORIS");
fbapi.SetValue(SUBTYPE, "");
fbapi.SetValue("OBJECTID", "");
fbapi.SetValue("LOCKINDICATOR", "");
fbapi.SetValue("RECORDNUMBER", "000");
Request clarification before answering.
Hi
I am also facing the same issue. Where you able to find any solution for this. I even tried using HR_INFOTYPE_OPERATION BAPI but still get the similar error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Sorry, I have not found a complete solution yet but I have managed to trick the string constructor by using the following code
fbapi.SetValue(SUBTYPE, " X");
The character length of the field is 3 characters in length and by passing in three spaces and then a random character in the constructor seems to populate the input parameter correctly. I have not however found out how to trick the numeric constructor with "000".
If you have any comments please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.