Dropdown List in report program

Hi
Anybody send me the Dropdown list coding for a parameter in s selection-screen of a normal report program without using a module-program
regards
paul

HI  paul
try this
TYPE-POOLS: VRM.
TABLES SPFLI.
TABLES SSCRFIELDS.
DATA flag.
DATA: NAME TYPE VRM_ID,
      LIST TYPE VRM_VALUES,
      VALUE LIKE LINE OF LIST.
PARAMETERS PS_PARM LIKE SPFLI-CARRID  AS LISTBOX VISIBLE LENGTH 10
USER-COMMAND
fcodex.
data: i_spfli type spfli occurs 0 with header line.
PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
USER-COMMAND
fcodey.
*DS AS CHECKBOX USER-COMMAND FLAG.
INITIALIZATION.
  NAME = 'PS_PARM'.
  DATA T TYPE I VALUE 0.
SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
SPFLI.
  loop at i_spfli.
    VALUE-KEY = i_spfli-CARRID.
    VALUE-TEXT = i_spfli-CARRID.
    APPEND VALUE TO LIST.
  endloop.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID     = NAME
      VALUES = LIST.
AT SELECTION-SCREEN.
  if sy-ucomm eq 'FCODEX'.
    REFRESH LIST.
    CLEAR LIST.
    PQ_PARAM = ' '.
    NAME = 'PQ_PARAM'.
    SELECT  * FROM SPFLI WHERE CARRID = PS_PARM.
      VALUE-KEY = SPFLI-connid.
      VALUE-TEXT = SPFLI-connid.
      APPEND VALUE TO LIST.
    ENDSELECT.
  endif.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID     = NAME
          VALUES = LIST.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
START-OF-SELECTION.
  clear i_spfli.
  refresh i_spfli.
select * into table i_spfli from spfli where carrid = ps_parm and connid
= pq_param.
  loop at i_spfli.
    WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
   'DEPARTURE TIME :', I_SPFLI-DEPTIME.
regards
kishore
Message was edited by: Harikishore Sreenivasulu

Similar Messages

  • Drop down list in report program

    Hi all,
    I am using the function module VRM_SET_VALUES to display the drop down list for a selection screen field for a report program. It works fine in foreground but in background mode the job is getting cancelled and the error log states 'Make an entry in all required fields'. If I remove this code for drop down list for a selection screen field then the program runs correctly in back ground mode. So i feel there is some problem with the function module. Can anyone suggest me an alternate function module or how to correct this error. I have used the condition if 'SY-BATCH' is initial only then to exceute the code for displaying the drop down list for a selection screen field. But even then the background job gets cancelled. The function module is called in the event AT SELECTION-SCREEN output.
    Thank you.
    Regards,
    Sowmya.

    Hi,
    Easy! You are calling that function module in the wrong event. It should be called in :
    at selection-screen on value-request for <field name>
    This way it is only executed if the user presses F4 (dropdown help) on that field.
    Therefore  it will no longer cause a problem for your background job.
    cheers
    Paul Bakker
    Hanabi Technology

  • Dropdown list in dialog programming

    Moved to correct forum by moderator.  Subject amended.  Please use meaningful subjects in future
    Hi Experts,
    How to get a drop down list in Dialog Programming. I need a drop down list for a field called country. Should it be done in Layout Editor or in the coding part. If at coding part can you please help me out with some pointers?
    TIA
    Edited by: Matt on Nov 16, 2008 4:11 PM

    SELECTION-SCREEN BEGIN OF SCREEN 111 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(11) text-012 FOR FIELD p_step1 MODIF ID st1.
    PARAMETER: p_step1 TYPE c AS LISTBOX VISIBLE LENGTH 20
                       USER-COMMAND step1 OBLIGATORY MODIF ID st1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF SCREEN 111.
    DATA:  name1 TYPE vrm_id,
           list1 TYPE vrm_values,
           value1 LIKE LINE OF list1.
    IF list1[] IS INITIAL.
        name1 = P_STEP1.
        value1-key = 1.
        value1-text = your text which you want to display in the list.
        APPEND value1 TO list1.
        value1-key = 2.
        value1-text = your text which you want to display in the list.
        APPEND value1 TO list1.
        CALL FUNCTION 'VRM_SET_VALUES'
          EXPORTING
            id              = name1
            values          = list1
          EXCEPTIONS
            id_illegal_name = 1
            OTHERS          = 2.
      ENDIF.

  • Customizing MSS reporting selection period dropdown list

    We have diffrent ABAP programs that uses the PNP logical database and we want to customize the period selection dropdown list on the MSS reporting iview. In same scenarios we want to display only 'Today'. In these scenarios we use the report together with a variant.
    When the user execute the report, the selection period on the variant is used and that is 100% correct. The problem is that the user change the selection period on the frontend (on the Iview) and this is not what is reflected on the output of the report, becasue the report uses a variant.
    Therefore we want to customize the period selection dropdown list on the Iviewin the scenarios where a report uses a variant.
    I know that we cannot customize the perido selction on the Iview, beacue we cannot set the properties on the Iview.
    Is anybody familiar with how we can accomplish this.
    Regards
    Margariet
    << moved by moderator - check out the list of other forums on top of portal forum >>
    http://forums.sdn.sap.com/thread.jspa?threadID=1239838&tstart=0
    Edited by: Anja Engelhardt on Feb 9, 2012 11:42 AM

    Hi Darren,
    We do have a property in the iview for which you can set the period. You need to know the name of the property. Give us the iview name so that we can have a look.
    Cheers,
    Sathya

  • SSRS report - A single selection dropdown list converted to text box

    Hello everyone,
    We created a single selection dropdown parameter (City parameter) on a report. The data in this parameter is populated using MDX query. Also, it is filtered based on selection of another single selection dropdown list (Country parameter) of a report.
    The problem is when there is no cities for the selected country the dropdown list is gets converted to free type text box and user can insert city data in it. Why SSRS is not keeping it as empty dropdown list with no data?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hello Charlie,
    We developed a fresh report only with two parameters but still the dropdown control gets converted to text box in our case. We have two single selection parameters, Location and Customers. Based on selected Location the customer
    dropdown gets populated.
    Location Parameter Query
    WITH MEMBER [Measures].[ParameterCaption] AS [Location].[Location Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Location].[Location Name].CURRENTMEMBER.UNIQUENAME MEMBER
    [Measures].[ParameterLevel] AS [Location].[Location Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Location].[Location Name].ALLMEMBERS ON ROWS FROM [Model]
    Customer Query
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Customer].[Customer Name].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Customer].[Customer Name].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [Customer].[Customer Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel],[Measures].[Amt]} ON COLUMNS,
    nonempty([Customer].[Customer Name].ALLMEMBERS,[Measures].[Amt]) ON ROWS FROM ( SELECT ( STRTOSET(@LocationName, CONSTRAINED) ) ON COLUMNS FROM [Model])
    Regarding parameter settings on General tab for both the above parameters we did not select any of the following values, all these checkboxes are empty:
    Allow Blank Value ("") , Allow null value, Allow multiple values.
    I think it has something related to [Measures].[Amt] that we used in customer parameter. We are now trying to take other two parameters where we would be not using the [Measures].[Amt] to filter the data. Will update you soon.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • Abap program to find the list of reports in complete

    I know we can get from sap easy access in
    information system but that is not all reports as I always find some report
    which is not listed there so we want to freeze the list and we want to know
    if we have any abap program If  u can send me the code or any standard
    program that find and list the reports
    soniya

    Check the table TRDIR and write the select statements to display.
    Check the fm  :F4_PROGRAM:  code.
    Message was edited by: Eswar Kanakanti

  • How to get list of custom objects used in abap report program?

    Hi friends,
    I have a requirement in which I have to scan the entire abap report and retrieve list of custom objects used in it for example custom tables, data elements, structures, table types etc,. Is there any provision in SAP like fuction modules to do this functionality?  As of now I am coding everything manually where so many possibilities are there for all kinds of objects. Provide your answers and suggestions...
    Thanks,
    Nastera

    Hi,
    The best way to do this is environment analysis. Follow the steps:
    1. Open se38, type in the program name (don't click on on display/change or create button, stay on first screen only)
    2. Click on environment analysis button (hot key SHIFT+F4)
    3. It will throw a pop-up, which will ask for type of object you want to see, which are linked /used by this program. select all (or may be if you are only interested in Tables, then select table only)
    4. Hit 'Enter'
    You will get the full list of all objects used in this report program. Just note down the one which starts with Z or Y and that's it.
    Cheers,
    Anid

  • List of unused custom report programs

    Hello,
    I have to develop a report though which we can find the list of unused program based on the selection date given in the selection screen. So, Is there any way through which we can find when was the Z* programs executes last time???
    I checked with the transaction STAD and ST03N.. but I didnt find it helpful.. because I want to see the list of programs for the past 1 year.
    Any suggestion will be helpful..
    Thanks,
    Regards,
    Jhings.
    Edited by: Jhings on Dec 1, 2011 1:31 PM
    Moderator message: FAQ, please search for previous discussions of this topic.
    Edited by: Thomas Zloch on Dec 1, 2011 12:20 PM

    Hi Sandeep,
    Thanks for the reply... I checked that table and it is having last change date of the code.. But my requirement is to find out the last execution date of the program.. Means.. when was the Z* programs runs last time.
    Hope u understand my problem..
    Thanks,
    Regards,
    Jhings

  • Creating a Month dropdown list for a report with multiple datasets

    I am currently working on a report that contains many charts that rely on multiple datasets. Currently, I have parameters @StartDate and @EndDate to display the information of the previous month across all the charts as my default value. Now, I would like
    to create a dropdown list so that the user can pick any month, and have the report display the data across all the charts for that particular month, while keeping the display of the previous month as the default value. Can anyone help as to how I can approach
    this. Would I have to use an expression when I specify my available values, or would I have to create a dataset to get the value of all 12 months? Any help would be greatly appreciated.

    This is essentially where I am having some trouble, as in creating the dataset that returns the individual months of the year as I am relatively to the use of SSRS. Could you possibly elaborate on how I can do so? Thank you in advance!
    Create a dataset in SSRS
    Inside dataset properties map datasource and then inside give command like
    DECLARE @Month int = 5 --example value
    SELECT ...
    FROM Table
    WHERE datefield >= DATEADD(mm,DATEDIFF(yy,0,GETDATE())*12 +(@Month-2),0)
    AND datefield < DATEADD(mm,DATEDIFF(yy,0,GETDATE())*12 +(@Month-1),0)
    then on refresh it will take field information and parameter information by itself.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dropdown lists appearing behind report regions

    Has anyone encountered their dropdown lists disappearing behind page items. I have a report which sits just under the dropdown menus(lists). In the report I'm using HTMLDB_ITEM.SELECT_LIST_FROM_QUERY items. It displays fine but when I drop down a list, they disappear behind these items on the report.
    Am I doing something really dumb?
    Many thanks for any help.
    Mary

    Hi Mary,
    Welcome to the wonderful world of IE and SELECT tags!
    I think that there's nothing for it but to extend your javascript to make all of the select items invisible whilst a menu is open. How you do this depends on how smart you want the page to be. The idea is to set the SELECT objects style.visibility value to either "visible" or "hidden".
    Something like:
    &lt;script type="text/javascript"&gt;
    function showHide(sVisibility)
    var xx = document.getElementsByTagName("SELECT");
    var i;
    for (i = 0; i < xx.length; i++)
    xx&#91;i&#93;.style.visibility = sVisibility;
    &lt;/script&gt;
    Call this function as either "showHide('hidden');" or "showHide("visible");" as appropriate within the code that opens or closes the menu.
    You could extend this to only show/hide those select elements that would actually be covered by the menu - this is doable but a bit of a pain as you have to identify the x and y co-ordinates of the select object and the menu div. Only do this if you really need to.
    Regards
    Andy

  • Dropdown list in module pool program

    Hi,
    I need to display a dropdown list for LFA1-LIFNR in my module pool program.
    In the screen painter I have added an Input/Output field with name LFA1-LIFNR and corresponding to the Dropdown option I have selected Listbox. When I execute the program empty dropdown list is coming. It is not taking the values of LIFNR from the table LFA1. Please let me know the solution for this.
    Thanks,
    Neethu.

    Hello Abaper,
    You have very well designed the drop-down box that is to be reflected in your program. The next thing for you to do is use any 1 method for populating the values i.e. using the function module F4IF_INT_TABLE_VALUE_REQUEST or VRM values. I prefer to use the the F4IF_INT_TABLE_VALUE_REQUEST as it is easy to use and understand. If you use the following function module then you need to call in a module under the flow logic of the screen i.e. PROCESS ON VALUE REQUEST.
    Let me just illustrate you with the syntax -
    Module Pool Code
    *internal table declaration
    TYPES : BEGIN OF ty_lifnr,
                     lifnr TYPE lfa1-lifnr,
    END OF ty_lifnr.
    DATA : itab_lifnr TYPE STANDARD TABLE OF ty_lifnr.
    *Dialog Modules for PBO
    *Dialog Module for PAI
    MODULE cancel INPUT.
       LEAVE PROGRAM.
    *Dialog Module Process on value reuest
    MODULE create_dropdownbox INPUT.
       SELECT lifnr
       FROM LFA1
       INTO CORRESPONDING FIELDS OF TABLE itab_lifnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
             retfield      = 'LIFNR'
             value_org = 'S'
       TABLES
             value_tab = itab_lifnr
       EXCEPTIONS
    ENDMODULE.
    Now for the Flow Logic -
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
       MODULE cancel AT EXIT-COMMAND.
       MODULE user_command_0100.
    PROCESS ON VALUE REQUEST.
       FIELD lfa1-lifnr MODULE create_dropdownbox.
    Hope this helps ! Let me know if any other doubts arises.

  • How can i create list box and  dropdown in my report?

    dear experts
    how can i create list box and  dropdown in my report?
    thanks  in advance

    Pl. see the code given below.
    REPORT Z_LISTBOX.
    Data declaration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    Selection screen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION SCREEN OUTPUT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    AT SELECTION-SCREEN OUTPUT.
      NAME = 'PS_PARM'.
      VALUE-KEY = '1'.
      VALUE-TEXT = 'Line 1'.
      APPEND VALUE TO LIST.
      VALUE-KEY = '2'.
      VALUE-TEXT = 'Line 2'.
      APPEND VALUE TO LIST.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID     = NAME
                VALUES = LIST.
    START-OF-SELECTION.
    Regards,
    Joy.

  • Table Control Dropdown List Problem

    Hi,
    I have this problem with my table control.
    I now have an input field (with input help) called: Reference Table, as well as a table control.
    What i need is to select the table names (select from the Reference table input help) and the field names will be populated inside the table control (according to the field names inside the respective tables) as a dropdown list.
    Refer to this diagram if unclear: http://img166.imageshack.us/img166/1066/tablecontrolwt4.png
    Please give me sample codes as i really need help.
    Will reward marks if useful.
    thanks a lot.
    Below is my codes:
    *& Report  ZHERA_TABLE3
    REPORT  ZHERA_TABLE3_EVONNE.
    DATA: P_HERA TYPE DNTAB-TABNAME VALUE 'Z07P4_REF',
           ITAB_HERA TYPE TABLE OF Z07P4_REF,
           FIELD_COUNT TYPE I,
           WA_HERA LIKE LINE OF ITAB_HERA.
    SELECT * INTO TABLE ITAB_HERA FROM Z07P4_REF.
    START-OF-SELECTION.
    CALL SCREEN 3000.
    MODULE STATUS_3000 OUTPUT.
      SET PF-STATUS 'UI'.
      SET TITLEBAR 'TITLE'.
    ENDMODULE.                    "STATUS_8000 OUTPUT
    MODULE USER_COMMAND_8000 INPUT
    MODULE USER_COMMAND_3000 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK' OR 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          PERFORM UPDATE_TABLE.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_8000 INPUT
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE' ITSELF
    CONTROLS: ZTABLE TYPE TABLEVIEW USING SCREEN 3000.
    *&SPWIZARD: LINES OF TABLECONTROL 'ZTABLE'
    DATA:     G_ZTABLE_LINES  LIKE SY-LOOPC.
    DATA:     OK_CODE LIKE SY-UCOMM.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE ZTABLE_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE ITAB_HERA LINES ZTABLE-lines.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE ZTABLE_GET_LINES OUTPUT.
      G_ZTABLE_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE ZTABLE_MODIFY INPUT.
      MODIFY ITAB_HERA
        FROM WA_HERA
        INDEX ZTABLE-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE ZTABLE_USER_COMMAND INPUT.
      OK_CODE = SY-UCOMM.
      PERFORM USER_OK_TC USING    'ZTABLE'
                                  'ITAB_HERA'
                         CHANGING OK_CODE.
      SY-UCOMM = OK_CODE.
    ENDMODULE.
      INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM
                              P_TABLE_NAME
                              P_MARK_NAME
                     CHANGING P_OK      LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA: L_OK              TYPE SY-UCOMM,
             L_OFFSET          TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
       SEARCH P_OK FOR P_TC_NAME.
       IF SY-SUBRC <> 0.
         EXIT.
       ENDIF.
       L_OFFSET = STRLEN( P_TC_NAME ) + 1.
       L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations                 *
       CASE L_OK.
         WHEN 'INSR'.                      "insert row
           PERFORM FCODE_INSERT_ROW USING    P_TC_NAME
                                             P_TABLE_NAME.
           CLEAR P_OK.
         WHEN 'DELE'.                      "delete row
           PERFORM FCODE_DELETE_ROW USING    P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME.
           CLEAR P_OK.
         WHEN 'P--' OR                     "top of list
              'P-'  OR                     "previous page
              'P+'  OR                     "next page
              'P++'.                       "bottom of list
           PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
                                                 L_OK.
           CLEAR P_OK.
        WHEN 'L--'.                       "total left
          PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
        WHEN 'L-'.                        "column left
          PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
        WHEN 'R+'.                        "column right
          PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
        WHEN 'R++'.                       "total right
          PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
         WHEN 'MARK'.                      "mark all filled lines
           PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME   .
           CLEAR P_OK.
         WHEN 'DMRK'.                      "demark all filled lines
           PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                               P_TABLE_NAME
                                               P_MARK_NAME .
           CLEAR P_OK.
        WHEN 'SASCEND'   OR
             'SDESCEND'.                  "sort column
          PERFORM FCODE_SORT_TC USING P_TC_NAME
                                      l_ok.
       ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME             .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_LINES_NAME       LIKE FELD-NAME.
       DATA L_SELLINE          LIKE SY-STEPL.
       DATA L_LASTLINE         TYPE I.
       DATA L_LINE             TYPE I.
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>                 TYPE CXTAB_CONTROL.
       FIELD-SYMBOLS <TABLE>              TYPE STANDARD TABLE.
       FIELD-SYMBOLS <LINES>              TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
       ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line                                           *
       GET CURSOR LINE L_SELLINE.
       IF SY-SUBRC <> 0.                   " append line to table
         L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line                                               *
         IF L_SELLINE > <LINES>.
           <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
         ELSE.
           <TC>-TOP_LINE = 1.
         ENDIF.
       ELSE.                               " insert line into table
         L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
         L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
       ENDIF.
    *&SPWIZARD: set new cursor line                                        *
       L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line                                        *
       INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
       <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor                                                 *
       SET CURSOR LINE L_LINE.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME
                            P_MARK_NAME   .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
       FIELD-SYMBOLS <WA>.
       FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
       DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
       LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         IF <MARK_FIELD> = 'X'.
           DELETE <TABLE> INDEX SYST-TABIX.
           IF SY-SUBRC = 0.
             <TC>-LINES = <TC>-LINES - 1.
           ENDIF.
         ENDIF.
       ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
          text
         -->P_TC_NAME  name of tablecontrol
         -->P_OK       ok code
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                           P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TC_NEW_TOP_LINE     TYPE I.
       DATA L_TC_NAME             LIKE FELD-NAME.
       DATA L_TC_LINES_NAME       LIKE FELD-NAME.
       DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <LINES>      TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
       ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled?                                         *
       IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ...                                                   *
         L_TC_NEW_TOP_LINE = 1.
       ELSE.
    *&SPWIZARD: no, ...                                                    *
         CALL FUNCTION 'SCROLLING_IN_TABLE'
              EXPORTING
                   ENTRY_ACT             = <TC>-TOP_LINE
                   ENTRY_FROM            = 1
                   ENTRY_TO              = <TC>-LINES
                   LAST_PAGE_FULL        = 'X'
                   LOOPS                 = <LINES>
                   OK_CODE               = P_OK
                   OVERLAPPING           = 'X'
              IMPORTING
                   ENTRY_NEW             = L_TC_NEW_TOP_LINE
              EXCEPTIONS
                 NO_ENTRY_OR_PAGE_ACT  = 01
                 NO_ENTRY_TO           = 02
                 NO_OK_CODE_OR_PAGE_GO = 03
                   OTHERS                = 0.
       ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
       GET CURSOR FIELD L_TC_FIELD_NAME
                  AREA  L_TC_NAME.
       IF SYST-SUBRC = 0.
         IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column                                           *
           SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
         ENDIF.
       ENDIF.
    *&SPWIZARD: set the new top line                                       *
       <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
          marks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                   P_TABLE_NAME
                                   P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
          demarks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                     P_TABLE_NAME
                                     P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = SPACE.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    FORM UPDATE_TABLE.
      "Update physical database table
      UPDATE Z07P4_REF FROM TABLE ITAB_HERA.
    ENDFORM.                    "UPDATE_TABLE
    Edited by: Evonne Gow on Jan 4, 2008 2:52 AM

    hey gary help me lei...
    Edited by: Evonne Gow on Jan 4, 2008 2:55 AM

  • ALV: Dropdown list individual for each line of the table

    Hi
    Question.. I would like to make a dropdown list for a field in the ALV list. The dropdown list is not the difficult point. But this dropdown list should be based on the line item.
    Example:
    Material 100.100     has plants (10, 20, 30)
    Material 100.800     has plants (60, 70)
    so the ALV list should show in the dropdown menu only the plants that this material has.
    As I'm not sure, that my explanations are any good, here a example:
    <u>
    ALV-List</u>
    Material       Description             Plants
    100.100        Screwdriver             (Dropdown list shows only 10,20,30)
    100.800        Hammer                  (Dropdown list shows only 60,70).
    Can anyone tell me if this is feasable? And if so how? Is it do-able with this method?
      call method grid->set_drop_down_table
        exporting
          it_drop_down = lt_dropdown.
    The program BCALV_EDIT_07 has sort of two different dropdown lists.. but I have more then two materials, there would be many lists to create.. (many drop_down_handle's)
    Any other idea?
    I know, this is a tricky one...
    Thanks
    Petra
    Message was edited by:
            Petra

    hi
    i have a code for drop down list use this
    this code is for selection-screen deop-down list yu can add this same code in ALV
    REPORT  ZCHETANA_PRAC10                         .
    Type-pools: VRM.
    data: name type vrm_id,
          list_month type vrm_values,
          list_year type vrm_values,
          value type vrm_value.
    selection-screen: begin of block b with frame.
    parameter: p_year(10) type c as listbox visible length 10,
               p_month(10) type c as listbox visible length 10.
    selection-screen: end of block b.
    at selection-screen output.
    value-key = 'JAN'.
    value-text = 'JAN'.
    append value to list_month.
    value-key = 'FEB'.
    value-text = 'FEB'.
    append value to list_month.
    value-key = 'MAR'.
    value-text = 'MAR'.
    append value to list_month.
    value-key = 'APR'.
    value-text = 'APR'.
    append value to list_month.
    value-key = '1998'.
    value-text = '1998'.
    append value to list_year.
    value-key = '1999'.
    value-text = '1999'.
    append value to list_year.
    value-key = '2000'.
    value-text = '2000'.
    append value to list_year.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'P_MONTH'
        VALUES                = list_month
    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.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'P_YEAR'
        VALUES                = list_year
    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.
    write:/ p_year,
           p_month.

  • Dropdown list boxes

    Hi friends,
    Could u please tell me how to create a module pool program to charge the content of a a field of database table in a Dropdown list boxes . Please provide me step by step Process or link of file.
    thinks .

    Hi Karim,
    see the below programs to fill the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from internal table'ivrm_values' . Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.
    report  zpavan_0001.
    type-pools: vrm.
    data: p_field(20) type c.
    data: ivrm_values type vrm_values.
    data: xvrm_values like line of ivrm_values.
    data: name type vrm_id.
    start-of-selection.
    Set default value, before calling the screen
      p_field = 'DEF'.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    name = 'P_FIELD'.
      xvrm_values-key = 'ABC'.
      xvrm_values-text = 'ABC'.
      append xvrm_values to ivrm_values.
      xvrm_values-key = 'DEF'.
      xvrm_values-text = 'DEF'.
      append xvrm_values to ivrm_values.
      xvrm_values-key = 'GHI'.
      xvrm_values-text = 'GHI'.
      append xvrm_values to ivrm_values.
      call function 'VRM_SET_VALUES'
           exporting
                id     = name
                values = ivrm_values.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
    endmodule.                 " USER_COMMAND_0100  INPUT
    Thanks and Regards,
    Pavankumar

Maybe you are looking for

  • Problem with changing password on macbook pro.

    I just realized now that whenever I try to change my password into anything, a screen pops up and says: The password for the account "(my account name)" was not changed. Above is an attachment of more details.

  • Zooming into the center of an image

    Hi, I have this code that allows the user to zoom into an image that they have selected. However, when the image is zoomed into using the slider, it goes towards the top left corner of the image rather than the center. How can I modify my code to zoo

  • Layer 3 Web redirect without MD DNS Server

    Hello there Actually, I want to configure layer 3 web redirect and i dont have any DNS server. I tried to use the core switch to resolve the name into ip through the comment ip host webauth 1.1.1.1 but it did not work, I am using the DHCP currently l

  • Files are disappearing after making changes in Camera Raw

    I have lost multiple files, and I have no idea what the rhyme or reason is. There are random photos that are missing out of my folders. If anyone has any knowledge about this, I would greatly appreciate it. Thank you all for your time!

  • Help blackberry curve 8520 screen gone white with funny icon and saying reload softwear 552

    hello my blackberry curve 8520 screen has gone white and funny  circle icon has come up with reload softwear 552 at bottum of screen what do i do as it wont do anything ive tried battry pull and turned back on and it still brings that up Solved! Go t