cancel
Showing results for 
Search instead for 
Did you mean: 

Create a new header+item after sync the item some informations are deleted

Former Member
0 Kudos

Hi All,

I have a DO with a backend adapter and 3 bapi wrapper (GetList, GetDetail, Create).

When I create a new instance (header+item) on client side the data are correct in the database. After a sync the instance is also on the client and the Backend but he lost some informations in the item.

For example i create e_top object (header) and t_vehicle object (item) the i added the item to the header an wirte it in the database. In the datebase both tables for header and item are correct filled.

-


Application Code:----


public void SaveVehicle( java.lang.String Manufacturer, int Driver, java.lang.String Licence_Number, java.lang.String Type ) {

VEHICLE_E_TOP e_top = model.createVEHICLE_E_TOP();

e_top.setLICENCE_NUMBER(Licence_Number);

wdContext.nodeVEHICLE_E_TOP().bind(Collections.singleton(e_top));

wdContext.nodeVEHICLE_E_TOP().setLeadSelection(0);

model.addToVEHICLE_E_TOPs(e_top);

VEHICLE_T_VEHICLES t_vehicle = e_top.createNewT_VEHICLESs();

t_vehicle.setDRIVER_ID(Driver);

t_vehicle.setLICENCE_NUMBER(e_top.getLICENCE_NUMBER());

t_vehicle.setMANUFACTURER(Manufacturer);

t_vehicle.setTYPE(Type);

wdContext.nodeVEHICLE_E_TOP().currentVEHICLE_E_TOPElement().model();

e_top.addToT_VEHICLESs(t_vehicle);

wdContext.nodeVEHICLE_T_VEHICLES().bind(Collections.singleton(t_vehicle));

wdContext.nodeVEHICLE_T_VEHICLES().setLeadSelection(0);

model.commit();

Now when I snyc with the middleware the object is still on the client (1 row in the e_top table and 1 row in the item table) but in the row of the item table all data until the header key(Licence_Number) is deleted. In the Backend there is a new objekt with only the header imformations.

Best Regards,

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dirk,

I think a reason could be if you have buildup your Business Object not properly.

We had the same problem as we used one table for the header structure and the item structure.

I think a Vehicle Data Object should have just a header structure in your scenario.

Best regards,

Michael

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

there was another post today n a similar issue. I still do not think it is a standard issue - so lets check first if your implementation is correct.

You should have a look on the CREATE BADI in the backend and on the mapping in the DOE. I expect the CREATE handler does not get all informations form the client, cause you missed to do the propper mapping in the DOE on the middleware. Check this first. If you see the data on the client, the client side should be fine. Check the DOE and its mapping and the BADI implementation on the backend.

Hope it helps!

Regards,

Oliver