Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

cannot get value (array storing element values is null) in sap

0 Likes
5,320

Hi SAPian,

I am getting the following error while trying to retrieve data by c#

12 REPLIES 12
Read only

Sandra_Rossi
Active Contributor
0 Likes
4,718

You are trying to read a field in the table, but you don't indicate from which line. After reading the table parameter ITEMTAB, you should first read one line of the table, then you can read one of the fields of the line.

Read only

0 Likes
4,717

Sir, I have now set :

cus_cr_bal.CurrentIndex = 0;

this.crlimit = cus_cr_bal.GetString("KUNNR");

But now getting the following error that table is empty:

Index 0 of table ZSD_TT_CUS_CRBAL out of range: table is empty (CurrentIndex cannot be set)

showing the following error in the current row. But if I run the function from se37, it is showing data nicely.

Read only

0 Likes
4,717

I can't tell you what is different between your code and the way you call it via SE37.

But did you call invoke before trying to get the result?

Read only

0 Likes
4,717

It is always a risky thing to call someone 'Sir' if you don't know whether they're male or female...

Read only

0 Likes
4,717

Sorry for that, but now a days, we dont differentiate male/female with a keyword sir/madam rather than tell only sir for both female and male.

Read only

0 Likes
4,717

please see, I have called invoke before getting the result and the way to call from se37

Read only

0 Likes
4,716

the testing from se37

Read only

0 Likes
4,716

the result table

Read only

4,716

Whoever told you that is speaking nonsense.

Read only

matt
Active Contributor
4,716

This might be the case where you live, but in other parts of the world, certainly is not.

Read only

0 Likes
4,716

Who decided "sir"? (probably due to the patriarchal dominance, not really equality) From my point of view, we should say "madam" for both female and male 😉

Read only

0 Likes
4,716
You called GetTable on the returned parameter before calling the Invoke method. That'd be better to call it after.