09-26-2008 10:46 AM
i'm collecting the dist channel values into an internal table with respect to material number.Then a popbox should come displaying those 2 values from that internal table so that user can select whatever he wants..is there any function module for that.
i have used popup_get_values..but i'm getting only 1 value..
09-26-2008 10:50 AM
hi
you can use:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = retfield
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
* STEPL = 0
* WINDOW_TITLE = WINDOW_TITLE
* VALUE = ' '
* VALUE_ORG = 'C'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB = MARK_TAB
* IMPORTING
* USER_RESET = USER_RESET
TABLES
value_tab = value_tab
* FIELD_TAB = FIELD_TAB
* RETURN_TAB = RETURN_TAB
* DYNPFLD_MAPPING = DYNPFLD_MAPPING
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
hope it will help u
regards
rahul
09-26-2008 10:48 AM
my code is..
DATA : ITAB LIKE SVAL OCCURS 0 WITH HEADER LINE.
DATA : RC TYPE C.
LOOP AT IT_MVKE INTO WA_MVKE.
ITAB-TABNAME = 'MVKE'.
ITAB-FIELDNAME = 'VTWEG'.
ITAB-VALUE = WA_MVKE-VTWEG.
ITAB-FIELD_ATTR = '01'.
ITAB-FIELD_OBL = 'X'.
APPEND ITAB.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
POPUP_TITLE = 'DISTRIBUTION CHANNEL'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE = RC
TABLES
FIELDS = ITAB
EXCEPTIONS
ERROR_IN_FIELDS = 1
OTHERS = 2.
ENDLOOP.
IF RC NE 'A'.
READ TABLE ITAB INDEX 1.
MVKE-VTWEG = ITAB-VALUE.
ENDIF.
09-26-2008 10:50 AM
hi
you can use:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = retfield
* PVALKEY = ' '
* DYNPPROG = ' '
* DYNPNR = ' '
* DYNPROFIELD = ' '
* STEPL = 0
* WINDOW_TITLE = WINDOW_TITLE
* VALUE = ' '
* VALUE_ORG = 'C'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB = MARK_TAB
* IMPORTING
* USER_RESET = USER_RESET
TABLES
value_tab = value_tab
* FIELD_TAB = FIELD_TAB
* RETURN_TAB = RETURN_TAB
* DYNPFLD_MAPPING = DYNPFLD_MAPPING
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
.
hope it will help u
regards
rahul
09-26-2008 10:56 AM
09-26-2008 10:59 AM
do like this...
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'WERKS'
tabname = 'T001W'
title_in_values_list = 'Select a value'
IMPORTING
select_value = lc_werks
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
09-26-2008 10:53 AM
09-26-2008 10:55 AM
U can use the FM MC_POPUP_TO_MARK_FIELDS
TABLES: t001.
DATA: t_fields LIKE mcs01 OCCURS 0 WITH HEADER LINE,
t_marked_fields LIKE mcs01 OCCURS 0 WITH HEADER LINE.
SELECT * FROM t001 UP TO 5 ROWS.
t_fields-tabname = 'T001'.
t_fields-fieldname = t001-bukrs.
t_fields-scrtext_l = t001-butxt.
APPEND t_fields.
ENDSELECT.
CALL FUNCTION 'MC_POPUP_TO_MARK_FIELDS'
EXPORTING
i_object_name_plural = 'Test'
i_object_name_singular = 'Test'
TABLES
t_fields = t_fields
t_marked_fields = t_marked_fields
EXCEPTIONS
unvalid_text_length = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_marked_fields.
WRITE:/ t_marked_fields-scrtext_l.
ENDLOOP.
Set the Parameter I_FIELDS_MARKED = 'X to get multiple values
Regards,
Joy.
09-26-2008 10:59 AM
Hi,
Create a search help through SE11 for the two fields Material number and distribution channel and assign that search help name in the two respective fields will resolve your problem.
Suppose u have created the search help giving the two field dist channel and MNo.
SELECT-OPTIONS : SLNO FOR ZORMD1-FD1SL MATCHCODE OBJECT ZORMD1,
fono FOR ZORMD1-FD1SL MATCHCODE OBJECT ZORMD1.
in the above ZORMD1 is my search help.
replace SLNo with material number and
replace fono with dist channel.
Cheers!!