-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRfcTransaction create transaction #7
Comments
Hi Roly, IRFCTRANSACTION is a section developed for experimentation. The main problem in the section is that the function that will receive the TransactionID needs to be registered in the system. This is a topic in the SAP NetWeaver RFC library documentation that I don't fully understand yet. Maybe calling another transaction function like in Sapnco instead of function registration can solve our problem. //sapnco example
var dest = SAPUtils.GetRfcDestination(connectionTarget);
var repo = dest.Repository;
var func = repo.CreateFunction("BAPI_MATERIAL_SAVEDATA");
var transaction = repo.CreateFunction("BAPI_TRANSACTION_COMMIT");
SetHeadData(func, material.HeadData);
SetMaterialDescription(func, material.MaterialDescription);
func.Invoke(dest);
transaction.Invoke(dest);
var resultTable = func.GetTable("RETURNMESSAGES");
var errorMessages = SAPUtils.GetListFromRFCTable<ReturnTableMessage>(resultTable);
if (errorMessages.All(x => x.TYPE == "S" || x.TYPE == "H"))
{
material.MaterialStatus = MaterialStatuses.Success;
material.ErrorMessages = string.Empty;
}
else
{
material.MaterialStatus = MaterialStatuses.Error;
material.ErrorMessages = string.Join("\n", errorMessages.Select(x => x.ToString()));
}
return material; Thank you for your feedback. |
im trying to create or insert data to bapi sap using IRFCTRANSACTION im encountered below error.
attempted to read or write protected memory. this is often an indication that other memory is corrupt
Thank you.
The text was updated successfully, but these errors were encountered: