Requirement  output based on Selection screen

I have the data like this and need to have a report as per the below requirement
Please experts guide me how to acheive this.
RECORDCompcode div category       SalesOrg          Price      
1     1208      A1      -           -     950     
2     1208      A1     CA1           -       900      
3     1208      A1     CA2           -     850     
4     1208      -      -          4001     920     
5     1208      -      -          4002     880     
6     1208      A1      -          4001     700     
7     1208      A2      -          4001     800     
8     1208      A1     CA1           -     910     
1.When the user runs the report, the target should be shown for only the selected values.
Ex1 : User runs a report with selection (Company Code = 1208) and (Division = A1)
With this combination target value should be shown as 950 - only the 1st record should be taken into account and should display that only.
Ex2 : User runs a report with selection (Company Code = 1208) and (Salesorg = 4001)
With this combination target value should be shown as 920 - only the 4th record should be taken into account and should display that only.
2.After the initial run when the user drilldown any character, the target value defined by the drilled down character should be seen.
Ex1 : User runs a report with selection (Company Code = 1208) and (Division = A1)
With this combination target value should be shown as 950 - only the 1st record should be taken into account and should display that only.
After the initial run, the user drilldown the report by Category. In this case target value 900 & 850 (records 2 & 3) should be shown respectively for categories Ca1 & Ca2 like below;
Category Price
C1       900
C2       850
Edited by: govaabaper on Dec 10, 2010 4:45 PM
Edited by: govaabaper on Dec 13, 2010 8:07 AM

Based on some assumptions and the date you have provided
Ex1 : User runs a report with selection (Company Code = 1208) and (Division = A1)
With this combination target value should be shown as 950 - only the 1st record should be taken into account and should display that only
--> select the key figure aggregation as - Maximum-
or if you can give the date/timestamp in the query as well- select the date and set it in the filter to be maximum- through a variable
2.After the initial run when the user drilldown any character, the target value defined by the drilled down character should be seen.
-->create a hierarchy on company code- division and place your category int he relevant divisions- when you activate the hierarchy it will show up as you have said

Similar Messages

  • Requirement date in ME2O selection screen.

    Hi Friends,
    I see that requirement date in ME2O selection screen is no where available in the output . Is this equal to PO creation date?

    Actually in ALV grid list out put, the document date is the Requirement date.
    If you analysis the same, you will find the solution.
    See I have analysis the same.
    In my ME2O transaction, I can see the document date as follow for the Purchase order number
    4700048844.
    Here the document date is showing 20.12.2011.
    When I go to to ME23N to display the PO number 4700048844, I can see the document date is different.
    But when I checked the requirement date, then I can see the same date for the PO number.

  • How to get data based on selection screen on the output

    Hi Expert,
    Can any one tell me based on material number on slection screen correspondind field i.e on selection scren
    WERKS,MTART,EKGRP,DISPO,BESKZ,MATNR should also get. i.e if i give mtart on selection screen corresponding to material number mtart shoul get.
    NOTE: I HAVE WRITTEN SELECT QUERY FOR TWO TABLES I.E MARA,MBEW.
    Below is my code
    TABLES:MARA,MARC,MARD.
    TYPES: BEGIN OF ty_mbew,
          matnr TYPE matnr,
          bwkey TYPE werks_d,
          lbkum TYPE lbkum,
          END OF ty_mbew.
    TYPES: BEGIN OF ty_close_stk,
           mandt TYPE mandt,
           matnr TYPE matnr,
           cdate TYPE zwkdate,
           bwkey TYPE werks_d,
           meins TYPE meins,
           zlbkum TYPE lbkum,
           WERKS  TYPE WERKS,      "
           MTART  TYPE MTART,
           EKGRP  TYPE EKGRP,
           DISPO TYPE  DISPO,
           BESKZ TYPE BESKZ,      
           salk3 TYPE salk3,
           END OF ty_close_stk.
    TYPES: BEGIN OF ty_mbewh,      
           matnr type matnr,
           bwkey type bwkey,
           lbkum type lbkum,
           lfmon type lfmon,
           end of ty_mbewh.        
    TYPES: begin of wa_matnr,
                matnr type matnr,
           end of wa_matnr.
    dATA : it_matnr type standard table of wa_matnr.
    DATA : it_close_stk_del TYPE STANDARD TABLE OF zclose_stock WITH HEADER LINE.
    DATA : it_close_stk TYPE STANDARD TABLE OF ty_close_stk,
           it_mbew TYPE STANDARD TABLE OF ty_mbew,
           wa_close_stk TYPE ty_close_stk,
           wa_mbew TYPE ty_mbew,
           it_mbewh TYPE STANDARD TABLE OF ty_mbewh,            "89286
           wa_mbewh TYPE ty_mbewh.                              "89286
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
    89286*********************
    SELECT-OPTIONS: WERKS FOR MARD-WERKS,    "Plant
                    MTART FOR MARA-MTART,    "Material type
                    EKGRP FOR MARC-EKGRP,    "Purchasing group
                    DISPO FOR MARC-DISPO,    "MRP Controller
                    BESKZ FOR MARC-BESKZ,    "Procurement type
                    s_MATNR FOR MARA-MATNR.  "Material number
    ************89286***************
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-002.
    select MATNR INTO CORRESPONDING FIELDS OF TABLE IT_MATNR
           FROM MARA
           WHERE MATNR IN S_MATNR.
    SELECT matnr
             bwkey
             lbkum
             salk3            "MSK25072011
             FROM mbew INTO CORRESPONDING FIELDS OF TABLE it_mbew
            WHERE lfgja = fis_year
              where matnr  in s_matnr
               and  bwkey in werks.

    Hi
    Perhaps I don't understand yet, but you have several select-options in your selection-screen, every select-options can be assigned to different tables (MARA, MARC, MBEW), so you need to decide if to use a JOIN o single SELECTION in order to get all data in one step or many steps.
    IF you need to do several selections, these have to be linked in order to get the data for the records selected in the previous selection, something like that:
    SELECT matnr mtart INTO TABLE t_mara
        FROM mara
          WHERE matnr IN s_matnr
            AND mtart IN s_mtart.
      IF sy-subrc = 0.
        SELECT matnr werks ekgrp INTO TABLE t_marc
          FROM marc
            FOR ALL ENTRIES IN t_mara
              WHERE natnr = t_mara-matnr
                AND ekgrp IN s_ekgrp.
        IF sy-subrc = 0.
          SELECT matnr bwkey lbkum salk3 INTO TABLE t_mbew
            FROM mbew
              FOR ALL ENTRIES IN t_marc
                WHERE matnr = t_marc-matnr
                  AND bwkey = t_marc-werks.
        ENDIF.
      ENDIF.
    But you can use an single join with all tables
    Max

  • ALV Report output as per selection screen

    Hi,
    I got a requirement. In selection screen there is field where i can entered 1 to 12 numbers. When i entered a number,  so that in output of an alv report should display that many fields
    for eg.
    if  i entered 5 in selection screen
    in out put 5 fields of alv report should display.
    Thanks....
    Moderator message : Spec dumping / Outsourcing is not allowed. Thread locked.
    Edited by: Vinod Kumar on Jul 15, 2011 11:34 AM

    hi,
    u sort the internal table by the materials in our variant.
    like sort itab by jtab
    itab consists of all materials
    jtab cosists of materials in variant.
    hope it may helpful,
    regards,
    chandu

  • Alv Output after dynamic selection screen

    Hi Guys
    I have coded a dynamic selection screen (shown below). I want to create an ALV report based on what the user enters in the selection screen. Is the right way of doing this to code an IF s_matnr is not initial statement then call all the subroutines for output of material data and then else call a second batch of subroutines for billing data. It seems a bit long winded to me but I haven't been able to find anything on google that clearly explains the approach.
    REPORT  ZTREVOR_DYNAMIC_ALV_MAKT_VBRP.
    TABLES : makt,
    marc,
    t001w,
    vbrk,
    vbrp.
    CONSTANTS : c_yes TYPE c VALUE '1',
    c_no TYPE c VALUE '0'.
    Selection-screen begin of block b1 with frame title text-sc1.
    PARAMETERS : p_opt1 TYPE c RADIOBUTTON GROUP radi USER-COMMAND op1, "Material
    p_opt2 TYPE c RADIOBUTTON GROUP radi.                  "Billing Document
    Selection-screen end of block b1.
    Selection-screen begin of block b2 with frame title text-sc2.
    SELECT-OPTIONS : s_matnr FOR makt-matnr MODIF ID op1, "Material
    s_vbeln FOR vbrp-vbeln MODIF ID op2. "Billing Document
    Selection-screen end of block b2.
    T SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN .
    IF screen-group1 = 'OP1' .
    IF p_opt1 = 'X' .
    screen-invisible = c_no .
    screen-active = c_yes .
    ELSE.
    screen-invisible = c_yes .
    screen-active = c_no .
    ENDIF.
    MODIFY SCREEN .
    ENDIF.
    IF screen-group1 = 'OP2' .
    IF p_opt2 = 'X' .
    screen-invisible = c_no .
    screen-active = c_yes .
    ELSE.
    screen-invisible = c_yes .
    screen-active = c_no .
    ENDIF.
    MODIFY SCREEN .
    ENDIF.
    ENDLOOP.

    Hi,
    First of all, you should check your radiobutton instead of select-option...
    Then you will have to build the output internal table dynamically based on the option chosen. There are lot of example on SDN...
    Here is a start: http://wiki.sdn.sap.com/wiki/display/Snippets/Tutorialabap-CodeforDynamicAlv+grid
    Kr,
    m.

  • Output based on selection

    Hi all,
    i'm working on MM report,
    i got one field in selection screen as
    PRODUCT TYPE = -
    (eg 6A, 6B, 6C)
    if i execute result should be based on this..
    if PRODUCT TYPE = -
    (eg 1A, 2B)
    it should give some other output....
    and should not take 6A, 6B in selection.
    how to approach this......
    Regards
    Suprith

    Hi suprit,
    select options s_prv .....
    in select stmt
    select * from table into internal table where prv in s_prv..
    the result vil b in ur internal table...
    Regards,
    Vamshi

  • From ALV output list to selection screen

    Hi,
    I created one ALV report.
    After executing the program, it displays an ALV list.
    When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
    But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
    I checked the program for any write statement, but therre are no write statements.
    Even i tried to remove the end-of-selection event in the program. but not working.
    Can any one help me on this how to overcome this issue.
    Thank you.
    Kumar

    hi check this example...
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog
    regards,
    venkat

  • How to get rid of the loop in ALV output from At selection screen event?

    I have several push buttons on a selection screen.
    Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..
    On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.
    choose a line and it fills the cell.
    Upto this it works fine.
    Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.
    How to control this?
    Probably I am not refreshing something?
    (I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)
    Thanks,
    Ven

    Hi,
    FORM refresh_grid USING  pw_grid TYPE REF TO cl_gui_alv_grid.
    *Work area
      DATA : wal_stable TYPE lvc_s_stbl.
      CHECK NOT pw_grid IS INITIAL.
      wal_stable-col = c_check.
      wal_stable-row = c_check.
    *Method to refresh grid
      CALL METHOD  pw_grid->refresh_table_display
           EXPORTING
             is_stable      = wal_stable
             i_soft_refresh = c_check
           EXCEPTIONS
             finished       = 1
             OTHERS         = 2.
    ENDFORM.                    " refresh_grid
    Thanks,
    Sree.

  • At selection-screen output and  at selection-screen on

    Hi Experts,
    I had coded in both at selection-screen output for disabling input of certain fields and at selection-screen for validation like this:
    AT SELECTION-SCREEN output.
      IF p_amt = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_AMT'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_B4C'.
              screen-input = '1'.
            WHEN 'P_AFC'.
              screen-input = '1'.
            WHEN 'P_COM'.
              screen-input = '1'.
            WHEN 'P_COM1'.
              screen-input = '1'.
            WHEN 'P_COM2'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_amt = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_AMT'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_B4C'.
              screen-input = '1'.
            WHEN 'P_AFC'.
              screen-input = '1'.
            WHEN 'P_COM'.
              screen-input = '1'.
            WHEN 'P_COM1'.
              screen-input = '1'.
            WHEN 'P_COM2'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_pdf = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_PDF'.
              screen-input = '1'.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'P_PATH'.
              screen-input = '1'.
            WHEN OTHERS.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF p_afc = 'X'.
        LOOP AT SCREEN.
          CASE screen-name.
            WHEN 'P_TST'.
              screen-input = '1'.
            WHEN 'S_FID-LOW' OR 'S_FID-HIGH'.
              screen-input = '0'.
            WHEN 'S_ORG-LOW' OR 'S_ORG-HIGH'.
              screen-input = '0'.
            WHEN 'S_OFF-LOW' OR 'S_OFF-HIGH'.
              screen-input = '0'.
            WHEN 'S_DAT-LOW' OR 'S_DAT-HIGH'.
              screen-input = '0'.
          ENDCASE.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    AT selection-screen on block b5.
    if p_tst is initial.
      message text-016 type 'E'.
    endif.
    AT selection-screen on block b2.
    if p_amt ne 'X' and p_pdf ne 'X'.
    if s_fid is initial and s_org is initial.
    message text-000 type 'E'.
    endif.
    if s_dat is initial.
    message text-000 type 'E'.
    endif.
    endif.
    when i comment out at selection-screen validations the input is disabled for the screen fields as set, else the validations are executed first.
    Any solution for this???
    Thanks in advance.

    AT SELECTION-SCREEN
    Syntax
    AT SELECTION-SCREEN selscreen_event.
    Effect
    This statement defines event blocks for different events selscreen_event that are triggered by the ABAP runtime environment during selection screen processing.
    Selection screen events occur immediately before sending a selection screen and after certain user actions on a displayed selection screen. They assist in selection screen processing in the ABAP program.
    AT SELECTION-SCREEN is triggered at least twice during actions on selection screens that are linked into another selection screen as a subscreen - first for the linked selection screen itself, and then for the linking selection screens.
    Note
    The event blocks after AT SELECTION-SCREEN are implemented internally as procedures. Declarative statments in these event blocks create local data.

  • Dynamic selection list based on selection screen values ?

    I have a requirement which I can't solve in one step in a selection screen
    first field I have to select the contract like you do with me33k
    in the second field I have to select the position of the contract filled in at the first field ?
    if the position is selected I have to fill other fields in the selection screen and block them for altering the information entered by the position selected
    anybody got some sample on how to do this ??
    kind regards
    arthur de smidt

    I really don't understand why it's not working. after input of the parameter field debugging doesn't start when is it evaluated ??
    I want the screen modified at every change of p_contr.
    SELECTION-SCREEN: BEGIN OF BLOCK s01 WITH FRAME TITLE text-s01.
    parameters:       p_bukrs like ekko-bukrs MEMORY ID BUK obligatory,
                      P_WERKS like EKPO-WERKS MEMORY ID WRK OBLIGATORY,
                      p_ekorg like ekko-ekorg MEMORY ID EKO obligatory,
                      P_EKGRP like EKKO-EKGRP MEMORY ID EKG OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK s01.
    SELECTION-SCREEN: BEGIN OF BLOCK s05 WITH FRAME TITLE text-s05.
    parameters:       p_contr AS CHECKBOX USER-COMMAND contr,
                      p_konnr like EKKO-ebeln  MATCHCODE OBJECT MEKK ,
                      P_KTPNR like EKPO-ktpnr.
    SELECTION-SCREEN: END OF BLOCK s05.
    SELECTION-SCREEN: BEGIN OF BLOCK s02 WITH FRAME TITLE text-s02.
    parameters:       p_lifnr like ekko-lifnr modif id CTR,
                      p_EVERK like EKKO-VERKF," obligatory,
                      p_afnam type zafnam,
                      p_uwkenm like EKPO-TXZ01,
                      P_IHRAN like EKKO-IHRAN DEFAULT SY-DATUM,
                      P_KDATB like EKKO-KDATB," obligatory,
                      P_KDATE like EKKO-KDATE," obligatory,
                      p_cntVU LIKE RP50G-PERNR OBLIGATORY
                                  MATCHCODE OBJECT PREM,
                      p_advies type lifnr.
    SELECTION-SCREEN: END OF BLOCK s02.
    SELECTION-SCREEN: BEGIN OF BLOCK s03 WITH FRAME TITLE text-s03.
    SELECTION-SCREEN  PUSHBUTTON /1(17) WERK USER-COMMAND WERK.
    parameters:       P_TXZ01 like EKPO-TXZ01 obligatory,
    *                 p_txt9  type tline,
                      P_MATKL like EKPO-MATKL DEFAULT 'DNST-02' OBLIGATORY.
    selection-screen begin of line.
    SELECTION-SCREEN COMMENT 1(31) TEXT-001 FOR FIELD p_menge.
    parameters:       P_MENGE like EKPO-MENGE DEFAULT '1' OBLIGATORY,
                      P_MEINS like EKPO-MEINS DEFAULT 'ST' OBLIGATORY.
    selection-screen end of line.
    selection-screen begin of line.
    SELECTION-SCREEN COMMENT 1(31) TEXT-002 FOR FIELD p_netpr.
    parameters:       P_NETPR like EKPO-NETPR obligatory,
                      P_EPEIN like EKPO-BPRME DEFAULT 'ST' OBLIGATORY.
    SELECTION-SCREEN POSITION 55.
    parameters:       p_schpr like ekpo-schpr.
    selection-screen end of line.
    parameters:       p_saknr like mepoaccounting-sakto obligatory,
                      p_aufnr like mepoaccounting-aufnr obligatory.
    SELECTION-SCREEN: END OF BLOCK s03.
    initialization.
      clear h_exit.
      set pf-status 'STANDAARD'.
      move 'Werkomschrijving' to WERK.
    at selection-screen on p_contr.
    loop at screen.
    if p_contr = 'X'.
          if screen-group1 = 'CTR'.
            screen-input = 0.
            screen-active = 0.
            screen-required = 0.
            modify screen.
          else.
            screen-input = 0.
            screen-active = 1.
            screen-required = 1.
            modify screen.
          endif.
    endif.
    endloop.
    at selection-screen on exit-command.
      case sy-ucomm.
        when '&F03' or '&F015' or '&F12'.
          leave program.
      endcase.
    at selection-screen on block S01.
      case sy-ucomm.
        when 'ONLI'.
          type_doc = 'B'.
        when 'ONLI1'.
          type_doc = 'O'.
      endcase.
    perform checks_org.
    at selection-screen on block S02.
      perform checks_lev.
    at selection-screen on block s03.
      check sy-ucomm(4) eq 'ONLI'.
      perform checks_werk.
    at selection-screen.
      case sy-ucomm.
        when 'WERK'.
          perform lange_omschrijving.
        when 'SPOS'.
          CALL FUNCTION 'RS_VARIANT_SAVE_FROM_SELSCREEN'
            EXPORTING
              CURR_REPORT = 'ZBESTELLING'.
      endcase.
    start-of-selection.

  • Dynamic column output based on selection.

    Hi all,
    I have certain qualification select-options upon the selection-screen.
    I have 5001 to 5012 range of qualificaitons.
    If user select only 5001 to 5003....
    I want only 3 columns ...or else if user wants to select 5008 to 5012  output should be have columns 5008 , 09,10,11...
    I am displaying output in
    mail format only
    concanate 'COL1' COL2' 'COL2' TO STRING SEPERATED BY C=>LB.
    loop at itab.
    CONCATE ITAB-1 itab-2 itab-3 to Xstring.
    endloop.
    Thanks and regards
    sas
    Edited by: saslove sap on Jul 7, 2010 5:36 AM

    Well I have harcoded the value  as below.I have no choice find .  Instead of using mutiple 'IF' conditions ANY other options are left:
      CONCATENATE
      'Personnel Number'    'Employee GUID'   'Last Name'   'First Name'   'Position Number'   'Position Title'   'Department Number'
      'Department Name'    'Employee Subgroup text'    'Employee Group text'   'SBU Head Personnel Number'   'SBU Head GUID'
      'SBU Head Name'   'Supervisor Personnel Number'   'Supervisor GUID'   'Supervisor Name'
      'Personnel Subarea text'
    'CF1-Director function'
    'CF2-Nonexecutive director function'
    'CF3-Chief Executive function'
    'CF8-Apportionment & oversight function'
    'CF10-Compliance oversight function'
    'CF11-Money laundering reporting function'
    'CF28-Systems & controls function'
    'CF29-Significant management function'
    'CF30-Customer function, Investment Advice'
    'CF30-Customer function, Investment Mgmt'
    'CF30-Customer function, Trading'
    'Admin - FSA T&C qualifying role'
        INTO S_OUTPUT-X SEPARATED BY C_TAB.
    IF C = 'X'.
    IF '50000001' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF1-Director function'  INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000002' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF2-Nonexecutive director function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000003' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF3-Chief Executive function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000004' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF8-Apportionment & oversight function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000005' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF10-Compliance oversight function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000006' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF11-Money laundering reporting function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000007' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF28-Systems & controls function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000008' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF29-Significant management function' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000009' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Investment Advice' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000010' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Investment Mgmt' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000011' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'CF30-Customer function, Trading' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000012' IN s_quali[].
       CONCATENATE S_OUTPUT-X    'Admin - FSA T&C qualifying role' INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    endif.
      APPEND S_OUTPUT.
      LOOP AT GIT_ITAB ASSIGNING <GFS_ITAB>.
        CLEAR S_OUTPUT.
        CONCATENATE
    <GFS_ITAB>-PERNR <GFS_ITAB>-EMPGUID <GFS_ITAB>-LNAME  <GFS_ITAB>-FNAME  <GFS_ITAB>-POSITION  <GFS_ITAB>-POSTITLE <GFS_ITAB>-DEPTNO <GFS_ITAB>-DEPTNAME  <GFS_ITAB>-EMPSUBTEXT <GFS_ITAB>-EMPGRPTEXT
    <GFS_ITAB>-SBUNO <GFS_ITAB>-SBUGUID <GFS_ITAB>-SBUNAME <GFS_ITAB>-SUPVNO <GFS_ITAB>-SUPVGUID <GFS_ITAB>-SUPVNAME <GFS_ITAB>-PSUBAREATEXT
       INTO S_OUTPUT-X SEPARATED BY C_TAB.
    IF C = 'X'.
    IF '50000001' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF1  INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000002' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF2 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000003' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF3 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000004' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF4 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000005' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF5 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000006' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF6 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000007' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF7 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000008' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF8 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000009' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF9 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000010' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF10 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000011' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF11 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    IF '50000012' IN s_quali[].
       CONCATENATE S_OUTPUT-X    <GFS_ITAB>-CF12 INTO S_OUTPUT-X SEPARATED BY C_TAB.
    endIF.
    endif.
      <GFS_ITAB>-CF2  <GFS_ITAB>-CF3 <GFS_ITAB>-CF4   <GFS_ITAB>-CF5 <GFS_ITAB>-CF6
    <GFS_ITAB>-CF7  <GFS_ITAB>-CF8 <GFS_ITAB>-CF9 <GFS_ITAB>-CF10  <GFS_ITAB>-CF11  <GFS_ITAB>-CF12
    *concatenate s_output-x c_cr into s_output-x.
        APPEND S_OUTPUT.
      ENDLOOP.

  • Display Output on the Selection-screen

    Hi all ! Could anybody tell me to how to display the name of the vendor/customer next to the input box on the selection screen area ? e.g. As soon as one presses the enter key after entering the vendor code on 'XK03' transaction screen, the name of the respective vendor is shown right next to the vendor code input box on the selection screen area.

    Hi,
    In AT-selection screen event write the code for getting the the Customer/vendor Name and display it on the screen.
    In-order for the Radiobutton selection process to initiate the 'AT selection-screen' event you need to add the 'USER_COMMAND' option to the parameter declaration. See code below.
    *Code used to Initiate the 'AT selection-screen' EVENT from radiobuttons.
    selection-screen begin of block group with frame title text-s04.
    parameters: p_sel1 type c radiobutton group sel user-command upd.
    parameters: p_sel2 type c radiobutton group sel.
    parameters: p_sel3 type c radiobutton group sel.
    selection-screen end of block group.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
      IF  p_sel1 = 'X'.
        Write select query to get teh customer/vendor name and display it.
      ENDIF.
    You can use LFA1 or KNA1 to get vendor/customer name

  • How to get required fields in the selection screen while filling a set tabl

    hai,
    i was filling the set up table for 2lis_13_vditm.but while filling the set up table in the selection conditions in the tcode OLI9BW.
    I would like to have the a field added in the selection condition which is not existing in the OLI9BW.
    kindly help me out of ths.
    with regards
    soumya.

    As far as I know, you're just limited to whatever fields are in the transaction... That applies for any of the setup tables processes.
    If you need to limit the data that goes to BW, you can do so by putting the logic in CMOD, EXIT_SAPLRSAP_001, Include ZXRSAU01 for the specific extractor.

  • How to Print Selection-Screen along with ALV Report output

    Hi,
    I have a requirement wherein i need to also print the Selection Screen of a report when I print the ALV report output.
    Basically i need to print the ALV output along with selection screen.
    Could you plz suggest me the way.
    Regards,
    Nitin

    Hi,
    My selection Screen is a very big one. It contains around 30 select-options.
    So is their any standard method in which you can choose whether you want to take the output printout with or without Selection screen.
    Regards,
    Nitin

  • Based from my selection-screen, how can I make the parameter dynamic?

    Hi experts,
    Based from my code below and logic, I have to modify the loop at screen without removing the original IF condition in such a way that the parameter p_code will only be available for input if the radiobutton pr_edit is clicked by the user.
    Again, thank you guys and have a great day!
    SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME TITLE text-001.
    PARAMETERS: pr_upld RADIOBUTTON GROUP grp MODIF ID id3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(30) text-a11 FOR FIELD p_flnme MODIF ID id3.
    PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\' MODIF ID id3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(32) text-002 FOR FIELD p_dcode MODIF ID id1.
    PARAMETERS: p_dcode LIKE vbak-kunnr MODIF ID id1,
                p_name1 LIKE kna1-name1 MODIF ID id1.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: pr_list RADIOBUTTON GROUP grp MODIF ID id4,
                pr_add  RADIOBUTTON GROUP grp MODIF ID id2,
                pr_edit RADIOBUTTON GROUP grp MODIF ID id5.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(30) text-a12 FOR FIELD p_code MODIF ID id2.
    *PARAMETERS: p_kunnr LIKE zts0001-kunnr.
    PARAMETERS: p_code LIKE zts0001-cdseq MODIF ID id6.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK box1.
    IF v_compflag EQ space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-input        = '0'.
            screen-output       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '1'.
            MODIFY SCREEN.
         ELSEIF screen-group1  = 'ID6'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF v_compflag NE space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

    Write the below code in  selection Screen Output Event
    AT SELECTION-SCREEN OUTPUT.
      IF pr_edit EQ 'X'.
        LOOP AT SCREEN.
          IF ( screen-group1 = 'ID6' ).
            screen-input = 0.
            screen-invisible = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    ENDIF.
    Enjoy Coding.
    Thomas.

Maybe you are looking for

  • 30 pin male to female cable

    Just got a Micropack battery. Provides 8 hours of video play. Problem is when you place the Touch into the dock, you have to turn everything sideways in order to view movies in landscape mode. I am trying to locate a 30 pin male to female cable so I

  • Unable to do the Local Client Copy

    Hi, Experts I have created a new client, and i have logged on that client and doing the local client copy. When I see the client copy log the client copy got cancelled. When i check the log i am getting a error saying "The System's Time Zone Cannot b

  • How to use 'AT PF' and 'AT USER-COMMAND' is used in reports...?

    HI, I AM SIVA, I AM NEW TO ABAP, I HAVE NOT CLARY ON 'AT PF' AND 'AT USER-COMMAND'.... I DONT KNOW HOW AND WHEN TO USE ABOVE TWO EVENTS.. SEND ME ANY SOURCE CODE OF USING ABOVE TWO EVENTS... IF U KNOW THE ANSWER... PLEASE SEND ME... REGUARS, SIVA.

  • MacBook Pro 15-inch Rechargeable Battery "swollen"

    Hello, I just exchanged the batter in an old MacBook Pro 15". Model A1281 The reason for the exchange was, that the removable batter lid had "exploded" (noise not actual combustion) open. The Battery inside was "deformed" and had expanded in thicknes

  • Items in queue won't download   - not a simple one

    I have 131 items in queue, but they won't even start downloading. When I check for purchases, I get the network times out connection contacting store messge. However, Itunes diagnostics run clean. up until today, I was able to buy a new song, watch i