2005 Oct 06 8:25 PM
Hi,
I am trying to change the customer address using BAPI_CUSTOMER_CHNAGEFROMDATA1. I got the message "Make an entry in all fields where required"
Below is my C# code:
string custNo ="0001000464";
string salesOrg = "XUS1";
string distChan = "01";
string div ="01";
BAPIKNA101_1 persData = new BAPIKNA101_1();
persData.House_No = "Alsterdorf 192";
persData.City = "Bruncwick";
persData.Postl_Cod1 = "32642";
persData.Country = "DE";
persData.Tel1_Numbr = "67-375-3675";
BAPIKNA101_1X persDataX = new BAPIKNA101_1X();
persDataX.Country = "X";
persDataX.City ="X";
persDataX.District = "X";
persDataX.House_No = "X";
persDataX.Postl_Cod1 = "X";
persDataX.Tel1_Numbr = "X";
BAPIKNA105 optPersData = new BAPIKNA105();
BAPIKNA105X optPersDataX = new BAPIKNA105X();
BAPIKNA106 compData = new BAPIKNA106();
BAPIKNA106X compDataX = new BAPIKNA106X();
BAPIKNA105 optCompData = new BAPIKNA105();
BAPIKNA105X optCompDataX = new BAPIKNA105X();
SAP.Connector.BAPIRETURN1 return0 = new SAP.Connector.BAPIRETURN1();
cs.ChangeFromData1(persData, persDataX, optPersData, optPersDataX, compData, compDataX, optCompData, optCompDataX, salesOrg, distChan, div, out return0,
custNo);
I would appreciate if anyone can tell me how I can solve this error.
Thank you in advance,
Sunny
2005 Oct 06 8:27 PM
2005 Oct 06 8:27 PM
2005 Oct 07 12:58 AM
Rich,
Thank you for your suggestion. However, I tried by using FD01 to create a new record and FD02 to change. It doesn't require anything I did not provide so I am puzzled as to what I should do to solve this error.
Sunny
2005 Dec 01 9:49 AM
Hello,
You have to enter the customer No BAPIKNA103-CUSTOMER .
Netaji.b
2005 Oct 06 8:40 PM
I don't know C# code, but I think you haven't supplied any street address and in most cases it is a required field. Pass something for the street1 field and see if you get the error.
Please take a look at your other posts to see if they are answered and close if so.
Regards,
Srinivas
2005 Oct 06 9:53 PM
It looks to me like you're telling it that you're going to update the district (persDataX.District = "X";) but then not supplying a value.
Rob
2005 Oct 07 4:04 AM
Sometimes when you change a customer programatically, you come across one that was created in an earlier version without data needed in a later version. Check to see (FD02) if this customer is missing the search term. If it is and you don't add it, you'll get this error.
Rob
2005 Oct 07 6:04 PM
Rob,
I could get it to work now. It is just that I need to specify firstname, lastname, language and currency as well.
Thank you for your help.
sunny