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: 

Info set - Internal table

antonio_bruno
Participant
0 Kudos

Hi,

I need to add an internal table to my infoset to extract the KONH-KNUMH.

In particular, I've add the following codes:

DATA

data: I_CONT type table of KONH,

         S_CONT type  KONH.

INIZIALIZATION

select KNUMH VAKEY from KONH

into corresponding fields of table I_CONT

where DATAB <= VAL

and DATBI >= VAL.

I've decalred VAL as parameters.

CUSTOM FIELD

KITA

clear KITA.

concatenate 'XXXXXXX' MATNR-MARA into KITA separated by '    '.

NCIT

clear NCIT.

read table I_CONT into S_CONT

with key VAKEY = KITA

binary search.

if sy-subrc ne 0.

NCIT = S_CONT-KNUMH.

ENDIF.

Why the NCIT is blank? Where i can correct the codes?

Thanks and best regards.

Antonio

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi ,

please add SORT after  " select .... "

INIZIALIZATION

select KNUMH VAKEY ........

............

............

and DATBI >= VAL.

SORT i_cont BY vakey.

Regards,

Boris.

2 REPLIES 2

Former Member
0 Kudos

Hi ,

please add SORT after  " select .... "

INIZIALIZATION

select KNUMH VAKEY ........

............

............

and DATBI >= VAL.

SORT i_cont BY vakey.

Regards,

Boris.

0 Kudos

Thanks Boris,

I've solved. I've modified the custom field's code:

clear NCIT.

loop at it_konh

where vakey = KITA.

NCIT = IT_KONH-KNUMH.

endloop.
.