2006 Dec 03 12:32 PM
i have itab, in itab i have field stat that have 3 status ( a,b,c)
in the select-option i put a , ineed to get all the lines that have a ( ab,ac,a,aa....)
i use delete itab not where stat co status but it's not work fine.
2006 Dec 04 12:03 PM
Hi,
I hope the following code will helps you. You can write the code in at selection-screen event.
-- Retrieve all the domain values by calling FM
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
domname = <domain name>
TEXT = 'X'
FILL_DD07L_TAB = 'X'
TABLES
VALUES_TAB = lt_values_tab <fixed value in domain>
VALUES_DD07L = <fixed values in DD07L Structure>
EXCEPTIONS
NO_VALUES_FOUND = 1
OTHERS = 2 .
IF sy-subrc <> 0.
Message 'Error ' type 'E'.
ENDIF.
* Read select-option values was supplied
if so_input is not initial.
read table so_input into wa_input index 1.
* Construct all the combination of in select-option parameter
loop at lt_values_tab into wa_values_tab.
concatenate wa_input-low wa_values_tab-DOMVALUE_L into so_input-low.
wa_input-sign = 'I'.
wa_input-option = 'I'.
append wa_input into so_input.
Endloop.
endif.
i have itab, in itab i have field stat that have 3 status ( a,b,c)
in the select-option i put a , ineed to get all the lines that have a ( ab,ac,a,aa....)
i use delete itab not where stat co status but it's not work fine.
2006 Dec 03 12:42 PM
In select options use <b>a*</b> It will give all combinations.
Regards
Kathirvel
2006 Dec 03 12:49 PM
no
i have a b c
a b
a a
b b c
c b c
a c in the itab.
i put in s.option a and i want all the lines that have a
( ihave space between the status)
2006 Dec 03 1:17 PM
Then try<b> a</b>,
It will give all combination with or with out space and containing <b>a</b> in it.
Regards
Kathirvel
2006 Dec 03 2:01 PM
but what is the code
delete itab where stat in <b></b>status<b></b>?
2006 Dec 03 5:14 PM
select-options:
s_status for itab-status.
delete itab where stat not in s_status.
when a was entered in select-options
delete itab where stat not in s_status
equivalent to
delete itab where stat NA 'a'.
Regards,
Clemens
2006 Dec 03 6:06 PM
In your select options just put <b>a</b>,
It will give all combination with or with out space and containing a in it say <b>( ab,ac,a,aa....)</b>.
Then you <b>need not use delete itab</b> because <b>a</b> will provide you details pnlt that has a in it, as required for you.
To be more clear please post your code, we will be in a better state to provide suggestion.
Regards
Kathirvel
2006 Dec 04 11:44 AM
delete itab NA not work....
i have in my itab, stat= <b>abc acb abb
abc
abc abb</b>
abb
acc
i insert in my s.option i_status: abc
i need to get all the three lines
what is rhe right statment delete???????????????
2006 Dec 04 12:17 PM
2006 Dec 04 12:03 PM
Hi,
I hope the following code will helps you. You can write the code in at selection-screen event.
-- Retrieve all the domain values by calling FM
CALL FUNCTION 'GET_DOMAIN_VALUES'
EXPORTING
domname = <domain name>
TEXT = 'X'
FILL_DD07L_TAB = 'X'
TABLES
VALUES_TAB = lt_values_tab <fixed value in domain>
VALUES_DD07L = <fixed values in DD07L Structure>
EXCEPTIONS
NO_VALUES_FOUND = 1
OTHERS = 2 .
IF sy-subrc <> 0.
Message 'Error ' type 'E'.
ENDIF.
* Read select-option values was supplied
if so_input is not initial.
read table so_input into wa_input index 1.
* Construct all the combination of in select-option parameter
loop at lt_values_tab into wa_values_tab.
concatenate wa_input-low wa_values_tab-DOMVALUE_L into so_input-low.
wa_input-sign = 'I'.
wa_input-option = 'I'.
append wa_input into so_input.
Endloop.
endif.
2006 Dec 04 1:10 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |