cancel
Showing results for 
Search instead for 
Did you mean: 

Item value is showing repeatedly in MI Client.

Former Member
0 Kudos

Hi,

I have two SAP standard BAPIs(GetList & GetDetail) in R/3. Since they are not in MI BAPI wrapper format, I have created two RFCs as per MI BAPI wrapper format, which calls the two standard BAPIs. I have created a SyncBO(S01), specified the RFC destination and mapped the two RFCs.Created the MCD and downloaded the XML file. Using this XML file I have created a MI Smart Sync project. I have uploaded the applcation onto the server & downloaded the aplication in to my MI client.

The application lists all the header values. The problem is with item values, ie, if a particular header record have three item records, its repeatedly showing the first item record three times.Not showing the second and third item records.

Do anyone have a solution for this.

Regards

Shemim

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shemim,

That is the bug in generated project using netweaver developer studio.

In the generated code

you can see the Class TableContentProvider

Please refer these methods

public Vector getTableWithSyncBoInstanceHeader(

String syncBoName,

String syncKey)

{

.....

tableVector.addElement(lineVector);

}

public Vector getTableWithSyncBoInstanceItems(

String syncBoName,

String syncKey,

String itemName)

{

.....

retVector.addElement(itemVector);}

In the generated code , we can see one statement like i mentioned above.

Just replace these statements like this..

tableVector.addElement(lineVector); --- >

tableVector.addElement(lineVector.clone());

retVector.addElement(itemVector); --- >

retVector.addElement(itemVector.clone());

export the warfile again and test.

This should solve your problem

Thanks

Regards

Devendra

Former Member
0 Kudos

Hi Devendrakumar,

Your suggestion solved my problem. Thanks a lot.

Regards

Shemim

Answers (1)

Answers (1)

Former Member
0 Kudos

The only problem now I face is the item values are listing in reverese order.

Former Member
0 Kudos

Hi Shemim,

We had also faced this problem sometime back we replaced

retVector.addElement(itemVector) - >retVector.addElement(itemVector.clone()); in public Vector getTableWithSyncBoInstanceItems{---} method.

This sloved our problem.

Best Regards,

Lakshmi

Former Member
0 Kudos

Hi Lakshmi,

As suggested by Devendrakumar, I have replaced

tableVector.addElement(lineVector) of the method getTableWithSyncBoInstanceHeader

to

tableVector.addElement(lineVector.clone())

and

retVector.addElement(itemVector) of the method getTableWithSyncBoInstanceItems

to

retVector.addElement(itemVector.clone()). Now am able to see all the corresponding item records of a particular header record. But my problem is the item records are listing in reverse order only, ie, the first record is listing as last one,...... I think some sorting is taking place somewhere.

Any suggestions...

Regards

Shemim

Former Member
0 Kudos

Hi Shemim,

We replaced only this;-

retVector.addElement(itemVector) of the method getTableWithSyncBoInstanceItems

to

retVector.addElement(itemVector.clone()).

This sloved our problem.

Best Regards,

Lakshmi

Former Member
0 Kudos

Hi Lakshmi,

I have tried as you said, but still I am getting the records in reverse order only.

Regards

Shemim