cancel
Showing results for 
Search instead for 
Did you mean: 

table binding problem

Former Member
0 Kudos

Hi all,

I am developing an application which uses ABAP function modules. I have a very strange problem with 2 tables in that app (the other tables work perfect):

the tables remain empty after pushing the button that causes the action to call the function module.

The functions which are called to fill this table are tested and they return the correct result (a table with content). I know as well that the application gets access to these functions. This is because I have placed an HTTP-breakpoint in them and I see that the function is completed, as well as that the exporting table is filled with the result. Does anyone know the reason why my table could remain empty? I really don't have a clue since I bound it the the exporting values and all my other tables work (and I think I constructed them in a similar way).

Thanks in advance,

Tom

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Tom,

1.Are you execute the BAPI indidualy and get the results?

2.Check the Size of the Output Result.

Is these things are Ok then,

You can Delete the table and re create it.

This will work. I also got the same problem. I recover it like that

Kind Regards,

Mukesh.

Former Member
0 Kudos

Hi,

the invalidate is done after the execute

where do i need to put the code with the response and will it work in my case with an array?

@mukesh, what exactly do you mean? when i place my http-breakpoint i see that the function returns a result, but it doesn't appear in the table. and how do i check the size?

thanks,

tom

Former Member
0 Kudos

Hi

Try invalidating the model node first and then execute ur BAPI.

Hope this should work.

Regards,

Rathna Ramamoorthy.

Former Member
0 Kudos

Hi,

If it's the model output/response node that is being invalidated after calling execute on your model object, there will be no data in the model nodes.

So you should place your invalidate call just before calling executing. But make sure that you are not invalidating your model input/request node. Otherwise your BAPI call will fail.

Regards,

Satyajit.

Former Member
0 Kudos

changing the order of the invalidate and execute didn't work either...

how can i check if the function gives back the result to the application?

Former Member
0 Kudos

Can you post the code in the onAction method of the button where u r executing the BAPI?

Former Member
0 Kudos

Hi Tom,

After execution you check the size of the output node like.

IPrivate<ViewName>.I<BapiOutput>Node node=wdContext.node<BapiOutput>();

int size=node.size();

You can get the size of the BAPI return value.

check the size is greater then 0 means the Bapi return result to your applicaion

Kind Regards

Mukesh

Former Member
0 Kudos

hi,

I've been changing the code a bit and now I can see that the other tables actually don't work either. There's only 1 table that's able to change it's content. The other tables always show the same data as when they get their content for the first time from the ABAP function module. Could the problem be in my invalidate. I always write the following:

//execution:

wdContext.currentBapi_<name>_InputElement().modelObject().execute();

//invalidate:

wdContext.nodeOutput().invalidate();

thanks,

Tom

Former Member
0 Kudos

Hi

you remove the code wdContext.nodeOutput().invalidate();

and execute the BAPI. or do the code before execution.

Kind Regards

Mukesh

sridhar_k2
Active Contributor
0 Kudos

Hi Tom,

R u sure about function is returning something? you can check with this following code.

response = wdContext.current<your node>ResponseElement();

if(response != null){

// if Result is an Array get the size of the array

Array[] ab = response.modelObject().getResultAsArray();

}

By this way, you can find the length of the array.

Regards,

Sridhar

Former Member
0 Kudos

Hi,

first of all thanks for the quick replies.

second:

the datasource property isn't blank and the context seems to be ok. Invalidate is also called.

I've made a screenshot:

http://server58.dedicatedusa.com/~mathias/tom/screen.JPG

with which I hope you can have a better look involving the context.

thanks,

Tom

Former Member
0 Kudos

Hi,

Where are you calling this invalidate code? Before executing the model objects or after? Check if this code is after the execute. In that case remove this invalidate call.

Regards,

Satyajit.

Former Member
0 Kudos

Hi

Check if the dataSource property of the Table is blank.

If it is blank then bind it to the correct node.

Regards,

Ajay

Former Member
0 Kudos

Hi Tom,

Are you calling inValidate() anywhere?

What's your context structure? Can you debug and see if the context node which is bound to your table is geting populated or not?

Regards,

Satyajit.

Former Member
0 Kudos

Hi Tom,

is ur table binded properly to ur context elements??

Theja