cancel
Showing results for 
Search instead for 
Did you mean: 

strange issue

Former Member
0 Kudos

Hi Experts,

i have a table populating data from RFC.i have a column with username and i am populating usernames in that column.

now the RFC had changed the code for username column.usernames are changed to alphabetical order in backend but from webdynpro username column not populating users in aplhabetical order.When i checked in RFC its showing data perfectly but through webdynpro its not working.

Strucuture not chnaged only code had changed.Could any one help me.

Regards,

Suree

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If I understand your query correctly, you are saying that the usernames from the backend are coming in sorting order where as in the front end(Webdynpro view) the results are not shown in sorting order. Am I correct in my understanding?

Are you directly binding the model node to the table? or are you copying the RFC data to some value node?

Regards,

Jaya.

Former Member
0 Kudos

Hi VJR,

I binded value node to the table.

thanks,

Suresh

Former Member
0 Kudos

Hi,

Post the code where you are copying the model node to the value node.

I think the sorting order is getting changed there.

Regards,

Jaya.

Former Member
0 Kudos

HI VJR,

this is my code

wdContext.nodeResultTable().invalidate();

if(wdContext.nodePt_Details().size()>0)

{

for(int i =0;i<wdContext.nodePt_Details().size();i++)

{

IPt_DetailsElement details = wdContext.nodePt_Details().getPt_DetailsElementAt(i);

IResultTableElement result = wdContext.nodeResultTable().createResultTableElement();

result.setusertName(details.getName1());

}

}

Regards,

suresh

Former Member
0 Kudos

Hi,

where you are adding the IResultTableElement to nodeResultTable?

Try adding like this:



wdContext.nodeResultTable().invalidate();
if(wdContext.nodePt_Details().size()>0)
{
for(int i =0;i<wdContext.nodePt_Details().size();i++)
{
IPt_DetailsElement details = wdContext.nodePt_Details().getPt_DetailsElementAt(i);
IResultTableElement result = wdContext.nodeResultTable().createResultTableElement();
result.setusertName(details.getName1());
wdContext.nodeResultTable.addElement(i,result);// Add the element to value node like this.
}
}

Regards,

Jaya.

Former Member
0 Kudos

HI VJR,

i already added the result to the value node but its not working

wdContext.nodeResultTable().invalidate();

if(wdContext.nodePt_Details().size()>0)

{

for(int i =0;i<wdContext.nodePt_Details().size();i++)

{

IPt_DetailsElement details = wdContext.nodePt_Details().getPt_DetailsElementAt(i);

IResultTableElement result = wdContext.nodeResultTable().createResultTableElement();

result.setPatient(String.valueOf(Long.parseLong(details.getKunnr())));

result.setPatientID(details.getKunnr());

result.setPatientName(details.getName1());

wdContext.nodeResultTable().addElement(result);

}}

Regards

Suresh

Former Member
0 Kudos

Hi Suresh,

Please change the code to


wdContext.nodeResultTable.addElement(i,result);// Add the element to value node like this.

Regards,

Jaya.

Former Member
0 Kudos

Hi VJR,

I added its not working same values display.The usernames are not populating by sortingorder.

Regards,

Suresh

Former Member
0 Kudos

Hi,

I doubt that values are not coming in sorting order from RFC.

Confirm this by printing the values in the for loop.

Regards,

Jaya.

former_member187439
Active Participant
0 Kudos

Might be the "sorting" is done in the FM after sending values to Portal????... Please check the order of the ABAP lines of code. May be the "sort" code should be added after some "copy" code or something like that.

Also, in your view, add 1 more table UI (for testing) via "apply template" of this particular model node directly and see the order of the values.

Edited by: Kavitha on Jul 2, 2009 4:07 PM

Former Member
0 Kudos

Hi Kavitha,

I created one UI table and i added model node directly but i am not getting values sorted order still it showing old values.

Regards,

suresh

Former Member
0 Kudos

Hi Suresh

Did you re-import the Model?

afterthat re-start the server.

Go to Portal http://<hostname>:<porttno>/iindex.html -->Webdynpro tools -->Webdynpro console -->Invalidation of ARFC Metadata cache.

Try to remove this cache.

Thanks

Tulasi Palnati

Edited by: Tulasi Palnati on Jul 2, 2009 2:04 PM

Former Member
0 Kudos

Hi,

After changing the code at backend, Did you test the BAPI in SAP GUI? I guess problem is at backend?

Regards,

Charan

former_member187439
Active Participant
0 Kudos

If so, could you paste the FM ABAP code here? The code part in which sort is done and values are passed to output table.

Former Member
0 Kudos

HI VJR,

I printed the values with in the forloop but the usernames are pritning old Vaules.

I am unable to find whats happenig from webdynrpo every thing is fine from my side but why from webdynpo it populating old vaules.

Regards,

suresh

Former Member
0 Kudos

HI Krishna,

Wheni am executing FM in backend its working fine.usernames are populating in sorted order but from webdynro its not populating users in sorted order.Just i am picking that userscolumn from Backend and displaying in webdynpro.

Regards,

Prasad

Former Member
0 Kudos

HI Kavitha,

In backend sorted order had done for usernames in FM.From webdynpro also i need to sorted for that usernames columns.

Regards,

Suresh

Former Member
0 Kudos

Hi Suresh,

This might happen:

In the SAP GUI (for particular client) may the result was sorted out based on the userid. (Just my guess).

Just check with the ABAP developer that, did they do any specific code to send the result in sorted order? If they didn't do and the result is coming automatically means, there was some personilization done in SAP GUI to show the result in sorted order of userid.

Regards,

Jaya.

former_member187439
Active Participant
0 Kudos

Yes, I understood your problem. If you could paste the ABAP code here, it would help to find the issue. Meanwhile like what Jaya says, make sure that the client is SAME both in R3 where you are testing the FM and also in your Portal JCO.

Answers (2)

Answers (2)

former_member187439
Active Participant
0 Kudos

If you are sure that only the code is changed, then model re-import and server restart are surely not required.

Are the number of outputs (users) displayed in R3 and WebDynpro same? Are the inputs that you are passing in SE37 exactly same as what you are passing from WebDynpro? (Number of digits if numeral, and case sensitiveness if alphabets). Please check them once.

Edited by: Kavitha on Jul 2, 2009 2:04 PM

Former Member
0 Kudos

Re-import the RFC model...and restart the server after the re-import.