Select-options as a external subroutine

hi all,
plz solve my problem.
this is my first program.
tables vbak.
select-options x for vbak-vbeln.
types : beginf of ty,
a tupe vbak-vbeln,
b type vbak-ernam,
end of ty.
data : itab type table of ty,
         wa type ty.
perform sub(znava) using x.
this is my secomd program
report znava.
form sub using x.
select vbeln ernam from vbak into table itab where vbeln in x.
loop at itab into wa.
write :/ wa-a,wa-b.
endloop.
endform.
in the above two programs are separate,and i am using external subroutine but it will show some error how can i rectify.
anyone plz guide me.
thanks and regards,
navneeth.
Edited by: Navaneetha KRISHNAN on Feb 19, 2008 5:50 PM

First of all SELECT-OPTIONS are TABLE type. 
You just can't use USING  keyword, you've to use TABLES keyword.
second point is,, in your second program are you defining ITAB and WA??? otherwise second program is not going to identify ITAB & WA... so I suggest you try like this..
"program 1.
TABLES vbak.
SELECT-OPTIONS x FOR vbak-vbeln.
PERFORM sub(znava) TABLES x .
"program 2
  TYPES : BEGIN OF ty,
  a TYPE vbak-vbeln,
  b TYPE vbak-ernam,
  END OF ty.
  DATA : itab TYPE TABLE OF ty,
  wa TYPE ty.
FORM sub TABLES x.
  SELECT vbeln ernam FROM vbak INTO TABLE itab WHERE vbeln IN x.
  LOOP AT itab INTO wa.
    WRITE :/ wa-a,wa-b.
  ENDLOOP.
ENDFORM.                    "sub

Similar Messages

  • Passing Select option to the sub routine

    Hi All ,
    how can we pass  select option values to a subroutine ,
    Thanks in Advance
    Vinay

    Hi Vinay Kolla,
    Check out this.
    TYPES: TYP_DATUM TYPE RANGE OF SY-DATUM.
    DATA: WA_DATUM   TYPE LINE OF TYP_DATUM.
    SELECT-OPTIONS : S_DATUM FOR SY-DATUM.
    START-OF-SELECTION.
      PERFORM WRITE_DATUM TABLES S_DATUM[].
    *&      Form  write_datum
    *       text
    *      -->P_S_DATUM  text
    FORM WRITE_DATUM TABLES P_S_DATUM TYPE TYP_DATUM.
      LOOP AT P_S_DATUM INTO WA_DATUM.
        WRITE : /10 WA_DATUM-SIGN,
                    WA_DATUM-OPTION,
                    WA_DATUM-LOW,
                    WA_DATUM-HIGH.
      ENDLOOP.
    ENDFORM.            
    Regards,
    R.Nagarajan.
    We can -

  • Passing select options to a subroutine

    hi experts
    can somebody tell me how to pass a select options to
    a subroutine. tell  me how to pass using pass by reference and
    value.
    thanks.

    Hi AJAY,
    yes, as  Sumit Agarwal  already said, the select-options are internal tables. They are implicitly declared as range tables with header line.
    SELECT-OPTIONS:
      s_matnr for mara-matnr.
    decalares a table and will generate the input fields on the selection screen.
    data:
      s_matnr TYPE RANGE OF mara-matnr WITH HEADER LINE.
    declares the same table.
    You may pass this to a subroutine using the TABLES parameter. But as this is obsolete, it is better to find or declare an appropriate type for this.
    TYPES:
      ty_sel_mat TYPE RANGE OF mara-matnr .
    PERFORM select_material USING s_matnr[]. "[] means table body only
    FORM select_material USING pt_selmat type ty_sel_mat.
    SELECT ... INTO ... FROM mara WHERE matnr IN pt_selmat.
    ENFORM
    is the appropriate syntax.
    Note: SAP has dictonary types for many fields frequently used in select-option ranges. They are defined as table types and may be found by searching for names like range.
    Regards,
    Clemens

  • Passing SELECT-OPTIONS and Internal Tables to SUBROUTINES

    Hi Guys
    In the code below my colleague has created her own table types in order to pass a select option and internal tables to her subroutine. Is there an easier way of making them known to the subroutine.
    data : v_vbeln type vbeln_vf,
          it_bdoc type table of vbrp,
          it_t006 type table of t006a,
          wa_bdoc type vbrp,
          wa_t006 type t006a,
          it_bdoc2 type table of zsswathi_st_vbeln,
          wa_bdoc2 type zsswathi_st_vbeln
    select-options s_vbeln for v_vbeln matchcode object zswathi_vbeln obligatory.
    start-of-selection.
    perform bdoc using s_vbeln[]
                 changing it_bdoc
                          it_bdoc2
                          it_t006.
      loop at it_bdoc2 into wa_bdoc2.
    form bdoc using f_s_vbeln type ZSWATHI_ST_SELECT_OPTION_TA_TY       " all these are table types. for select options, a structure is created and then a table type for it is created.
            changing f_it_bdoc type zswathi_vbrp_ty_ta
                     f_it_bdoc2 type zswathi_vbeln_ty_ta
                      f_it_t006 type ZSWATHI_T006_TA_TY.
    select * from vbrp into table f_it_bdoc where vbeln in f_s_vbeln.
          if f_it_bdoc is not initial.
          select  vbeln sum( netwr ) prsdt from vbrp into table f_it_bdoc2 where vbeln in f_s_vbeln group by vbeln prsdt.
          sort f_it_bdoc2 by vbeln.
          "select * from t006a into table it_t006 for all entries in it_bdoc where msehi = it_bdoc-vrkme.
          select * from t006a into table f_it_t006 for all entries in f_it_bdoc where msehi = f_it_bdoc-vrkme.
       endif.
        endform.

    Hi Brett,
    1. you can use a select-options-range in a FORM subroutine also without passing it as a parameter because parameters and select-option range tables are global fields in their program.
    2. If you need a parameter, declare it as type table or type standard table or type any table. You do not need any special table type.
    Regards
    Clemens

  • Passing select options through subroutines

    Hi
    how do you pass select option values through subroutines?

    Hello,
    Is this what you are looking for:
    TYPES: ty_r_bukrs TYPE RANGE OF bukrs.
    DATA:
          v_date TYPE datum,
          v_bukrs TYPE bukrs.
    SELECT-OPTIONS:
    s_bukrs FOR v_bukrs OBLIGATORY,
    s_date FOR v_date.
    AT SELECTION-SCREEN.
      PERFORM f_check_cocd
      USING s_bukrs[].
    *&      Form  f_check_cocd
    *       Check Comp. Code
    FORM f_check_cocd
      USING fp_s_bukrs TYPE ty_r_bukrs.
      DATA: l_v_bukrs TYPE bukrs.
      SELECT bukrs UP TO 1 ROWS
      FROM t001
      INTO l_v_bukrs
      WHERE bukrs IN s_bukrs.
      ENDSELECT.
      IF sy-subrc <> 0.
    *   Throw Error Message
      ENDIF.
    ENDFORM.                    " f_check_cocd
    BR,
    Suhas

  • SAPscript external subroutine - select not pulling data

    Hi all,
    I am calling an external subroutine in my SAPscript. In this subroutine, I am using a simple select statement:
    * get sales order number
      SELECT vbelv posnv
        FROM vbfa
        INTO CORRESPONDING FIELDS OF TABLE it_so
         WHERE vbeln = gv_deldoc
           AND posnn = gv_posnr.
    The problem is no data is being pulled into it_so. I have confirmed in VBFA (through SE16N) that data exists in the system so this isn't the problem. Are there restrictions with using selects in SAPscript?
    Thanks,
    Edited by: pistols123 on Sep 8, 2011 9:11 PM

    Hi,
    Please refer below code.
    In SAP Script ,SE71: call the subroutine pool program with the below sysntax.
    /: PERFORM GET_DATA IN PROGRAM ZXXXX
    /: USING &XXXX-MATNR&
    /: CHANGING &V_YYYY&
    /: CHANGING &V_YYY2&
    /: ENDPERFORM
    Using Parameter will be the input in the subroutine pool to fetch the data.
    Changing Paramter will be the your output to pass the data into SAP Form.
    now goto SE38,and create a subroutine pool program with the name ZXXXX,follow the below code.
    FORM get_data TABLES tbl_in  STRUCTURE itcsy
                           tbl_out STRUCTURE itcsy.
    READ TABLE tbl_in INDEX 1.
      IF sy-subrc EQ 0.
        XXXX-Matnr = tbl_in-value.
    "Pass it through the conversion exit CONVERSION_EXIT_ALPHA_INPUT before SELECT."
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input         = gv_deldoc
    IMPORTING
       OUTPUT        = gv_deldoc
    SELECT vbelv posnv
        FROM vbfa
        INTO (l_vbelv,l_posnv)
         WHERE vbeln = gv_deldoc
           AND posnn = gv_posnr.
    READ TABLE tbl_out INDEX 1.
      IF sy-subrc = 0.
        MOVE l_vbelv TO tbl_out-value.
        MODIFY tbl_out INDEX 1.
      ENDIF.
      READ TABLE tbl_out INDEX 2.
      IF sy-subrc = 0.
        MOVE l_posnv TO tbl_out-value.
        MODIFY tbl_out INDEX 2.
      ENDIF.
    Moderator message - Welcome to SCN. But please do not ask for "rewards"
    Regards,
    VSNM
    Endform.
    Edited by: Rob Burbank on Sep 8, 2011 4:18 PM

  • No exact match was found. Click the item(s) that did not resolve for more options. You can also use Select button to choose External Data.

    HI,
    I have SharePoint Online 2013 environment, i have created a external content type from wcf service. I want to use this as External Data column in document library. When i look for values in content type it populates and when i click any values and adds and
    then click saves it shows the below error
    No exact match was found. Click the item(s) that
    did not resolve for more options. You can also use Select button to choose External Data
    __fkc000950056003700kc000950056003700kc000e400f2001400kc000950056003700k830035004700160027004700d20057000700020064009600870056004600:
    No Matching Items
    Please help on this.
    varinder

    I don't understand the question exactly, could you restate it.  Sorry mate, I might just be braindead.
    But, as far as the issue, it is by design.  the column is a lookup columns which essentially ties to the external data.  if that data is removed, the column on your simple list becomes invalid and any edits of the simple list item will require
    it to be changed.
    are you wanting to make the ECT read only?  that's simple enough.  you can pop open SPD and edit the ECT, then remove the C/E/D operations (create/update/delete).  That will not, however make it read-only in any other systems that access that
    external data, as I assume its not just SP or else it wouldn't be external
    Christopher Webb | MCM: SharePoint 2010 | MCSM: SharePoint Charter | MCT | http://christophermichaelwebb.com

  • DYNP_VALUES_READ Limitations for multiple lines select options

    Hi all !
       First post here, but a tough one I think. Here is my inquiry :
       I have worked on an specific abap function used in many long abap list reports. Theses reports are launched in background processing. The aim of this routine is to stop the report execution if a background job with the same selection parameters is already launched for the current user (to Prevent useless several launch of a time-expensive program).
        Because this routine is dynamic, I read the selection screen of the current report with the function 'DYNP_VALUES_READ'. And I compare the result with the variant of the backgroung job (read with function 'RS_VARIANT_CONTENTS').
        The real problem is that function "DYNP_VALUES_READ" only extract the first line of select-options. I found an alternative solution to extract the select options values (a dynamic assign with field symbols), but external conversions (for WBS elements for example ) are lost, so the comparison detects differences between the background job's variant values and the current selection screen values.
        Does anybody know a way to get entire select options values from a selection screen just as they are displayed on screen ?
    Thanks for reading my message
    Message was edited by: Thomas BRICOUT

    Thomas,
    Perhaps the following code will help you.  A function module in the code captures everything on the selection screen into an internal table.  It doesn't actually capture the information the way you want it, but I believe you will be able to work with it to achieve your desired result.  If it doesn't meet your needs, it is still useful for printing selection screen fields and their values.
    Bruce
    report zybttes2.
    tables: zf137,   " 137 General Ledger Document Details Table
            zf137a.  " 137 General Ledger Document Details Table, Archive
    selection-screen begin of block b1 with frame title text-004." BCT003
    parameters: p_zf137   radiobutton group xxx,                " BCT003
                p_zf137a  radiobutton group xxx.                " BCT003
    selection-screen end of block b1.                           " BCT003
    selection-screen begin of block parameter with frame title text-001.
    selection-screen skip 1.
    select-options: s_date for zf137-zzpostdat.
    selection-screen skip 1.
    selection-screen begin of line.
    selection-screen comment 3(6) text-002.
    selection-screen end of line.
    selection-screen skip 1.
    select-options: s_loan for zf137-zzloan.
    selection-screen skip 1.
    selection-screen begin of line.
    selection-screen comment 3(6) text-003.
    selection-screen end of line.
    selection-screen skip 1.
    select-options: s_ccentr for zf137-zzcostctr.
    selection-screen skip 1.
    selection-screen end of block parameter.
    data: ww(3) type n.
    data: zz(3) type c.
    data: c1(1) type c value '0'.
    do 2 times.
      ww = ww + 1.
      zz = ww.  shift zz left  deleting leading  c1.
      write: / zz.
    enddo.
      Capture and then print the selection screen fields and their values
    data: begin of i_info occurs 20,
            flag,
            olength type x,
            line  like raldb-infoline,
          end of i_info.
    call function 'PRINT_SELECTIONS'
      exporting
        mode      = 'TABLE'
        rname     = sy-cprog
        rvariante = sy-slset
      tables
        infotab   = i_info.
    loop at   i_info.
      write: / i_info-line.
    endloop.
    write:  / 'end'.

  • How to retrieve data using logical database and custom select options

    Hi all,
    I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
    Thanks in advance.

    Hai Gupta
    Check the following Document & Links
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB
    good info about Logical Database. you can check the link.
    http://www.geekinterview.com/question_details/1506
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Re: How to Create and Use ldb in reports?
    Re: Logical databases
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    Functions for displaying and changing logical databases:
    Call Transaction SE36 or
    Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
    Interaction between database program and report:
    During program processing, subroutines are performed in the database program and events are executed in the report.
    To read data from a database tables we use logical database.
    A logical database provides read-only access to a group of related tables to an ABAP/4 program.
    advantages:-
    The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
    i)An easy-to-use standard user interface.
    ii)check functions which check that user input is complete,correct,and plausible.
    iii)meaningful data selection.
    iv)central authorization checks for database accesses.
    v)good read access performance while retaining the hierarchical data view determined by the application logic.
    disadvantages:-
    i)If you donot specify a logical database in the program attributes,the GET events never occur.
    ii)There is no ENDGET command,so the code block associated with an event ends with the next event
    statement (such as another GET or an END-OF-SELECTION).
    1. transaction code SLDB.
    2.enter name z<ldb-name>
    3.create
    4.short text
    5.create
    6. name of root node (here Ekko)
    7. enter short text (f6)
    8.node type -> data base table.
    9.create
    10 change logical DB
    riht click on ekko and insert node
    here node name ekpo
    11.create
    12. click on selections
    13. press no Should the changed structure of Z<ldb name> be saved first.
    14.select tables which you want to join.
    15.transfer
    16 now you have to o to coding part.
    17. save
    activate.
    19.click to src code
    double click on first include and activate
    Regards
    Sreeni

  • Select-option in module pool  with table Control

    HI,
    How to use the select-option in Module Pool and how Can i use the Table control in it.
    Can any body give me some Clues.
    with rgds
    Ranjith

    Hi ..
    PBO.
    LOOP at <table contriol>
    module --- Inside the module
    DATA: g_uti TYPE REF TO cl_fobu_input_util.
      if rollname <> space.
         CREATE OBJECT g_uti
           EXPORTING typename =rollname.
    *....convert to external pattern
         CALL METHOD g_util->output_convert
           EXPORTING
             field_value_int = p_value                 " This is Tablecontrol-low
           IMPORTING
             field_value_ext = p_value.              " Retrun value for Low
    ENDLOOP.
    lly you have code in PAI
    DATA: g_util_1 TYPE REF TO cl_fobu_input_util.
      if rollname <> space.
         CREATE OBJECT g_util_1
           EXPORTING typename = rollname.
    *....convert to internal pattern
         CALL METHOD g_util_1->input_convert
           EXPORTING
             field_value_ext   = p_value
           IMPORTING
             field_value_int_c = p_value.
    The above code should be written for tablecontrol-high aswell..
    you can also refer: Inlcude LSE16NF10 line no 341 & 434 (SE16n)
    Nag

  • Select-option in AR02 txcode

    Hi,
    I want to keep select-option in AR02 txcode in the selection screen SETTINGS, i want
    to replace REPORT DATE from parameter to select-options.
    I have copied the standard programs RAGITT_ALV01 and LDB ADA into
    Zprogram can anyone guide me to this requirment.
    Regards
    VEnk@

    Hi ilesh,
    Thanks for the answer. Actually someone have prepared this report but report is running
    correctly when we are not checking the depreciation checkbox for the date rang (select-options).
    It is not running correctly i mean it is fecthing wrong data according to the date
    range when deprication checkbox is checked. Hope you got it now.
    Please check my subroutine get data.
    FORM GET_DATA .
    Populate Report Start Date
      CLEAR FS_VARI_CONTENTS.
      FS_VARI_CONTENTS-SELNAME    = 'BERDATUM'.
      FS_VARI_CONTENTS-KIND       = C_P.
      FS_VARI_CONTENTS-SIGN       = C_I.
      FS_VARI_CONTENTS-OPTION     = C_EQ.
      FS_VARI_CONTENTS-LOW        = BERDAT1.
      FS_VARI_CONTENTS-HIGH       = SPACE.
      APPEND FS_VARI_CONTENTS TO T_VARI_CONTENTS.
    Populate Variant table
      PERFORM POPULATE_VARIANT_TABLE.
      W_FLAG = '1'.
    Submit report ZRAGITT_ALV01 using variant PPE_VARIANT
      PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA1[]
                                          USING  W_FLAG.
    IF ( BERDAT2 IS NOT INITIAL ) AND
      IF BERDAT1 NE BERDAT2.
        DELETE T_VARI_CONTENTS INDEX 1.
      Populate Report End Date
        CLEAR FS_VARI_CONTENTS.
        FS_VARI_CONTENTS-SELNAME    = 'BERDATUM'.
        FS_VARI_CONTENTS-KIND       = C_P.
        FS_VARI_CONTENTS-SIGN       = C_I.
        FS_VARI_CONTENTS-OPTION     = C_EQ.
        FS_VARI_CONTENTS-LOW        = BERDAT2.
        FS_VARI_CONTENTS-HIGH       = SPACE.
        INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.
        W_FLAG = '2'.
      Submit report ZRAGITT_ALV01 using variant PPE_VARIANT
        PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA2[]
                                             USING W_FLAG.
      ENDIF.                               " IF BERDAT1 NE BERDAT2
      IF W_ENDDATE IS NOT INITIAL.
        IF W_ENDDATE NE BERDAT1.
          DELETE T_VARI_CONTENTS INDEX 1.
        Populate Report End Date
          CLEAR FS_VARI_CONTENTS.
          FS_VARI_CONTENTS-SELNAME    = 'BERDATUM'.
          FS_VARI_CONTENTS-KIND       = C_P.
          FS_VARI_CONTENTS-SIGN       = C_I.
          FS_VARI_CONTENTS-OPTION     = C_EQ.
          FS_VARI_CONTENTS-LOW        = W_ENDDATE.
          FS_VARI_CONTENTS-HIGH       = SPACE.
          INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.
          W_FLAG = '3'.
    This is where i was strucked in.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Sep 21, 2009 12:59 PM

  • Dynamic Selection option in the selection screen

    Hi ,
    I have a requirement like this ....
    The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
    The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
    In the transaction FBL3N , this facility is provided.
    Kindly help me with this..
    thanks,
    Sumit .

    Hi Sumit,
    To include dynamic selection check this sample code.
    TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
    TYPE-POOLS : vrm,
                 icon.
    *SELECTION SCREEN FIELDS
    TABLES : sscrfields.*GLOBAL DECLARATIONS
    DATA : flag TYPE c,
          tablename(10),
          mmtable LIKE dd02l-tabname,
          sdtable LIKE dd02l-tabname,
          hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
    DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
    PARAMETERS :  pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
                  pb RADIOBUTTON GROUP rad MODIF ID rad,
                  pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
    SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
    PARAMETERS one AS LISTBOX VISIBLE LENGTH 20  MODIF ID mod.
    PARAMETERS two AS LISTBOX VISIBLE LENGTH 20   MODIF ID rad.
    PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
    SELECTION-SCREEN: FUNCTION KEY 1,
                      FUNCTION KEY 2,
                      FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
    AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
      IF pa = 'X'.
        sscrfields-functxt_01 = 'Materials Management'.
        WRITE icon_plant AS ICON TO text_001.
    *CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
        LOOP AT SCREEN.
          IF screen-group1 = 'MOD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CLICK OF SECOND RADIO
      IF pb = 'X'.
        sscrfields-functxt_02 = 'Sales And Distribution'.
        WRITE icon_ws_ship AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CLICK OF THIRD RADIO
      IF pc = 'X'.
        sscrfields-functxt_03 = 'Human Resources'.
        WRITE icon_new_employee AS ICON TO text_001.
        LOOP AT SCREEN.
          IF screen-group1 = 'RAD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'MOD'.
            screen-intensified = '0'.
            screen-active = 0.
            screen-display_3d = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'CAD'.
            screen-intensified = '1'.
            screen-active = 1.
            screen-display_3d = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
    *WITH F8 BUTTON DISABLED  APPEND :  'PRIN' TO it_ucomm,
                'SPOS' TO it_ucomm,
                'ONLI' TO it_ucomm.  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = sy-pfkey
        TABLES
          p_exclude = it_ucomm.
    **EVENT ON THE SELECTION
    AT SELECTION-SCREEN.* LIST BOX ONE VALUES
      CASE one.
        WHEN '1'.
          mmtable = 'MARC'.
        WHEN '2'.
          mmtable = 'MARA'.
        WHEN '3'.
          mmtable = 'MARD'.
        WHEN '4'.
          mmtable = 'MARM'.
      ENDCASE.* LIST BOX TWO VALUES
      CASE two.
        WHEN '1'.
          sdtable = 'VBAK'.
        WHEN '2'.
          sdtable = 'VBAP'.
        WHEN '3'.
          sdtable = 'VBUK'.
        WHEN '4'.
          sdtable = 'VBUP'.
      ENDCASE.* LIST BOX THREE VALUES
      CASE three.
        WHEN '1'.
          hrtable = 'PA0001'.
        WHEN '2'.
          hrtable = 'PA0006'.
        WHEN '3'.
          hrtable = 'PA0022'.
        WHEN '4'.
          hrtable = 'PA0008'.
      ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
    *AND ENABLING THE BUTTONS TO PERFORM F8
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
          tablename = mmtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC02'.
          tablename = sdtable.
          sscrfields-ucomm = 'ONLI'.
        WHEN 'FC03'.
          tablename = hrtable.
          sscrfields-ucomm = 'ONLI'.
      ENDCASE.*INITIALIZATION EVENT
    INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
      PERFORM f4_value_request_pa.
      PERFORM f4_value_request_pb.
      PERFORM f4_value_request_pc.*START OF SELECTION EVENT
    START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
      PERFORM output.*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PA
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
    FORM f4_value_request_pa.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Plant Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'General Material Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Storage Location Data for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Units of Measure for Material'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'ONE'.  CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PB
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'Sales Document: Header Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Sales Document: Item Data'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Sales Document:Header Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Sales Document: Item Status'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'TWO'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
    *&      Form  f4_value_request_PC
    *       text
    *SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc.  DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.  l_value-key = '1'.
      l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '2'.
      l_value-text = 'Address Infotype 0006'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '3'.
      l_value-text = 'Education Infotype 0022'.
      APPEND l_value TO li_list.
      CLEAR l_value.  l_value-key = '4'.
      l_value-text = 'Basic Pay Infotype 0008'.
      APPEND l_value TO li_list.
      CLEAR l_value.
      l_name = 'THREE'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = l_name
          values          = li_list
        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.
    ENDFORM. " f4_value_request_PC
    *&      Form  OUTPUT
    *       text
    *      -->P_TABLENAME  text
    *fINAL OUTPUT
    FORM output.  DATA p_table(10).  p_table = tablename.*popup to display teh selected table and
    *Continue button is clicked
      CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
        EXPORTING
          titel        = 'User Selections '
          textline1    = p_table
          textline2    = 'is the Selected table'
          start_column = 25
          start_row    = 6.*assigning the table value in p_table to the
    * Table in SE16 transaction by explicitly calling
      SET PARAMETER ID 'DTB' FIELD p_table.
      CALL TRANSACTION 'SE16'.
    ENDFORM.                    "OUTPUT
    Regards,
    Manoj Kumar P

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • 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

  • Will the New MaPro running Maveriks do a select boot from an external HD of older OSX versions?

    Hi...
    I was wondering if the new MacPro will do an Option selective boot of an external HD bootable backup made using SuperDuper?  The drive would be a FW800 external connected via adaptor as the nMP has nonly TB and USB 3 ports.

    As shipped, the new MacPro late 2103 will boot ONLY from the software it shipped with, or a re-load of the software it shipped with. Nothing older.
    You may be able to install and fiddle with Virtualization software to get an older version to run under a Hypervisor, but it will be some work.

Maybe you are looking for

  • Restoring my imac from an external harddrive

    hi, i have made a backup using time machine on my imac 5 days ago onto an external hard drive. and i have started deleting stuff off my computer and noticed that the time machine had started making back ups automatically everyday. but now i would lik

  • ICloud made a mess of my Outlook.  How do I put it back?

    I went through over 3000 contacts in Outlook and carefully deleted duplicates and old contacts and made corrections.  Then I checked the box in the iCloud Control Panel for "Contacts with Outlook."  After it uploaded all my contacts, I opened the new

  • Activation of Export LC's

    Friends, So far we are not using Export LC's in our company... LC Application, LC opening are totally handled out of SAP. Special GL Indicator u201CLu201D has been created as Advance LC, 100% LC either in advance along with PO. Till GR and IR happen

  • Setting up my own SAND BOX for HANDS ON / practicing BW

    Dear friends,     I am learning SAP BW, and I need to practice some test cases to make myself comfortable. I want to install SAP R/3 on a seperate external hard disk and configure to my system. <b>Can anybody from <b>"BANGALORE"</b> tell me <b>who /

  • Three tables problem

    Hi My information is spread over three (database) tables: - one master table M with organisation codes - one detail table D containing the facts - one lookup table L, which translates the codes of M in something comprehensible. L also containes sever