Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Insert TOP header in SyncBO S01

Hi all,

I have a SyncBo S01. I have done a test with MDK_inventory smart application. (MI 2.5 sp15)

This is my syncBO:

<Property name="CLIENT.BUILDNUMBER">1.2</Property>

<Property name="C_APPLRESOLVE" />

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

<Property name="E_APPLRESOLVE" />

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

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

<Property name="HOMEPAGE.INVISIBLE" />

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

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

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

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

- <TopStructure name="TOP"

This SyncBO not have a Item.

For add new record in my syncBo, I have this code:

dbAccess.loadHeaderFieldNames(SYNCBO_CID);

String names[]=dbAccess.getArrayHeaderFieldNames();

String values[]=new String[names.length];

for (int i=0;i < names.length;i++){

if (names<i>.equalsIgnoreCase("SHORT")){

values<i>="SHORT TEST1";

}else{

if (names<i>.equalsIgnoreCase("STEXT")){

values<i>="STEXT TEST1";

}else{

values<i>="";

}

}

}

try{

dbAccess.addRowInDB(SYNCBO_CID,values);

}catch(Exception e){

}

I insert only 2 values in the header while the other fields are empty.

client not have problem and not have error, the sync is exececute in correct mode.

But in the MW I not found the new record and I think that is not even called the Create BAPI wrapper.

Can someone help me ?

Former Member replied

hello rocco,

did you redeploy your application with this new metadata?

- <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="SHORT" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false" /> 
<Field name="STEXT" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false" /> 
</TopStructure>

with this metadata, you will be able to modify your field

values...

if your syncbo attribute has allowCreate="true" etc, you

will be able to insert new syncbo into your data facade.

if the "insert forbidden" exception appears, try

redeploying your xml metadata.

regards

jo

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question