Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

popup box with values from itab.

Former Member
0 Kudos

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..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

what is the retfield

0 Kudos

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.

Former Member
0 Kudos

Hi,

Try using the FM HELP_VALUES_GET_WITH_TABLE

Regards,

Surinder

Former Member
0 Kudos

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.

Former Member
0 Kudos

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!!