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: 

accessing fields from a method

0 Kudos
317

Hello,

I am in BEFORE_UPDATE Method in class ZCL_IM_PP_WOUPDATE & I want to select

from IT_ITEM parameter the AUFNR , VAPLZ , ADPSP.

How can I do this?

11 REPLIES 11

rajkumarnarasimman
Active Contributor
0 Kudos
132

Can you explain in detail

0 Kudos
132

IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE ,I have my code inside this interface or method how will you call it,The fields that I want are in the IT_ITEM Parameter =>double click in assosiated type(COBAI_T_ITEM) has cobai_t_item TYPE TABLE OF cobai_s_item,=>double click again =>cobai_s_item LIKE afpob, Inside afpob are the fields I want.How do I use them in my code?

matt
Active Contributor
132

IT_ITEM is an ordinary internal table. So you use normal basic ABAP to read the information you need.

0 Kudos
132

then it gives me this error "IT_ITEM" is not defined in the ABAP Dictionary as a table, projection view, or database view.

132

It is an internal table, I think you are using select on this.

You should use read table rather than select.

0 Kudos
132

You are right but If I do this for example

READ TABLE IT_ITEM into lt_caufv WITH TABLE KEY aufnr = IT_ITEM_OLD-aufnr. it_item_old is a table without a header line.

matt
Active Contributor
132

I'm sorry but I can't give assistance to anyone who is visible as "former member".

0 Kudos
132

Hi,sorry you can now

matt
Active Contributor
132

As Horst Keller as commented below, reading internal tables is basic ABAP. Perhaps you should revisit your training notes.

Tables with header lines are obsolete and have been for years.

horst_keller
Product and Topic Expert
Product and Topic Expert
132

Learn some basic ABAP, working with internal tables?

horst_keller
Product and Topic Expert
Product and Topic Expert