Skip to Content
avatar image
Former Member

need a drop down list for cost center group

Hello,

I need to add the cost center group selection option to my program. I have added it to the selection options of my program and I would like to have a drop down list on this field. I have looked at the t-code KS13 and I am thinking that this is what I need. I am not sure if this is a search help or something else. if this is a search help, is it possible to use the same search help in my program? can some please let me know how I would do this in my program? possibly a code example?

thanks in advance for the help.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Aug 20, 2007 at 02:38 PM

    How about something like this?

    
    report zrich_0001.
    
    tables: kmas_d.
    
    select-options s_kostls for kmas_d-kostl_set .
    
    at selection-screen on value-request for s_kostls-low.
    
      call function 'K_GROUP_SELECT'
           exporting
                class            = '0101'
                field_name       = 'KOSTL'
           importing
    *            class_name       =
                set_name         = kmas_d-kostl_set
    *            set_title        = kmas_d-settxt_kst
    *            table_name       =
              exceptions
                no_set_picked    = 1
                others           = 2.
    
    
      s_kostls-low = kmas_d-kostl_set.
    
    

    Regards,

    RIch Heilman

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Rich,

      this is exactly what I was looking for.

      added to my program and it is working great.

      thanks for the quick help

  • avatar image
    Former Member
    Aug 20, 2007 at 02:30 PM

    PARAMETER: p_sostat(15) TYPE c AS LISTBOX VISIBLE LENGTH 16,

    name = 'p_sostat'.

    CLEAR sostatlist[].

    value-text = text-101. "'Open'(101).

    value-key = '1'.

    APPEND value TO sostatlist.

    value-text = text-102. "'On Hold'(102).

    value-key = '2'.

    APPEND value TO sostatlist.

    value-text = text-103. "'Drop/Pull'(103).

    value-key = '3'.

    APPEND value TO sostatlist.

    value-text = text-104. "'Pending'(104).

    value-key = '4'.

    APPEND value TO sostatlist.

    value-text = text-105. "'Floor'(105).

    value-key = '5'.

    APPEND value TO sostatlist.

    value-text = text-106. "'Kitted'(106).

    value-key = '6'.

    APPEND value TO sostatlist.

    value-text = text-107. "'Packed'(107).

    value-key = '7'.

    APPEND value TO sostatlist.

    value-text = text-108. "'PGI'(108).

    value-key = '8'.

    APPEND value TO sostatlist.

    value-text = text-109. "'EDI Error'(109).

    value-key = '9'.

    APPEND value TO sostatlist.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    id = name

    values = sostatlist.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 02:33 PM
    REPORT zpwtest .
    
    PARAMETERS : p_k TYPE kmas_d-kostl_set .
    
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_k .
    
    
      CALL FUNCTION 'K_GROUP_SELECT'
           EXPORTING
                field_name    = 'KOSTL'
           IMPORTING
                set_name      = p_k
           EXCEPTIONS
                no_set_picked = 1
                OTHERS        = 2.
    
      IF sy-subrc <> 0.
      ENDIF.
    
    Add comment
    10|10000 characters needed characters exceeded