Application Development 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: 

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

0 Kudos

Hi SAPian,

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

12 REPLIES 12

Sandra_Rossi
Active Contributor
0 Kudos

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.

0 Kudos

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.

0 Kudos

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?

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

the testing from se37

0 Kudos

the result table

Whoever told you that is speaking nonsense.

matt
Active Contributor

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

0 Kudos

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 😉

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