Skip to Content
0

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

Oct 21, 2017 at 06:57 AM

154

avatar image

Hi SAPian,

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

error.png (32.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sandra Rossi Oct 21, 2017 at 08:07 AM
0

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.

Show 11 Share
10 |10000 characters needed characters left characters exceeded

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.

error.png (5.4 kB)
0
Shahriar Istiaq Halim

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

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

code.png (21.7 kB)
0
Shahriar Istiaq Halim
You called GetTable on the returned parameter before calling the Invoke method. That'd be better to call it after.
0

the testing from se37

test1.png (12.3 kB)
0

the result table

test2.png (13.4 kB)
0
Shahriar Istiaq Halim

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

0

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
Shahriar Istiaq Halim

Whoever told you that is speaking nonsense.

1

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

1
Shahriar Istiaq Halim

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