Skip to Content
author's profile photo Former Member
Former Member

Drop down list for User ID's and SAP List viewer format

Couple of quick questions. Any help will be greatly appreciated.

1) I need to put User ID on the selection criteria screen. And also, I need to build a dropdown list for user ID selection by finding all user IDs in the Finance department and put it on the list.

2) I need to display the report in the SAP List viewer format, which enable these functions including sorting, hiding fields, filtering, exporting to an excel file as necessary. My output is currently plain vanilla as follows

loop at ibkpf where belnr = ibseg-belnr.

read table iskat with key saknr = ibseg-hkont.

read table icepct with key prctr = ibseg-prctr.

read table icskt with key kostl = ibseg-kostl.

write:/

iBKPF-BELNR, " Accounting document number

iBKPF-BUKRS, " Company code

iBKPF-GJAHR, " Fiscal Year Range

iBKPF-MONAT, " Period

iBKPF-USNAM, " Username

iBSEG-BELNR, "Document #

iBSEG-BUZEI, "Item #

iBSEG-BSCHL, "Posting Key

iBSEG-SHKZG, "Debit/credit indicator

iBSEG-PRCTR, "Profit Center

icepct-ktext,

iBSEG-KOSTL, "Cost Center

icskt-ltext,

iBSEG-HKONT, "G/L Account

iskat-TXT20,

iBSEG-DMBTR, "Local currency

iBSEG-WRBTR, "Document currency

iBSEG-SGTXT, "Explanation

iBSEG-KOART. "Account type

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 21, 2006 at 04:06 PM

    Hello Syed

    Here is a sample coding for a dropdown listbox:

    *&---------------------------------------------------------------------*
    *& Report  ZUS_SDN_DROPDOWN_LIST
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  zus_sdn_dropdown_list.
    
    
    TYPE-POOLS: vrm. " Value Request Manager: Typen und Konstanten
    
    
    DATA:
      gt_values   TYPE vrm_values.
    
    PARAMETERS:
      p_usrid    TYPE xubname AS LISTBOX VISIBLE LENGTH 13.
    
    
    
    INITIALIZATION.
    * Select the allowed values for dropdown listbox
      SELECT bname AS key FROM  usr02 INTO TABLE gt_values
             WHERE  bname  LIKE 'S%'.
    
    
    
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_USRID'
          values          = gt_values
        EXCEPTIONS
          id_illegal_name = 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.
    
    
    
    START-OF-SELECTION.
    
    
    END-OF-SELECTION.

    You have two fields for the listbox available:

    - KEY (obligatory)

    - TEXT (optional)

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 07:31 PM

    you can program your own drodown list for your parameter in at selection-screen on value-request for <your parameter name>

    Check FM F4IF_INT_TABLE_VALUE_REQUEST which can be used to display/select your value.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.