cancel
Showing results for 
Search instead for 
Did you mean: 

meRepMeta.xml doesn't work for MAM 2.5

Former Member
0 Kudos
66

I have a problem with my meRepMeta.xml.

Background: Before we used WAS 6.20 and MAM 2.0. Exporting the XML file for our upload SYncBO and added to the original meRepMeta.xml worked well. At least the following code worked were Z_EPC is the name of our own SyncBO id:


...
private static SyncBoDataFacade dataFacade;
private static SyncBoDescriptorFacade descFacade;

public static boolean saveImageFile(){
		
dataFacade = SmartSyncRuntime.getInstance().getSyncBoDataFacade(VisibilityType.SEPARATED); 
descFacade = SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade();
SyncBoDescriptor descr = descFacade.getSyncBoDescriptor("Z_EPC"); 
SyncBo imgBo; 
   try {imgBo = dataFacade.createEmptySyncBo(descr);} 
	catch (ModificationNotAllowedException e) { 
				   e.printStackTrace(); 
				   return false;}
...

No we have upgraded to WAS 6.40 and MAM to version 2.5. The exported meRepMeta.xml from the WAS 6.40 system looks like this:


...
<SyncBO id="Z_EPC" version="3" type="upload" allowCreate="true" allowModify="false" allowDelete="false" reqDirectSync="false">
<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="USER_NAME" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="FORMAT" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="TIME_STAMP" type="N" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="OBJ_TYPE" type="C" length="2" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="OBJ_NUM" type="N" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="ITEM_NO" type="N" length="5" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="RESOURCE" type="N" length="15" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="NAME" type="C" length="128" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<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="SEQ_NUM" type="N" length="16" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
<Field name="DATA" type="C" length="252" decimalLength="0" signed="false" isKey="false" isIndex="false">
  <Input type="modify">false</Input> 
  </Field>
  </ChildStructure>
  </TopStructure>
  </SyncBO>
...

Running MAM with the code on top will not work. If I change the "Z_EPC" to the existing MAM25 SyncBO, "MAM25_005" for example, the code works.

SyncBoDescriptor descr = descFacade.getSyncBoDescriptor("MAM25_005");

Is it something wrong with the meRepMeta file or has it to do with something else?

Kind Regards,

Daniel Guldbrandsen

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks Jo! I ran the code and it cam back with:

Installed SyncBo Names: MAM25_041

Installed SyncBo Names: MAM25_016

Installed SyncBo Names: MAM25_031

Installed SyncBo Names: MAM25_010

Installed SyncBo Names: MAM25_001

Installed SyncBo Names: MAM25_006

Installed SyncBo Names: MAM25_070

I guess that means I'm using the new MAM 2.5 SyncBOs. Should I get all the SyncBO names with that call, including my own?

Cheers,

Daniel

Former Member
0 Kudos

hello daniel,

this means that the meRepMeta.xml included in the MAM

application package deployed to your client is the OLD

metadata. try the following steps:

1) download the meRepMeta.xml from your 6.4 system having

the new SyncBo names i.e. Z_EPC***.

2) Unpack you MAM WAR archive and overwrite the

meRepMeta.xml file with the file you downloaded in step 1.

3) Create the WAR file of your application.

-> steps 2 & 3 means that you just have to update the

meRepMeta.xml in your MAM WAR archive.

4) Upload and register your MAM application to the WebConsole then assign it to your client. <b>(If you have existing MAM installation on your client, you need to undeploy it prior to your updated MAM deployment.)</b>

5) Redeploy the application by synching your device.

I would recommend trying it using a clean MI installation.

If you hate reinstallation of MI client, there's a faster way to do it also.

Try to refer to my blog at

/people/sap.user72/blog/2005/11/17/reinitialize-mi-client-without-reinstallation-in-seconds

Regards

Jo

Former Member
0 Kudos

Rahul: Yes, I checked the BAPI wrapper and it returned no error.

Jo: I created my own SyncBO, and generated it. Thanks for the info about the mobileID...

Thanks,

Daniel

Former Member
0 Kudos

hello daniel,

just some clarification.

did you use the same MAM application you deployed into your client in 6.2 after you moved to 6.4?

if yes -> you need to include the new meRepMeta.xml from your 6.4 system into the MAM application i.e. overwrite your old meta xml with the new one.

you need to redeploy the application package having the new meRepMeta.xml in it, for the metadata to be persisted in the client.

try listing the metadata of your application by using

SyncBoDescriptorIterator boDescs = descriptorFacade.getAllSyncBoDescriptors();
while(boDescs.hasNext())
  System.out.println("Installed SyncBo Names: "+ boDescs.next().getSyncBoName());

if the names are the old names i.e. MAM_xxx, try checking

on the meRepMeta.xml on the root folder of your deployed

MAM. if it is the new one, try redeploying your application.

regards

jg

Former Member
0 Kudos

THanks... That was what we thought, so we have another problem. We're not getting any data back to the backend when running the SyncBO emulator. Anyone having a go at the first question

Thanx,

Daniel

Former Member
0 Kudos

Hi Daniel,

For the first question:

Use RFC BAPI Wrapper Check in the transaction MEREP_SBUILDER to check the BAPI wrappers for the SyncBO 'Z_EPC'. Please let me know if you get any error.

Regards,

Rahul

Former Member
0 Kudos

hello daniel,

did you create the syncBos or change existing MAM syncBos

thru the syncboBuilder? did you regenerate the syncBos?

treat the emulator as a device client. yes, the modification

will be reflected into the backend. be careful however when

using a mobileID of an existing mobile client. a mobile

client assigned with that mobileID will not be able to sync

with the MW since its state in the MW had been changed thru

the emulator...

jg

Former Member
0 Kudos

Hi Jo! Thanks for getting back to me that quick! Yes, I downloaded the meRepMeta.xml and added it to my application. Then uploaded the app and then deployed it to the device...

Another question: When I'm using the SyncBO emulator with my SyncBO, should I see data coming back to the backend or does it just inform you if it works or not?

Don't really know what is wrong here...

Thanks again!

/Daniel

Former Member
0 Kudos

Hei

Yes it should, but only if you have COMMIT WORK in your backend BAPI.

Best Regars

Morten

Former Member
0 Kudos

Hello Daniel,

Did you include your new meRepMeta.xml into your application

archive and redeploy it? Try checking on the meRepMeta.xml

version on the application deployed on the client...

Regards

Jo