I want a report

I want report for this data :
  these are the tables marc,mard,mara,makt.
these r the fields matnr,meins from mara,
                         matnr,werks from marc,
                         matnr,werks,lgort,labst from mard,
                         matnr,maktx from makt.
input fields   : matnr,werks,lgort.
output fields : matnr,maktx,lgort,labst,meins .

<b>Here is your   program    just  cut & paste ....</b>
<b>input fields : matnr,werks,lgort.
output fields : matnr,maktx,lgort,labst,meins</b>
*& Report  ZDEMO_ALVGRID                                               *
*& Example of a simple ALV Grid Report                                 *
*& The basic requirement for this demo is to display a number of       *
*& fields from the Mara table.                                         *
REPORT  zdemo_alvgrid                 .
TABLES:   mara , mard , makt .
type-pools: slis.                                 "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_Mara,
matnr   like   mara-matnr  ,
meins   like  mara-meins,
werks   like mard-werks  ,
lgort   like mard-lgort ,
labst   like mard-labst ,
maktx  like makt-maktx ,
END OF t_Mara.
DATA: it_Mara TYPE STANDARD TABLE OF t_Mara INITIAL SIZE 0,
      wa_Mara TYPE t_Mara.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid.
select-options  : p_mat  for  mara-matnr   ,
p_werks  for   mard-werks ,
p_lgort  for  mard-lgort.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
*&      Form  BUILD_FIELDCATALOG
*       Build Fieldcatalog for ALV Report
form build_fieldcatalog.
  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
*  fieldcatalog-do_sum      = 'X'.
*  fieldcatalog-no_zero     = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MATKX'.
  fieldcatalog-seltext_m   = 'Materail Text'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'WERKS'.
  fieldcatalog-seltext_m   = 'Plant'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'LGORT'.
  fieldcatalog-seltext_m   = 'Storage Location'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'LABST'.
  fieldcatalog-seltext_m   = 'Valuated Unrestricted-Use Stock'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Base Unit of Measure'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " build_fieldcatalog
*&      Form  BUILD_LAYOUT
*       Build layout for ALV grid report
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
*  gd_layout-totals_only        = 'X'.
*  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
*                                         "click(press f2)
*  gd_layout-zebra             = 'X'.
*  gd_layout-group_change_edit = 'X'.
*  gd_layout-header_text       = 'helllllo'.
endform.                    " BUILD_LAYOUT
*&      Form  DISPLAY_ALV_REPORT
*       Display report using ALV grid
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
*            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
*            i_callback_user_command = 'USER_COMMAND'
*            i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
*            it_special_groups       = gd_tabgroup
*            IT_EVENTS                = GT_XEVENTS
            i_save                  = 'X'
*            is_variant              = z_template
       tables
            t_outtab                = it_Mara
       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  DATA_RETRIEVAL
*       Retrieve data form EKPO table and populate itab it_Mara
form data_retrieval.
select mara~matnr mara~meins  mard~werks mard~lgort  mard~labst  makt~maktx  into  corresponding fields of  table  it_Mara
  from ( ( mara  join  mard  on   mard~matnr  =  mara~matnr   ) join
       makt  on   makt~matnr  =  mard~matnr )  where  mara~matnr in  p_mat
       and  mard~werks  in  p_werks
       and  mard~lgort  in p_lgort  .
endform.                    " DATA_RETRIEVAL
reward  points if it is usefull ...
Girish

Similar Messages

  • Want BW Report within Portal in Editable mode

    HI Gurus,
                  I hav created Bex Appln iView from Query string obtained from "Query Designer". Now I am able to view Selection screen. When I enter some values and execute Report gets generated. But this report is in Display mode.
                  My BW functional consultant want this report in Editable mode to update some fields. They are saying they are able to edit If they go to Bex analyzer (Execel Format).
                 Please suggest me probable solution. or what I am missing ?

    Values in a BW report cannot be changed.
    However a report from integrated planner can be.
    I expect your are on BI 7.0 with IP.
    You need to create a planning cube and additional Planning Levels.
    It is a rather different setup but you can read about it here.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/6e01a04e-0a01-0010-dfbe-951c2c39d169
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    Best Regards
    - Rasmus
    Please reward points if helpfull.

  • Someone used my email address to create an apple id. I changed the password because it is freaking me out. I want to report it to Apple but dont know how to go about it. I want the Apple ID deleted. How do I go about that?

    Someone used my email address to create an Apple ID. I logged in to appleid.apple.com and I changed the password because it is freaking me out. I want to report it to Apple but dont know how to go about it. I want the Apple ID deleted. How do I go about that? Is there also a way to ensure that the email address wont be used again by this person to create another Apple ID?
    This is compounded actually by a Gmail issue. I have had this email address for ages, since the start of the beta. But lately in the last year or so, I am getting mail that seems to be intended for other people but it is using my email address. It is probably one of them who created the Apple ID.

    Contact iTunes support: https://getsupport.apple.com/Issues.action

  • I want standard report to get material MATNR for Which PO isn't created

    hi
    i want standard report to get material no for which Purchase Order is not created.
    only those Material no for Which PO is not generated.
    thanks.

    Hi,
    go to me23n transaction and in the top extreme left click the
    Purchase order  tab it will show you a drop down list where you will have a option called other purch. order click this and enter the purchase order for which you want to know the exsistence of that purchase order.
    if Purchase order is present it will show the order otherwise it will through you an error message.
    hope this helps.

  • I want to report the theft of my iphone

    I want to report the theft of my iphone, block it and finds it

    Call the police.
    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • My MacBook pro got stolen last night. I want to report it. How do I go abt it.

    My MacBook pro got stolen last night. I want to report it to Apple
    (have made a police report)
    How do I go abt it?

    The Yellow Pages should have the phone of the Police Dept. Being it is not a life threatening situation, calling 911 seems an overkill.
    Apple does not have a law enforcement dept. Best you can do, IF you enabled Find My Mac and carry your stuff in a FileVault container, is Remote Wipe it clean to keep your info from the thieves claws and prevent an identity theft as well.

  • I want a report for Report analysis....

    i want a report for Report analysis....
    the require ment is like below...
    Selection
    From Date
    To date
    Set Up Data
    Bank Accounts           From—To
    Billing Accounts         From—To
    %  Operations  % Management % Research & Development
    Above % applies on Billed Amount.
    Report Need to be displayed
    SBU/Dept     OB Bank     Receipts     Payments     Balance     Accrued OB on Billing     Accrued on  Billing     Balance
    SBU1                                   
    SBU2                                   
    SBU3                                   
    SBU4                                   
    SBU5                                   
    SBU6                                   
    SBU7                                   
    SBU8

    Hi Sam
    As I said, you can tag variance of FG upto some extent to the COGS of FG...
    Also note that, w/o ML, variance is disposed off in the month of mfg, where as COGS comes in the month of sale... For eg: You mfr 100 Kgs @ Actual cost of 120, where as your std cost is 100... You sell 50 kgs in Month 1 and 50 kg in month 2
    In Month 1
    COGS = 50 (@ std cost)
    Variance = 20
    In Month 2
    COGS = 50
    Variance = 0
    Variance analysis w/o ML is always limited.. At best what you can do is draw your COPA reports on YTD (Year To Date) basis... Assuming that your closing and opening stock is more or less the same, your variance related to FG can now be analysed with COGS and revenues....
    Also, if your prod order for FG is tagged to sale order on account of MTO scenario, your COPA doc for variance will have customer info as well
    With ML in place
    Variance of SFG can be rolled upto FG... i.e. Say, variance in SFG is 20 USD... Std cost of FG is 125 USD... When you roll up the variance to FG, your FG valuation will become 145 USD....
    Also, if part of the FG is sold off, then prorata variance will go to Inventory and the rest can be taken to COGS.. i.e. not only FG, you can also revaluate your COGS with ML...
    Regards
    Ajay M

  • I have these three tables data and i want this report as given below

    here cpv means cash payment voucher<pre>i have voucher header tableVoucher Voucher Voucher Entry ID Type Date Date1 CPV 2014-12-10 16:47:00 0 2014-12-10 00:00:00
    1 CRV 2014-12-10 16:22:00 0 2014-12-10 00:00:00
    1 JV 2014-12-10 16:49:00 ccc 0 2014-12-10 00:00:00
    2 CPV 2014-12-10 16:51:00 sss 0 2014-12-10 00:00:00
    2 CRV 2014-12-10 16:59:00 0 2014-12-10 00:00:00
    2 JV 2014-12-20 14:31:00 0 2014-12-20 00:00:00
    3 CPV 2014-12-20 14:33:00 0 2014-12-20 00:00:00
    3 CRV 2014-12-13 15:02:00 0 2014-12-13 00:00:00
    3 JV 2014-12-13 15:02:00 0 2014-12-20 00:00:00
    4 CPV 2014-12-20 14:33:00 0 2014-12-20 00:00:00
    4 CRV 2014-12-13 15:13:00 0 2014-12-13 00:00:00
    4 JV 2014-12-23 00:21:00 0 2014-12-23 00:00:00
    5 CPV 2014-12-20 20:50:00 0 2014-12-20 00:00:00
    5 CRV 2014-12-14 23:39:00 0 2014-12-14 00:00:00
    5 JV 2014-12-23 00:24:00 0 2014-12-23 00:00:00
    6 CPV 2014-12-20 22:43:00 0 2014-12-20 00:00:00
    6 CRV 2014-12-14 23:40:00 0 2014-12-14 00:00:00 select VoucherID,VoucherType,Remarks ,Debit,Credit from voucherbody
    1 CRV fsdd 0.000000000 44.000000000
    1 JV xccc 4.000000000 4.000000000
    2 CRV sdf 0.000000000 40.000000000
    2 CPV ss 33.000000000 0.000000000
    1 CPV cxvx 43.000000000 0.000000000
    3 CRV 0.000000000 33.000000000
    4 CRV 0.000000000 200.000000000
    5 CRV 0.000000000 3444.000000000
    6 CRV 0.000000000 343333.000000000
    2 JV 300.000000000 300.000000000
    3 CPV 40000.000000000 0.000000000
    7 CRV 0.000000000 34.000000000
    8 CRV 0.000000000 4000.000000000
    9 CRV ss 0.000000000 3444.000000000
    4 CPV 345.000000000 0.000000000
    5 CPV 230.000000000 0.000000000
    3 JV 4000.000000000 4000.000000000
    6 CPV 2.000000000 0.000000000
    7 CPV 3432.000000000 0.000000000
    8 CPV 222.000000000 0.000000000
    9 CPV 2000.000000000 0.000000000
    10 CPV 233.000000000 0.000000000
    11 CPV 3444.000000000 0.000000000
    10 CRV 0.000000000 45555.000000000
    12 CPV 333.000000000 0.000000000
    13 CPV 344.000000000 0.000000000
    14 CPV 4555.000000000 0.000000000
    15 CPV 455.000000000 0.000000000
    16 CPV 2222.000000000 0.000000000
    17 CPV 333.000000000 0.000000000
    18 CPV ss 232.000000000 0.000000000
    19 CPV 222.000000000 0.000000000
    11 CRV 0.000000000 2222.000000000
    4 JV xx 200.000000000 200.000000000
    12 CRV 0.000000000 333.000000000
    20 CPV 3333.000000000 0.000000000
    13 CRV 0.000000000 3333.000000000
    14 CRV 0.000000000 4444.000000000
    5 JV 33.000000000 33.000000000
    21 CPV ssss 2222.000000000 0.000000000
    22 CPV wsss 2222.000000000 0.000000000
    23 CPV 22222.000000000 0.000000000
    24 CPV qqq 1111.000000000 0.000000000
    25 CPV 222.000000000 0.000000000
    26 CPV 2222.000000000 0.000000000
    15 CRV qqqq 0.000000000 11111.000000000
    16 CRV 0.000000000 2000.000000000
    27 CPV 10000.000000000 0.000000000
    28 CPV 23.000000000 0.000000000select AccountNo,AccountTitle,AccountType,OpeningDebit,OpeningCredit from AccountChart100001 Majid ASSET 2000.000000000 3000.000000000
    100002 Salman ASSET 2999.000000000 1000.000000000
    100003 Kamran ASSET 4000.000000000 4500.000000000
    100004 Arif ASSET 3000.000000000 2000.000000000
    100005 Aslam ASSET 2000.000000000 50000.000000000
    100006 Akram ASSET 30.000000000 454.000000000
    100007 Sohail ASSET 3.000000000 353.000000000
    100008 Kashif ASSET 78897.000000000 7879.000000000
    100009 Asif ASSET 4200.000000000 3242.000000000
    100010 Tajmul ASSET 1111123.000000000 3000.000000000
    100011 Kamran ASSET 3.000000000 113.000000000
    100012 Taswer ASSET 2000.000000000 1000.000000000
    100013 dfd ASSET 2000.000000000 1000.000000000
    100014 Tameer ASSET 3000.000000000 2000.000000000
    100015 No Name ASSET 5000.000000000 1999.000000000
    100016 Saleem ASSET 3339.000000000 9999.000000000
    100017 Awais ASSET 6000.000000000 4000.000000000
    100018 Abid ASSET 4000.000000000 1000.000000000
    200001 Muazam LIABILITY 500.000000000 0.000000000i want this report as given below from above tables account no AccountTitle accounttype Debit Credit1 CRV fsdd 0.000000000 44.0000000001 cash fsdd 44.000000000 0.000000000</pre>

    SELECT AC.AccountNo
    ,AC.AccountTitle
    ,AC.AccountType
    ,VB.Debit
    ,VB.Credit
    FROM voucherheader VH
    INNER JOIN voucherbody VB ON VH.VoucherID = VB.VoucherID
    INNER JOIN AccountChart AC ON AC.AccountNo = VH.AccountNohere voucher header has voucherID and not Accountnoit is showing error at vh.accountno

  • Does ipad have an activity log? I want to report on when it was on and being used?

    Does ipad have an activity log? I want to report on when it was on and being used?

    Hi, No but there are many 3rd party apps in the app store but it all depends what activity you need to monitor or log

  • I want to report a word error in the portuguese thunderbird. How do i do it?

    There's a word error on a question in the portuguese language of the mozilla thunderbird. I just want to report it and i don't know to who. When i try to eliminate a contact, a question will pop asking if i am sure that i want do delete it, and there's a word error on that question. No big deal but i thought you would like to correct that. Thank you.

    I think the formal procedure would be to file a bug to [https://bugzilla.mozilla.org/ Bugzilla], using key words like 'Thunderbird', 'Portuguese' and 'localization'. Additional information is given here:
    https://wiki.mozilla.org/L10n:Contribute

  • I want a report which gives leave approver for an employee

    HI All,
    Please help in this issue
    I want a report which gives leave approver for an employee.
    Thanks,
    Guddia

    Hi
    The report to get the leave approver is 'RPTARQ'.
    Enter the personnel no and the application ID which can be 'ESS_LR' and execute.
    Also, you may determine the same without using the report as a whole.
    Check the MSTBR field of the table PA0001 of the corresponding PERNR and you will get the supervisor of the employee who generally is the leave approver.
    Hope this helps.
    Harsh

  • I know a App Store Bug .. Want to report to Apple

    I know how to download a Paid -up for free without any code or any software .. I want to report to Apple abt it ..

    I don't want to know the 'trick'.
    Contact Apple at using one of the Contact Us links at the bottom of the page.
    You didn't get the nuance of my question.
    I was wonderering how anybody could download anything with using software of some sort.  That would be a neat trick!

  • I want interactive report

    i want interactive report (ALV"S)  to display customer header details in basic list and item list in secondary list by USING
    ALV"S
    Arjun marati

    Hi,
    REPORT  zs5.
    TABLES:t001w,   "  plants / branches
           mard.    "  Storage Location data for material
          marc.    "  plant data for material
    TYPE-POOLS:slis.
    SELECT-OPTIONS:s_werks FOR mard-werks.  "plant
    DATA:BEGIN OF it_mard OCCURS 0,
           werks LIKE mard-werks, " plant
           matnr LIKE mard-matnr, " material number
           lgort LIKE mard-lgort, " storage location
         END OF it_mard.
    DATA:BEGIN OF it_t001w OCCURS 0,
           werks LIKE t001w-werks,  "plant
           name1 LIKE t001w-name1,  "name
           ort01 LIKE t001w-ort01,  "city
         END OF it_t001w.
    DATA: temp_werks(4) TYPE c.
    DATA: it_listheader TYPE slis_t_listheader .
    DATA: hline TYPE slis_listheader.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: it_fieldcat1 TYPE slis_t_fieldcat_alv,
          wa_fieldcat1 TYPE slis_fieldcat_alv.
    DATA: it_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    DATA: wa_layout TYPE slis_layout_alv.
    START-OF-SELECTION.
      PERFORM get_data_from_mard.
      PERFORM populate_alv.
    *&      Form  get_data_from_mard
    FORM get_data_from_mard .
      SELECT  werks
             matnr
             lgort
      FROM mard INTO TABLE it_mard WHERE werks IN s_werks.
    ENDFORM.                    " get_data_from_mard
    *&      Form  populate_alv
    FORM populate_alv .
      PERFORM populate_fieldcat.
      PERFORM event_call.
      PERFORM populate_event.
      PERFORM build_listheader USING it_listheader.
      PERFORM call_alv_grid_display.
    ENDFORM.                    " populate_alv
    *&      Form  populate_fieldcat
    FORM populate_fieldcat .
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-icon = 'X'.
      wa_fieldcat-fieldname = 'WERKS'.
      wa_fieldcat-seltext_l = 'plant'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_fieldcat-col_pos = 2.
      wa_fieldcat-fieldname = 'MATNR'.
      wa_fieldcat-seltext_l = 'Material no'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_fieldcat-col_pos = 3.
      wa_fieldcat-fieldname = 'LGORT'.
      wa_fieldcat-seltext_l = 'Storage location'.
      APPEND wa_fieldcat TO it_fieldcat.
      wa_layout-zebra = 'X'.
      wa_layout-colwidth_optimize = 'X'.
    wa_layout-get_selinfos = 'X'.
    ENDFORM.                    " populate_fieldcat
    *&      Form  event_call
    FORM event_call .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_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
    FORM populate_event .
      READ TABLE it_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'TOP_OF_PAGE'.
        MODIFY it_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-form.
      ENDIF.
      READ TABLE it_events INTO wa_event WITH KEY name = 'USER_COMMAND'.
      IF sy-subrc EQ 0.
        wa_event-form = 'USER_COMMAND'.
        MODIFY it_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-name.
      ENDIF.
      ENDFORM.                    " populate_event
    *&      Form  build_listheader
    FORM build_listheader  USING    p_it_listheader.
      hline-info = 'PRIMARY LIST'.
      hline-typ = 'H'.
      APPEND hline TO it_listheader.
    ENDFORM.                    " build_listheader
    *&      Form  top-of-page
    FORM top-of-page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader.
    ENDFORM.                    "top-of-page
    *&      Form  call_alv_grid_display
    FORM call_alv_grid_display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = sy-repid
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP-OF_PAGE'
         i_grid_title                      = 'FIRST LIST'
         is_layout                         = wa_layout
         it_fieldcat                       = it_fieldcat
         it_events                         = it_events
        TABLES
          t_outtab                          = it_mard
       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.                    " call_alv_grid_display
    *&      Form  user_command
    FORM user_command USING r_ucomm TYPE sy-ucomm rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'WERKS'.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                input  = rs_selfield-value
              IMPORTING
                output = temp_werks.
            temp_werks = rs_selfield-value.
            PERFORM get_data_t001w.
            PERFORM populate_fieldcat_t001w.
            PERFORM event_call_t001w.
            PERFORM populate_event_t001w.
            PERFORM build_listheader_t001w USING it_listheader.
            PERFORM alv_grid_display_t001w.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " user_command
    *&      Form  get_data_t001w
    FORM get_data_t001w .
      SELECT werks
             name1
             ort01
      FROM t001w INTO TABLE it_t001w WHERE werks = temp_werks.
    ENDFORM.                    " get_data_t001w
    *&      Form  populate_fieldcat_t001w
    FORM populate_fieldcat_t001w .
    clear it_fieldcat1[].
      wa_fieldcat1-col_pos = 1.
      wa_fieldcat1-icon = 'X'.
      wa_fieldcat1-fieldname = 'WERKS'.
      wa_fieldcat1-seltext_l = 'plant'.
      APPEND wa_fieldcat1 TO it_fieldcat1.
      wa_fieldcat1-col_pos = 2.
      wa_fieldcat1-fieldname = 'NAME1'.
      wa_fieldcat1-seltext_l = 'Name'.
      APPEND wa_fieldcat1 TO it_fieldcat1.
      wa_fieldcat1-col_pos = 3.
      wa_fieldcat1-fieldname = 'ORT01'.
      wa_fieldcat1-seltext_l = 'City'.
      APPEND wa_fieldcat1 TO it_fieldcat1.
      wa_layout-zebra = 'X'.
      wa_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " populate_fieldcat_t001w
    *&      Form  event_call_t001w
          text
    -->  p1        text
    <--  p2        text
    FORM event_call_t001w .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_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_t001w
    *&      Form  populate_event_t001w
    FORM populate_event_t001w .
      READ TABLE it_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'TOP_OF_PAGE'.
        MODIFY it_events FROM wa_event TRANSPORTING form WHERE name = wa_event-form.
      ENDIF.
    ENDFORM.                    " populate_event_t001w
    *&      Form  build_listheader
    FORM build_listheader_t001w  USING    p_it_listheader.
      hline-info = 'SECONDARY LIST'.
      hline-typ = 'H'.
      APPEND hline TO it_listheader.
    ENDFORM.                    " build_listheader
    *&      Form  top-of-page_t001w
    FORM top-of-page_t001w.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader.
    ENDFORM.                    "top-of-page_t001w
    *&      Form  alv_grid_display_t001w
    FORM alv_grid_display_t001w .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = sy-repid
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = 'SECONDARY LIST'
         is_layout                         = wa_layout
         it_fieldcat                       = it_fieldcat1
         it_events                         = it_events
        TABLES
          t_outtab                          = it_t001w
       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.                    " alv_grid_display_t001w

  • I want the report which gives the material having Shelf life.

    I want the report which gives the material having Shelf life, but without batch management in the master .
    Thanks in adavnce...
    Vikrant

    Hi,
    Report MB5M can be used for this.

  • I want to report my telephone out of order

    i want to report my telephone out of order

    You will need to report the fault to Sky directly and the only way to do so is by phone.
    You can call from a mobile and the calls to the 03 numbers should be free with inclusive minutes or charged at local rates.
    You can also download the Sky Service App and call via it, should the wait be longer than 2 minutes you can request a call back (again this call should be free with inclusinve minutes or charged at a local rate)

  • OSystem Program Problem Detected Window, asks if I want to report this, then it asks for my Password ? is this ok ?

    I'm new to Ubuntu & Linuz OS. I've started to see a pop-up window that says: System Program Problem Detected- Do you want to report the problem. When I click yes, I'm asked to enter my password to access problem reports of system programs. Should I be asked for my password ???

    I am fairly new to Ubuntu, but that does not sound unexpected. Ubuntu tends to have everyone use a limited account that needs to ask for a password before carrying out operations like installing software.

Maybe you are looking for

  • WLC 5508 and 802.11n

    We are currently deploying multiple 3502 AP's and a WLC5508. Is it recommended to put the access points that are one the same site as the controller on H-REAP or put them on local mode. The WLC5508 has a max uplink of 8 Gb can that be a limitation wh

  • How to download one more time the purchased content?

    I purchased yesterday the OST of Fast Five, and unexpectedly I deleted it from my Mac. How to access it one more time?

  • X-Fi Fatal1ty IS IT POSSIBLE TO BUY WITH OUT BEING BRANDE

    Is it Possible to get an X-Fi Fatalty? with out it being branded by (EDITED) Fatalty? Its not fair being stuck with an Sound Blaster X-Fi Platinum ( with out the 64 RAM ) A Complete product Series Should not be Singled out just because of a bad gamme

  • I changed my password for my email and cannot pick up email on my iPad

    I changed my password on my imac and cannot pick up my email on my ipad??   How can I fix this?

  • Multiplexer Error Please help!!!!!

    I am trying to create a dual Layer DVD in iDVD which on two occasions has given me a Multiplexer error. This error tells me that it has happened during the formatting stage, the result of which, has rendered two Dual layer disks unusable. What is the