Abap-alv

which is triggered first in alv pgm? what is load of pgm

Processing Blocks in ABAP Programs
The following sections introduce you to the processing blocks supported in ABAP programs and explain how they are called. They can be called either from outside the ABAP program (as is the case for dialog modules and event blocks) or through ABAP commands which are themselves contained in processing blocks.
Dialog Modules
You call dialog modules from the screen flow logic (screen command MODULE). You can write a dialog module in an ABAP program for each state (PBO, PAI; user input) of any of the screens belonging to it. The PAI modules of a screen together with the PBO modules of the subsequent screen form a dialog step. The interaction between the flow logic and the screen is controlled by a dialog processor.
Dialog modules are introduced with the MODULEstatement and concluded with the ENDMODULE statement.
Fields on a dialog screen have the same name as a corresponding field in the ABAP program. Data is passed between identically-named fields in the program. You do notdefine dialog screens in the ABAP programs.
Event Blocks
Event blocks are called through events which are triggered by user actions on selection screens and lists or by the ABAP runtime environment. You only have to define event blocks for events to which you want the program to react (whereas a subroutine call, for example, must have a corresponding subroutine). This ensures that while an ABAP program may react to a particular event, it is not forced to do so.
Program Constructor
Directly after an executable program, a module pool, a function group or a subroutine pool has been loaded, a special processing block can be executed exactly once. This processing block is defined as an event block using the event keyword LOAD-OF-PROGRAM. The processing block for LOAD-OF-PROGRAM has the same function for ABAP programs as a constructor has for classes.
Event Blocks for Selection Screens
The different events in a selection screen (PAI, PBO, user input), are controlled by a selection screen processor. You can program processing logic for these events in your program. The selection screen processor controls the flow logic of the selection screen.
You do not have to create the screen flow logic yourself, neither can you create your own dialog modules for the PBO or PAI events . Data is passed between selection screen and ABAP program using the fields (parameters and selection tables) which you create in the selection screen definition in the declaration part of the ABAP program.
Event Blocks for Lists
You can create them in any processing block in an ABAP program using a special set of commands (such as WRITE, NEW-PAGE and so on). The list processor displays the list on the screen and handles user actions within lists. The list processor controls the flow logic of the list. You do not have to create the list flow logic yourself, neither can you create your own dialog modules for the PBO or PAI events .
You can call various event blocks while the list is being created which are used in page formatting. The above illustration contains the event block TOP-OF-PAGE, which is called from the ABAP program itself. When the list is displayed, the user can carry out actions which trigger event blocks for interactive list events (such as AT LINE-SELECTION). You can program processing logic for the interactive list events in your program. Data is transferred from list to ABAP program via system fields or an internal memory area called the HIDE area.
Event Blocks for Executable Programs (Reports)
When you run an executable program, it is controlled by a predefined process in the runtime environment. A series of processors is called, one after the other. These processors trigger events, for which you can define event blocks. Executable ABAP programs are event-driven.
The process is as follows:
       1.      The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
       2.      If there is a selection screen defined in the program, control returns to the selection screen processor. This generates the corresponding events and calls their event blocks.
       3.      Control then passes to the reporting processor. It creates the START-OF-SELECTION event and calls the corresponding event block (if it has been defined in the ABAP program).
       4.      The logical database, if you are using one, calls further event blocks at this point.
       5.      The reporting processor creates the END-OF-SELECTION event and calls the corresponding event block (if it has been defined in the ABAP program).
       6.      If the program contains a list description, control now passes to the list processor. The list processor displays the list defined in the ABAP program. It converts user actions on the list into events and calls the corresponding event blocks.
       7.      If a selection screen is declared in the declaration part of the program, the same program is automatically called again after the program is ended (the list is exited).
Procedures
Procedures are callable processing blocks which contain an interface and a local data area.
Subroutines
You call subroutines from ABAP programs using the PERFORMstatement.
Subroutines are introduced with the FORMstatement and concluded with the ENDFORMstatement.
You can define subroutines in any ABAP program. You can either call a subroutine that is part of the same program or an external subroutine, that is, one that belongs to a different program. If you call an internal subroutine, you can use global data to pass values between the main program and the subroutine. When you call an external subroutine, you must pass actual parameters from the main program to formal parameters in the subroutine.
Function Modules
Function modules are external functions with a defined interface. You call function modules from ABAP programs using the CALL FUNCTION statement.
Function modules are introduced with the FUNCTION statement and concluded with the ENDFUNCTION statement.
You can only create function groups within special ABAP programs called function groups using the Function Builder. This means that you can only call them externally from other ABAP programs. Unlike subroutines, you always pass data to function modules using an explicit parameter interface.
Methods
Methods describe the functions of classes. Like function modules, they have a defined interface. You call methods from ABAP programs using the CALL METHOD statement.
Methods are introduced with the METHOD statement and concluded with the ENDMETHOD statement.
Methods can only be defined in the implementation parts of classes. You can either do this globally in the Class Builder, or locally within ABAP programs. Methods can work with the attributes of their class and with data that you pass to them using their explicit parameter interface

Similar Messages

  • Issue regarding cell action in webdynpro for abap alv

    hello gurus,
           i have one requirement in webdynpro for abap alv.i have one alv table in that i have one coloun employee name.
    for that i have provided F4 help and that is editable field.if i select value from F4 help it is getting value correctly and it is showing properly at the same time it is allowing values entered manually insted of from F4 help.but as per my requiremnet it should not allow any manually entered values.how can i get this functinality. i am not aware indepth od WDA.
    could you go through my isssue and could you revert me some solution.
    thanks in advance.

    Hi,
       I dont think this is possible because when you can change the value using F4 then it would obviously be
       possible to enter manually.
       You can try using a drop down instead because in drop down you cannot enter values manually,
       But this would be good if the values that can be shown in drop down are very low, if the values are more
       then again user will face problems selecting values.
       Else you can try out what srinivas suggested, But dont know whether we can have two cell editors at a time
       inside a single cell of ALV. Please post the answer if you have found any other way to do it.

  • Import from excel in WD ABAP ALV

    Hi,
    Is there any ready made component e.g which shows Import data from excel to WD ABAP ALV.
    Kindly suggest.
    Best Regards
    Sid

    Sample codes:
    "Define the tables according to your import data,
    "or just define an structure,
    "and then define the internal table
    DATA IT_Map type table of ZYFIAccountMapCN.
    TYPE-POOLS: truxs.
    DATA F_Name(128) type C value 'd:\0927.xls'.
    DATA: it_raw TYPE truxs_t_text_data.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
      I_LINE_HEADER              =
        I_TAB_RAW_DATA             = it_raw
        I_FILENAME                 = F_Name
      TABLES
        I_TAB_CONVERTED_DATA       = IT_Map
    EXCEPTIONS
      CONVERSION_FAILED          = 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.

  • DIfference Between OOPS ALV and WEBDYNPRO FOR ABAP ALV?

    Hi to All,
    i want some information that What is main difference when we develop ALV Report in OOPS and WEBDYNPRO For ABAP.which is good n in what way it is good?
    In the Same way I m also want know that WHICH IS BETTER AMONG WEBDYNPRO FOR JAVA/ABAP.In which way?
    Regards,
    Ravi K

    Thanku for ur valuble Information.
    could u give me information regarding OOPS ALV and WEBDYNPRO FOR ABAP ALV?which is better?is there differences?
    Edited by: ravi k on Mar 26, 2008 12:23 PM

  • Web Dynpro ABAP ALV menu button icon image

    Hi
    Does anybody know how to add or link an image or an icon to a menu button in a
    Web Dynpro ABAP ALV view?
    I know how to do it in the alv table column but can't find a method for a menu button.
    Best regards
    Lars

    Hi
    Found the answer:
      DATA: lr_febutton TYPE REF TO cl_salv_wd_fe_button.
      lr_febutton->set_image_source( '@4B@' ).
    Just used a wrong class.
    Best regards
    Lars

  • How to upload file in webdynpro abap alv

    Hello Friends,
    how to upload file in webdynpro abap alv
    Regards
    Narendra
    Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
    Edited by: Thomas Zloch on Jun 6, 2011 11:55 AM

    Hi Narendra,
    You ahve to search before posting. This discussed many times.
    You need to use file upload ui element to upload data. and display in alv.
    Please go thorugh this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    Re: Upload .xls file in WDABAP
    http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
    Cheers,
    Kris.

  • WEBDYNPRO FOR ABAP ALV单元格的颜色问题

    WEBDYNPRO FOR ABAP 的 ALV 的某一个字段的单元格,现在需要把单元格的边框的颜色,改成红色,请问大家有做过的吗?

    看一看:http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPWebDynproALV-ChangeCellColourbasedonContent

  • Webdynpro ABAP - ALV how can i display Total of Column

    Hi friends,
    Webdynpro ABAP - ALV how can i display Total of Columns.
    Please tell me any metod is there or any solution.
    Thanks,
    Kumar.

    Hi
    You can take help of following code snippet to create totals for a particular column
    Data: lr_function_settings TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column          TYPE REF TO cl_salv_wd_column,
            lt_column type salv_wd_t_column_ref,
            ls_column type salv_wd_s_column_ref.
    Data:  lr_field_amnt type REF TO CL_SALV_WD_FIELD.
    * get reference of ALV component
      lr_salv_wd_table = wd_this->wd_cpifc_OVERVIEW_EARNED_ALV( ).
      wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
    *  get function settings
      lr_function_settings ?= wd_this->alv_config_table.
    * display columns in correct order
      lr_column_settings ?= wd_this->alv_config_table.
      lt_column = lr_column_settings->get_columns( ).
      loop at lt_column into ls_column.
    CASE ls_column-id.
    when 'AMOUNT'
    * aggregate field
            CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD
              EXPORTING
                FIELDNAME = 'AMOUNT'
              RECEIVING
                VALUE     = lr_field_amnt.
    * create aggregate rule as total
            CALL METHOD LR_FIELD_AMNT->IF_SALV_WD_AGGR~CREATE_AGGR_RULE
              EXPORTING
                AGGREGATION_TYPE = IF_SALV_WD_C_AGGREGATION=>AGGRTYPE_TOTAL
              RECEIVING
                VALUE            = lv_aggr_rule.
    endcase.
    Regards
    Manas DUa

  • How to delimit leading zero in vendor number in OO ABAP ALV without using conversion routine

    Hi,
    How to delimit leading zero in OO ABAP ALV without using conversion routine, because I have many fields like vendor, customer, material number etc..
    How to address this leading zero.
    I appreciate your quick response.
    Regards,
    Nalini S.

    Hi Nalini,
    Delimiting leading zeros in fields has to be done via conversion routines, as suggested by Vadamalai you need to pass on the conversion routine name in you field catalog variable.
    Now as to which object oriented approach are you using to have your table contents display in ALV as it matters  -
    Using FACTORY method of CL_SALV_TABLE class, or
    Using SET_TABLE_FOR_FIRST_DISPLAY method of CL_GUI_ALV_GRID class.
    Using FACTORY method of CL_SALV_TABLE will do your own work, no need to apply any conversion routines or set long/medium/short text for columns as we do in field catalogs!
    Cheers,
    Varun

  • Webdynpro abap ALV export to excel with images problem

    Hello experts,
    I'm having problems with standard excel export functionality in webdynpro abap ALV.
    In my table i have images taken from content server (employee photos) linked with URL to a table_cell Image, when i export the table to excel using standard function the images is showed as a broken picture with the following text:
    "The linked image cannot displayed. The file may have been moved, or deleted. Verify that the link points to the correct file and location."
    I'm running on sap basis 7.02 SP13 and implemented the notes 1975765 and 1985288 but not resolved this issue.
    Do you have any ideas?
    Thank you.

    Hi Jorge,
    Are you able to download the ICONs from alv table? try to use some icon source '~Icon/Add' and check out if you can download it to excel successfully.
    FYR:
    Regards,
    Rama

  • Merging of 2 Cells in WD ABAP ALV Header & Dynamically change the header

    Hello Experts,
    I have two main requirements with respect to WD ABAP - ALV report creation
    1) Two feilds in the  header of ALV GRID created in the WD ABAP screen must be merged as shown below(Month Column) ,
    |     January         |     February         |  
    |   Col 1 | Col2      |   Col 1 | Col2        |     
    2) The header value(Month) should dynamically change based on the current date.
    For Eg: If June 2011 is the current month , the ALV table should start from June 2011 and displayed till May 2012.
    Looking forward for your valuable inputs @ the earliest
    Regards,
    Sriram

    Hi Sriram,
    For merging..
    Pleaese go through this
    Merge of Cells in ALV table in ABAP webdynpro.
    ABAP WD: ALV merge cells
    For Header Change..
    How to set title/text for ALV table column header in WD ABAP
    Change column header in ALV to another DDIC Element type
    Change label of a column in ALV
    Cheers,
    Kris.

  • How we can sort subtotal results value in abap alv report

    Hi, How we can sort subtotal results value in abap alv report

    Thanks a lot for your code
    but i am still getting double and weird results.
    Subtotal     IN     PARTY              KGS        TOTAL VALUE
         1     40008     3,141.20     192,799.00
         1     40008     16,681.06     1,908,659.00
    Subtotal     1          19,822.25     2,101,458.00
         10     40022     4,590.60     531,228.00
         10     40022     3,448.27     377,173.00
    Subtotal     10          8,038.87     908,401.00
         100     40010     270.172     19,852.00
    Subtotal     100          270.172     19,852.00
         101     40036     752.898     61,051.00
         101     40036     207.586     19,431.00
    Subtotal     101          960.484     80,482.00
         102     40048     325.936     32,154.00
         102     40048     264.32     19,364.00
    Subtotal     102          590.256     51,518.00
         103     40066     216.134     18,088.00
    Subtotal     103          216.134     18,088.00
         104     40001     231.96     16,986.00
    Subtotal     104          231.96     16,986.00
         105     40021     585.918     65,461.00
         105     40021     108.683     15,825.00
    Subtotal     105          694.601     81,286.00
         106     40046     209.777     15,341.00
    Subtotal     106          209.777     15,341.00
         107     40043     167.353     14,755.00
    Subtotal     107          167.353     14,755.00
         108     40046     153.023     14,343.00
         108     40046     342.348     32,223.00
    Subtotal     108          495.371     46,566.00
         109     40008     184.085     13,483.00
    Subtotal     109          184.085     13,483.00
         11     40011     5,275.63     524,232.69
         11     40011     6,723.28     643,911.82
    Subtotal     11          11,998.90     1,168,144.51
         110     40067     142.113     13,333.00
         110     40067     492.883     44,428.00
    Subtotal     110          634.996     57,761.00
         111     40040     118.961     13,190.00
         111     40040     492.433     60,029.00
    Subtotal     111          611.394     73,219.00
    Edited by: Timaji Sawant on Feb 16, 2012 12:16 PM
    Edited by: Timaji Sawant on Feb 17, 2012 9:27 AM

  • WD ABAP ALV: filter in unsorted columns settings

    Hello WD ABAP experts,
    in a WD ABAP ALV Table, in settings, it is possible to filer in the "hidden columns" section for the column name. Unfortunately this filter is not possible in the "Sort" section, where I get only a list of unsorted columns. In a big table it is then hard to find the right columns.
    Can the filter somehow be generally enabled for settings->sort in "unsorted columns" ?
    thank you
    Johannes

    Hi Ragini,
    Please refer this thread: [alv total and subtotal|How to display graphs;.
    I hope it helps.
    Regards
    Arjun

  • WD Abap ALV Hierarchy

    Hi folks,
    i have an wd abap alv with table mode hierarchy, but i want to show the values in the non-hierarchy fields at the hierarchy-level.
    Is this not possible with WD ALV, with normal Table Control in WD Abap this is possible.
    kind regards,
    oliver

    Hi Jagruti,
    it's kind of simple, you just have to do 2 things:
    A) identify the table as hierarchy table:
    wd_this->go_table is the reference to wd alv object:
    wd_this->go_table->if_salv_wd_table_settings~set_display_type( if_salv_wd_c_table_settings=>display_type_hierarchy ).
    B) mark the columns you want to have as nodes  with following statement:
    ls_col is reference to the column!
              ls_col-r_column->if_salv_wd_column_hierarchy~set_hierarchy_column( value = abap_true ).
    oliver

  • WD Abap Alv With hierarchy

    hi folks,
    i use an wd abap alv with hierarchy, on EVENT CLICKED on a CELL never gives me the correct R_PARAM->INDEX back as it does without hierarchy.
    how can i find out the exactly row which is behind the clicked cell?????
    kind regards,
    oliver

    Hi Oliver,
      Hierarchy is one type of setting in WD ABAP not like in normal ALV. I think there is no way to set the lead selection index in the case of Hiearchy, why becuase you can able to select only the leaf nodes only not all the nodes in the hiearachy. For the leaf nodes you can make the lead selected node. Just try to access the leaf node and find out that how you are accesing depending on that you can set the leaf node as selected.
    1. This is link to ALV tutorial, ALV Demo
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9
    There are some standard examples also,
    2.Please refer to Package called as SALV_WD_DEMO .In this you will get ample of sample examples about ALV .
    3. Please search in SDN library you will ALV in WD ABAP you will get many pdfs avilable that will guide you to develope ALV application in WD ABAP.
    Hope this will help you.
    Cheers,
    Darshna.

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

Maybe you are looking for

  • Conver SAPscript data to PFD and send mail as attachement

    Hi all, I have reqirement as conver SAP script data to PDF and send id as attachemetn to respective email ids. I have data in t_tdline internal table after CLOSE_FORM. Now I'm able to convert to PDF and sending a mail (checking in SOST). But not able

  • Hide fields for IT0006 is not working correctly

    Hello all, I am trying to hide following fields in IT0006 for poland. P0006-TELNR P0006-ENTKM P0006-WKWNG P0006-BUSRT P0006-ENTK2 P0006-HSNMR P0006-POSTA I have set up feature p0006 properly iand selected right buttons in  T588M. There is no alternat

  • Horizontal display of column values

    HI All, I got a requirement in that i need to display one column horizontally Such as        abc     abc1     abc2     abc3     abc4 --->Second column in my table 1                          2                          3                          4--->F

  • I get uninstall set message error when downloading firefox 4

    everytime I download 4 I get this message on every page. When I uninstal 4 the message goes away. I really want to use 4 so if you could help me I would appreciate it.

  • SOLVED - Query help needed

    i want an sql query such that it can fetch elements which have only one entry in the table. For instance, say the table contains a record of the people who have borrowed books from a library. Name ---- Book ---- Date AA -------- B1 --------- xx AA --