Button in basic list

Hi
I want to set a button in basic list of a transaction,not an ALV.
I don't want to see the button in the detail list. How should i set this and where. Ideally where should  pf-status  be set in ?.
Answers will be  rewarded.
Thanks
Varun Mathur
Edited by: Varun Mathur on Feb 12, 2008 7:42 AM

HI,
   check this program. in this the basic list has the gui and not the detail list...here the detail list is done using alv..dont worry abt that.
report  z_banks1_rp1.
TABLE
tables : zacc_master2.
TYPE-POOLS
type-pools slis.
*INTERNAL TABLE
data : itab like zacc_master2 occurs 0 with header line.
data : itab1 like zacc_master2 occurs 0 with header line.
DATA
data : gt_fcat type slis_t_fieldcat_alv,
       fcat like line of gt_fcat.
data : check type c length 1,
       wa type c length 20.
select * from zacc_master2 into table itab.
write : '       ACCOUNT NUMBER' intensified color 3.
loop at itab.
write: / check as checkbox, itab-zaccno.
endloop.
hide : itab.
START OF SELECTION
start-of-selection.
set pf-status 'ZMBANKS1'.
AT LINE SELECTION
at line-selection.
AT USER-COMMAND
at user-command.
case sy-ucomm.
when 'SUBMIT'.
do.
read line sy-index field value check itab-zaccno into wa.
if sy-subrc <> 0.
exit.
elseif check = 'X'.
read table itab with key zaccno = wa.
if sy-subrc eq 0.
move-corresponding itab to itab1.
append itab1.
endif.
endif.
enddo.
CALLING SUB-ROUTINE
perform fieldcatalog.
CALLING FUNCTION MODULE
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
it_fieldcat = gt_fcat[]
tables
t_outtab = itab1.
when 'BACK'.
call screen 0002.
*WHEN 'BACK1'.
*CALL SCREEN 0002.
endcase.
SUB ROUTINE DECLARATION
form fieldcatalog.
fcat-seltext_l = 'ACCOUNT NUMBER'.
fcat-fieldname = 'ZACCNO'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
fcat-seltext_l = 'CUSTOMER ID'.
fcat-fieldname = 'ZCUSTID'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
fcat-seltext_l = 'ACCOUNT TYPE'.
fcat-fieldname = 'ZACCTYPE'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
fcat-seltext_l = 'ACCOUNT BALANCE'.
fcat-fieldname = 'ZBAL'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
fcat-seltext_l = 'ACCOUNT CREATED DATE'.
fcat-fieldname = 'ZACCDATE'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
fcat-seltext_l = 'STATUS'.
fcat-fieldname = 'ZSTAT'.
fcat-tabname = 'ITAB1'.
append fcat to gt_fcat.
endform.
Please reward if it is helpful.
regards,
sri

Similar Messages

  • Refreshing Basic list when i press Refresh button

    My Requirement is that when i move from the Basic list to interactive list. i am going to make some changes to internal table.
    when i came back to basic list. and when i press 'REFRESH' button in the Application Tool Bar. screen has to refresh  and display with modified data.

    Hi,
    When you press Back button you can call this method REFRESH_TABLE_DISPLAY which refresh the data in the screen in basic list if you are using the ALV Classes.

  • Output screen basic list buttons

    Hi frnds,
                   what are the steps to create buttons in the application toolbar in our output screen.
    like i m getting sales header data in my basic list so in the output i m having a button which i press then i will get sales item details.
    so can anyone help me how to create that button there in the ouput screen.
    regards,
    sanjay

    Hi,
    You can copy the GUI STATUS  STANDARD of the program SAPLKKBL in SE41 and create a new one..
    in that add a button in the application toolbar section..
    Then use call back pf status parameter to pass the subroutine to display the gui status..
    Then use call back subroutine parameter in the alv function module to give the subroutine name..
    check this example for using double click to get the item details.
    TYPE-POOLS: slis.
    DATA: BEGIN OF itab1 OCCURS 0,
            vbeln TYPE vbeln,
            bstnk TYPE vbak-bstnk,
            erdat TYPE vbak-erdat,
            kunnr TYPE vbak-kunnr,
          END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
            vbeln  TYPE vbeln,
            matnr  TYPE vbap-matnr,
            netpr  TYPE vbap-netpr,
            kwmeng TYPE vbap-kwmeng,
          END OF itab2.
    DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
    DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
    DATA: v_repid         TYPE syrepid.
    v_repid = sy-repid.
    * Get the fieldcatalog1
    PERFORM get_fieldcat1.
    * Get the fieldcatalog2
    PERFORM get_fieldcat2.
    SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
           INTO TABLE itab1
           FROM vbak.
    IF NOT itab1[] IS INITIAL.
      SELECT vbeln matnr netpr kwmeng UP TO 10 ROWS
             INTO TABLE itab2
             FROM vbap
             FOR ALL ENTRIES IN itab1
             WHERE vbeln = itab1-vbeln.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
              i_callback_user_command = 'DISPLAY_DETAIL'
              it_fieldcat             = t_fieldcatalog1
         TABLES
              t_outtab                = itab1.
    *       FORM display_detail                                           *
    *  -->  UCOMM                                                         *
    *  -->  SELFIELD                                                      *
    FORM display_detail USING ucomm LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      DATA: itab2_temp LIKE itab2 OCCURS 0 WITH HEADER LINE.
      IF ucomm = '&IC1'.
        READ TABLE itab1 INDEX selfield-tabindex.
        IF sy-subrc = 0.
          LOOP AT itab2 WHERE vbeln = itab1-vbeln.
            MOVE itab2 TO itab2_temp.
            APPEND itab2_temp.
          ENDLOOP.
          CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
               EXPORTING
                    i_callback_program = v_repid
                    it_fieldcat        = t_fieldcatalog2
               TABLES
                    t_outtab           = itab2_temp.
        ENDIF.
      ENDIF.
    ENDFORM.
    *       FORM GET_FIELDCAT1                                            *
    FORM get_fieldcat1.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
      s_fieldcatalog-col_pos = '1'.
      s_fieldcatalog-fieldname = 'VBELN'.
      s_fieldcatalog-tabname   = 'ITAB1'.
      s_fieldcatalog-rollname  = 'VBELN'.
      s_fieldcatalog-hotspot   = 'X'.
      APPEND s_fieldcatalog TO t_fieldcatalog1.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '2'.
      s_fieldcatalog-fieldname = 'BSTNK'.
      s_fieldcatalog-tabname   = 'ITAB1'.
      s_fieldcatalog-rollname  = 'BSTNK'.
      APPEND s_fieldcatalog TO t_fieldcatalog1.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '3'.
      s_fieldcatalog-fieldname = 'ERDAT'.
      s_fieldcatalog-tabname   = 'ITAB1'.
      s_fieldcatalog-rollname  = 'ERDAT'.
      APPEND s_fieldcatalog TO t_fieldcatalog1.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '4'.
      s_fieldcatalog-fieldname = 'KUNNR'.
      s_fieldcatalog-tabname   = 'ITAB1'.
      s_fieldcatalog-rollname  = 'KUNNR'.
      APPEND s_fieldcatalog TO t_fieldcatalog1.
      CLEAR s_fieldcatalog.
    ENDFORM.
    *       FORM GET_FIELDCAT2                                            *
    FORM get_fieldcat2.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
      s_fieldcatalog-col_pos = '1'.
      s_fieldcatalog-fieldname = 'VBELN'.
      s_fieldcatalog-tabname   = 'ITAB2'.
      s_fieldcatalog-rollname  = 'VBELN'.
      APPEND s_fieldcatalog TO t_fieldcatalog2.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '2'.
      s_fieldcatalog-fieldname = 'MATNR'.
      s_fieldcatalog-tabname   = 'ITAB2'.
      s_fieldcatalog-rollname  = 'MATNR'.
      APPEND s_fieldcatalog TO t_fieldcatalog2.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '3'.
      s_fieldcatalog-fieldname = 'NETPR'.
      s_fieldcatalog-tabname   = 'ITAB2'.
      s_fieldcatalog-rollname  = 'NETPR'.
      APPEND s_fieldcatalog TO t_fieldcatalog2.
      CLEAR s_fieldcatalog.
      s_fieldcatalog-col_pos = '4'.
      s_fieldcatalog-fieldname = 'KWMENG'.
      s_fieldcatalog-tabname   = 'ITAB2'.
      s_fieldcatalog-rollname  = 'KWMENG'.
      APPEND s_fieldcatalog TO t_fieldcatalog2.
      CLEAR s_fieldcatalog.
    ENDFORM.
    Thanks
    Naren

  • Check box in basic list

    Hi frieds,
    I wants to display a list of record in basic list and also one chek box for every record.
    Then based on selected check box i want to cancel that record in database means i want to set it's flag. also in application toolbar of basic list display cancel button.
    can  any one gives me code for this.
    Thank you.
    Regards,
    Virat

    Hi
    See the sample example code
    and do accordingly
    TABLES:MARA.
    DATA:BEGIN OF GT_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,
    END OF GT_MARA,
    GV_CB,
    GV_CBV,
    GV_LINES TYPE I,
    INDEX TYPE I,
    SY_INDEX TYPE I,
    GV_LINES1 TYPE I,
    MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS:S_MATNR FOR MARA-MATNR.
    SELECT
    MATNR FROM MARA
    INTO TABLE GT_MARA
    WHERE MATNR IN S_MATNR.
    IF SY-SUBRC = 0.
    DESCRIBE TABLE GT_MARA LINES GV_LINES.
    ENDIF.
    LOOP AT GT_MARA.
    WRITE:/ GV_CB AS CHECKBOX,
    GT_MARA-MATNR.
    ENDLOOP.
    CLEAR GT_MARA.
    WRITE:'Total num of records is ',GV_LINES.
    SET PF-STATUS 'DEL'.
    AT USER-COMMAND.
    IF SY-UCOMM = 'DEL' OR SY-UCOMM = 'PICK'.
    DO 50 TIMES.
    SY_INDEX = SY-INDEX.
    READ LINE SY_INDEX FIELD VALUE GV_CB
    GT_MARA-MATNR INTO MATNR.
    IF GV_CB = 'X'." AND MATNR IS NOT INITIAL.
    LOOP AT GT_MARA." WHERE MATNR = MATNR.
    DELETE GT_MARA.
    CLEAR GT_MARA.
    ENDLOOP.
    delete gt_mara index sy_index.
    ENDIF.
    ENDDO.
    DESCRIBE TABLE GT_MARA LINES GV_LINES1.
    WRITE:'Total num of records is ',GV_LINES1.
    CLEAR:GV_LINES .
    LOOP AT GT_MARA.
    WRITE:/ GT_MARA-MATNR.
    ENDLOOP.
    ENDIF.
    Reward points for useful Answers
    Regards
    Anji

  • Refresh Classical report/basic list

    Hi,
    I have created a classical report/basic list where user can select check boxes and adjacent rows should be deleted. But after the action, I wish to refresh the report and remove the selected lines from displaying.
    Please let me know how to achieve this.
    Thanks in advance.
    Nitin

    Hi Nitin,
    Check the following program.
    Here on pressing the delete push button(FCODE: DELETE) it will delete all
    rows which has adjacent checkboxes checked.
    REPORT ztest_list_processing NO STANDARD PAGE HEADING .
    TYPES: BEGIN OF ty_tab,
           delete,
           f1(3) TYPE c,
           f2(3) TYPE c,
           f3(3) TYPE c,
           END OF ty_tab.
    DATA: it_tab TYPE TABLE OF ty_tab,
          wa_tab TYPE ty_tab.
    DATA: w_delete TYPE c,
          w_lines TYPE i,
          w_ind TYPE i.
    wa_tab-f1 = '111'.
    wa_tab-f2 = 'ABC'.
    wa_tab-f3 = '123'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '222'.
    wa_tab-f2 = 'DEF'.
    wa_tab-f3 = '456'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '333'.
    wa_tab-f2 = 'GHI'.
    wa_tab-f3 = '789'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '444'.
    wa_tab-f2 = 'JKL'.
    wa_tab-f3 = '987'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '555'.
    wa_tab-f2 = 'MNO'.
    wa_tab-f3 = '654'.
    APPEND wa_tab TO it_tab.
    SET PF-STATUS '100'. "Contains Delete button
    PERFORM print_output.
    "Logic which you can implement
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'DELETE'.
          DESCRIBE TABLE it_tab LINES w_lines.
          DO w_lines TIMES. "To read all rows
            CLEAR: wa_tab.
            READ LINE w_ind FIELD VALUE wa_tab-delete
                                           wa_tab-f1. "Getting the values
            IF wa_tab-delete EQ 'X'. "Delete when check box is 'X'
              DELETE it_tab WHERE f1 = wa_tab-f1.
            ENDIF.
            ADD 1 TO w_ind."Index for next line
          ENDDO.
          IF it_tab IS INITIAL.
            WRITE: / 'There are no data in the table'.
          ELSE.
            PERFORM print_output. "Reprint the updated data(like refreshing)
          ENDIF.
          "Modified the existing Back button in standard Toolbar so that on
          "pressin the back button it will come to program and not to
          "previous displayed list
        WHEN '&BACK'.
          LEAVE SCREEN.
      ENDCASE.
    *&      Form  print_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM print_output.
      LOOP AT it_tab INTO wa_tab.
        WRITE:/ wa_tab-delete AS CHECKBOX INPUT ON, "Display as checkbox
              wa_tab-f1,
              wa_tab-f2,
              wa_tab-f3.
        IF sy-tabix EQ 1.
          w_ind = sy-linno. "Get the line position of first row
        ENDIF.
      ENDLOOP.
    Hope this helps you.
    Regards,
    Manoj Kumar P

  • Control checkbox in basic list

    I have write a checkbox in basic list and i have created a status for the list, and when i click the checkbox it doesn´t works to the event at line-selection, i have tried with the hide command too, but it doesnt goes to the event, i think that it goes before creating the status and write the checkbox, does anybody know how to resolve it?,
    Thanks in advance

    I do not believe that you can fire an event when checking a checkbox in a list display.  Please see the following program as it allows the user to click a "DISPLAY" button and then it will read all of the select lines.
    report zrich_0001 no standard page heading.
    data: begin of ivbak occurs 0,
          check type char01,
          vbeln type vbak-vbeln,
          end of ivbak.
    data: lines type i.
    select-options: s_vbeln for ivbak-vbeln.
    start-of-selection.
    set pf-status 'LIST'.
      select vbeln into corresponding fields of table ivbak
          from vbak
              where vbeln in s_vbeln.
      loop at ivbak.
        write:/ ivbak-check as checkbox, ivbak-vbeln.
      endloop.
    at user-command.
      case sy-ucomm.
        when 'DISPLAY'.
    * Mark the internal table for the checkboxes selected on list
          describe table ivbak lines lines.
          do lines times.
            read line sy-index field value ivbak-check.
            if  ivbak-check = 'X'.
              read table ivbak index sy-index.
              if sy-subrc  = 0.
                ivbak-check = 'X'.
                modify ivbak index sy-index.
              endif.
            endif.
          enddo.
    * Now display the sales order for all select SD docs
          loop at ivbak where check = 'X'.
            set parameter id 'AUN' field ivbak-vbeln.
            call transaction 'VA03' and skip first screen..
          endloop.
      endcase.
    Regards,
    Rich Heilman

  • ALV List Display With a Pushbutton in the basic list

    i have displayed the po details in teh basic list. I have used the double clicking functionality. It worked well. Now instead of double clicking, i will place the cursor on the po and click a push button. then it should show the other details.
    Can anyone please guide me how to create the pushbuttons on the basic list ?

    Hi,
       You create your own GUI status.Pass the name of GUI status to FM REUSE_ALV_GRID_DISPLAY.
    e.g.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          CALLBACKPF_STATUS_SET = 'PF'
          i_callback_user_command = 'USER_COMMAND'
          i_grid_title            = text-020
          is_layout               = wa_layout
          it_fieldcat             = it_fieldcat[]
        TABLES
          t_outtab                = it_basic
        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.
    FORM PF.
    SET PF_STATUS 'P1'.
    ENDFORM.
    On pressing that button go to secondary list.

  • Basic List

    I have a basic list and 4 secondary list. I am NOT using the BACK button. Instead i have created a button that acts like the standard BACK button. From the 4th List, if i keep pressing the button, it should take the user one list back. Any solution.

    When you handle your own BACK Button in the at user-command section, your should reset your sy-lsind to one less than its present value
    sy-lsind = sy-lsind - 1.

  • Basic list in ALV report

    Hi,
    can someone please tell me how/where I can change the sort criteria and displayed columns of the basic list in an ALV report (e.g. S_ALR_87011963)? Our test and development systems seem to have different settings here. No layout has been created or defaulted. I just want the basic list to be the same in both systems. Then the users can create their own layouts as well, but the basic list should be the same.
    Thanks,
    Moly

    Hi, This report seems to be a report painter/writer, Request you to check with your functional consultant and also check transaction GR* (GR51 to GR55 etc,,) to see if something can be changed.
    Thanks,
    Shiva

  • Astericks appearing in place of a particular value in basic list ????

    Hello,
    I am outputting values thru a basic list, but the system is outputting ' *********** ' (Astericks) in place of the value. I have increased the length while outputtin on a basic list but to no avail. What can be the reason?
    Thanks,
    Shehryar Dahar

    hi,
    check whther both field type are identical..check for type..
    thanks
    jaideep
    *reward points for useful answers..

  • ABAP Query - Sorting Issue in Basic List (SQ03)

    Hi,
        I have developed a ABAP Query. I want to sort some of the fields, for which I need to add some output fields to the sort sequence box in the Basic List page in SQ03/SQ01. But, I am not able to drag and drop the fields directly. Please suggest how can this be done? Thanks in advance.
    Best Regards,
    Tejas Savla

    Hi Abhishek,
    There are three things related to Query.
    1) You have to create the USER GROUP in SQ03.
    2) You have to create the Infoset in SQ02. In this infoset you can write the logic of the program/Query what ever you want to perform.So you can sort the table in the infoset in the program logic.you have to create the output table of the query.
    3) you have to create the Query in SQ01 and you have to associate the User group and infoset . you have to design the layput of the output you want to have.this output fields would be same as you have defined in infoset(step 2).
    hope this will help you.
    thanks
    Tanmaya

  • Hyperlink on field in Basic list of ABAP Query

    Dear All,
    Could somebody tell me, if its possible to have a hyperlink on a field in the Basic list of ABAP Query (SQ01,SQ02).
    Example :- There is a basic list which has the field MARA-MATNR displayed.There should be a hyperlink on this field, such that when the user clicks on it , the transaction MM03 is called.
    Thanking You.
    Ranu

    Hi,
    Loop at itab.
    write:/ itab-matnr hotspot,
              itab-maktx.
    hide: itab-matnr.
    endloop.
    data: c_field(16).
    at line-selection.
      get cursor field c_field.
      if c_field  = 'ITAB-MATNR'.
        check not itab-matnr is initial.
        set parameter id 'MAT' field itab-matnr.
        call transaction 'MM03' and skip first screen.
      endif.
    This is one example to call the transaction.
    If this helps you award points.
    Thanks,
    Deepak.

  • A report for MM where basic list will contain the material no and material

    how to develop a report for MM where basic list will contain the material no and material description for the range of material no chosen by user. ...plz help me...how to do this step by step..

    Hi Raja,
    Firstly declare a select-option for material number.
    write a select query specifying the required field and specify a where clause
    as
    WHERE MATNR IN S_MATNR.
    Obviously you will select the records into internal table and so loop that internal table and display the records...
    The records will be displayed on the basic list.
    Hope this will solve your problem.
    Regards,
    Narin Nandivada

  • How to enable enable Quick Edit button in Discussions List (SharePoint community).

    I wonder how I can enable the Quick Edit button in Discussions List (SharePoint community), see attachment. This is no problem on other list in SharePoint. I need to import data that I have in a Excel sheet from and old forum (not Sharepoint). So if I can
    enable Quick Edit, I will just copy data into my Discussions List. Hope somebody can help me???

    Hi,
    Please execute the commands below to enable Quick Edit feature in Discussion board list:
    $web = get-spweb "http://sp/sites/sitename"
    $list = $web.Lists["listname"]
    $list.DisableGridEditing = $false
    $list.Update()
    Now you could use Quick Edit in Management view.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • LINKING BETWEEN FUNCTION MODULE AND INTERACTIVE NO. OF BASIC LIST

    Dear Mates,
    Iam preparing Z report for BOM display of FG and SFG materials.
    Iam displaying the Basic List using the MAST table. Here i double click on the material no.
    Here iam using the function module :CS_BOM_EXPL_MAT_V2 for fetching the data from STPOX structure ,here i want to link material no. which has been from basic list and the above said function module. 
    Can anybody provide the solution for the above said linking in ALV interactive report.
    Please treat it very urgent as this report is to be presented on high priority.
    Thanks in advance
    Subbu

    Hi
    use the Function module REUSE_ALV_POPUP_TO_SELECT.
    check the below example:
    REPORT ZSR_ALV_INTERACTIVE.
    TABLES : LFA1,EKKO,EKPO.
    SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
    DATA : BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    END OF ITAB.
    DATA : BEGIN OF JTAB OCCURS 0,
    EBELN LIKE EKKO-EBELN,
    AEDAT LIKE EKKO-AEDAT,
    END OF JTAB.
    DATA : BEGIN OF KTAB OCCURS 0,
    EBELP LIKE EKPO-EBELP,
    MATNR LIKE EKPO-MATNR,
    END OF KTAB.
    TYPE-POOLS : SLIS.
    DATA : REPID LIKE SY-REPID.
    DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,
    LFA1_W TYPE SLIS_FIELDCAT_ALV,
    EKKO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKKO_W TYPE SLIS_FIELDCAT_ALV,
    EKPO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKPO_W TYPE SLIS_FIELDCAT_ALV,
    EVENTS_B TYPE SLIS_T_EVENT,
    EVENTS_W TYPE SLIS_ALV_EVENT.
    PERFORM GET_VAL.
    REPID = SY-REPID.
    SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.
    *perform val USING USER_COMMAND sel.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    IT_FIELDCAT = LFA1_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = ITAB.
    *& Form GET_VAL
    text this is to put column headings
    FORM GET_VAL.
    LFA1_W-FIELDNAME = 'LIFNR'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'LIFNR'.
    APPEND LFA1_W TO LFA1_B.
    LFA1_W-FIELDNAME = 'NAME1'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'NAME1'.
    APPEND LFA1_W TO LFA1_B.
    EKKO_W-FIELDNAME = 'EBELN'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'EBELN'.
    APPEND EKKO_W TO EKKO_B.
    EKKO_W-FIELDNAME = 'AEDAT'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'AEDAT'.
    APPEND EKKO_W TO EKKO_B.
    EKPO_W-FIELDNAME = 'EBELP'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'EBELP'.
    APPEND EKPO_W TO EKPO_B.
    EKPO_W-FIELDNAME = 'MATNR'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'MATNR'.
    APPEND EKPO_W TO EKPO_B.
    EVENTS_W-NAME = 'USER_COMMAND'.
    EVENTS_W-FORM = 'VAL'.
    APPEND EVENTS_W TO EVENTS_B.
    ENDFORM. "GET_VAL
    *& Form VAL
    text
    -->USER_COMMANtext
    -->SEL text for retrieving data
    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
    DATA : VEN(10) TYPE N,
    PO(10) TYPE N.
    DATA : MAT(10) TYPE C.
    IF SEL-FIELDNAME = 'LIFNR'.
    VEN = SEL-VALUE.
    SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    I_STRUCTURE_NAME = EKKO_B
    IT_FIELDCAT = EKKO_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = JTAB.
    ENDIF.
    IF SEL-FIELDNAME = 'EBELN'.
    PO = SEL-VALUE.
    SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
    I_TITLE = 'ITEM DETAILS'
    I_TABNAME = 'EKPO'
    IT_FIELDCAT = EKPO_B
    I_CALLBACK_PROGRAM = REPID
    IMPORTING
    ES_SELFIELD = SEL
    TABLES
    T_OUTTAB = KTAB.
    ENDIF.
    logic to select a record
    IF SEL-FIELDNAME = 'MATNR'.
    MAT = SEL-VALUE.
    SET PARAMETER ID 'MAT' FIELD MAT.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDFORM. "VAL
    check my example:
    REPORT ZSR_ALV_INTERACTIVE.
    TABLES : LFA1,EKKO,EKPO.
    SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
    DATA : BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    END OF ITAB.
    DATA : BEGIN OF JTAB OCCURS 0,
    EBELN LIKE EKKO-EBELN,
    AEDAT LIKE EKKO-AEDAT,
    END OF JTAB.
    DATA : BEGIN OF KTAB OCCURS 0,
    EBELP LIKE EKPO-EBELP,
    MATNR LIKE EKPO-MATNR,
    END OF KTAB.
    TYPE-POOLS : SLIS.
    DATA : REPID LIKE SY-REPID.
    DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,
    LFA1_W TYPE SLIS_FIELDCAT_ALV,
    EKKO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKKO_W TYPE SLIS_FIELDCAT_ALV,
    EKPO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKPO_W TYPE SLIS_FIELDCAT_ALV,
    EVENTS_B TYPE SLIS_T_EVENT,
    EVENTS_W TYPE SLIS_ALV_EVENT.
    PERFORM GET_VAL.
    REPID = SY-REPID.
    SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.
    *perform val USING USER_COMMAND sel.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    IT_FIELDCAT = LFA1_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = ITAB.
    *& Form GET_VAL
    text this is to put column headings
    FORM GET_VAL.
    LFA1_W-FIELDNAME = 'LIFNR'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'LIFNR'.
    APPEND LFA1_W TO LFA1_B.
    LFA1_W-FIELDNAME = 'NAME1'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'NAME1'.
    APPEND LFA1_W TO LFA1_B.
    EKKO_W-FIELDNAME = 'EBELN'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'EBELN'.
    APPEND EKKO_W TO EKKO_B.
    EKKO_W-FIELDNAME = 'AEDAT'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'AEDAT'.
    APPEND EKKO_W TO EKKO_B.
    EKPO_W-FIELDNAME = 'EBELP'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'EBELP'.
    APPEND EKPO_W TO EKPO_B.
    EKPO_W-FIELDNAME = 'MATNR'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'MATNR'.
    APPEND EKPO_W TO EKPO_B.
    EVENTS_W-NAME = 'USER_COMMAND'.
    EVENTS_W-FORM = 'VAL'.
    APPEND EVENTS_W TO EVENTS_B.
    ENDFORM. "GET_VAL
    *& Form VAL
    text
    -->USER_COMMANtext
    -->SEL text for retrieving data
    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
    DATA : VEN(10) TYPE N,
    PO(10) TYPE N.
    DATA : MAT(10) TYPE C.
    IF SEL-FIELDNAME = 'LIFNR'.
    VEN = SEL-VALUE.
    SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    I_STRUCTURE_NAME = EKKO_B
    IT_FIELDCAT = EKKO_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = JTAB.
    ENDIF.
    IF SEL-FIELDNAME = 'EBELN'.
    PO = SEL-VALUE.
    SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
    I_TITLE = 'ITEM DETAILS'
    I_TABNAME = 'EKPO'
    IT_FIELDCAT = EKPO_B
    I_CALLBACK_PROGRAM = REPID
    IMPORTING
    ES_SELFIELD = SEL
    TABLES
    T_OUTTAB = KTAB.
    ENDIF.
    logic to select a record
    IF SEL-FIELDNAME = 'MATNR'.
    MAT = SEL-VALUE.
    SET PARAMETER ID 'MAT' FIELD MAT.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDFORM. "VAL

Maybe you are looking for

  • TS4066 Mail, Toast, Acrobat Pro, et. al., crash frequently in 10.8.2

    Running OS X 10.8.2 (12C60) on MacBook 5,1 (late 2008 aluminum), 8GB 1067 MHz DDR3, ST9750420AS 750.16GB HDD more or less without incident since Mountain Lion was introduced. In the last month, and particularly in the last week, I'm experiencing app

  • Install failed and now computer won't reboot!

    Hi there, I have tried to install the snow leopard 10.6.3 update CD on my Mac and I was told it failed and that I needed to restart - however, I hit restart and I get the start-up chime and apple logo on white with spinning gear underneath, but that'

  • Smartform to PDF conversion having issue with Russian address

    We are having a business situation we are the invoice in English language and the the address of ship-to party and sold-to party in Russian. The issue we face is. When the  smartform is converted to PDF the Russian specific characters are missing in

  • Can you turn off autosave and versions in mountain lion?

    Is this possible? 

  • Changes In  T-OBA5

    In T-code OBA5  I had made  change Application Area 7Q message no 333  is warning.  actually i want  this is as  error message but there no option  for error. is it possible to do  this  as error message type?