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: 

Ecatt & Data dictionnary

Former Member
0 Kudos

Hello all,

I've a strange action in my ecatt script.

I need to know RSNUM (reservation number) from table RESB corresponding to KDAUF (sales order number).

An index existing for RESB-KDAUF.

The record exists (se16n).

To execute this select, I've create a function module for simplifying tests :

- When I call the FM in the script, the record is not found.

- When I call the FM by se37, the record is found.

I've created another FM which select KDAUF in RESB by attacking RSNUM (primary key) :

- When I call the FM in the script, the record is found.

- When I call the FM by se37, the record is found.

My questions :

- In script ecatt, can we access to database table with no primary key?

- Is it a bug & is there any OSS Note or my Sap environment isn't good?

- Did someone had already seen this problem?

Thank you for responses!

Djamel.

2 REPLIES 2

Former Member
0 Kudos

Hi,

for tables with needed access by non-key-fields please use not GETTAB, please use inline ABAP with select statements instead.

Kind regards,

Christoph

Former Member
0 Kudos

Hi,

I don't use GETTAB

Here is the problematic script line :

FUN ( Z_BC_LOAD_RESB , Z_BC_LOAD_RESB_1 ).

And here the function module called :

FUNCTION Z_BC_LOAD_RESB.

*"----


""Local Interface:

*" IMPORTING

*" REFERENCE(I_KDAUF) TYPE KDAUF

*" EXPORTING

*" REFERENCE(O_RESB) TYPE RESB

*"----


select single * into corresponding fields of o_resb

from resb

where kdauf = i_kdauf.

ENDFUNCTION.