on 11-09-2006 10:19 AM
Hi,
I develop web dynpro application to modify student data. I use this BAPI :
BAPI_STUDENT_CHANGE3 and BAPI_TRANSACTION_COMMIT.
The return message of BAPI_STUDENT_CHANGE3 is :
"Instance 0150000201 of object type Student has been change."
But there is no modification in the database !
Why ?
Can you help me ?
Best regards,
Mathieu
Here is my code :
//@@begin ExecuteSaveData()
Bapi_Student_Change3_Input inputStudentChange =
new Bapi_Student_Change3_Input();
wdContext.nodeBapi_Student_Change3_Input().bind(inputStudentChange);
Bapi_Transaction_Commit_Input commit =
new Bapi_Transaction_Commit_Input();
wdContext.nodeBapi_Transaction_Commit_Input().bind(commit);
String lastName =
wdContext.currentEt_Students_Student_SearchElement().getNachn();
String firstName =
wdContext.currentEt_Students_Student_SearchElement().getVorna();
String middleName =
wdContext.currentEt_Students_Student_SearchElement().getMidnm();
Date birthDate =
wdContext.currentEt_Students_Student_SearchElement().getGbdat();
String objectID =
wdContext.currentEt_Students_Student_SearchElement().getObjid();
wdContext.currentBapi_Student_Change3_InputElement().setObjectid(
objectID);
Bapistudent_Personal model = new Bapistudent_Personal();
model.setLast_Name(lastName);
model.setFirst_Name(firstName);
model.setMiddle_Name(middleName);
model.setDate_Birth(birthDate);
wdContext.nodeStudentpersonaldata_Student_Change().bind(model);
Bapistudent_Personalx modelX = new Bapistudent_Personalx();
modelX.setLast_Name(true);
modelX.setFirst_Name(true);
modelX.setMiddle_Name(true);
modelX.setDate_Birth(true);
wdContext.nodeStudentpersonaldatax_Student_Change().bind(modelX);
try {
// Calls remote function module ExecuteStudentSearch
wdContext
.currentBapi_Student_Change3_InputElement()
.modelObject()
.execute();
wdContext
.currentBapi_Transaction_Commit_InputElement()
.modelObject()
.execute();
} catch (Exception ex) {
// If an exception is thrown, then the stack trace will be printed
ex.printStackTrace();
}
Hi,
Bapi_Student_Change3_Input inputStudentChange =
new Bapi_Student_Change3_Input();
wdContext.nodeBapi_Student_Change3_Input().bind(inputStudentChange);
Why don not do like this.
inputStudentChange.setlastName(wdContext.currentEt_Students_Student_SearchElement().getNachn());
inputStudentChange.setFirstName(wdContext.currentEt_Students_Student_SearchElement().getVorna());
inputStudentChange.setmiddleName(wdContext.currentEt_Students_Student_SearchElement().getMidnm());
inputStudentChange.setbirthDate(wdContext.currentEt_Students_Student_SearchElement().getGbdat());
inputStudentChange.setObject(
wdContext.currentEt_Students_Student_SearchElement().getObjid());
The same thing commint BAPI also
Try like this it might helps you.
Thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lohitha,
Thanks for your help. My solution was :
.....
Bapistudent_Personal data = new Bapistudent_Personal() ;
data.setLast_Name(lastName);
data.setFirst_Name(firstName);
data.setMiddle_Name(middleName);
data.setDate_Birth(birthDate);
inputStudentChange.setStudentpersonaldata(data) ;
Bapistudent_Personalx datax = new Bapistudent_Personalx() ;
.....
Regards,
Mathieu
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.