2008 Aug 11 3:16 PM
Hi ABAPer's ,
I have a question that how to validate the screen input field using key LIFNR with the tables given:
EKKO,
EKPO,
EKET,
LFA1,
MAKT,
TOO1W.
in ALV Classical report?
If i give 1 to some char in select options i should not get the values, if i give the lifnr values i should get the values.
Plz help me out of this.
2008 Aug 11 3:50 PM
hi raja,
You have to validate the field by its check table only, i.e in table KNA1 field land1 is validated by Table t005
so you have to validate lifnr by its check tabke LFA1.
here is the code, remember that select option create a internal table, in which user can enter the multiple selection, so here is the solution to handle single as well as multiple selection values,
select-options: s_lifnr for lfa1-lifnr.
LOOP AT S_LIFNR.
CHECK S_LIFNR-OPTION = 'EQ'.
SELECT SINGLE LIFNR FROM LFA1 INTO LFA1-LIFNR
WHERE LIFNR = S_LIFNR-LOW.
IF SY-SUBRC NE 0.
MESSAGE E001 WITH S_LIFNR-LOW.
. ENDIF.
ENDLOOP.
you can use the same code for S_LIFNR-HIGH also
Yogesh Nigam
Edited by: Yogesh N on Aug 11, 2008 10:51 AM
2008 Aug 11 3:40 PM
2008 Aug 11 3:50 PM
hi raja,
You have to validate the field by its check table only, i.e in table KNA1 field land1 is validated by Table t005
so you have to validate lifnr by its check tabke LFA1.
here is the code, remember that select option create a internal table, in which user can enter the multiple selection, so here is the solution to handle single as well as multiple selection values,
select-options: s_lifnr for lfa1-lifnr.
LOOP AT S_LIFNR.
CHECK S_LIFNR-OPTION = 'EQ'.
SELECT SINGLE LIFNR FROM LFA1 INTO LFA1-LIFNR
WHERE LIFNR = S_LIFNR-LOW.
IF SY-SUBRC NE 0.
MESSAGE E001 WITH S_LIFNR-LOW.
. ENDIF.
ENDLOOP.
you can use the same code for S_LIFNR-HIGH also
Yogesh Nigam
Edited by: Yogesh N on Aug 11, 2008 10:51 AM
2008 Aug 11 3:56 PM
2008 Aug 12 2:45 AM
Hi ABAPer's,
I didn't get raletion between eket to make and too1w. How to make an interactive using for all entries.
Plz go thru it and reply me soon.