cancel
Showing results for 
Search instead for 
Did you mean: 

global syncbo & local syncbo

Former Member
0 Kudos

1)what is the different btw global syncbo & local syncbo

2)what doest this statement trying to say :

Create and modify is in respect of the SyncBo and not of the child Row.

This means changing a field (also on child Row) of a global SyncBo is a modifcation while changing a field (also on child Row) of a local SyncBo is a creation.

3) i cannot find <u>field UNRESTRICTED</u> mentioned by the thread below in my xml

<u>field UNRESTRICTED</u> has a

FORBIDDEN CreateInputQualifyType defined in your metadata.

according to this

i have my original xml like this

<?xml version="1.0" encoding="utf-8" ?>

- <MeRepApplication schemaVersion="1.1" id="ZAM_08" version="01">

<Property name="CLIENT.BUILDNUMBER" />

<Property name="C_APPLRESOLVE">X</Property>

<Property name="DATA_VISIBLE_SHARED">X</Property>

<Property name="E_APPLRESOLVE">X</Property>

<Property name="FACADE_C_CLIENT">X</Property>

<Property name="FACADE_E_CLIENT">X</Property>

<Property name="HOMEPAGE.INVISIBLE" />

<Property name="INITVALUE" />

<Property name="RUNTIME">JSP</Property>

<Property name="TYPE">APPLICATION</Property>

- <SyncBO id="ZAM_08" version="2" type="twoWay" allowCreate="false" allowModify="true" allowDelete="false" reqDirectSync="true">

- <TopStructure name="TOP">

- <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

<Input type="create">false</Input>

<Input type="modify">false</Input>

</Field>

<Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

- <ChildStructure name="010">

- <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

<Input type="create">false</Input>

<Input type="modify">false</Input>

</Field>

<Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="STORT" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

<Field name="TXT50" type="C" length="50" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Input type="create">false</Input>

</ChildStructure>

</TopStructure>

</SyncBO>

</MeRepApplication>

<b>meaning i have to change to this</b>

<?xml version="1.0" encoding="utf-8" ?>

- <MeRepApplication schemaVersion="1.1" id="ZAM_08" version="01">

<Property name="CLIENT.BUILDNUMBER" />

<Property name="C_APPLRESOLVE">X</Property>

<Property name="DATA_VISIBLE_SHARED">X</Property>

<Property name="E_APPLRESOLVE">X</Property>

<Property name="FACADE_C_CLIENT">X</Property>

<Property name="FACADE_E_CLIENT">X</Property>

<Property name="HOMEPAGE.INVISIBLE" />

<Property name="INITVALUE" />

<Property name="RUNTIME">JSP</Property>

<Property name="TYPE">APPLICATION</Property>

- <SyncBO id="ZAM_08" version="2" type="twoWay" allowCreate="false" allowModify="true" allowDelete="false" reqDirectSync="true">

- <TopStructure name="TOP">

- <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

<Input type="create">false</Input>

<Input type="modify">false</Input>

</Field>

<Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

- <ChildStructure name="010">

- <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">

<Input type="create">false</Input>

<Input type="modify">false</Input>

</Field>

<Field name="BUKRS" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="ANLN1" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="ANLN2" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="STORT" type="C" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false" />

<Field name="TXT50" type="C" length="50" decimalLength="0" signed="false" isKey="false" isIndex="false" />

</ChildStructure>

</TopStructure>

</SyncBO>

</MeRepApplication>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Adding Ajith's reply.

Global sync key and local synckey.

Local synckey is the synckey..when we create any record from client.

Global synckey is the records which was creted in MI server..and then downloaded to client after sync.

Concept remains same with respect globalsyncbo and local syncbo.

Thanks & Regards,

Karthick

Answers (4)

Answers (4)

Former Member
0 Kudos

hi yzme,

first, i would like to suggest if you can separate your queries into different thread

of different topics. this way it will benefit future readers.

> 1)what is the different btw global syncbo & local syncbo

this was already answered. HOWEVER there's one thing missing.

global syncbo - instances which also exists in the backend

this definition is correct. but for local syncbo, definition differs a little bit depending

on the context since we have 2 types of this kind:

- syncbos which are created in the client but are not inserted in the backend yet.

--> these syncbos have their actual definition in the middleware i.e. syncbo builder

- offline syncbos i.e. those syncbos which are not and will not be uploaded thru

all time.

--> these syncbos may or may not have their actual definition in the middleware.

you can manually add a syncbo definition into your meRepMeta.xml and add the

attributes to make it a "local syncbo". for those defined via syncbo builder, their

suppressUpload and suppressDownload attributes are checked. they will have

their corresponding BAPIs which will be never called at all since they won't be

uploaded... nor a download request will be sent!

> 2)what doest this statement trying to say :

> This means changing a field (also on child Row) of a

> global SyncBo is a modifcation while changing a field

> (also on child Row) of a local SyncBo is a creation.

again, global syncBo has an image in the backend. changing a field in header or

in existing items; and/or inserting a new item and/or deleting an existing item

means modifying a syncbo. when the delta is sent, the middleware will look for

the existing business object and "MODIFY" it... for local syncbo (to be specific,

an unsync syncbo), any succeeding manipulations you do after you have inserted

the syncbo into the client's repository will not be recorded. eventhough from the

client repository's point of view you are actually modifying it, the delta upload

message will still create an "ADD" request during synchronization. this is because

this instance is not yet in the backend and doesn't have a global synckey yet.

from the backend's point of view, this is insertion of a new record and not modify.

hope this is clear now?

regards

jo

Former Member
0 Kudos

hi,

This XML generated depends on the field being existing in the BAPI wrappers. If u want to create and modify a field then it must be present in the create and change bapi and must be mapped.

Thanks..

Preetham S

Former Member
0 Kudos

Hi Yzme,

In your context local and global syncBos are a little different.

Global SyncBos are synchronized with the middleware but the local syncBos are present only in the client, the middleware will not know that they exist.

Also changes to the CreateInputQualifyType should be done from the middleware level and not directly in the xml.

Best Regards,

Karthik

AjithC
Employee
Employee
0 Kudos

Global means the object is present in both client and in the backend (ofcourse on MI server also).

Local means its currently only in client. Not yet synced to the backend..

So if you edit the global syncBO, what ever changes you make (e.g creating a new item row, deleting an item row or changing any fields), its still a modification to the object in the backend. That means at the end modify bapi will be called..

If the object is local, that means its not present in the backend.. If you make changes, it make sense to accumulate all the changes and then call the create bapi at the end rather than calling create with initial data and then modifying the same..

Hope its clear...

Ajith

Former Member
0 Kudos

>>Global means the object is present in both client and in the backend (ofcourse on MI server also).

>>Local means its currently only in client. Not yet synced to the backend

i have a list of records which is downloaded into the client, i modify 1 of the rows,

it is consider global syncbo ---Modification or local syncbo ---INSERT.

the record both exist in middleware and client , only different is the value.

what do you mean by global syncbo modification, how do i do modify record in middleware? i though i can only modify the record in client and upload it back to ME.

>>>Also changes to the CreateInputQualifyType should be done from the middleware level and not directly in the xml.

what do you mean by this..?

>>>This XML generated depends on the field being existing in the BAPI wrappers. If u want to create and modify a field then it must be present in the create and change bapi and must be mapped.

I just want to modify a row , but somehow it will trigger the unexpected action = INSERT. it is consider local syncbo -INSERT, but this record exist in the ME.

4) when i check the merep_mon inbox, it is successful

and check the log it shows

ERROR part

top record read from R/3 itab, conflict detected

-


Cl. Run Number

Msg Cntr. RT Cntr. Msg Type Created on Time Message text

-


100 38021

1 3 I 30.08.2007 18:06:01 MEREP_HANDLER has started for run number 0000038021 and runtime counter 3

2 3 D 30.08.2007 18:06:01 Return code 0 (HANDLER ENABLED)

3 5 I 30.08.2007 18:06:01 Z_MEREP_GEN_S01_____ZAM_09 has started for run number 0000038021 and runtime counter 5

4 5 N 30.08.2007 18:06:01 Metadata reading was successful (SyncBO=ZAM_09, #=47)

5 5 N 30.08.2007 18:06:01 Default values loaded successfully (SyncBO=ZAM_09, #=0)

6 5 N 30.08.2007 18:06:02 Header=ZAM_09, items=0000001668 stored from mbl10100 into itab (sBO=0,Mobile ID=0)

7 5 D 30.08.2007 18:06:02 Filling common fields; struct ID=TOP, send mask=00000000000000000000000000000000000000000000000000, sync key=0001313285, action=M

8 5 D 30.08.2007 18:06:02 Filling common fields; struct ID=010, send mask=00000000000000000000000000000000000000000000000000, sync key=0001313286, action=M

9 5 D 30.08.2007 18:06:02 Retrieving internal table of RDB header (header key=10000000000010020000, #=1)

10 5 N 30.08.2007 18:06:02 Match found for header key 10000000000010020000 (sync key=0001313285)

11 5 N 30.08.2007 18:06:02 Before BAPI wrapper call: GetDetail

12 6 I 30.08.2007 18:06:02 ZBAPI_AM_DETAILS_V3 has started for run number 0000038021 and runtime counter 6

13 6 I 30.08.2007 18:06:02 ZBAPI_AM_DETAILS_V3 has finished for run number 0000038021 and runtime counter 6

14 5 S 30.08.2007 18:06:02 Return code from RFC BAPI Wrapper call:

15 5 D 30.08.2007 18:06:02 Changing R/3 object header and RDB header (sync key=0001313285, R/3 key=10000000000010020000)

16 5 N 30.08.2007 18:06:02 Item exists in RDB already (parent synchronization key=0001313286, R/3 key=10000000000010020000)

17 5 I 30.08.2007 18:06:02 Line items: R/3 key=10000000000010020000, synchronization key=0001313285, action=D, item number=1

18 5 I 30.08.2007 18:06:02 Line items: add=0, changed=0, deleted=0, not changed=0

19 5 I 30.08.2007 18:06:02 Objects found in R/3=1, passed filter=0, loaded filter=1

20 5 I 30.08.2007 18:06:02 Objects: Add=0, changed=0, deleted=1, not changed=0

21 5 D 30.08.2007 18:06:02 Getting synchornizer worklist records (mobile ID=0000001668, #=1)

22 5 N 30.08.2007 18:06:02 TOP record (seq.no.=10, counter=0000000001) read for mobile ID 0000001668

23 5 W 30.08.2007 18:06:02 TOP record read from R/3 itab; conflict detected (sync key=0001313285)

24 5 D 30.08.2007 18:06:02 Header action from mobile="MOD", R/3 action="DEL"

25 5 I 30.08.2007 18:06:02 Mobile ID=0000001668: Total records=2, total worklists=1, conflicts detected=1

26 5 I 30.08.2007 18:06:02 Mobile ID=0000001668: Added=0, changed=2, deleted=0

27 5 N 30.08.2007 18:06:02 Updating RDB header/item (SyncBO=ZAM_09, mobile ID=0000001668, headers=#1,items=#0)

28 5 D 30.08.2007 18:06:02 Getting header from download itab (sync key=0001313285, #=0, data=TOP0001E0000000000000000000000000000000000000000000000000000000000000000001313285 D20070830)

29 5 S 30.08.2007 18:06:02 Downloader completed successfully (mobile ID: 0000001668, SyncBO: ZAM_09)

30 5 D 30.08.2007 18:06:02 Return code 0 (UPDATE MEREP_506-STATUS)

31 5 D 30.08.2007 18:06:02 Return code 0 (ENQUEUE MEREP_502)

32 5 D 30.08.2007 18:06:02 Return code 0 (SELECT MEREP_502)

33 5 D 30.08.2007 18:06:02 Return code 0 (INSERT MEREP_504)

34 5 D 30.08.2007 18:06:02 Return code 0 (UPDATE MEREP_502)

35 5 D 30.08.2007 18:06:02 Return code 0 (INSERT MEREP_505)

36 5 D 30.08.2007 18:06:02 Return code 0 (DEQUEUE MEREP_502)

37 5 I 30.08.2007 18:06:02 Z_MEREP_GEN_S01_____ZAM_09 has finished for run number 0000038021 and runtime counter 5

-


worklist printscreen in doc format

http://www.savefile.com/files/1014947

Bapi function

http://www.savefile.com/files/1005882

Message was edited by:

yzme yzme

Message was edited by:

yzme yzme

Former Member
0 Kudos

>Local means its currently only in client. Not yet

> synced to the backend

be careful of this definition. if a syncbo have suppressUpload and suppressDownload

attributes set to true, no download nor upload will happen... see my previous post.

> i have a list of records which is downloaded into the

> client, i modify 1 of the rows,

this is MODIFY.

> what do you mean by global syncbo modification, how

> do i do modify record in middleware? i though i can

> only modify the record in client and upload it back

> to ME.

you can directly modify a record by editing a field e.g. from se16/se17

or from another SAP application.

>Also changes to the CreateInputQualifyType should

> be done from the middleware level and not directly in

> the xml.

> what do you mean by this..?

the attributes will be assigned accordingly depending on you syncbo definition

and mapping in the middleware. manually removing or editing the xml metadata

might cause you a problem especially for those fields like synckey which has

to be assigned only by the backend. some backend apps don't behave properly

if such field of the business object is not empty.

> I just want to modify a row , but somehow it will

> trigger the unexpected action = INSERT. it is

> consider local syncbo -INSERT, but this record exist

> in the ME.

are you sure that the client sends an ADD request? you can check this in the

mobile worklist. see the action field... if it is ADD, then there's something wrong

in the client app. if it is MODIFY, then there's something wrong with your MODIFY

BAPI.

> 4) when i check the merep_mon inbox, it is successful

> and check the log it shows

> ERROR part

check on your ZBAPI_AM_DETAILS_V3 BAPI if it returns the whole BO instance.

i already forgot looking on these logs, but i think your get details bapi doesn't

return the object. thus R/3 then consider as the object had been deleted. thus

returning a conflict...

regards

jo