Interactive list - field selection

Hi,
I am writen code for interactive list. But I am facing a problem is wherever i click on the row, it is showing the next list. But i dont want it..
  when i click on the sales order no. it has to show sales order details in the secondary list.. and when i click on the materail no. it has to show material details in the secondary list..
how can i get it..
plz suggest me..
Thanks & Regards,
Dhanunjay.

Hi,
Herewith i am sending the sample report for interactive list report.
REPORT  YMS_ALVINTER.
*& tables declaration
TABLES: VBRK,VBRP.
*& type-pools declaration
TYPE-POOLS: SLIS.
*& data declaration
DATA: G_REPID TYPE SY-REPID.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, "mara
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
WA_EVENT TYPE SLIS_ALV_EVENT,
T_EVENT TYPE SLIS_T_EVENT.
DATA: V_VBELN LIKE VBRK-VBELN,
V_MATNR LIKE VBRP-MATNR.
DATA: BEGIN OF IT_VBRK OCCURS 0,
VBELN LIKE VBRK-VBELN,
WAERK LIKE VBRK-WAERK,
VKORG LIKE VBRK-VKORG,
FKDAT LIKE VBRK-FKDAT,
BUKRS LIKE VBRK-BUKRS,
NETWR LIKE VBRK-NETWR,
END OF IT_VBRK.
DATA: BEGIN OF IT_VBRP OCCURS 0,
VBELN LIKE VBRP-VBELN,
POSNR LIKE VBRP-POSNR,
FKIMG LIKE VBRP-FKIMG,
VRKME LIKE VBRP-VRKME,
NETWR LIKE VBRP-NETWR,
MATNR LIKE VBRP-MATNR,
ARKTX LIKE VBRP-ARKTX,
END OF IT_VBRP.
*& selection screen
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN,
S_FKDAT FOR VBRK-FKDAT,
S_MATNR FOR VBRP-MATNR.
SELECTION-SCREEN END OF BLOCK B.
**INITIALIZATION.
INITIALIZATION.
  G_REPID = SY-REPID.
  S_FKDAT-LOW = SY-DATUM - 200.
  S_FKDAT-HIGH = SY-DATUM.
  APPEND S_FKDAT.
***AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
  IF NOT S_VBELN IS INITIAL.
    SELECT SINGLE VBELN FROM VBRK
    INTO V_VBELN
    WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
      MESSAGE E001(ZZ2).
    ENDIF.
  ENDIF.
  IF NOT S_MATNR IS INITIAL.
    SELECT SINGLE MATNR FROM MARA
    INTO V_MATNR
    WHERE MATNR IN S_MATNR.
    IF SY-SUBRC <> 0.
      MESSAGE E001(ZZ2).
    ENDIF.
  ENDIF.
***START-OF-SELECTION.
START-OF-SELECTION.
  PERFORM GET_DATA_VBRK.
*& Form GET_DATA_VBRK
text
--> p1 text
<-- p2 text
FORM GET_DATA_VBRK .
  SELECT VBELN
  WAERK
  VKORG
  FKDAT
  BUKRS
  NETWR
  INTO TABLE IT_VBRK
  FROM VBRK
  WHERE VBELN IN S_VBELN
  AND FKDAT IN S_FKDAT.
ENDFORM. " GET_DATA_VBRK
*& Form GET_DATA_VBRP
text
--> p1 text
<-- p2 text
FORM GET_DATA_VBRP .
  SELECT VBELN
  POSNR
  FKIMG
  VRKME
  NETWR
  MATNR
  ARKTX
  FROM VBRP
  INTO TABLE IT_VBRP
  WHERE VBELN = IT_VBRK-VBELN.
ENDFORM. " GET_DATA_VBRP
***END-OF-SELECTION.
END-OF-SELECTION.
  PERFORM EVENT_LIST.
  PERFORM GET_FIELD_CATALOG.
  PERFORM LIST_DISP .
*&      Form  list_disp
      text
FORM LIST_DISP .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
  I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = 'POPUP'
  I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = WA_LAYOUT
  IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
  TABLES
  T_OUTTAB = IT_VBRK
  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. " LIST_DISP
*& Form GET_FIELD_CATALOG
text
--> p1 text
<-- p2 text
FORM GET_FIELD_CATALOG .
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
  I_PROGRAM_NAME = G_REPID
  I_INTERNAL_TABNAME = 'IT_VBRK'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
  I_INCLNAME = G_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
  CHANGING
  CT_FIELDCAT = IT_FIELDCAT
  EXCEPTIONS
  INCONSISTENT_INTERFACE = 1
  PROGRAM_ERROR = 2
  OTHERS = 3
  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. " GET_FIELD_CATALOG
*& Form event_list
text
--> p1 text
<-- p2 text
FORM EVENT_LIST .
  CLEAR WA_EVENT.
  WA_EVENT-NAME = 'USER_COMMAND'.
  WA_EVENT-FORM = 'USER_COMMAND'.
  APPEND WA_EVENT TO T_EVENT.
  CLEAR WA_EVENT.
ENDFORM. " event_list
*&      Form  user_command
      text
     -->R_UCOMM    text
     -->RS_SELFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
  CASE R_UCOMM.
    WHEN '&IC1'.
      READ TABLE IT_VBRK INDEX RS_SELFIELD-TABINDEX.
      PERFORM GET_DATA_VBRP.
      PERFORM BUILD_FIELDCATALOG_VBRP .
      PERFORM DISPLAY_ALV_VBRP.
  ENDCASE.
ENDFORM.                    "user_command
*& Form BUILD_FIELDCATALOG_VBRP
text
--> p1 text
<-- p2 text
FORM BUILD_FIELDCATALOG_VBRP .
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
  I_PROGRAM_NAME = G_REPID
  I_INTERNAL_TABNAME = 'IT_VBRP'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
  I_INCLNAME = G_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
  CHANGING
  CT_FIELDCAT = IT_FIELDCAT
  EXCEPTIONS
  INCONSISTENT_INTERFACE = 1
  PROGRAM_ERROR = 2
  OTHERS = 3
  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. " BUILD_FIELDCATALOG_VBRP
*& Form DISPLAY_ALV_VBRP
text
--> p1 text
<-- p2 text
FORM DISPLAY_ALV_VBRP .
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
  I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
  IT_FIELDCAT = IT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
  TABLES
  T_OUTTAB = IT_VBRP
  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_VBRP
Thanks,
Sankar M

Similar Messages

  • Signing: Empty list in "Field Selection" when picking fields to mark as read-only on signing

    I have a PDF form with some signature fields. I am attempting to mark some of the fields in the document as read-only when the document is signed. This is what I did:
    1. Modify the "Signed" properties of the signature field.
    2. Choose "Mark as read-only" and "Just these fields" in the drop down list beside this option.
    3. Click on the "Pick" button to select the fields to be marked read-only when the user signs this field.
    In the "Field Selection" dialog that comes up, nothing is shown in the list.
    Am I doing something wrong? Is there something I need to do to add fields to this list, or should it be populated automatically allowing me to choose what I want?
    I noticed this feature is only available for Acrobat 6.0 and later. The compatibility level for the document I created is 1.6 (Acrobat 7 and later). It is created in Acrobat X.
    Just figuring my way around these things. Did a google search for any solutions, but couldn't find anything on this.
    Any help would be greatly appreciated.
    Thanks,
    Ron

    Hi Ron,
    It certainly sounds like you are on the right track.What version of Acrobat are you using, is it Pro or Standard, Mac or Win? I see where you mentioned the file was created in Acrobat X, but I'm not sure that the app that create the PDF file is the same version as the one you are using for editing.
    Steve

  • Auto-populating Infopath fields from a Sharepoint list after selecting a drop down

    I currently have two lists one titled 'Book of Work' which holds details around on-going projects and the other titled 'Book of Work Amendments' which are requests submitted by users to change project details (through an infopath form).
    There is a column in the BoW Amendments list entitled 'Select Project' which has a lookup to 'Project Name' in the BoW list. The aim is that when a user chooses an option from the 'Select Project' drop-down, other fields in the form such as 'Project Manager',
    'Project Description' will be automatically populated with data from that row in the BoW table.
    I have connected both Sharepoint Lists as data connections with BoW Amendments being the primary and BoW the secondary. If we take the Project Manager field as an example the method I have attempted is as follows:
    . Create a rule with condition Select Project is not blank
    . Action - Set a field's value: Field: Project Manager (BoW Amendments - Primary) Value:
    Project Manager (BoW - Secondary) Add Filter: Project_Name (BoW - Secondary) =
    Select Project (BoW - Primary)
    Currently this is not populating the field when the project is selected in the drop down, any assistance would be greatly appreciated.

    Hi Josh,
    This should be straight forward. You do not need BOW Amend data connection. You are creating requests in this list so this will be your Main Data Connection.
    When creating the rule on the drop down, select Action:
    Condition: anytime the value changes, Set a field's value - Project Manager (Main); Value - Project Manager(BOW) where Project[BOW] = Project [Main]
    Hope it helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Select List field in Form not pulling correct record

    I have a report that displays a Product Name and a Host Name. Each product can reside on multiple hosts and each host has multiple products, hence an associative table with product_host_asgmt_id, product_id and host_id is defined.
    The report I created selects data from the associative table and presents the user the product names and host names without a problem. the same report has an edit link that when selected will open a form that should display the selected host name and product name. In the form both of these fields are defined as Select List. The issue is that the list shows all the LOV but does not focus on the one that was selected in the report to edit.
    I unhid the product_host_asgmt_id, product_id and host_id in the form and the values contained are correct, so I think the Automated Row Fetch is working. This same form needs to be used for editing and for creating new values hence the Select List.
    I I have the Source section of the Host_name select list field set to : Only when current session state is null and the Source Type is an SQL query selecting all host_name form the host table.
    Any ideas how to get the values selected in the report to appear in the form?
    Thanks and apologize if this is trivial. I'm a rookie Apex user (but I like it).

    When you link to the form page, I assume you are passing the host_id value into a page item. Say you pass this value into item P2_HOST_ID, just make the select list item's Source Type Item (application or page item name) and enter P2_HOST_ID in the Source field.
    This assumes that the lov query is of the form "select host_name d, host_id r from ...".
    Be careful with Source Used "Only, ..." so that you never allow the page to display with a stale and unwanted value in P2_HOST_ID or that will produce an incorrect display value in the select list.
    Scott
    P.S. Please tell us your first name and put it into your handle and/or profile to help us.

  • Use of Field selection for Multilevel list Display Equipment/Function loc

    Dear Expert,
                          Anybody suggest me that how can we use the feature of Equipment & function location settings as given SPRO path.
    Plant Maintenance and Customer Service ® Master Data in Plant Maintenance and Customer Service ® Technical Objects ® Equipment ® Define Field Selection for Multi-Level List Displays of Equipment.
    Plant Maintenance and Customer Service ® Master Data in Plant Maintenance and Customer Service ® Technical Objects ® Functional Locations ® Field Selection for Multi-Level List Displays of Functional Locations.
    Your help & suggestions are much appreciated.
    Regards,
    Akhilesh

    Dear AKhliesh,
    This customizing setting is for the T-code IE07. You can customize view of IE07 in different strcuture with required fields wants to didplay or suppress.
    Regards,
    Kaushal Rai

  • Append list values under Field selection per Mvt type (MIGO)

    Hi Experts,
    Can we append list of values for u2018Field Nameu2019 in case of Setting for goods movement (MIGO), under Field selection per Mvt type. We want to append values for 101 Mvt type.
    Current values are
    CUSTNAME Customer
    EXVKW Sales Value
    GRUND Reason for Movement
    LIFNR Vendor
    SGTXT Text
    WEANZ Number of GR Slips
    WEMPF Goods recipient
    Regards,
    Praful Mankar

    Hi pafulmankar
    If you find the solution, please share with me. I do have the same requirement
    Thanks

  • Profile for field selection on object detail list

    Hi All ,
            What is the customizing path or tcode to define  Field selection profile and also object profile
    to choose in COIO transaction , please advice the assignment process also .
    Thanks
    Anil

    Hi All , thanks for your quick response
    I can create only overall profiles in COISN tcode .Please advice me where can we create Object profile and field profile and assignment of the same to overall profile .
    My purpose of defining above profiles is I wish to incorporate a field name resource in the seperate column with including the list of fields which is showing currently in COIO order header (here we can not find resource untill drill down) .For acheiving the same I think I can define new field profile and assigning that one to object profile , and thus I can able to select the desired object profile after executing the COIO order header --> settings --> select profile . Please suggest me if I am wrong and also the other transaction codes
    Thanks
    Anil

  • IE07 and error 'Maintain field selection for Fleet data in Equipment List'

    Hi all,
    When running transaction IE07 (multi-level equipment list) , I get the following error:  'Maintain field selection for Fleet data in Equipment List (Multilevel)'
    I can't see where is the missing configuration point.
    We have activated business function LOG_EAM_CI_3.
    Have anyone encountered this error before?
    Thanks,
    P.

    Hi Narasimhan
    Could you give more details ? where is located this setting?
    Thanks,
    P.

  • Fixed length select list fields

    Is it possible to fix the width of a Select List field? I don't want it to auto-resize to the max width of the values in that column, but see no way to do that on the page editor. Thanks.

    Hi Mike:
    To fix the width of a select list item, set
    style="width:120px;"
    in the HTML Form Element Attributes of the element
    Regards, Marcelo

  • Populating a text field in a form based on selection from a list field?

    Hello,
    I'm using Acrobat 9 on a mac.
    In the list field users choose their hospital name. I then want the address associated with this hospital to populate a text field. Where do I enter the hospital addresses and the "script" (if hospital X then this address)? I've copied this list field and am using it in multiple places on the form by utilizing "global binding" and this is working well.
    Also, can the choices in a list field "drop down" or is the only option available a "click through?"
    Thanks in advance for your help!!

    hi, i've seen this problem before but can't remember what the solution was...
    but just by searching on this forum resulted in this link
    Re: Copy and Paste
    hope it helps

  • What is difference between interactive list and interactive reports?

    what is difference between interactive list and interactive reports?

    hi check this..
    interactive report/list means any input(double click or single click or user command ) on the screen will results a new screen with the corresponding fields....this is upto 20 levels only check this..
    report .
    start-of-selection.
    write:/ 'this is the source list'.
    at line-selection .
    if sy-lsind = 1 .
    write:/ ' this is the 1st list'.
    elseif.
    if sy-lsind = 2 .
    write:/ ' this is the 2 list'.
    if sy-lsind = 3 .
    write:/ ' this is the 3 list'.
    if sy-lsind = 4 .
    write:/ ' this is the 4 list'.
    if sy-lsind = 5 .
    write:/ ' this is the 5 list'.
    if sy-lsind = 6 .
    write:/ ' this is the 6 list'.
    if sy-lsind = 7 .
    write:/ ' this is the 7 list'.
    if sy-lsind = 8.
    write:/ ' this is the 8 list'.
    if sy-lsind = 9 .
    write:/ ' this is the 9 list'.
    if sy-lsind = 10 .
    write:/ ' this is the 10 list'.
    endif.
    regards,
    venkat

  • Displaying a document in interactive list-high priority

    Hi Experts,
    There is already an interactive report which displays the output in classick format.Now, the requirement is ,
    when they place the cursor position on a sales document and press a push button, it has to display the document in display mode ie in VA03.
    Now my problem is that I am not able to find a function code which captures the sales docu number so that i can use that particular selected doc num. You know that i cannot use Function code 'PICK' since it an interactive list . Now i need another function code(like PICK which captures the dou num) so that i can use this for displaying the document.
    Quick replys are appreciated.
    Thanks in advance.
    Regards,
    Praveen.

    not sure what's ur req...but the kind of displaying the order numbers in basic or sec list and then navigating to change/display tcode of the order is easy using HIDE in AT LINE-SELECTION with combination of
    SET PARAMETER ID pid FIELD f. and then
    CALL TRANSACTION xyz AND SKIP FIRST SCREEN .
    RB.

  • Interactive list in ALV

    Hi All,
    Is there any sample program for an interactive list in ALV? I would like to try an interactive ALV list option for one of my reports
    Thanks

    One more example - ALV Interactive ( two times REUSE_ALV_GRID_DISPLAY )
    REPORT  ZZ_22038_22098_002 NO STANDARD PAGE HEADING LINE-SIZE 650
    MESSAGE-ID ZZ_9838                      .
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *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.
    declaration for events table where user comand or set PF status will
    be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
          Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
         Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
      retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
          text
         -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'this is my first alv pgm'.
      HLINE-TYP = 'H'.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
          text
    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          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
      I_GRID_SETTINGS                   =
      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                          = IT_EKKO
    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
          text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
          text
    FORM BUILD_FIELDCATLOG_EKPO.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'NETPR'.
      WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
           Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
          text
    FORM F_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'CHECKING PGM'.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = I_TITLE_EKPO
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = I_FIELDCAT[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         =
       I_SAVE                            = 'A'
      IS_VARIANT                        =
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    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.

  • Plz help interactive list issue-urgent today is the deadline

    hi experts ,
    i have created an interactive list report .
    in which when i click on value of first coloumn it should display another list report .
    in my case when i click on the spaces next to the value it should not display the value .
    i want when i click on the value like 34 it should display the next list not on the spaces .
    to get the value i am using
    GET CURSOR FIELD fld VALUE val.
    Thanx in advance

    hi,
    check the following code
    here i used hide ang get cursor statements
    in my prog i will display the next list only on clicking material number
    otherwise it will display a message click on material number
    modify accordingly
    REPORT  zp_interactive5 LINE-SIZE 100 LINE-COUNT 10(2).
    TABLES: mara, marc, makt.
    DATA: wa_mara LIKE mara,
          it_mara TYPE TABLE OF mara,
          wa_marc LIKE marc,
          it_marc TYPE TABLE OF marc,
          wa_makt LIKE makt,
          it_makt TYPE TABLE OF makt.
    DATA: value(20) TYPE c.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    START-OF-SELECTION.
      SELECT * FROM mara INTO TABLE it_mara
            WHERE matnr IN s_matnr.
      LOOP AT it_mara INTO wa_mara.
        WRITE: / wa_mara-matnr COLOR COL_KEY INTENSIFIED ON,
                 wa_mara-ersda COLOR COL_KEY INTENSIFIED ON.
        HIDE: wa_mara-matnr.
      ENDLOOP.
      CLEAR wa_mara-matnr.
    AT LINE-SELECTION.
      CASE sy-lsind.
        WHEN '1'.
          GET CURSOR FIELD value.
          IF value = 'WA_MARA-MATNR'.
            SELECT * FROM marc INTO TABLE it_marc
                WHERE matnr = wa_maRA-matnr.
            IF it_marc IS INITIAL.
              MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
            ELSE.
              WINDOW STARTING AT 10 l1
                       ENDING AT 50 l2.
              LOOP AT it_marc INTO wa_marc.
                WRITE: / wa_marc-matnr COLOR COL_KEY INTENSIFIED ON,
                         wa_marc-werks COLOR COL_KEY INTENSIFIED ON.
                HIDE: wa_marc-matnr.
              ENDLOOP.
            ENDIF.
          ELSE.
            MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
          ENDIF.
        WHEN '2'.
          GET CURSOR FIELD value.
          IF value = 'WA_MARC-MATNR'.
            SELECT * FROM makt INTO TABLE it_makt
            WHERE matnr = wa_maRC-matnr.
            IF it_makt IS INITIAL.
              MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
            ELSE.
              WINDOW STARTING AT 10 l1
                       ENDING AT 50 l2.
              LOOP AT it_makt INTO wa_makt.
                WRITE: / wa_makt-matnr COLOR COL_KEY INTENSIFIED ON,
                         wa_makt-spras COLOR COL_KEY INTENSIFIED ON,
                         wa_makt-maktx COLOR COL_KEY INTENSIFIED ON.
              ENDLOOP.
            ENDIF.
            CLEAR wa_makt-matnr.
          ELSE.
            MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
          ENDIF.
      ENDCASE.
    TOP-OF-PAGE.
      WRITE: 'MATERIAL MASTER DETAILS'.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE sy-lsind.
        WHEN '1'.
          WRITE: 'PLANT DETIALS'.
        WHEN '2'.
          WRITE: 'MATERIAL DESCRIPTION'.
      ENDCASE.
    REWARD IF HELPFUL
    PRASANTH

  • Interactive lists from ALV

    Hi experts,
    Please tell me how to generate Interactive list from ALV.
    I have already created interactive list without ALV
    ( using AT LINE SELECTION)

    Please refer to the below code.
    A very good example with most of the company Standards.
    *& Report  zalv                                                      *
    REPORT zalv .
    TYPE-POOLS: kkblo,
                slis.
    TABLES: mara, marc, mard.
    DATA:       disvariant   LIKE disvariant,
                eventcat     TYPE slis_t_event,
                eventcat_ln  LIKE LINE OF eventcat,
                fieldcat     TYPE slis_t_fieldcat_alv,
                fieldcat_kkb TYPE kkblo_t_fieldcat,
                fieldcat_ln  LIKE LINE OF fieldcat,
                keyinfo      TYPE slis_keyinfo_alv,
                layout       TYPE slis_layout_alv,
                layout_kkb   TYPE kkblo_layout,
                pgm          LIKE sy-repid,
                printcat     TYPE slis_print_alv,
                sortcat      TYPE slis_t_sortinfo_alv,
                sortcat_ln   LIKE LINE OF sortcat,
                BEGIN OF coltab OCCURS 50,
                  fieldname LIKE fieldcat_ln-fieldname,
                END OF coltab.
    DATA: print          TYPE slis_print_alv.
    DATA : v_repid TYPE sy-repid.
    DATA: BEGIN OF wa OCCURS 0,
            matnr TYPE mara-matnr,
            ersda TYPE mara-ersda,
            ernam TYPE mara-ernam,
            aenam TYPE mara-aenam,
            werks TYPE marc-werks,
            pstat TYPE marc-pstat,
            lfmon TYPE mard-lfmon,
          END OF wa.
    DATA: itab LIKE TABLE OF wa.
    **Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001..
    SELECT-OPTIONS: mat_no FOR mara-matnr.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK b1.
    * Parameter for list viewer display variant
    PARAMETERS:    variant  LIKE disvariant-variant.
    AT SELECTION-SCREEN ON variant.
      CHECK NOT variant IS INITIAL.
      PERFORM check_variant_existence USING variant 'U'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
      PERFORM f4_display_variant USING variant 'U'.
    *Initialization
    INITIALIZATION.
      v_repid = sy-repid.
    *Start of selection
      PERFORM check_tcode_authority USING 'SA38'.
    START-OF-SELECTION.
      SELECT a~matnr a~ersda
             a~ernam a~aenam
             c~werks c~pstat d~lfmon
      INTO TABLE itab
      UP TO 10 ROWS
      FROM mara AS a
      INNER JOIN marc AS c ON a~matnr = c~matnr
      INNER JOIN mard AS d ON c~matnr = d~matnr
      WHERE a~matnr IN mat_no.
    *End of Selection
    END-OF-SELECTION.
      PERFORM call_list_viewer.
    *&      Form  call_list_viewer
    *       text
    FORM call_list_viewer .
      PERFORM build_fieldcat USING:
               'MATNR' 'ITAB'
                'Material #' 'CHAR'     18 ' ' ' ' ' ' ' ' ' ',
               'ERSDA' 'ITAB'
                'Date Created' 'CHAR'   10 ' ' ' ' ' ' ' ' ' ',
               'ERNAM' 'ITAB'
                'Created By' 'CHAR'     10 ' ' ' ' ' ' ' ' ' ',
               'AENAM' 'ITAB'
                'Changed By' 'CHAR'     10 ' ' ' ' ' ' ' ' ' ',
               'WERKS' 'ITAB'
                'Plant' 'CHAR'           4 ' ' ' ' ' ' ' ' ' ',
               'PSTAT' 'ITAB'
                'Status' 'CHAR'         10 ' ' ' ' ' ' ' ' ' ',
               'LFMON' 'ITAB'
                'Current Period' 'CHAR'  8 ' ' ' ' ' ' ' ' ' '.
      PERFORM build_eventcat USING: 'TOP_OF_LIST',
                                    'TOP_OF_PAGE'.
      PERFORM list_display TABLES itab.
    ENDFORM.                    "call_list_viewer
    * build field catalog entry                                            *
    FORM build_fieldcat USING a_fieldname
                              a_tabname
                              a_heading
                              a_datatype
                              a_outputlen
                              a_key
                              a_no_out
                              a_no_sum
                              a_do_sum
                              a_no_zero.
      CLEAR fieldcat_ln.
      fieldcat_ln-fieldname = a_fieldname.
      fieldcat_ln-tabname  = a_tabname.
      fieldcat_ln-outputlen = a_outputlen.
      fieldcat_ln-datatype = a_datatype.
      fieldcat_ln-reptext_ddic = a_heading.
      fieldcat_ln-key = a_key.
      fieldcat_ln-no_out = a_no_out.
      fieldcat_ln-no_sum = a_no_sum.
      fieldcat_ln-do_sum = a_do_sum.
      fieldcat_ln-no_zero = a_no_zero.
      APPEND fieldcat_ln TO fieldcat.
    ENDFORM.                    "BUILD_FIELDCAT
    *       FORM BUILD_EVENTCAT
    FORM build_eventcat USING a_event.
      eventcat_ln-name = eventcat_ln-form = a_event.
      APPEND eventcat_ln TO eventcat.
    ENDFORM.                    "BUILD_EVENTCAT
    * call the ABAP list viewer                                            *
    FORM list_display TABLES a_output.
      pgm = disvariant-report = sy-repid.
      disvariant-variant = variant.
    * call list viewer
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = pgm
    *      i_callback_pf_status_set = 'SET_PF_STATUS'
          it_fieldcat              = fieldcat
          is_variant               = disvariant
          is_layout                = layout
          is_print                 = print
          i_save                   = 'A'
          it_events                = eventcat
          it_sort                  = sortcat
    *      i_callback_user_command  = 'USER_COMMAND'
        TABLES
          t_outtab                 = a_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    ENDFORM.                    "LIST_DISPLAY
    *&      Form  top_of_page
    *       text
    FORM top_of_page.
      PERFORM standard_headings.
      PERFORM print_selection_screen TABLES:
                   mat_no USING  'Material No  : ' 18 'N' 1.
    ENDFORM.                    "top_of_page
    *       FORM CHECK_VARIANT_EXISTENCE
    *       Verify that a variant on the selection screen exists
    FORM check_variant_existence USING varname LIKE disvariant-variant
                                       save   TYPE c.
      DATA: xdisvar LIKE disvariant.
      xdisvar-report  = sy-repid.
      xdisvar-variant = varname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
        EXPORTING
          i_save        = save
        CHANGING
          cs_variant    = xdisvar
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
      IF sy-subrc <> 0.
        MESSAGE e256(56) WITH varname.
    *   Anzeigevariante &1 nicht gefunden
      ENDIF.
      disvariant-report  = sy-repid.
      disvariant-variant = varname.
    ENDFORM.                    "check_variant_existence
    *       Form  F4_DISPLAY_VARIANT
    *       F4 help to find a display variant
    *       varname = name of the dynpro field for which f4 is requested
    *       save    = type of list variant saving
    *                 ' ' = no saving allowed
    *                 'A' = standard & user specific variants can be saved
    *                 'U' = only user specific variants can be saved
    *                 'X' = only standard variants can be saved
    FORM f4_display_variant USING varname LIKE disvariant-variant
                                  save    TYPE c.
      disvariant-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant    = disvariant
          i_save        = save
        IMPORTING
          es_variant    = disvariant
        EXCEPTIONS
          not_found     = 1
          program_error = 2
          OTHERS        = 3.
      IF sy-subrc = 0.
        varname = disvariant-variant.
      ELSE.
        MESSAGE s245(56).
    *   Keine Anzeigevariante(n) vorhanden
      ENDIF.
    ENDFORM.                               " F4_DISPLAY_VARIANT
    *       FORM STANDARD_HEADINGS                                        *
    *       Print standard page headings for report                       *
    FORM standard_headings.
      DATA: start_column TYPE i,
            title_len TYPE i,
            header_for_80_col(45),
            date_time_for_80_col(45),
            text_h0(11) VALUE 'Report No. ',
            text_h1(5) VALUE 'Date ',
            text_h2(6) VALUE 'Page -',
            text_h3(7) VALUE 'System ',
            text_h4(5) VALUE 'Time ',
            text_h5(11) VALUE 'Run By     '.
      FORMAT INTENSIFIED ON.
      CONDENSE syst-title.
      IF syst-linsz > 80.
        WRITE: /  text_h0,                 "Report No.
               12 syst-repid(8),
               23 text_h1,                 "Date
                  sy-datlo.
        title_len = STRLEN( syst-title ) / 2.
        start_column = ( syst-linsz / 2 ) - title_len.
        IF start_column < 40.
          start_column = 40.
        ENDIF.
        WRITE: AT start_column syst-title.
      ELSE.
        WRITE: /  text_h0,                 "Report No.
               12 syst-repid(8).
        start_column = 22.
        WRITE syst-title TO header_for_80_col CENTERED.
        WRITE: header_for_80_col.
      ENDIF.
      start_column = syst-linsz - 12.
      WRITE: AT start_column text_h2, syst-pagno LEFT-JUSTIFIED.
      IF syst-linsz > 80.
        WRITE: / text_h3,                  "System
              12 syst-sysid(4),
                 syst-mandt,
              23 text_h4,                  "Time
                 syst-timlo.
        WRITE: / text_h5,                  "Run By
              12 syst-uname.
      ELSE.
        WRITE: / text_h3,                  "System
              12 syst-sysid(4),
                 syst-mandt,
              23 text_h1,                  "Date
                 syst-datlo.
        WRITE: / text_h5,                  "Run By
              12 syst-uname,
              23 text_h4,                  "Time
                 syst-timlo.
      ENDIF.
      SKIP.
    ENDFORM.                    "STANDARD_HEADINGS
    *       FORM PRINT_SELECTION_SCREEN                                        *
    *  -->  SIGN                                                          *
    *  -->  OPTION                                                        *
    *  -->  LOW                                                           *
    *  -->  HIGH                                                          *
    *  -->  D_IND                                                         *
    *  -->  S_STRING                                                      *
    FORM print_selection_screen TABLES r_selection TYPE table
                           USING  p_name
                                  p_length TYPE i
                                  p_ind
                                  p_start_col.
      DATA: year(4)       TYPE c,
            month(2)      TYPE c,
            day(2)        TYPE c,
            low_date(10)  TYPE c,
            high_date(10) TYPE c,
            offset(80)    TYPE c.
      DATA: BEGIN OF l_selline,
              sign(1) TYPE c,
              option(2) TYPE c,
              data(200) TYPE c,
            END OF l_selline.
      DATA: l_string(80) TYPE c,
            l_temp(80) TYPE c,
            len TYPE i,
            len1 TYPE i.
      DESCRIBE FIELD p_name LENGTH len IN CHARACTER MODE.
      len = len + p_start_col + 2.
      LOOP AT r_selection.
        IF syst-tabix = 1.
          WRITE AT /p_start_col p_name.
        ELSE.
          len1 = ( STRLEN( l_string ) ).
          len = len1 + len + 2.
        ENDIF.
        MOVE r_selection TO l_selline.
        SHIFT l_selline-data LEFT DELETING LEADING '0'.
        CLEAR l_string.
        CASE l_selline-option.
          WHEN 'EQ'.
            CONCATENATE l_string '=' INTO l_string.
          WHEN 'NE'.
            CONCATENATE l_string 'not =' INTO l_string.
          WHEN 'LT'.
            CONCATENATE l_string '<' INTO l_string.
          WHEN 'GT'.
            CONCATENATE l_string '>' INTO l_string.
          WHEN 'LE'.
            CONCATENATE l_string '<=' INTO l_string.
          WHEN 'GE'.
            CONCATENATE l_string '>=' INTO l_string.
          WHEN 'BT'.
            CONCATENATE l_string 'between' INTO l_string.
          WHEN 'NB'.
            CONCATENATE l_string 'not between' INTO l_string.
          WHEN 'CP'.
            CONCATENATE l_string 'contains pattern' INTO l_string.
          WHEN 'NP'.
            CONCATENATE l_string 'no pattern' INTO l_string.
        ENDCASE.
        IF l_selline-sign EQ 'E'.
          CONCATENATE 'NOT' l_string INTO l_string SEPARATED BY ' '.
        ENDIF.
        IF p_ind EQ 'Y'.
          MOVE l_selline-data(4) TO year.
          MOVE l_selline-data+4(2) TO month.
          MOVE l_selline-data+6(2) TO day.
          CONCATENATE month '/' day '/' year INTO low_date.
          CONCATENATE l_string low_date INTO l_string SEPARATED BY ' '.
          IF l_selline-option EQ 'BT' OR l_selline-option EQ 'NB'.
            MOVE l_selline-data+p_length(4) TO year.
            offset = p_length + 4.
            MOVE l_selline-data+offset(2) TO month.
            ADD 2 TO offset.
            MOVE l_selline-data+offset(2) TO day.
            CONCATENATE month '/' day '/' year INTO high_date.
            CONCATENATE l_string 'and' high_date INTO l_string SEPARATED
                                                  BY ' '.
          ENDIF.
        ELSE.
          MOVE l_selline-data(p_length) TO l_temp.
          CONCATENATE l_string l_temp INTO l_string SEPARATED BY ' '.
          IF l_selline-option EQ 'BT' OR l_selline-option EQ 'NB'.
            MOVE l_selline-data+p_length(p_length) TO l_temp.
            CONCATENATE l_string 'and' l_temp INTO l_string SEPARATED
                                                                BY ' '.
          ENDIF.
        ENDIF.
        WRITE AT len l_string.
      ENDLOOP.
      IF syst-subrc <> 0.
        WRITE: AT /p_start_col p_name, ' *** ALL ***'.
      ENDIF.
    ENDFORM.                    "PRINT_SELECTION_SCREEN
    *       FORM CHECK_TCODE_AUTHORITY                                    *
    *       Check User Security Against A SAP Transaction                 *
    *  -->  a_tcode  Transaction Code For Security                        *
    FORM check_tcode_authority USING a_tcode.
    * if tcode is not passed, then return ok.
      IF NOT a_tcode IS INITIAL.
        CALL FUNCTION 'AUTHORITY_CHECK_TCODE'"Only People that
             EXPORTING                     " have access to
               tcode  = a_tcode            " Transaction t-tcode
             EXCEPTIONS                    " are ALLOWED to execute
                  ok     = 1               " this Program
                  not_ok = 2.
        IF syst-subrc NE 1.
          MESSAGE a999(zz) WITH 'YOU Do Not Have Authority to Execute'.
        ENDIF.
      ELSE.
        MOVE 1 TO syst-subrc.
      ENDIF.
    ENDFORM.                    "CHECK_TCODE_AUTHORITY
    Shreekant

Maybe you are looking for

  • A Web Page Development Question

    Hi, I want to develop a web page with an image. By clicking different areas on the image, people can go to different links. There are many such areas on the image. How can I implement that? Answer or whereabout of the answer is appreciated. myao1

  • Map in midlet

    Hello Currently we are writing a midlet and there's a requirement that the midlet should integrate a map. The map should work in offline mode, so yahoo map and google map is useless here. I should install the map with my app and draw it. I couldn't f

  • Using ActiveX Media Player

    I want to use Media Player as music player on my project. I would like to have a "list of songs" on my stage and when I click one them it plays n Media player. Can I do that and how? Is there a better player for mp3s for Director?

  • Kodak Gallery Help

    Hi. I just upgraded to Ilife 09. After i upload say 100 pics, ill delete 50 by hitting the delete button. Then to add to Kodak Gallery, I drag/drop my iphoto event ( which says it now has 50 pics) and for some reason Kodak says, "uploading 100 photos

  • Macbook Pro Freezes after wake up from sleep

    My Macbook Pro 5,5 with mountian Lion freezes after waking up from sleep. i have 8 GB RAM and did a hardware test wich was passed. I also have a SSD of 240 GB in the optical drive. this is my startup drive. Another HD is my workdrive. The first thing