05-21-2016 5:22 AM
Hi,
I'm trying to change a shipment field using the code below, but so far it didn't get updated. Could you please help me?
RfcRepository repo = destination.Repository;
IRfcFunction salesShip = repo.CreateFunction("BAPI_SHIPMENT_CHANGE");
IRfcFunction salesShipCommit = repo.CreateFunction("BAPI_TRANSACTION_COMMIT");
IRfcStructure salesShipHeader = salesShip.GetStructure("HEADERDATA");
salesShipHeader.SetValue("SHIPMENT_NUM", "0011406654");
salesShipHeader.SetValue("SERVICE_AGENT_ID", "30003367");
IRfcStructure shipHeaderAction = salesShip.GetStructure("HEADERDATAACTION");
shipHeaderAction.SetValue("SERVICE_AGENT_ID", "X");
RfcSessionManager.BeginContext(destination);
salesShip.Invoke(destination);
salesShipCommit.Invoke(destination);
RfcSessionManager.EndContext(destination);
I don't receive any error message in the return.
05-23-2016 7:54 AM
Attention, check the domain for fields in HEADERDATAACTION.
It's not "Blank" or "X" but instead A-D-C
05-23-2016 7:54 AM
Attention, check the domain for fields in HEADERDATAACTION.
It's not "Blank" or "X" but instead A-D-C
05-23-2016 9:57 PM
Thank you so much for your help! I change the value to C and it worked perfectly!
What is the transaction that you use to check the domain for the fields?
05-24-2016 7:35 AM
Hi Leandro,
For this kind of issue, in SE37, double click on the structure, double click on the data element, double click on the domain.
If you already know the domain name, you can use SE11