2006 Jul 19 1:44 PM
Hi,
I have taken a Multiple values in the selection screen with the 'select-options'.And
My code is like below.
select-options : KUNNR1 for KNA1-KUNNR.
select-options : KTOKD1 for KNA1-KTOKD.
Select single KTOKD from KNA1 into KTOKD2
where kunnr In KUNNR1.
Now what is the value we got for KTOKD2, we have to chek with all the values we are getting from KTOKD1 in the selection screen.
Please give me some Idea how can I do it.
Thanks & Regards
Venkat
Hi,
I have taken a Multiple values in the selection screen with the 'select-options'.And
My code is like below.
select-options : KUNNR1 for KNA1-KUNNR.
select-options : KTOKD1 for KNA1-KTOKD.
Select single KTOKD from KNA1 into KTOKD2
where kunnr In KUNNR1.
Now what is the value we got for KTOKD2, we have to chek with all the values we are getting from KTOKD1 in the selection screen.
Please give me some Idea how can I do it.
Thanks & Regards
Venkat
2006 Jul 19 1:46 PM
Hi venkata,
can you explain it a bit more clearly?
Regards,
Ravi
2006 Jul 19 1:48 PM
hi,
do this
<b>loop at KTOKD2 where KTOKD in KTOKD1</b>.
-------ur logic
or append the value in new internal table
<b>Endloop.</b>
<b>
Reward Points & mark helpful Answers</b>
2006 Jul 19 1:48 PM
Da a internal table
select-options : KUNNR1 for KNA1-KUNNR.
select-options : KTOKD1 for KNA1-KTOKD.
DATA: begin of it occurs 0,
KTOKD2 like kna1-ktokd,
end of it.
Select KTOKD from KNA1 into table it
where kunnr In KUNNR1
and ktokd in ktokd1.
But , ..could you explain us your problem a little more clearly ?? (i'm no sure i understand good your problem)
BR< Jacek
Message was edited by: Jacek Slowikowski
Message was edited by: Jacek Slowikowski
Message was edited by: Jacek Slowikowski
2006 Jul 19 1:49 PM
hi,
at selection-screen.
if not KTOKD1 is initial.
select single KTOKD from KNA1 into KTOKD1
where kunnr in kunnr1
and KTOKD in KTOKD1.
endif.
hope this helps,
do reward if it helps,
priya.
Message was edited by: Priya
2006 Jul 19 1:51 PM
Hi,
Use event <b> At selection screen</b>
then inside that loop ur internal table for the values to be checked..
Hope it helps..
cheers,
Simha.
2006 Jul 19 1:57 PM
Hi,
Please take a look at my code below:
types: begin of t_kna1,
kunnr type kna1-kunnr,
ktokd type kna1-ktokd,
end of t_kna1.
data: it_kna1 type standard table of t_kna1.
field-symbols: <fs_kna1> like line of it_kna1.
selection-screne begin of block b1 with frame.
select-options: s_kunnr for kna1-kunnr,
s_ktokd1 for kna1-ktokd.
selection-screen end of block b1.
start-of-selection.
select kunnr ktokd from kna1
into it_kna1
where kunnr in s_kunnr.
*or you can do select single if you only want a single *record.
remember that using IN is saying that you are checking against multiple values.
Hope this helps.
P.S> Please reward points for useful answers.
2006 Jul 19 1:55 PM
As a sample note down some values which result from the selection based on
Select single KTOKD from KNA1 into KTOKD2
where kunnr In KUNNR1.
Now search for the equivalent in the standard database tables.
2006 Jul 20 3:56 PM
Hi,
As much as I understand u want a validation for the data for field2 from the values in field1.
If So,Please go throuhg the code below.
REPORT ZSM_TEST.
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS : S_MTART LIKE MARA-MTART OBLIGATORY.
PARAMETERS : S_MATNR LIKE MARA-MATNR OBLIGATORY MODIF ID M1.
SELECTION-SCREEN END OF BLOCK B1.
<b>To Disable the field2(Material Code) in case the Material Type is not entered
-
</b>
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'M1'.
IF S_MTART IS INITIAL.
SCREEN-INPUT = '0'.
ELSE.
SCREEN-INPUT = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
<b>Check the data for combibation of field1 and field2
-
</b>AT SELECTION-SCREEN.
CHECK S_MTART IS NOT INITIAL AND
S_MATNR IS NOT INITIAL.
SELECT SINGLE * FROM MARA
WHERE MTART EQ S_MTART
AND MATNR EQ S_MATNR.
IF SY-SUBRC NE 0.
MESSAGE E002(SY) WITH 'Invalid Material & Type Combination!!'.
ENDIF.
START-OF-SELECTION.
WRITE : 'BINGO'.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |