on 11-08-2006 12:56 PM
Hi,
I try to change the student address with the bapi : bapi_student_address_change. When I run the application, there is no error, but no data is changed !
Here is my code :
-
public void ExecuteAddressChange( )
{
//@@begin ExecuteAddressChange()
Bapi_Student_Address_Change_Input inputAddressChange =
new Bapi_Student_Address_Change_Input();
wdContext.nodeStudent_Address_Change().bind(inputAddressChange);
Bapi_Transaction_Commit_Input inputCommit =
new Bapi_Transaction_Commit_Input() ;
wdContext.nodeStudentAddressCommit().bind(inputCommit) ;
String address = wdContext.currentAddressdataElement().getStreet();
String postalCode =
wdContext.currentAddressdataElement().getPostl_Cod1();
String houseNo = wdContext.currentAddressdataElement().getHouse_No();
String City = wdContext.currentAddressdataElement().getCity();
String telephone = wdContext.currentStudent_Address_GetdetailElement().getNoTelephone() ;
String mobile = wdContext.currentStudent_Address_GetdetailElement().getNoMobile();
String objectID = wdContext.currentStudent_Address_GetdetailElement().getObjectid();
com.sap.cm.studentchange.model4.Bapibus1006_Address model =
new com.sap.cm.studentchange.model4.Bapibus1006_Address();
model.setStreet(address);
model.setPcode1_Ext(postalCode);
model.setHouse_No(houseNo);
model.setCity(City);
wdContext.nodeAddressdata2().bind(model) ;
Bapibus1006_Address_X modelX = new Bapibus1006_Address_X();
modelX.setStreet(true);
modelX.setPcode1_Ext(true);
modelX.setHouse_No(true);
modelX.setCity(true);
wdContext.nodeAddressdata_X().bind(modelX) ;
try {
wdContext
.currentStudent_Address_ChangeElement()
.modelObject()
.execute();
wdContext
.currentStudentAddressCommitElement()
.modelObject()
.execute() ;
} catch (Exception ex) {
// If an exception is thrown, then the stack trace will be printed
ex.printStackTrace();
}
//@@end
-
Can you help me ?
Thanks,
Mathieu
Hi,
After model.setCity(City) try this,
inputAddressChange.add<>(model);
Same for another structure
inputAddressChange.add<>(modelX);
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the lines
com.sap.cm.studentchange.model4.Bapibus1006_Address addmodel =
new com.sap.cm.studentchange.model4.Bapibus1006_Address();
addmodel .setStreet(address);
addmodel .setPcode1_Ext(postalCode);
addmodel .setHouse_No(houseNo);
addmodel .setCity(City);
inputAddressChange.add<Find the method>(addmodel);
I don't understand the second structure...Kindly clarify
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan,
I will check the line, but there is no add method for the parameter type : com.sap.cm.studentchange.model4.Bapibus1006_Address
I have already develop a java client interface to change user data and I use both structures ADRESS (with values) and ADDRESSX (with flags that corresponding value updated).
Regards,
Mathieu
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.