on 07-16-2007 4:54 PM
Hi,
I am creating an AWT application using smart sync.
I have a backend server.. where i have creating a Table called ZPatient
There is just one table with foru attributes .
I have put some entries in the backend table.
I have written a Bapi wrapper for getList().
and I am able to get the details in my Mobile client.
I have also written a Bapi wrapper for create
When I add from the mobile client and then sync..... I am able to see the new entry in the MI Client but that entry is not showing in the backend server table. instead a entry is added whose id is 0 and all other entries are empty....
My inbound worklist is also not showing any data.
am i doing anything wrong..
please help!!
regards,
Sougata.
hi all,
thanks every one for ur reply....
I solved the problem ...
I had not mapped the syncBO with create() wrapper in the MI SERVER (merep_sbuilder).
mapping the fields solved the problem.
regards.
Sougata.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sougata,
Also in the create bapi, make sure that the entry is created in the backend by checking the sy-subrc value after insert. In case of failure, fill the bapiret2 and sent back an error message.
Regards
Ajith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sougata,
SY-SUBRC value 4 means the record is not created. Check the data you are trying to insert.
So I think the problem you are facing is just because the data is not properly created in the backend..
For filling bapiret..
If the return parameter (BAPIRET2) is an export parameter, the code should be something like this..
if sy-subrc is not initial. "Error
RETURN-TYPE = 'E'.
RETURN-MESSAGE = 'Your error message".
else. "sucess
RETURN-TYPE = 'S'.
RETURN-MESSAGE = "Sucess".
endif.
If return is a table, declare a local workarea and append it to the return table..
If you use a message class instead of hard coding the message, use the function module BALW_BAPIRETURN_GET2 fill the bapiret structure..
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
TYPE = " E or S
CL = "message class name
NUMBER = "message number
PAR1 = ' ' "parameter if any
PAR2 = ' ' "parameter if any
PAR3 = ' ' "parameter if any
PAR4 = ' ' "parameter if any
LOG_NO = ' '
LOG_MSG_NO = ' '
PARAMETER = ' '
ROW = 0
FIELD = ' '
IMPORTING
RETURN =
.
Hope this helps....
Regards
Ajith Chandran
Could you let me know the bapi wrappers present for this synbo.
do u have getdetail bapi wrapper
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Raghavendra,
thnks for the reply
I have defined all the bapi wrappers for the syncBo zpatient ...
i have coded only for getList() and create() . I havent implemented getDetails() since I have only one table ZPATIENT in the backend.
this is the code that i have written in create()
e_patientid = i_top-patientId.
INSERT INTO ZPATIENT VALUES I_TOP.
where, I-TOP is the import parameter and e_patientid is the export parameter.
HI, Raghavendra
I have also implemented the GETDETAILS ...
But the same problem persists
I tried printing the values after the insert statement in create.
write: / i_top-FIRSTNAME, i_top-patientId.
the values are empty..... i.e. i_top-patientid is 0 where as i had put 36
is there any problem in the MI server ??
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.