Defining Selection variables for program variant, TVARV table Help - urgent

Hi All,
Can anyone tell me, what is the transaction to create new variables in table TVARV to use them in my variant for fiscal year and WIP period fields in selection screen of SAPKKA07 program.I used STVARV and it creates variables in table TVARVC table not in TVARV table and moreover in creating a variant the selection variables are defaulted as variables from TVARVC table as input help but not the variables in TVARV table however I see and understand different from SAP Help. The following is the link
http://help.sap.com/saphelp_47x200/helpdata/en/25/c966398ae5c13ae10000000a114084/frameset.htm
for selection variable creation.
Can anyone help me on this this is very urgent. Your help is highly appreciated
Thanks in advance
Kumar

Thanks Appana,
I know we can create the variable that way but, that is something hardway to do it. I want to go about it from transaction not meaning to update the table directly and moreover if I update the TVARV table directly as u said I still dont see the variable I created in the list I get on input help for selection variables while creating a program variant.
I hope u can suggest me better now.
Thanks
Kumar

Similar Messages

  • Does SAP keep change history for program variants?

    Hi,
    Does anybody know whether SAP keep change history for program variants, like it does for PO, Material etc?
    If so, how could I get this information? If not, does it mean there is no way we could find the changes made to the variant?
    Thanks
    steven

    Hello Steven,
    I see that this is your first post to the forums here and I would like to welcome to SDN and BPX. I hope you will find these communities very helpful for learning and sharing information about SAP Products and Technologies.
    Regarding your question, I think the best place to find the answer would be the ABAP Development.
    However, being an experienced ABAP developer myself, I do not think program variants have change history. And yes, there is no way to retrieve the old values of the variants .
    Regards.
    Anand Mandalika.

  • How to  Create  a selection variable for Fiscal period/year range

    How to  Create  a selection variable for Fiscal period/year range. The idea is to filter the query results using a fiscal period/year range user input rather than a full fiscal year input.

    Hi Priya,
    Open the query in a query designer -> in the left hand side you would find the fiscal year period under the time dimension -> right click -> create variable -> create the variable.
    The better option would be use any of the SAP provided variable. You would find them under the Fiscal year period in the left hand side in the query designer.
    Bye
    Dinesh

  • Define selection rule for Day type

    Dear Experts
        As I want to "Define selection rule" for "day types" in Time Management-> work schedule-> Day types-> define selection rule, the third and 4th columns are default weekdays of SAP, But weekend is different in our system. How can we handle this subject? Can we change these columns to our needs? How?
    For example we want to define that friday is not working day in our company and it should be payed, is there any other option?
    Thank you all,...

    Hi friend,
    Check:
    Time Management -> Work Schedules -> Period Work Schedules -> Define Period Work Schedules
    btw, you should check factory Holiday calendar (Tcode: SCAL) and generate Work schedule for year.
    IMG: Time Management -> Work Schedules -> Work Schedule Rules and Work Schedules -> Generate Work Schedules in Batch
    Regard,
    Michael.

  • User defined Selection screen for Logical database

    hi all,
           can we display a user defined selection screen instead of the default selection screen in LDB . eg pnp
    cheers
    senthil

    Hi,
    to my knowledge, the selection screen of a logical database can only be changed (versions!) in the logical database itself.
    What you can do is, write a program with your own selection screen an then either call another program that uses the LDB or -  much better - you call the LDB from your program with function module LDB_PROCESS!
    Example taken from the example library (TA ABAPDOCU):
    <b>REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.</b>

  • Doubt in Selection-Screen for Program type "Function Group"

    Hi Gurus,
    I created a Function group in that i created one screen and writtem the Screen flow logic. In that screen I called a Function module "COMPLEX_SELECTIONS_DIALOG" For Creating a selection-Screen.
    The code snippet is like below.
    CASE ok_code .
        WHEN c_clk1.
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
         EXPORTING
           title                   = text-002
           text                    = 'Material Number'
           signed                  = 'X'
            lower_case              = ' '
            no_interval_check       = ' '
             just_display            = ' '          " Un commented by Srihari
             just_incl               = 'X'          " Un commented by Srihari
            excluded_options        =
            description             =
            help_field              =
            search_help             =
           tab_and_field           = st_tab
          TABLES
            range                   = r_matnr
         EXCEPTIONS
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           OTHERS                  = 5.
    it works fine. But the problem is if i click the multiple selection button for the select-option in selection screen and enter the values and copy those value. In the multiple selection button green button is not coming like noram report selection-screen. Please remember I used the program type as "Function Group" not "Module Pool".
    Please send your suggestions.
    Thanks,
    Srihari.

    Ok, I am not 100% sure, if I understand you correctly, you said, you created one screen to 'simulate' a standard selection screen behavior without using select-options statement?
    If that's not correct, could you please post a few more details on what exactly you are doing.
    I had to 'simulate' a select-option behavior which I did as follows:
    - I created a range variable to store the values (s_ctby)
    - on the screen I defined the LOW (s_ctby-low), HIGH (s_ctby-high) and the multiple selection field pushbutton
    - In the PBO I set the icons for the multiple selection pushbutton
      READ TABLE s_ctby INDEX 2 TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        gv_createby = gc_icon_enter_data.
      ELSE.
        gv_createby = gc_icon_disp_data.
      ENDIF.
    - In the PBO make sure that any values entered on the screen are transferred to the range
    * transfer any changed values into the correct range for user transaction
    * (screen 0110) because that screen just 'simulates' a selection screen
    * so we have to make sure that any data the user enters in the selection
    * fields is passed into the appropriate ranges
      IF sy-tcode EQ gc_trans_user.
    *   created by
        IF NOT s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_bt.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF NOT s_ctby-low  IS INITIAL AND
                   s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_eq.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF s_ctby-low  IS INITIAL AND
               s_ctby-high IS INITIAL.
          DELETE s_ctby INDEX 1.
        ENDIF.
    - If the user hits the multiple selection pushbutton
        WHEN gc_fc_create_by.
    *     if the user hits the multiple selection button on the screen
    *     we call the standard SAP functionality to show the multiple
    *     selection popup SAP uses on a standard selection screen
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
            EXPORTING
              title             = text-t02
            TABLES
              range             = s_ctby
            EXCEPTIONS
              no_range_tab      = 1
              cancelled         = 2
              internal_error    = 3
              invalid_fieldname = 4
              OTHERS            = 5.
          IF sy-subrc NE 0 AND NOT sy-msgty IS INITIAL.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     now update the header line so the screen fields display the correct values
          CLEAR s_ctby.
          READ TABLE s_ctby INDEX 1.
    Hope that helps,
    Michael

  • Selection variable for next month in RFPERIOD_OPEN in closing cockpit

    Hi,
    we would like to use RFPERIOD_OPEN in the closing cockpit in order to open the next period on D-10 automatically. I would like to use the selection variables of the closing cockpit in the program variant in order to avoid unnecessary variant maintenance every month.
    Unfortunately I cannot find a variable for the next month. There is only SAP_FAST_CLOSE_PERIOD_P. Do you know if it is possible to base a calculation logic to derive the next period from SAP_FAST_CLOSE_PERIOD_P.
    Thanks!
    Kind regards,
    Mariya

    Thanks! I checked it, but the appearance of months and order is okay in T247.
    Any other ideas?
    I thought I read somewhere that this is a bug but can´t remember where I found that bug hint.

  • Define selection screen for ldb_process

    Hi I'm using the call function ldb_process for KDF(lfa1, lfb1, bsik), the trouble is that the information its different than if i do it on a normal report defining the logical database kdf and selection screen 903.
    I find that the difference is because the selection screen, this is because the default selection screen for the kdf database is 1000, and this selection has the "Open items at key date" selection with the current date.
    The question is:
    How can i define the selection screen 903 using the call function ldb_proces?
    Thanks
    Pablo Santos

    Hi,
    You cannot define screen version 903 using function LDB_PROCESS. Instead use table "SELECTIONS" of the function module .
    Cheers.

  • Add new select option for VT04 variants

    Hi Experts,
    Want to know the process of how we add a new select option (say sold-to/KUNAG) to the existing set of selection criteria in the variants in VT04 apart from implicit enhancements.
    Even if we create a new implicit enhancement in LV56LSCR, the new field (sold-to/KUNAG) has to be further added to the select statements also. The select statement in the subroutine INDEX_SELEKTIEREN in LV56LF01 has to be enhanced for the same.
    Also should this new field has to be added to the EXPORT TO and IMPORT FROM MEMORY ID MEMORY_LFSL statements in the other includes of SAPLV56L ?
    Is there a better/recommended way to do this? Any pointers are much appreciated. Thank You.
    Regards,
    Narendra.

    Hi Ravi,
    This is infact the program for the txn VT04, would you be able to shed any other info? Thanks.
    Regards,
    Narendra.
    Edited by: Narendra Daka on Dec 7, 2011 9:00 AM

  • Select query for KONV and VBAK table

    hy Experts.
    Please Help me For this Query, i got error on it.
    I wnt to take KONV-KBETR (RATE FIELD) for particular  SO number. and i used following query but it gives error i cant relate VBAK & KONV table.
    Please do needful
    SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV) WHERE VBAK-KNUMV = KONV-KNUMV AND VBAK-VBELN IN VBELN.
    Thnks
    Bhavesh Panchal.

    Hello Thnks For Reply,
    but still i cant take solution. i am making a Sales order Rports. i got all field but i cant fetch filed for RATE and Pending Order Value.
    Please check following  Code. if need to change u can.
    Thnks
    Bhavesh Panchal.
    REPORT  ZTESTCODE.
    TYPE-POOLS:slis.
    TABLES: VBEP , VBAP ,  VBPA , VBKD , VBAK , LIKP , LIPS , VBUP , VBBE, KONV, KNA1.
    DATA :BEGIN OF itab  OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    EDATU LIKE VBEP-EDATU,
    KNUMV LIKE VBAK-KNUMV,
    WMENG LIKE VBEP-WMENG,
    BMENG LIKE VBEP-BMENG,
    LFIMG LIKE LIPS-LFIMG,
    OMENG LIKE VBBE-OMENG,
    POSAR LIKE VBAP-POSAR,
    NETWR LIKE VBAP-NETWR,
    NTGEW LIKE VBAP-NTGEW,
    KBETR LIKE KOMV-KBETR,
    KUNNR LIKE  VBAK-KUNNR,
    NAME1 LIKE  KNA1-NAME1,
    *BRGEW LIKE  VBAP-BRGEW,
    BSTKD LIKE VBKD-BSTKD,
    BSTDK LIKE VBKD-BSTDK,
    LFSTA LIKE VBUP-LFSTA,
    *KNUMV LIKE VBAK-KNUMV,
    *posnr LIKE LIPS-POSNR,
    *NETWR LIKE VBAK-NETWR,
    BRGEW LIKE VBAP-BRGEW,
    LFDAT LIKE LIKP-LFDAT,
    *NTGEW LIKE LIKP-NTGEW,
    DELIVERY LIKE LIPS-VBELN,
    WEIGHT like VBAP-NTGEW,
    END OF itab.
    *variable for Report ID
    DATA: v_repid LIKE sy-repid .
    *declaration for fieldcatalog
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: it_listheader TYPE slis_t_listheader.
    declartion for layout
    DATA: alv_layout TYPE slis_layout_alv.
    *Title displayed when the alv list is displayed
    *DATA:  i_title_main TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
    DATA:  i_title_main TYPE lvc_title VALUE 'Reports : Bhavesh Pacnhal'.
    INITIALIZATION.
      v_repid = sy-repid.
      PERFORM build_fieldcatlog.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
         SELECT-OPTIONS : VBELN FOR VBAK-VBELN ,
                          KUNNR FOR VBPA-KUNNR ,
                          EDATU for ITAB-EDATU.
      SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_listheader USING it_listheader.
      PERFORM display_alv_report.
    FORM build_fieldcatlog.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_m = 'SalesOrderNo'.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field for Customer Name.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NAME1'.
      wa_fieldcat-seltext_m = 'Customer Name'.
      wa_fieldcat-outputlen = '30'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Po Number.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BSTKD'.
      wa_fieldcat-seltext_m = 'PO No'.
      wa_fieldcat-outputlen = '20'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    Field For Order Value
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NETWR'.
      wa_fieldcat-seltext_m = 'Order Value '.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Po Date.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BSTDK'.
      wa_fieldcat-seltext_m = 'PO Date'.
      wa_fieldcat-outputlen = '20'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-fieldname = 'POSNR'.
    wa_fieldcat-seltext_m = 'Item No'.
    wa_fieldcat-outputlen = '20'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'EDATU'.
      wa_fieldcat-seltext_m = 'Delivery Date'.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    wa_fieldcat-tabname = 'VBAP'.
    wa_fieldcat-fieldname = 'KWMENG'.
    wa_fieldcat-seltext_m = 'Order QTY VABP.'.
    wa_fieldcat-outputlen = '14'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
    Field For Order Qty.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'WMENG'.
      wa_fieldcat-seltext_m = 'Ord.QT.WMEN.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Order Qty.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BMENG'.
      wa_fieldcat-seltext_m = 'Ord.QT.BMEN.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    field For Delivery Qty.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'LFMING'.
      wa_fieldcat-seltext_m = 'DEL QTY.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Open Qty from ITAB.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'OMENG'.
      wa_fieldcat-seltext_m = 'OPEN QTY.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Pending Weight from ITAB.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BRGEW'.
      wa_fieldcat-seltext_m = 'Pending Weight'.
      wa_fieldcat-outputlen = '12'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    Field For netweight.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NTGEW'.
      wa_fieldcat-seltext_m = 'Net Weight'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Actual Delivery.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'LFDAT'.
      wa_fieldcat-seltext_m = 'Actual Delivery'.
      wa_fieldcat-outputlen = '12'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'KBETR'.
      wa_fieldcat-seltext_m = 'RATE'.
      wa_fieldcat-outputlen = '20'.
      append wa_fieldcat to i_fieldcat.
      clear wa_fieldcat.
    Field For Actual Delivery.
    wa_fieldcat-tabname = 'LIPS'.
    wa_fieldcat-fieldname = 'POSNR'.
    wa_fieldcat-seltext_m = 'Delivery ITEM'.
    wa_fieldcat-outputlen = '20'.
    append wa_fieldcat to i_fieldcat.
    clear wa_fieldcat.
    Field For Pending Value.
    VBUP-LFSTA
    wa_fieldcat-tabname = 'VBUP'.
    wa_fieldcat-fieldname = 'LFSTA'.
    wa_fieldcat-seltext_m = 'Pending Value'.
    wa_fieldcat-outputlen = '20'.
    append wa_fieldcat to i_fieldcat.
    clear wa_fieldcat.
    Field For pending weight.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-fieldname = 'ITAB-OMENG * KOMV-KBETR'.
    wa_fieldcat-seltext_m = 'Pending VALUE'.
    wa_fieldcat-outputlen = '20'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM.                    "BUILD_FIELDCATLOG
    FORM data_retrieval.
    SELECT VBELN  NETWR KUNNR FROM VBAK INTO (ITAB-VBELN,ITAB-NETWR,ITAB-KUNNR) WHERE VBELN IN VBELN .
    SELECT POSNR POSAR BRGEW FROM VBAP INTO (ITAB-POSNR,ITAB-POSAR,ITAB-BRGEW) WHERE VBELN = ITAB-VBELN .
    SELECT EDATU FROM VBEP INTO (ITAB-EDATU) WHERE VBELN = ITAB-VBELN AND POSNR = ITAB-POSNR.
    SELECT NAME1 FROM KNA1 INTO (ITAB-NAME1) WHERE KUNNR = ITAB-KUNNR .
    SELECT BSTKD BSTDK FROM VBKD INTO (ITAB-BSTKD,ITAB-BSTDK) WHERE VBELN = ITAB-VBELN AND POSNR = ITAB-POSNR.
    SELECT VBELN LFIMG FROM LIPS INTO (ITAB-DELIVERY, ITAB-LFIMG) WHERE VGBEL = ITAB-VBELN AND VGPOS = ITAB-POSNR.
    SELECT LFDAT NTGEW FROM LIKP INTO (ITAB-LFDAT,ITAB-NTGEW) WHERE VBELN = ITAB-DELIVERY .
    SELECT WMENG BMENG FROM VBEP INTO (ITAB-WMENG,ITAB-BMENG) WHERE VBELN IN VBELN .
    SELECT SINGLE OMENG FROM VBBE INTO (ITAB-OMENG) WHERE VBELN IN VBELN.
    SELECT SINGLE NETWR FROM VBAK INTO (ITAB-NETWR) WHERE VBELN IN VBELN.
    SELECT KNUMV FROM VBAK INTO (ITAB-KNUMV) WHERE VBELN IN VBELN.
    *SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV) WHERE KNUMV = VBAK-KNUMV.
    *assign VAR1 = itab-kbetr.
    *append itab.
    *ENDSELECT.
    SELECT KBETR KNUMV FROM KONV INTO (ITAB-KBETR, ITAB-KNUMV)WHERE KNUMV = VBAK-KNUMV.
    ITAB-KBETR = KONV-KBETR.
    ENDSELECT.
    APPEND ITAB.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    ENDSELECT.
    *ENDSELECT.
    ENDFORM.                    "data_retrieval
    FORM build_listheader  USING it_listheader TYPE slis_t_listheader.
    DATA HLINE TYPE SLIS_LISTHEADER.
      DATA: ls_line TYPE slis_listheader.
    bhavesh
    HLINE-INFO = 'report Developed by Bhavesh'.
    HLINE-TYP = 'H'.
    Header
    Bhavesh
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY: not used for this type
      ls_line-info = 'Sales ORDER Report'.
      APPEND ls_line TO it_listheader.
    bhavesh
    ***Selection
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'Key 1'.
      ls_line-info = 'SFEL'.
      APPEND ls_line TO it_listheader.
      ls_line-key  = 'Key 2'.
      ls_line-info = 'SFEL'.
      APPEND ls_line TO it_listheader.
    ***Action
      CLEAR ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY: not used for this type
      ls_line-info = 'Status list'.
      APPEND ls_line TO it_listheader.
      ENDFORM.                    "BUILD_LISTHEADER
    *ENDFORM.                   "build_listheader
    FORM display_alv_report.
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_repid
       I_CALLBACK_PF_STATUS_SET          = 'STATUS'(002)
         i_callback_user_command           = 'USER_COMMAND'
       i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = 'SFEL SALES EXPEDITING REPORT'
         i_background_id         = 'ALV_BACKGROUND'
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         = LAYO
      IS_LAYOUT                         = ALV_LAYOUT
        it_fieldcat                       = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
        i_default                         = 'ZLAY1'
        I_SAVE                            = 'A'
        is_variant                        = i_variant
        IT_EVENTS                         = V_EVENTS
        TABLES
          t_outtab                          = itab[]
    EXCEPTIONS
      PROGRAM_ERROR                     = 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.
    ENDFORM.                    "display_alv_report
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader[].
         i_logo             = 'ENJOYSAP_LOGO'.
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE

  • How to Create a Selection Variable for restricting the querry output

    Hi Gurus,
    I have created a query in query designer on a Multiprovider and the output of the query is a Formula in a structure which calculates a % value, the client is looking for entering a range of number during the query selection screen and the output should be restricted to the given selection values.
    Can any one tell me how i should create a selection variable that would take the input from the user during the query selection screen and then restrict the output to that value which user specified.
    Is there a need to write any customer exit or is there any alternative way to make the query work as the requirement is.
    I hope this explains my problem but if any questions please let me know so that i can give u specific information.
    Thanks,
    Nisha.

    Hi Nisha,
    Firstly, in order to restrict the query output by a key figure value, you will need to create a condition on that key figure. This is done in the query deisgner. Now when you are creating the condition you can also use user entry variables (formula variables with user entry) to let the users enter the value that they want to see.
    See here for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/content.htm
    Hope this helps...

  • Selection variable for dynamic selection in QE51n

    Hi All,
    I have a scenario were we have a repetitive Manufacturing and we create one insp. lot of origin 13 and keep creating insp. points for days, so my user wants the insp. points to be displayed only for the past 3 days based of the Date Insp. point identifier which is one of dynamic selection criteria under insp. points, I see with other transaction I can do selection variable on dates for dynamic selection fields but I cannot do that in QE51n, I can do the same in QE51 but not in QE51n, can some tell me if there is a OSS or other way to get this working.
    I appreciate your help.
    Thanks,

    Hi Srikant,
    I think you can meet the requirement in QE51N also.
    In the screen for QE51N :Result Recording Work list", Follow this Path,,,,,,,,,
    Edit--->Dynamic Selection.
    The system will pop-up new small window for "Dynamic selection for insp. lot and operation" here I there is one folder is available named "Inspection point " which is having the selection criteria "Inspection point",  double click on it and enter the desired values.
    Regards,
    Shyamal

  • Select query for fetching from 3 tables.

    Can we have a single Select query for fetching same fields (kappl,kschl,vkorg,vtweg,spart,kunwe,datbi,knuma,datab,knumh)
    from 3 tables >> KOTE707,KOTE708 and KOTE709 into an internal table for a particular KUNNR?
    Regards,
    Shashank.

    Hi,
    If you have kunnr field in all the 3 tables then it is possible. use inner join as below
    PARAMETERS: p_cityfr TYPE spfli-cityfrom,
                p_cityto TYPE spfli-cityto.
    DATA: BEGIN OF wa,
             fldate TYPE sflight-fldate,
             carrname TYPE scarr-carrname,
             connid   TYPE spfli-connid,
           END OF wa.
    DATA itab LIKE SORTED TABLE OF wa
                   WITH UNIQUE KEY fldate carrname connid.
    SELECT c~carrname p~connid f~fldate
           INTO CORRESPONDING FIELDS OF TABLE itab
           FROM ( ( scarr AS c
             INNER JOIN spfli AS p ON p~carrid   = c~carrid
                                  AND p~cityfrom = p_cityfr
                                  AND p~cityto   = p_cityto )
             INNER JOIN sflight AS f ON f~carrid = p~carrid
                                    AND f~connid = p~connid ).
    LOOP AT itab INTO wa.
      WRITE: / wa-fldate, wa-carrname, wa-connid.
    ENDLOOP.
    <b>Reward Points if this helps,</b>
    Satish

  • EXIT FOR SELECTING AUTOMATIC PAYMENT PROGRAM VARIANT

    HI Experts,
    I want to fix the variant as per the payment method selected in automatic payment method parameter.
    ( Ex. i want to populate the variant CHECK  in print parameters if user enter C as the payment method )
    How it can be done? is there any exit available?
    it is urgent. Points will be rewarded.
    regards,
    MAHESH

    hi,
    check these badi's.
    FI_BSTM_MC_EXIT                         FI Account Statement: Exit from MultiCash Conversion
    FI_F110_SCHEDULE_JOB                    F110: Check before scheduling a proposal/update run

  • Date selection in a program variant

    Hi,
            I would to like to set a variant for a program under ECC6.
             The date selection has to be dynamic, and i would like to put in the selection from a fix date (e.g 1.1.2009) to (today's date + 5 days).
             It is possible?
    min

    Hi,
    Why don't you write a code for this in INITIALIZATION.
    Second possibal way which I think you want is :
    1. Give the fix date you want in From date field.
    2 Press save ( variant maintinance screen will open
    3 Go to your date filed and press F4 on selection variant forum, and choose D.
    4 Go to last column name of variable and select F4.
    6 Give the number of days from current date you want in field Currne date +/-??? days
    7 save variant.

Maybe you are looking for

  • Invalid File Handle Windows 7 with Novell Client 2 SP1

    Hello! I have a user on Windows who gets "invalid file handle" when saving files in WordPerfect and possibly Adobe as well. He thinks it mostly occurs when he has multiple files open and has saved one open file to a different directory. Then if he go

  • Video Quality: iTunes Purchase vs. DVD rip

    Is there a difference in video quality between, on the one hand, buying a movie on iTunes and, on the other hand, buying a DVD and ripping it to the iPhone?

  • Cannot install Apache Open Office for mac

    I downloaded Apache Open Office for Mac but cannot complete installation I believe I have completed all instructions from Open Office.org but the application does not appear in Applications nor in the Dock

  • Can I send all my contacts by blue tooth

    Can I send all my contacts by blue tooth

  • My Bridge Is Acting Wierd With Huge Thumbnails

    I just backed up my files on Webroots backup system.  Now, the bridge is acting strange.  The thumbnails are HUGE.  I can use the slider to make them a little smaller but if they get too small they disapear.  I reinstalled the Ps and Br part of the d