04-01-2014 1:43 PM
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
04-01-2014 2:45 PM
Hi ,
please add SORT after " select .... "
INIZIALIZATION
select KNUMH VAKEY ........
............
............
and DATBI >= VAL.
SORT i_cont BY vakey.
Regards,
Boris.
04-01-2014 2:45 PM
Hi ,
please add SORT after " select .... "
INIZIALIZATION
select KNUMH VAKEY ........
............
............
and DATBI >= VAL.
SORT i_cont BY vakey.
Regards,
Boris.
04-01-2014 4:32 PM
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.
.