• RELEVANCY SCORE 5.31

    DB:5.31:At Line Selection In Alv 8f




    how to handle the at line selection event using ALV?

    DB:5.31:At Line Selection In Alv 8f

    try themhttp://www.sap-img.com/abap/an-interactive-alv-report.htmhttp://www.erpgenie.com/sap/abap/code/abap26.htmRegards,Vikram Dev

  • RELEVANCY SCORE 4.94

    DB:4.94:At Line Selection In Alv 19





    Hi Experts,

    How can modify current line used in At line selection be replaced in ALV

    DB:4.94:At Line Selection In Alv 19


    Check out this :

    Possible functionalities in ALV

    Regards

    Neha

  • RELEVANCY SCORE 4.84

    DB:4.84:Alv With Two Container On One Page ja





    Hi,

    I want to create an ALV which displays certain records , and when I select any records I want another ALV report for the related line selected on the same page having selection enabled as first alv, please suggest how to do it, or send some sample code

    thanks

  • RELEVANCY SCORE 4.83

    DB:4.83:Multiple Line Selection In Alv 7d



    Hi All,

    I have an alv report. In which, i have to get the selected row index values in return. Those selected row index will be used for further processing. I do not need check box selection, as ALV provide that inbuilt facility. Please tell me the parameter name.

    It is urgent.

    Regards

    Gajendra

    DB:4.83:Multiple Line Selection In Alv 7d


    Hi,

    Your Call to ALV

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = sy-cprog

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND1'

    I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

    IS_LAYOUT = wa_layout

    IT_FIELDCAT = it_fieldcat

    T_OUTTAB = it_rfq

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    Implement a Form Routine with the name you gave for the I_CALLBACK_USER_COMMAND

    eg.,

    FORM user_command1 using ucomm type sy-ucomm

    selfield type slis_selfield.

    case ucomm.

    when 'IC1'.

    read table it_rfq into wa_rfq index selfield-tabindex.

    if sy-subrc eq 0.

    if selfield-fieldname = 'EBELN' " EBELN is the fieldname in Fieldcat

    Do the necessary coding to call the screen here

    endif.

    endif.

    ENDFORM.

    regards,

    Omkar.

  • RELEVANCY SCORE 4.83

    DB:4.83:Alv Selection In Cliam Recon Report p9



    Hello All,

    In Cliam Recon report ( RPCLMSU0 ), we are not able to select the ALV type from the ALV selection field in the report selection screen.

    We are in ECC 5.0.

    Thanks for any responses.

    Chakri.

    DB:4.83:Alv Selection In Cliam Recon Report p9


    The same thing happens for us, and we are on ECC 6.0. However, you can run the program without selecting anything for that field. Once you are in the report, go to the top menu and choose "Settings - Layout - Choose...". This will give you a pop-up with selections. You can choose All, Global, or User-specific for the Layout Setting and then choose a layout from the table below. I hope this helps.

    Actually, it looks like there might be a coding error in the program. The same form is used for the value request on that field as is used to check whether an entered variant exists. That form doesn't fill anything in if the field is initial, it just looks to see if something that was entered already exists. If you look at the source code you will see that the same form is used for "AT SELECTION-SCREEN ON VALUE-REQUEST FOR sv_alvar" as is used for "AT SELECTION-SCREEN". You may want to consider opening a note with SAP about this.

    - April King

    Message was edited by:

    April King

  • RELEVANCY SCORE 4.63

    DB:4.63:Problem With Call Transaction kx



    Hi guys,

    In my alv report if i select a line and click a button in the toolbar,then the transaction MF47 will gets executed in the background by taking the material no in the selected line.I used bdc recording when the button is clicked.this is working fine it is taking the material no in the selection screen of transaction MF47 and getting executed.When i click back button in that screen it should come back directly to the alv report again but it going to the intial selection screen of transaction MF47.

    Any suggestions.

    DB:4.63:Problem With Call Transaction kx


    I think this is a report which you are calling (Currently i do not have access to SAP so i will not be able to check). Try using SUBMIT and RETURN. This should work.

  • RELEVANCY SCORE 4.42

    DB:4.42:Alv Report - Production Scheduling Report cf



    Hello Gurus,

    I need to write an ALV report of open production order operations per selection criteria. If the production orders are linked to any sales order, then the result of ALV should also contain the sales order data.

    Selection screen should contain -

    Plant(required), Production order number(optional), Material number (optional), Work center (optional).

    If the system statuses of the production orders are not TECO, CLSD, DV then they are considered as open.

    The ALV report should contain the following fields.

    SO Number, PO Nbr, Ship-to-address, Material availability date, Req ship date, Last confirmed date, Ship via, Sales order line item, Pro Ord Nr, Plant, Pro ord cre date, Material Nbr, Material desc, Order qty, UOM, Sch Start date, Sche finish date, user status, MRP ctrler, Remaining hrs etc.

    Please guide me how to proceed to achieve the required report.

    Regards,

    B

    DB:4.42:Alv Report - Production Scheduling Report cf


    Vijay,

    Iam new to ABAP. Can you briefly tell me the flow I need to follow to achieve the requirement. I mean, what structures I need to define and then how I should proceed further.

    Regards,

    B

  • RELEVANCY SCORE 4.34

    DB:4.34:What Is % In A Abap Code? 91



    i have a report which uses % everywhere.

    No idea what that means?

    part of the code is like this..

    DATA %data_selected(1).

    DATA %glframe(1) VALUE 'X' .

    DATA %uflag(1).

    DATA %ustflag(1).

    SELECTION-SCREEN: BEGIN OF LINE.

    PARAMETERS: %alv RADIOBUTTON GROUP func USER-COMMAND outbut

    DEFAULT 'X' .

    SELECTION-SCREEN: COMMENT 4(26) text-f72 FOR FIELD %alv.

    PARAMETERS: %alvl TYPE slis_vari.

    SELECTION-SCREEN: PUSHBUTTON 72(4) pb%exco USER-COMMAND expcol.

    SELECTION-SCREEN: END OF LINE.

    DB:4.34:What Is % In A Abap Code? 91


    % character can be used in naming convection, so it is used by some programmers to name elements variable etc

    not much to get confused

  • RELEVANCY SCORE 4.34

    DB:4.34:Alv j3


    Hi,Is it possible to bring alv top of page dynamically with respect to selection screen parameters.Thanks in advance,Suchithra.

    DB:4.34:Alv j3


    Hi Suchitra,

    Yes. you can do it .
    1. create one parameter .

    parameters:p_param type char4.

  • RELEVANCY SCORE 4.34

    DB:4.34:Alv 17



    Hi,

    I am displaying some data in alv using slis layout.

    I have a selection button in the output.

    At present user is able to select multiple lines, i want to restrict it to single line.

    Please help me.

    Regards,

    Nishant

    DB:4.34:Alv 17


    Hi,

    Think u need to use check box for selection..

    Re: ALV checkbox

    How to use the alv function module

    TYPE-POOLS:slis.

    TABLES:ekko.

    SELECT-OPTIONS:so_ebeln FOR ekko-ebeln.

    PARAMETERS: VARIANT LIKE DISVARIANT-VARIANT.

    DATA:BEGIN OF it_ekko OCCURS 0,

    ebeln LIKE ekko-ebeln, "PURCHASE DOCUMENT NUMBER

    bukrs LIKE ekko-bukrs, "COMPANY CODE

    bstyp LIKE ekko-bstyp, "PURCHASE DOCUMENT CATEGORY

    bsart LIKE ekko-bsart, "PUCHASE DOCUMENT TYPE

    END OF it_ekko.

    *FIELD CATALOG AND EVENT CATALOG TABLE DECLARATION.

    DATA:i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,

    i_eventcat TYPE slis_t_event WITH HEADER LINE,

    I_LAYOUT TYPE SLIS_LAYOUT_ALV .

    ZDLAYOUT1 TYPE SLIS_LAYOUT_ALV .

    DATA:W_VARIANT LIKE DISVARIANT,

    W_VARIANT1 LIKE DISVARIANT.

    INITIALIZATION.

    MOVE: SY-REPID TO W_VARIANT-REPORT,

    SY-REPID TO W_VARIANT1-REPORT.

    CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'

    EXPORTING

    I_SAVE = 'A'

    CHANGING

    cs_variant = W_VARIANT.

    MOVE W_VARIANT-VARIANT TO w_VARIANT1.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR VARIANT.

    DATA: L_EXIT.

    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

    EXPORTING

    is_variant = W_VARIANT1

    I_TABNAME_HEADER =

    I_TABNAME_ITEM =

    IT_DEFAULT_FIELDCAT =

    I_SAVE = 'A'

    I_DISPLAY_VIA_GRID = ' '

    IMPORTING

    E_EXIT = L_EXIT

    ES_VARIANT = W_VARIANT.

    START-OF-SELECTION.

    *INTERNAL TABLE POPULATION

    SELECT ebeln

    bukrs

    bstyp

    bsart

    FROM ekko

    INTO TABLE it_ekko

    WHERE ebeln IN so_ebeln.

    *POPULATING FIELD CATALOG BY USING FUNCTION MODULE

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    i_program_name = sy-cprog

    i_internal_tabname = 'IT_EKKO'

    i_inclname = sy-cprog

    CHANGING

    ct_fieldcat = i_fieldcat[].

    *DISPLAYING ALV GRID WITH MULTIPLE LAYOUTSETS

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = SY-CPROG

    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 = 'ZDLAYOUT1'

    IT_FIELDCAT = I_FIELDCAT[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = 'A' "'U' "'X'

    IS_VARIANT = 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_EKKO.

    Regards,

    Arunsri

  • RELEVANCY SCORE 4.22

    DB:4.22:Cl_Gui_Alv_Grid - Disable Line To Select x7



    Hi,

    I have ALV Grid referencing to class CL_GUI_ALV_GRID.

    The selection mode is multiple.

    Is it possible to force the ALV that only some lines may be selectable ?

    Means: Display 15 lines but only line 1,2,3,4,10,12 and 15 are selectable by the user.

    Thanks a lot.

    Achim

    DB:4.22:Cl_Gui_Alv_Grid - Disable Line To Select x7


    Yes, I thought that to myself, John.

    Nevertheless thanks a lot.

    Achim

  • RELEVANCY SCORE 4.21

    DB:4.21:How To Capture Check Box Click In Alv 3a



    Hi,

    I have requirement in which after displaying the ALV out put, immediately when the check box is checked i need to capture it and proceed with further coding with that input.

    Check box click is not getting captured in "USER COMMAND or LINE SELECTION"

    Could you please suggest a way.

    Regards

    venkatesh.

    DB:4.21:How To Capture Check Box Click In Alv 3a


    Continue.....

    *---------------------------------------------------------------------
    * Form USER_COMMAND
    *---------------------------------------------------------------------

    *text
    *----------------------------------------------------------------------

    *--R_UCOMM text
    *--RS_SELFIELD text
    *----------------------------------------------------------------------
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.

    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = REF_GRID.
    ENDIF.
    IF NOT REF_GRID IS INITIAL.
    CALL METHOD REF_GRID-CHECK_CHANGED_DATA .
    ENDIF.

    loop at itab where chk = 'X'.
    itab-color = 'C300'.
    modify itab index sy-tabix transporting color.
    endloop.
    RS_SELFIELD-refresh = 'X'.
    break-point.

    ENDFORM. "USER_COMMAND

  • RELEVANCY SCORE 4.13

    DB:4.13:Selecting And Refreshing Individual Line In Alv Grid Report 7m


    Hi AllI have ALV grid output and 1 user button (POST) in application toolbar.I want to know which property I should set in ALV grid so that I am able to select a line and POST it and then that line gets removed from ALV output.I know how to get the ALV report refreshed but I am not sure of how to identify the line which is highlighted by selection and how can we give accroding effect in the internal table which we are displaying.Amol

    DB:4.13:Selecting And Refreshing Individual Line In Alv Grid Report 7m

    Hi Amol, for selecting a single row we can declare one variable in our internal table with charecter type and in layout we can give this field name as box type. Check the below code.
    ----Data Declaration
    DATA: BEGIN OF it_base_data OCCURS 0,
    mark,
    vbeln LIKE vbak-vbeln, " SALES DOCU NO
    End of it_base_data.

    gs_layout-box_fieldname = 'MARK'.

    in ALV User Command loop the Internal table where Marx = 'X' and delete that line. and for refresh as U Know Put ps_selfield-refresh = 'X'.

  • RELEVANCY SCORE 4.06

    DB:4.06:Alv Selection Not Displayed/Shown 38


    Hello,I have a question concerning the ALV:In NW 7.0 everything was fine and working, as of EhP1 the selection for one ALV is not displayed....the selection is done alright and also corresponding events are raised. Nevertheless there is no visual representation for a selection - meaning the yellow/orange highlighting of a selected line. It is neither done for the lead selection nor for "normal" selections.Other ALV in the same application (though different component) work fine and as far as I can tell all are initilized similarly.Does anyone know this effect and - most important - how to correct it?Regards,Robert

    DB:4.06:Alv Selection Not Displayed/Shown 38

    Hello all,We were able to solve the issue of selections not being visible - although they are correctly set in ALV/context.- The default view of the window has to be set to the ALV usage!Don't ask me why, but in case the default setting is on the empty view, no selections will be visible on the UI. As soon as you set the ALV usage as default, the selections will be visible again.Kind Regards,Robert

  • RELEVANCY SCORE 4.01

    DB:4.01:Oo Alv On Selection-Screen zx



    Hi,

    Is it possible to display a OO ALV on the same screen as the selection parameters ?

    At first only have the selection-screen, and after validation, display the ALV at the end of the screen ?

  • RELEVANCY SCORE 4.00

    DB:4.00:Variant In Alv Selection Screen f9


    Hi friends, How to protect a variant in ALV selection screen from changing or deleting by other users.Thanks,Rajesh

    DB:4.00:Variant In Alv Selection Screen f9

    Hi,When you pass parameter value in FM in ALV for i_save'X': global saving only'U': user-specific saving only'A': corresponds to 'X' and 'U'SPACE: no savingHope this helps you.Regards,Tarun

  • RELEVANCY SCORE 3.99

    DB:3.99:How To Keep Selection (Or Select) The Row Of Sorted Alv Table? 8p



    Dear Experts,

    I have WD ALV table with grouped and therefore sorted layout. I know that sorted ALV beahve differently.

    The problem is that if the values in cell is updated (setting attribute of selected element of context node bound to the ALV table), then the whole table is redrawn and selection disappears. It does not happen when layout of ALV is not sorted/grouped.

    I need somehow to select the ALV line again. Method MOV_To of IF_WD_CONTEXT_NODE for some reason is not working in sorted ALV (it selects element on node but not in ALV table). And in ALV Interface controller I also could not find anything usefull.

    Thanks.

    Best regards,

    Dmitry.

    DB:3.99:How To Keep Selection (Or Select) The Row Of Sorted Alv Table? 8p


    Hi, I solved keeping the row selection by adding an extra column just to hold information that such row is understood as selected.

    I have written a blog post (including source code) because I've faced similar problem: ABAP - ALV Context menu + keep row selection after a filter is applied

    So if you find it useful, please feel free to re-use it

  • RELEVANCY SCORE 3.85

    DB:3.85:Catch Checkbox In Heirachycal Alv ma



    Hi All

    I am Displaying my output in Heirachycal ALV. It has checkbox at header and item level. I need a functionality that is user selects checkbox at header, all the line item checkboxes should get selected.

    I need a event or something to catch the checkbox selection. Because checkbox selection doesnt fire user command..

    Could you please hepl me on this issue.

    Thanks.

    DB:3.85:Catch Checkbox In Heirachycal Alv ma


    Hello Uwe , Im sorry but what does the variable checked means in your program , I moved a 'X' to it but once i click the check and is marked i cant unmark the checkbox. could you help me please.?

  • RELEVANCY SCORE 3.84

    DB:3.84:Alv Grid Multiple Row Selection, Disabling Some d7



    Does anyone know if it is possible to have an ALV grid with multiple row selection allowed but for some rows the row selection is disabled?

    Kind regards,

    John.

    DB:3.84:Alv Grid Multiple Row Selection, Disabling Some d7


    This is possible there is an event to handle this situation

  • RELEVANCY SCORE 3.81

    DB:3.81:How To Create Multiple Selection Screen In Alv 93



    Hi,

    Can anybody tell me how to create the Multiple Selection screen in ALV reports.

    Plse give me code sample if possible.

    Thanks in advance

    KP

    DB:3.81:How To Create Multiple Selection Screen In Alv 93


    hi

    you cannot create selection.screen in ALV.

    Can you explain ur problem more clearly??

    Cheers,

    Hakim

  • RELEVANCY SCORE 3.81

    DB:3.81:Calling Alv Report In Bapi 37


    Hi All There ,I am calling ALV report in my bapi but it is not gettin called it is not giving screen of parameter selection derectly selectin all parametercoding is as belowpoints assured.Data: MTAB_REPORT_HTML type standard table of W3HTML WITH HEADER LINE.Submit ZSDRUSHORDERSRPT with SELECTION-TABLE SELTAB exporting list to Memory and return.CALL FUNCTION 'LIST_FROM_MEMORY' TABLES listobject = list_tab EXCEPTIONS not_found = 1 OTHERS = 2.CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT' EXPORTING TEMPLATE_NAME = 'WEBREPORTING_REPORT' CHARSET = 'UTF8' TABLES html = MTAB_REPORT_HTML listobject = list_tab.FREE MEMORY.CLEAR LIST_TAB[].loop at MTAB_REPORT_HTML. concatenate htmlstring MTAB_REPORT_HTML-LINE into htmlstring.endloop.

    DB:3.81:Calling Alv Report In Bapi 37

    by using via selection screen I am getting the screen but couldn't excecute program from that screenpl help out me cause of this i may not solved my probleRegardsShashi

  • RELEVANCY SCORE 3.81

    DB:3.81:Selected Line Alv Oo sf



    Hello

    i need put a line selected when the alv appear , which method make it

    this alv is OO

    thank

    DB:3.81:Selected Line Alv Oo sf


    Look in online help for :
    cl_gui_alv_grid-set_selected_rows (ALV Grid Control (BC-SRV-ALV), Methods of Class CL_GUI_ALV_GRID, set_selected_rows.)cl_salv_selections-set_selected_rows (SAP NetWeaver by Key Capability, Application Platform by Key Capability, ABAP Technology, UI Technology, SAP GUI Technology, SAP List Viewer (ALV), Selecting Cells, Rows and Columns.)

    Regards,

    Raymond

  • RELEVANCY SCORE 3.79

    DB:3.79:At Line Selection On Alv Grid ca



    Hi guys: I need to double click on a field in the ALV report that should bring up another structure (which I have created) called s_det

    s_det has only document number company code.

    Please provide the code for doing this in ALV. I know I cant use At Line Selection. Please give me simple code.

    thanks so much

    Brian

    DB:3.79:At Line Selection On Alv Grid ca


    Hi

    take this as an example for ur solution.

    In this if we double click on first level display then it opens second level display.Just have a look on the following code.

    This is Interactive ALV report of displaying each row with colours and Headers.

    TYPE-POOLS SLIS.

    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,

    L_COLOR(4) TYPE C,

    END OF I_EKKO.

    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,

    WA_EKKO TYPE I_EKKO.

    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,

    L_COLOR1(4) TYPE C,

    END OF I_EKPO.

    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,

    WA_EKPO TYPE I_EKPO.

    DATA: V_REPID TYPE SY-REPID,

    I_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,

    WA_FLDCAT TYPE SLIS_FIELDCAT_ALV,

    I_EVENTS TYPE SLIS_T_EVENT,

    WA_EVENT TYPE SLIS_ALV_EVENT,

    GD_LAYOUT TYPE SLIS_LAYOUT_ALV,

    GD_LAYOUT1 TYPE SLIS_LAYOUT_ALV.

    DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST ALV REPORT',

    I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDARY ALV REPORT'.

    INITIALIZATION.

    V_REPID = SY-REPID.

    PERFORM FLDCATALOG.

    PERFORM CALL_EVENTS.

    PERFORM POPULATE_EVENT.

    PERFORM BLD_LAYOUT.

    PERFORM BLD_LAYOUT1.

    START-OF-SELECTION.

    PERFORM DATA_RETRIEVAL.

    PERFORM DISPLAY_ALV_REPORT.

    FORM FLDCATALOG.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'EBELN'.

    WA_FLDCAT-SELTEXT_M = 'PO NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'AEDAT'.

    WA_FLDCAT-SELTEXT_M = 'DATE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'BUKRS'.

    WA_FLDCAT-SELTEXT_M = 'DOCUMENT TYPE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'LIFNR'.

    WA_FLDCAT-SELTEXT_M = 'VENDOR CODE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    ENDFORM.

    FORM CALL_EVENTS.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = I_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.

    FORM POPULATE_EVENT.

    *READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    *IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'TOP_OF_PAGE'.

    MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-FORM.

    *ENDIF.

    READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

    IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'USER_COMMAND'.

    MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-NAME.

    ENDIF.

    ENDFORM.

    FORM BLD_LAYOUT.

    GD_LAYOUT-INFO_FIELDNAME = 'L_COLOR'.

    ENDFORM.

    FORM DATA_RETRIEVAL.

    DATA LN_COLOR(1) TYPE C.

    SELECT EBELN AEDAT BUKRS BSART LIFNR

    FROM EKKO INTO TABLE IT_EKKO.

    LOOP AT IT_EKKO INTO WA_EKKO.

    LN_COLOR = LN_COLOR + 1.

    IF LN_COLOR = 8.

    LN_COLOR = 1.

    ENDIF.

    CONCATENATE 'C' LN_COLOR '11' INTO WA_EKKO-L_COLOR.

    MODIFY IT_EKKO FROM WA_EKKO.

    ENDLOOP.

    ENDFORM.

    FORM DISPLAY_ALV_REPORT.

    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 = '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_EKKO

    I_GRID_SETTINGS =

    IS_LAYOUT = GD_LAYOUT

    IT_FIELDCAT = I_FLDCAT[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = 'A'

    IS_VARIANT =

    IT_EVENTS = I_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

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS =

    IT_HYPERLINK =

    IT_ADD_FIELDCAT =

    IT_EXCEPT_QINFO =

    IR_SALV_FULLSCREEN_ADAPTER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    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.

    FORM TOP_OF_PAGE.

    DATA: T_HEADER TYPE SLIS_T_LISTHEADER,

    WA_HEADER TYPE SLIS_LISTHEADER.

    WA_HEADER-TYP = 'H'.

    WA_HEADER-INFO = 'THIS IS MY FIRST ALV'.

    APPEND WA_HEADER TO T_HEADER.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = T_HEADER

    I_LOGO =

    I_END_OF_LIST_GRID =

    I_ALV_FORM =

    .

    ENDFORM.

    FORM USER_COMMAND USING R_COMM TYPE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_COMM.

    WHEN 'IC1'.

    READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.

    PERFORM FLDCAT_EKPO.

    PERFORM CALL_EVENT_EKPO.

    PERFORM POPULATE_EVENT_EKPO.

    PERFORM DATA_RETRIEVAL_EKPO.

    PERFORM DISPLAY_ALV_REPORT_EKPO.

    ENDCASE.

    ENDFORM.

    FORM FLDCAT_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'EBELN'.

    WA_FLDCAT-SELTEXT_M = 'PO NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'EBELP'.

    WA_FLDCAT-SELTEXT_M = 'LINE NO'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MATNR'.

    WA_FLDCAT-SELTEXT_M = 'MATERIAL NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MENGE'.

    WA_FLDCAT-SELTEXT_M = 'QUANTITY'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MEINS'.

    WA_FLDCAT-SELTEXT_M = 'BASE UNIT OF MEASURE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'NETPR'.

    WA_FLDCAT-SELTEXT_M = 'PRICE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    ENDFORM.

    FORM CALL_EVENT_EKPO.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = I_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.

    *FORM POPULATE_EVENT_EKPO.

    *

    *READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    *IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'TOP_OF_PAGE'.

    MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-FORM.

    *ENDIF.

    *

    *ENDFORM.

    FORM BLD_LAYOUT1.

    GD_LAYOUT1-INFO_FIELDNAME = 'L_COLOR1'.

    ENDFORM.

    FORM DATA_RETRIEVAL_EKPO.

    DATA LN_COLOR1(1) TYPE C.

    SELECT EBELN EBELP MATNR MENGE MEINS NETPR

    INTO TABLE IT_EKPO

    FROM EKPO.

    LOOP AT IT_EKPO INTO WA_EKPO.

    LN_COLOR1 = LN_COLOR1 + 1.

    IF LN_COLOR1 = 8.

    LN_COLOR1 = 1.

    ENDIF.

    CONCATENATE 'C' LN_COLOR1 '11' INTO WA_EKPO-L_COLOR1.

    MODIFY IT_EKPO FROM WA_EKPO.

    ENDLOOP.

    ENDFORM.

    FORM DISPLAY_ALV_REPORT_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 = ' '

    I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE1'

    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 = GD_LAYOUT1

    IT_FIELDCAT = I_FLDCAT[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = 'A'

    IS_VARIANT =

    IT_EVENTS = I_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

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS =

    IT_HYPERLINK =

    IT_ADD_FIELDCAT =

    IT_EXCEPT_QINFO =

    IR_SALV_FULLSCREEN_ADAPTER =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    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.

    FORM TOP_OF_PAGE1.

    DATA: T_HEADER1 TYPE SLIS_T_LISTHEADER,

    WA_HEADER1 TYPE SLIS_LISTHEADER.

    WA_HEADER1-TYP = 'H'.

    WA_HEADER1-INFO = 'SECONDARY ALV LEVEL'.

    APPEND WA_HEADER1 TO T_HEADER1.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = T_HEADER1

    I_LOGO =

    I_END_OF_LIST_GRID =

    I_ALV_FORM = .

    ENDFORM.

    reward points,if it is useful.

    Thanks,

    chandu.

  • RELEVANCY SCORE 3.78

    DB:3.78:Defaulting Alv Graph From Bar To Line Type 19



    Hi,

    Is it possible to default the ALV graphic to line type from bar chart...

    Surendra

    DB:3.78:Defaulting Alv Graph From Bar To Line Type 19


    hey surendernath,

    i think u can check below these may be useful for u

    You can do this using the FM GFW_PRES_SHOW

    Check the sample program : DEMO_GFW_PRES_SHOW.

    check once GRAPH_MATRIX_2D

    Hope this link proves useful:

    http://help.sap.com/saphelp_erp2005/helpdata/en/7e/daf830b46411d2961200a0c9308b1f/frameset.htm

    i thins this info is useful for u

    Regards

    naveen

  • RELEVANCY SCORE 3.78

    DB:3.78:At Line-Selection Event In Blocked Alv fx


    Hi friends ,i have created blocked ALV and Simple ALV report.i wanted to use At line-selection event .if anybody knows please let me know.]thanks and regards,shridevi

    DB:3.78:At Line-Selection Event In Blocked Alv fx

    hi .Thanks for your answer.you have sent program without perform statment.can u send some other example or can you tell where to use that function module.thanks and regards,shridevi.

  • RELEVANCY SCORE 3.73

    DB:3.73:Interactive Alv cm


    how to use top-of-page during line-selection in alv?I want the sample code also

    DB:3.73:Interactive Alv cm

    This is a basic ALV with the followings:- - Page Heading - Page No - Sub-Total - Grand Total REPORT ZALV. TYPE-POOLS: SLIS. DATA: G_REPID LIKE SY-REPID, GS_PRINT TYPE SLIS_PRINT_ALV, GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER, GT_EVENTS TYPE SLIS_T_EVENT, GT_SORT TYPE SLIS_T_SORTINFO_ALV, GS_LAYOUT TYPE SLIS_LAYOUT_ALV, GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, FIELDCAT_LN LIKE LINE OF GT_FIELDCAT, COL_POS TYPE I. DATA: BEGIN OF ITAB, FIELD1(5) TYPE C, FIELD2(5) TYPE C, FIELD3(5) TYPE P DECIMALS 2, END OF ITAB. DATA: BEGIN OF ITAB1 OCCURS 0. INCLUDE STRUCTURE ITAB. DATA: END OF ITAB1. DATA: BEGIN OF ITAB_FIELDCAT OCCURS 0. INCLUDE STRUCTURE ITAB. DATA: END OF ITAB_FIELDCAT. Print Parameters PARAMETERS: P_PRINT AS CHECKBOX DEFAULT ' ', "PRINT IMMEDIATE P_NOSINF AS CHECKBOX DEFAULT 'X', "NO SELECTION INFO P_NOCOVE AS CHECKBOX DEFAULT ' ', "NO COVER PAGE P_NONEWP AS CHECKBOX DEFAULT ' ', "NO NEW PAGE P_NOLINF AS CHECKBOX DEFAULT 'X', "NO PRINT LIST INFO P_RESERV TYPE I. "NO OF FOOTER LINE INITIALIZATION. G_REPID = SY-REPID. PERFORM PRINT_BUILD USING GS_PRINT. "Print PARAMETERS START-OF-SELECTION. TEST DATA MOVE 'TEST1' TO ITAB1-FIELD1. MOVE 'TEST1' TO ITAB1-FIELD2. MOVE '10.00' TO ITAB1-FIELD3. APPEND ITAB1. MOVE 'TEST2' TO ITAB1-FIELD1. MOVE 'TEST2' TO ITAB1-FIELD2. MOVE '20.00' TO ITAB1-FIELD3. APPEND ITAB1. DO 50 TIMES. APPEND ITAB1. ENDDO. END-OF-SELECTION. PERFORM BUILD. PERFORM EVENTTAB_BUILD CHANGING GT_EVENTS. PERFORM COMMENT_BUILD CHANGING GT_LIST_TOP_OF_PAGE. PERFORM CALL_ALV. FORM BUILD. DATA FIELD CATALOG Explain Field Description to ALV DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV. CLEAR FIELDCAT_IN. FIELDCAT_LN-FIELDNAME = 'FIELD1'. FIELDCAT_LN-TABNAME = 'ITAB1'. *FIELDCAT_LN-NO_OUT = 'X'. "FIELD NOT DISPLAY, CHOOSE FROM LAYOUT FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY FIELDCAT_LN-NO_OUT = ' '. FIELDCAT_LN-SELTEXT_L = 'HEAD1'. APPEND FIELDCAT_LN TO GT_FIELDCAT. CLEAR FIELDCAT_IN. FIELDCAT_LN-FIELDNAME = 'FIELD2'. FIELDCAT_LN-TABNAME = 'ITAB1'. FIELDCAT_LN-NO_OUT = 'X'. FIELDCAT_LN-SELTEXT_L = 'HEAD2'. APPEND FIELDCAT_LN TO GT_FIELDCAT. CLEAR FIELDCAT_IN. FIELDCAT_LN-FIELDNAME = 'FIELD3'. FIELDCAT_LN-TABNAME = 'ITAB1'. FIELDCAT_LN-REF_FIELDNAME = 'MENGE'. "- REF FIELD IN THE DICTIONNARY FIELDCAT_LN-REF_TABNAME = 'MSEG'. "- REF TABLE IN THE DICTIONNARY FIELDCAT_LN-NO_OUT = ' '. FIELDCAT_LN-DO_SUM = 'X'. "SUM UPON DISPLAY APPEND FIELDCAT_LN TO GT_FIELDCAT. DATA SORTING AND SUBTOTAL DATA: GS_SORT TYPE SLIS_SORTINFO_ALV. CLEAR GS_SORT. GS_SORT-FIELDNAME = 'FIELD1'. GS_SORT-SPOS = 1. GS_SORT-UP = 'X'. GS_SORT-SUBTOT = 'X'. APPEND GS_SORT TO GT_SORT. CLEAR GS_SORT. GS_SORT-FIELDNAME = 'FIELD2'. GS_SORT-SPOS = 2. GS_SORT-UP = 'X'. *GS_SORT-SUBTOT = 'X'. APPEND GS_SORT TO GT_SORT. ENDFORM. FORM CALL_ALV. ABAP List Viewer CALL FUNCTION 'REUSE_ALV_LIST_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_STRUCTURE_NAME = 'ITAB1' IS_LAYOUT = GS_LAYOUT IT_FIELDCAT = GT_FIELDCAT[] IT_EXCLUDING = IT_SPECIAL_GROUPS = IT_SORT = GT_SORT[] IT_FILTER = IS_SEL_HIDE = I_DEFAULT = 'X' I_SAVE = ' ' IS_VARIANT = IT_EVENTS = GT_EVENTS[] IT_EVENT_EXIT = IS_PRINT = GS_PRINT IS_REPREP_ID = I_SCREEN_START_COLUMN = 0 I_SCREEN_START_LINE = 0 I_SCREEN_END_COLUMN = 0 I_SCREEN_END_LINE = 0 IMPORTING E_EXIT_CAUSED_BY_CALLER = ES_EXIT_CAUSED_BY_USER = TABLES T_OUTTAB = ITAB1 EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2. ENDFORM. HEADER FORM FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT. CONSTANTS: GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'. *GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'. DATA: LS_EVENT TYPE SLIS_ALV_EVENT. CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING I_LIST_TYPE = 0 IMPORTING ET_EVENTS = LT_EVENTS. READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE INTO LS_EVENT. IF SY-SUBRC = 0. MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM. APPEND LS_EVENT TO LT_EVENTS. ENDIF. define END_OF_PAGE event READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE INTO LS_EVENT. IF SY-SUBRC = 0. MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM. APPEND LS_EVENT TO LT_EVENTS. ENDIF. ENDFORM. FORM COMMENT_BUILD CHANGING GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER. DATA: GS_LINE TYPE SLIS_LISTHEADER. CLEAR GS_LINE. GS_LINE-TYP = 'H'. GS_LINE-INFO = 'HEADER 1'. APPEND GS_LINE TO GT_TOP_OF_PAGE. CLEAR GS_LINE. GS_LINE-TYP = 'S'. GS_LINE-KEY = 'STATUS 1'. GS_LINE-INFO = 'INFO 1'. APPEND GS_LINE TO GT_TOP_OF_PAGE. GS_LINE-KEY = 'STATUS 2'. GS_LINE-INFO = 'INFO 2'. APPEND GS_LINE TO GT_TOP_OF_PAGE. CLEAR GS_LINE. GS_LINE-TYP = 'A'. GS_LINE-INFO = 'ACTION'. APPEND GS_LINE TO GT_TOP_OF_PAGE. ENDFORM. FORM TOP_OF_PAGE. CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE. WRITE: SY-DATUM, 'Page No', SY-PAGNO LEFT-JUSTIFIED. ENDFORM. FORM END_OF_PAGE. WRITE at (sy-linsz) sy-pagno CENTERED. ENDFORM. PRINT SETTINGS FORM PRINT_BUILD USING LS_PRINT TYPE SLIS_PRINT_ALV. LS_PRINT-PRINT = P_PRINT. "PRINT IMMEDIATE LS_PRINT-NO_PRINT_SELINFOS = P_NOSINF. "NO SELECTION INFO LS_PRINT-NO_COVERPAGE = P_NOCOVE. "NO COVER PAGE LS_PRINT-NO_NEW_PAGE = P_NONEWP. LS_PRINT-NO_PRINT_LISTINFOS = P_NOLINF. "NO PRINT LIST INFO LS_PRINT-RESERVE_LINES = P_RESERV. ENDFORM. *END OF ZALV PROGRAM

  • RELEVANCY SCORE 3.73

    DB:3.73:Multiple Line Selection In Alv xd


    Hi friends,Can you tell me how to do the following.Ive an internal table ITAB with 10 lines of records. It is having 6 columns.I display this ITAB in ALV using REUSE_ALV_GRID_DISPLAY.Now my task is user may select one or more line of records in ALV and I have to move the selected lines of records to A Flat file.Can you tell me how to do this?.-Thanks,Nash

    DB:3.73:Multiple Line Selection In Alv xd

    Hi all,thanks for your timely help. points are awarded-Nash John

  • RELEVANCY SCORE 3.69

    DB:3.69:Skip 1 Line In Alv Report..... 19



    Hi Experts,

    I have made ALV report in which user wants one blank line after each row.

    How to skip one line after each row in ALV ?

    Yusuf

    DB:3.69:Skip 1 Line In Alv Report..... 19


    Hi Yusuf,

    Please confirm with the client, whether he wants a blank line after each row or after change of any field in the ALV.

    if you want the second concept, you can use At New command in the loop.

    Hope this will solve your issue.

    Regards,

    Niyaz

  • RELEVANCY SCORE 3.68

    DB:3.68:Hide An Object Of Class Cl_Dd_Document In A Screen 3j


    Hello all,I am working on a program running with the following steps :- Selection-screen- Display ALV number 1- When double click on a line in the ALV number 1, a screen 100 is displayed with :1 ALV number 2 (object from class CL_GUI_ALV_GRID in a custom container O_CUST_CONT)1 text box (object from class CL_DD_DOCUMENT)1 other ALV number 3 - The ALV number 2 is editable, the user should enter some value and save- The user go back (F3) to the ALV number 1- Then he can double click on the same line and display again the screen 100.The problem is that at this step, according to the value the user has entered in screen 100, we must only display the ALV number 3, but not the ALV number 2 and not the text box.For ALV number 2, no problem. I do :CALL METHOD o_cust_cont-free.CLEAR o_cust_cont.CLEAR o_alv_number_2.And it works fine, the ALV is not displayed. But for the text box, I can't find any solution. (CLEAR o_text_box...)The text box is still displayed with the old text inside. Please advise me how I could do.Thanks.

  • RELEVANCY SCORE 3.67

    DB:3.67:How To Change Alv Top Of Page Data Dynamically 1a


    Hi All,

    I need to change ALV header data. In selection screen i have given some amount and the same amount i have passed to ALV header for user Review. That amount have to adjust for ALV output. In ALV output one editable field is there. If suppose there are 10 line items in ALV output and the input amount is 10000 then I have to adjust this amount for 5 line items. If suppose in first line item editable field i enter 2000 then in ALV header data the remaining amount have to 8000 only. Because that 2000 have to decrease for input amount. How should we do this?

    Regards
    Nageswar

    DB:3.67:How To Change Alv Top Of Page Data Dynamically 1a


    hi,

    do the code for your calculation

    1. start-of-selection

    PERFORM HEADING TABLES head USING 'HEADING'.

    FORM HEADING TABLES P_HEAD TYPE SLIS_T_LISTHEADER

    CHANGING TABLENAME.

    CASE TABLENAME.

    WHEN 'HEADING'.

    data: amount type i. " here you do your calculation

    amount = 100. "do calculation

    P_HEAD-TYP = 'H'.

    P_HEAD-INFO = amount. "pass the variable

    APPEND P_HEAD.

    FORM TOP-OF-PAGE.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = HEAD[]

    I_LOGO = 'LOGO_M'

    I_END_OF_LIST_GRID = 'X'

    * I_ALV_FORM =

    .

    clear head[].

    ENDFORM.

  • RELEVANCY SCORE 3.66

    DB:3.66:Interactive Alv f7



    hi ,

    I have problem in performing interactive alv , i am not able to perform column selection using fm(reuse_alv_grid_display).

    DB:3.66:Interactive Alv f7


    Hello,

    check this sample program:

    ----

    report zkeerthi_alv5 .

    ----

    * 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 .

    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 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.

    ----

    * 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

    regards,

    keerthi

  • RELEVANCY SCORE 3.66

    DB:3.66:To Hide Default Line Selection Column In Webdynpro Alv 1d



    Hi all,

    as per requirement i have to hide default line selection column in alv which is shown in attachment.

    Give the coding for the requirement.

    Thanks.

  • RELEVANCY SCORE 3.62

    DB:3.62:Alv Selection Field Of Displayed Table Is Not Populated Properly 39



    Hi,

    I am using OO ALV in my screen. I have two tabs. In one tab I display one ALV output in edit mode with selection option and passing internal table field for box_selection. In the other tab I am displaying another ALV output but in display mode.

    My problem is when I switch from tab in edit mode to tab in display mode and back to tab in edit mode, then select a line on the tab in the edit mode, the method I am calling:

    CALL METHOD grid1-get_selected_rows

    IMPORTING

    et_index_rows = i_sel_alvrows[].

    would return table "i_sel_alvrows" empty.

    If i do not switch between the tabs, the -get_selected_rows logic works perfectly.

    You reply will be greatly appreciated.

    Thanks.

    DB:3.62:Alv Selection Field Of Displayed Table Is Not Populated Properly 39


    Oleg,

    I have doubt ,

    This is example:-- if you have selected a line in edit tab and going to display tab and coming back to edit tab, at the point your selected line is there in edit tab as in selected mode ?

    After freeing the container?

    aRs

    Message was edited by:

    aRs

  • RELEVANCY SCORE 3.61

    DB:3.61:The Lead Selection Defaults To The First Line When The Alv-Node Is Updated. 1s



    I have an ALV-grid with material data. Below the ALV-grid I have a detail area with the information of the line selected in the ALV-grid. This detail area can be updated. If the detail area is updated, changes are written back to the ALV-grid.

    Problem is now that the lead_selection always goes back to the first line when something is changed to the context node of the ALV-grid. When I change nothing and press enter, everything is o.k.. It looks like updating the context node of the ALV overwrites the lead selection. Even when I do a SET_LEAD_SELECTION_INDEX in the method WDDOMODIFYVIEW.

    Please help.

    DB:3.61:The Lead Selection Defaults To The First Line When The Alv-Node Is Updated. 1s


    I finally got a reply from SAP. It was a known problem which could be fixed with OSS message 1137854. After implementing the lead-selection acts normally again.

  • RELEVANCY SCORE 3.58

    DB:3.58:Handling Multiple Checkboxes Iin Alv List?? cd



    Hi,

    I have a requirement of generating a list with multiple checkboxes corresponding to each line/row of the list..Based on the selection of some/all the rows of the list I have to invoke some functionality on the click of some button..

    I am able to get the chk-boxes on the list also i have got the button on the std PF-status of ALV list, but I am not able to handle multiple selection of the chk-boxes??

    plz help..

    DB:3.58:Handling Multiple Checkboxes Iin Alv List?? cd


    Hi,

    I have a requirement of generating a list with multiple checkboxes corresponding to each line/row of the list..Based on the selection of some/all the rows of the list I have to invoke some functionality on the click of some button..

    I am able to get the chk-boxes on the list also i have got the button on the std PF-status of ALV list, but I am not able to handle multiple selection of the chk-boxes??

    plz help..

  • RELEVANCY SCORE 3.58

    DB:3.58:At Line Selection Event In Blocked Alv mz


    hi friends,i have developed blocked alv report.i wanted to use at line selection event..pls halp me if u know..thanks and regards,shridevi.l

    DB:3.58:At Line Selection Event In Blocked Alv mz

    hithere is no particulat at line selection event in REUSE_ALV_EVENTS_GET.at line selection we get fct 'PICK' code for double click.so using that fct code we do the operations using at user_command. which is other way of implemnting at line-selectionIf any quieries revert, reward if helpfulTry this code----* Report ZP_ALV8*----**----REPORT zp_alv8.TABLES: kna1, mara, vbak, mard.TYPE-POOLS: slis.***************************************************TYPE DECLERATION*************************************************TYPES: BEGIN OF ty_kna1, kunnr LIKE kna1-kunnr, land1 LIKE kna1-land1, name1 LIKE kna1-name1, ort01 LIKE kna1-ort01, END OF ty_kna1.TYPES: BEGIN OF ty_mara, matnr LIKE mara-matnr, ersda LIKE mara-ersda, ernam LIKE mara-ernam, END OF ty_mara.TYPES: BEGIN OF ty_vbak, vbeln LIKE vbak-vbeln, erdat LIKE vbak-erdat, ernam LIKE vbak-ernam, END OF ty_vbak.TYPES: BEGIN OF ty_mard, matnr LIKE mard-matnr, werks LIKE mard-werks, lgort LIKE mard-lgort, END OF ty_mard.***************************************************DATA DECLERATION*************************************************DATA: it_kna1 TYPE STANDARD TABLE OF ty_kna1, wa_kna1 TYPE ty_kna1.DATA: it_mara TYPE STANDARD TABLE OF ty_mara, wa_mara TYPE ty_mara.DATA: it_vbak TYPE STANDARD TABLE OF ty_vbak, wa_vbak TYPE ty_vbak.DATA: it_mard TYPE STANDARD TABLE OF ty_mard, wa_mard TYPE ty_mard.DATA: it_fieldcat_kna1 TYPE slis_t_fieldcat_alv, wa_fieldcat_kna1 TYPE slis_fieldcat_alv, it_fieldcat_mara TYPE slis_t_fieldcat_alv, wa_fieldcat_mara TYPE slis_fieldcat_alv, it_fieldcat_vbak TYPE slis_t_fieldcat_alv, wa_fieldcat_vbak TYPE slis_fieldcat_alv, it_fieldcat_mard TYPE slis_t_fieldcat_alv, wa_fieldcat_mard TYPE slis_fieldcat_alv.DATA: it_event_kna1 TYPE slis_t_event, wa_event_kna1 TYPE slis_alv_event, it_event_mara TYPE slis_t_event, wa_event_mara TYPE slis_alv_event, it_event_vbak TYPE slis_t_event, wa_event_vbak TYPE slis_alv_event, it_event_mard TYPE slis_t_event, wa_event_mard TYPE slis_alv_event.DATA: wa_layout TYPE slis_layout_alv, it_listheader TYPE slis_t_listheader, wa_listheader TYPE slis_listheader.selection-screen begin of block b1 with frame title text-001.select-options: s_kunnr for kna1-kunnr default '1000' to '1050'.selection-screen end of block b1.selection-screen begin of block b2 with frame title text-002.select-options: s_matnr for mara-matnr default '1' to '100'.selection-screen end of block b2.***************************************************INITIALIZATION*************************************************INITIALIZATION. PERFORM layout. PERFORM fieldcat_kna1. PERFORM fieldcat_mara. PERFORM event_kna1. PERFORM event_mara. PERFORM eventpopulate_kna1. PERFORM eventpopulate_mara.***************************************************START OF SELECTION AND FIRST LIST DISPLAY*************************************************START-OF-SELECTION. SELECT kunnr land1 name1 ort01 FROM kna1 INTO TABLE it_kna1 where kunnr in s_kunnr. UP TO 10 ROWS. SELECT matnr ersda ernam FROM mara INTO TABLE it_mara where matnr in s_matnr. UP TO 20 ROWS. PERFORM display.***************************************************FORM LAYOUT*************************************************----* Form layout---- text---- -- p1 text -- p2 text----FORM layout . wa_layout-zebra ='X'. wa_layout-get_selinfos = 'X'. wa_layout-key_hotspot = 'X'.ENDFORM. " layout**************************************************FIELD CATALOUGE********************************************************************************----* Form fieldcat_kna1---- text---- -- p1 text -- p2 text----FORM fieldcat_kna1 . REFRESH it_fieldcat_kna1. CLEAR wa_fieldcat_kna1. wa_fieldcat_kna1-fieldname = 'KUNNR'. wa_fieldcat_kna1-seltext_l = 'CUSTOMER NUMBER'. wa_fieldcat_kna1-datatype = 'CHAR'. wa_fieldcat_kna1-outputlen = 30. wa_fieldcat_kna1-tabname = 'IT_KNA1'. wa_fieldcat_kna1-key = 'X'. wa_fieldcat_kna1-hotspot = 'X'. wa_fieldcat_kna1-col_pos = 1. wa_fieldcat_kna1-emphasize = 'C21'. APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1. CLEAR wa_fieldcat_kna1. wa_fieldcat_kna1-fieldname = 'LAND1'. wa_fieldcat_kna1-seltext_l = 'COUNTRY CODE'. wa_fieldcat_kna1-datatype = 'CHAR'. wa_fieldcat_kna1-outputlen = 30. wa_fieldcat_kna1-tabname = 'IT_KNA1'. wa_fieldcat_kna1-hotspot = 'X'. wa_fieldcat_kna1-col_pos = 2. wa_fieldcat_kna1-emphasize = 'C31'. APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1. CLEAR wa_fieldcat_kna1. wa_fieldcat_kna1-fieldname = 'NAME1'. wa_fieldcat_kna1-seltext_l = 'CUSTOMER NAME'. wa_fieldcat_kna1-datatype = 'CHAR'. wa_fieldcat_kna1-outputlen = 30. wa_fieldcat_kna1-tabname = 'IT_KNA1'. wa_fieldcat_kna1-hotspot = 'X'. wa_fieldcat_kna1-col_pos = 3. wa_fieldcat_kna1-emphasize = 'C71'. APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1. CLEAR wa_fieldcat_kna1. wa_fieldcat_kna1-fieldname = 'ORT01'. wa_fieldcat_kna1-seltext_l = 'COUNTRY '. wa_fieldcat_kna1-datatype = 'CHAR'. wa_fieldcat_kna1-outputlen = 30. wa_fieldcat_kna1-tabname = 'IT_KNA1'. wa_fieldcat_kna1-hotspot = 'X'. wa_fieldcat_kna1-col_pos = 4. wa_fieldcat_kna1-emphasize = 'C51'. APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1. CLEAR wa_fieldcat_kna1.ENDFORM. " fieldcat_kna1----* Form fieldcat_kna2---- text----FORM fieldcat_mara . wa_fieldcat_mara-fieldname = 'MATNR'. wa_fieldcat_mara-seltext_l = 'MATERIAL NUMBER'. wa_fieldcat_mara-datatype = 'CHAR'. wa_fieldcat_mara-outputlen = 30. wa_fieldcat_mara-tabname = 'IT_MARA'. wa_fieldcat_mara-key = 'X'. wa_fieldcat_mara-hotspot = 'X'. wa_fieldcat_mara-col_pos = 1. wa_fieldcat_mara-emphasize = 'C21'. APPEND wa_fieldcat_mara TO it_fieldcat_mara. CLEAR wa_fieldcat_mara. wa_fieldcat_mara-fieldname = 'ERSDA'. wa_fieldcat_mara-seltext_l = 'CREATED ON'. wa_fieldcat_mara-datatype = 'CHAR'. wa_fieldcat_mara-outputlen = 30. wa_fieldcat_mara-tabname = 'IT_MARA'. wa_fieldcat_mara-hotspot = 'X'. wa_fieldcat_mara-col_pos = 2. wa_fieldcat_mara-emphasize = 'C41'. APPEND wa_fieldcat_mara TO it_fieldcat_mara. CLEAR wa_fieldcat_mara. wa_fieldcat_mara-fieldname = 'ERNAM'. wa_fieldcat_mara-seltext_l = 'CREATED BY'. wa_fieldcat_mara-datatype = 'CHAR'. wa_fieldcat_mara-outputlen = 30. wa_fieldcat_mara-tabname = 'IT_MARA'. wa_fieldcat_mara-hotspot = 'X'. wa_fieldcat_mara-col_pos = 3. wa_fieldcat_mara-emphasize = 'C61'. APPEND wa_fieldcat_mara TO it_fieldcat_mara. CLEAR wa_fieldcat_mara.ENDFORM. "fieldcat_kna2----* Form FIELDCAT_VBAK---- text----FORM fieldcat_vbak. wa_fieldcat_vbak-fieldname = 'VBELN'. wa_fieldcat_vbak-seltext_l = 'SALES ORDER'. wa_fieldcat_vbak-datatype = 'CHAR'. wa_fieldcat_vbak-outputlen = 30. wa_fieldcat_vbak-tabname = 'IT_VBAK'. wa_fieldcat_vbak-hotspot = 'X'. wa_fieldcat_vbak-col_pos = 3. wa_fieldcat_vbak-emphasize = 'C31'. APPEND wa_fieldcat_vbak TO it_fieldcat_vbak. CLEAR wa_fieldcat_vbak. wa_fieldcat_vbak-fieldname = 'ERDAT'. wa_fieldcat_vbak-seltext_l = 'CREATED ON'. wa_fieldcat_vbak-datatype = 'DATS'. wa_fieldcat_vbak-outputlen = 30. wa_fieldcat_vbak-tabname = 'IT_VBAK'. wa_fieldcat_vbak-hotspot = 'X'. wa_fieldcat_vbak-col_pos = 3. wa_fieldcat_vbak-emphasize = 'C41'. APPEND wa_fieldcat_vbak TO it_fieldcat_vbak. CLEAR wa_fieldcat_vbak. wa_fieldcat_vbak-fieldname = 'ERNAM'. wa_fieldcat_vbak-seltext_l = 'CREATED BY'. wa_fieldcat_vbak-datatype = 'CHAR'. wa_fieldcat_vbak-outputlen = 30. wa_fieldcat_vbak-tabname = 'IT_VBAK'. wa_fieldcat_vbak-hotspot = 'X'. wa_fieldcat_vbak-col_pos = 3. wa_fieldcat_vbak-emphasize = 'C51'. APPEND wa_fieldcat_vbak TO it_fieldcat_vbak. CLEAR wa_fieldcat_vbak.ENDFORM. "FIELDCAT_VBAK----* Form fieldcat_mard---- text----FORM fieldcat_mard. wa_fieldcat_mard-fieldname = 'MATNR'. wa_fieldcat_mard-seltext_l = 'MATERIAL NUMBER'. wa_fieldcat_mard-datatype = 'CHAR'. wa_fieldcat_mard-outputlen = 30. wa_fieldcat_mard-tabname = 'IT_MARD'. wa_fieldcat_mard-hotspot = 'X'. wa_fieldcat_mard-col_pos = 1. wa_fieldcat_mard-emphasize = 'C31'. APPEND wa_fieldcat_mard TO it_fieldcat_mard. CLEAR wa_fieldcat_mard. wa_fieldcat_mard-fieldname = 'WERKS'. wa_fieldcat_mard-seltext_l = 'PLANT'. wa_fieldcat_mard-datatype = 'CHAR'. wa_fieldcat_mard-outputlen = 30. wa_fieldcat_mard-tabname = 'IT_MARD'. wa_fieldcat_mard-hotspot = 'X'. wa_fieldcat_mard-col_pos = 2. wa_fieldcat_mard-emphasize = 'C61'. APPEND wa_fieldcat_mard TO it_fieldcat_mard. CLEAR wa_fieldcat_mard. wa_fieldcat_mard-fieldname = 'LGORT'. wa_fieldcat_mard-seltext_l = 'STORAGE LOCATION'. wa_fieldcat_mard-datatype = 'CHAR'. wa_fieldcat_mard-outputlen = 30. wa_fieldcat_mard-tabname = 'IT_MARD'. wa_fieldcat_mard-hotspot = 'X'. wa_fieldcat_mard-col_pos = 3. wa_fieldcat_mard-emphasize = 'C81'. APPEND wa_fieldcat_mard TO it_fieldcat_mard. CLEAR wa_fieldcat_mard.ENDFORM . "fieldcat_mard***************************************************FORM DISPLAY*************************************************----* Form Display---- text---- -- p1 text -- p2 text----FORM display . CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT' EXPORTING i_callback_program = sy-repid I_CALLBACK_PF_STATUS_SET = ' ' I_CALLBACK_USER_COMMAND = 'USER_COMMAND'. IT_EXCLUDING = CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND' EXPORTING is_layout = wa_layout it_fieldcat = it_fieldcat_kna1 i_tabname = 'IT_KNA1' it_events = it_event_kna1 IT_SORT = I_TEXT = ' ' TABLES t_outtab = it_kna1 EXCEPTIONS program_error = 1 maximum_of_appends_reached = 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. CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND' EXPORTING is_layout = wa_layout it_fieldcat = it_fieldcat_mara i_tabname = 'IT_MARA' it_events = it_event_mara IT_SORT = I_TEXT = ' ' TABLES t_outtab = it_mara EXCEPTIONS program_error = 1 maximum_of_appends_reached = 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. CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY' 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***************************************************EVENTS FOR KNA1 AND MARA*************************************************----* Form EVENT_KNA1---- text---- -- p1 text -- p2 text----FORM event_kna1 . CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = it_event_kna1 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_KNA1----* Form EVENT_MARA---- text---- -- p1 text -- p2 text----FORM event_mara . CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = it_event_mara 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_MARA***************************************************POPULATING EVENTS*************************************************----* Form eventpopulate_kna1---- text---- -- p1 text -- p2 text----FORM eventpopulate_kna1 . READ TABLE it_event_kna1 INTO wa_event_kna1 WITH KEY name = 'TOP_OF_PAGE'. IF sy-subrc = 0. wa_event_kna1-form = 'TOP_OF_PAGE_KNA1'. MODIFY it_event_kna1 FROM wa_event_kna1 TRANSPORTING form WHERE name = wa_event_kna1-name. ENDIF. READ TABLE it_event_kna1 INTO wa_event_kna1 WITH KEY name = 'USER_COMMAND'. IF sy-subrc = 0. wa_event_kna1-form = 'USER_COMMAND_KNA1'. MODIFY it_event_kna1 FROM wa_event_kna1 TRANSPORTING form WHERE name = wa_event_kna1-name. ENDIF.ENDFORM. " eventpopulate_kna1----* Form eventpopulate_mara---- text---- -- p1 text -- p2 text----FORM eventpopulate_mara . READ TABLE it_event_mara INTO wa_event_mara WITH KEY name = 'TOP_OF_PAGE'. IF sy-subrc = 0. wa_event_mara-form = 'TOP_OF_PAGE_MARA'. MODIFY it_event_mara FROM wa_event_mara TRANSPORTING form WHERE name = wa_event_mara-name. ENDIF. READ TABLE it_event_mara INTO wa_event_mara WITH KEY name = 'USER_COMMAND'. IF sy-subrc = 0. wa_event_mara-form = 'USER_COMMAND_MARA'. MODIFY it_event_mara FROM wa_event_mara TRANSPORTING form WHERE name = wa_event_mara-name. ENDIF.ENDFORM. " eventpopulate_mara***************************************************TOP OF PAGE*************************************************----* Form TOP_OF_PAGE_KNA1---- text----FORM top_of_page_kna1. wa_listheader-typ = 'H'. wa_listheader-info = 'CUSTOMER DETAILS' . APPEND wa_listheader TO it_listheader. CLEAR wa_listheader.* WRITE:/ 'CUSTOMER DETAILS'.ENDFORM. "TOP_OF_PAGE_KNA1----* Form TOP_OF_PAGE_MARA---- text----FORM top_of_page_mara. wa_listheader-typ = 'H'. wa_listheader-info = 'MATERIAL DETAILS' . APPEND wa_listheader TO it_listheader. CLEAR wa_listheader. WRITE:/ 'MATERIAL DETAILS' .ENDFORM. "TOP_OF_PAGE_KNA1***************************************************CODE FOR SECOND LIST DISPLAY FOR VBAK*************************************************----* Form USER_COMMAND---- text---- --UCOMM text --R_SELFIELD text----FORM user_command USING ucomm LIKE sy-ucomm r_selfield TYPE slis_selfield.CASE UCOMM. when 'IC1'. CASE R_SELFIELD-TABNAME. WHEN 'IT_KNA1'. DATA: CUST(10) TYPE n. CUST = r_selfield-value. SELECT vbeln erdat ernam FROM vbak INTO TABLE it_vbak WHERE kunnr = cust. PERFORM fieldcat_vbak. PERFORM display_vbak. WHEN 'IT_MARA'. DATA: MAT(18) TYPE N. MAT = R_selfield-value. SELECT matnr werks lgort FROM mard INTO TABLE it_mard WHERE matnr = mat. PERFORM fieldcat_mard. PERFORM display_mard. ENDCASE. ENDCASE.ENDFORM. "USER_COMMAND**----** Form USER_COMMAND_MARA*---- text*---- --UCOMM text --S_SELFIELD text*----*FORM user_command_mara USING ucomm LIKE sy-ucomm s_selfield TYPE slis_selfield.* SELECT matnr werks lgort FROM mard INTO TABLE it_mard WHERE matnr = s_selfield-value.* PERFORM fieldcat_mard. PERFORM display_mard.*ENDFORM. "USER_COMMAND_MARA----* Form DISPLAY_VBAK---- text---- -- p1 text -- p2 text----FORM display_vbak .CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'EXPORTING I_INTERFACE_CHECK = ' ' I_BYPASSING_BUFFER = ' ' I_BUFFER_ACTIVE = ' ' I_CALLBACK_PROGRAM = sy-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 = wa_layout IT_FIELDCAT = it_fieldcat_vbak 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 I_HTML_HEIGHT_TOP = 0 I_HTML_HEIGHT_END = 0 IT_ALV_GRAPHICS = IT_HYPERLINK = IT_ADD_FIELDCAT = IT_EXCEPT_QINFO = IR_SALV_FULLSCREEN_ADAPTER =IMPORTING E_EXIT_CAUSED_BY_CALLER = ES_EXIT_CAUSED_BY_USER = TABLES t_outtab = it_vbak 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_VBAK----* Form display_mard---- text----FORM display_mard . CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING I_INTERFACE_CHECK = ' ' I_BYPASSING_BUFFER = I_BUFFER_ACTIVE = ' ' i_callback_program = sy-repid I_CALLBACK_PF_STATUS_SET = ' ' i_callback_user_command = 'USER_COMMAND_MARD' I_STRUCTURE_NAME = is_layout = wa_layout it_fieldcat = it_fieldcat_mard IT_EXCLUDING = IT_SPECIAL_GROUPS = IT_SORT = IT_FILTER = IS_SEL_HIDE = I_DEFAULT = 'X' I_SAVE = ' ' IS_VARIANT = it_events = it_event_mard 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 IR_SALV_LIST_ADAPTER = IT_EXCEPT_QINFO = I_SUPPRESS_EMPTY_DATA = ABAP_FALSEIMPORTING E_EXIT_CAUSED_BY_CALLER = ES_EXIT_CAUSED_BY_USER = TABLES t_outtab = it_mardEXCEPTIONS 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_mardREGARDSPRASANTH

  • RELEVANCY SCORE 3.55

    DB:3.55:Events In Alv zx



    Hi friends,

    i wanted to use top of page and at line selection events for ALV,

    can u help me on this.

    DB:3.55:Events In Alv zx


    Hi,

    Refer to the following link:

    http://sapdev.co.uk/reporting/alv/alvgrid.htm

    Hope this helps.

    Reward if helpful.

    Regards,

    Sipra

  • RELEVANCY SCORE 3.55

    DB:3.55:Dynamic Text For Checkbox ks



    I am displaying a selection screen a checkbox and a select-option in the same line

    the code is like this:

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS: p_check AS CHECKBOX MODIF ID bk1.

    SELECTION-SCREEN COMMENT 2(9) text-100 FOR FIELD p_check.

    SELECTION-SCREEN POSITION POS_LOW.

    SELECTION-SCREEN COMMENT 12(18) text-101 FOR FIELD s_bwart1.

    SELECT-OPTIONS:s_bwart1 FOR mseg-bwart DEFAULT 411 TO 412.

    SELECTION-SCREEN POSITION POS_HIGH.

    SELECTION-SCREEN END OF LINE.

    now I want to edit the checkbox text and can change and can pass it to the output as a header.

    Can we do this?

    please help me...

    in my ALV (using function modules)

    DB:3.55:Dynamic Text For Checkbox ks


    I am displaying a selection screen a checkbox and a select-option in the same line

    the code is like this:

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS: p_check AS CHECKBOX MODIF ID bk1.

    SELECTION-SCREEN COMMENT 2(9) text-100 FOR FIELD p_check.

    SELECTION-SCREEN POSITION POS_LOW.

    SELECTION-SCREEN COMMENT 12(18) text-101 FOR FIELD s_bwart1.

    SELECT-OPTIONS:s_bwart1 FOR mseg-bwart DEFAULT 411 TO 412.

    SELECTION-SCREEN POSITION POS_HIGH.

    SELECTION-SCREEN END OF LINE.

    now I want to edit the checkbox text and can change and can pass it to the output as a header.

    Can we do this?

    please help me...

    in my ALV (using function modules)

  • RELEVANCY SCORE 3.55

    DB:3.55:Hiding The Selection-Screen Contents cj



    Hi all,

    I wants to hide below selection screen contents(do'nt wants to display in the output)

    SELECTION-SCREEN BEGIN OF BLOCK alv WITH FRAME TITLE alvframe.

    PARAMETERS:

    p_layout LIKE disvariant-variant,

    p_list RADIOBUTTON GROUP alv ,

    p_grid RADIOBUTTON GROUP alv DEFAULT 'X' .

    SELECTION-SCREEN END OF BLOCK alv.

    How to do this?

    Thanks

    Umesh

    DB:3.55:Hiding The Selection-Screen Contents cj


    Hi,

    Try like this:

    CONSTANTS OFF VALUE '0'.

    SELECTION-SCREEN BEGIN OF BLOCK alv WITH FRAME TITLE alvframe.

    PARAMETERS:

    p_layout LIKE disvariant-variant,

    p_list RADIOBUTTON GROUP alv ,

    p_grid RADIOBUTTON GROUP alv DEFAULT 'X' .

    SELECTION-SCREEN END OF BLOCK alv.

    at selection-screen output.

    loop at screen.

    screen-input = OFF.

    modify screen.

    endloop.

    Regards,

    Bhaskar

  • RELEVANCY SCORE 3.54

    DB:3.54:Regarding Alv List Display 88



    hi,

    i have an ALV list display.

    At line selection (single mouse click on line), i want the line color to be intensified.

    DB:3.54:Regarding Alv List Display 88


    Hi,

    yes it is possible, check this sample code.

    REPORT ztest.

    TYPE-POOLS:slis.
    DATA: BEGIN OF itab OCCURS 0,
    vbeln LIKE vbak-vbeln,
    posnr LIKE vbap-posnr,
    color(4),
    END OF itab.

    SELECT vbeln
    posnr
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM vbap
    UP TO 20 ROWS.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
    x_fieldcat TYPE slis_fieldcat_alv.
    DATA: x_layout TYPE slis_layout_alv.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_internal_tabname = 'ITAB'
    i_inclname = sy-repid
    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.

    loop at it_fieldcat into x_fieldcat.
    if x_fieldcat-fieldname = 'COLOR'.
    x_fieldcat-no_out = 'X'.
    modify it_fieldcat from x_fieldcat index sy-tabix.
    endif.
    if x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-HOTSPOT = 'X'.
    x_fieldcat-key = ''.
    modify it_fieldcat from x_fieldcat index sy-tabix.
    endif.
    if x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-HOTSPOT = 'X'.
    x_fieldcat-key = ''.
    modify it_fieldcat from x_fieldcat index sy-tabix.
    endif.
    endloop.
    x_layout-info_fieldname = 'COLOR'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    is_layout = x_layout
    it_fieldcat = it_fieldcat
    i_callback_user_command = 'USER_COMMAND'
    TABLES
    t_outtab = itab
    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 user_command
    *---------------------------------------------------------------------*
    * text
    *----------------------------------------------------------------------*
    * --R_UCOMM text
    * --R_SELFIELD text
    *----------------------------------------------------------------------*
    FORM user_command USING r_ucomm TYPE sy-ucomm
    r_selfield TYPE slis_selfield.
    READ TABLE itab INDEX r_selfield-tabindex.
    IF sy-subrc = 0.
    itab-color = 'C600'.
    MODIFY itab INDEX r_selfield-tabindex.
    ENDIF.
    r_selfield-row_stable = 'X'.
    r_selfield-refresh = 'X'.
    ENDFORM. "user_command

  • RELEVANCY SCORE 3.53

    DB:3.53:Problems With Alv - 2 sc



    Hi All

    The flow of my program is as follows

    First one interactive report is shown to the user.

    When he triggers the At line selection, I am creating editable ALV (using object methods i.e. using set_table_for_first_display) and the user can make changes to the values ,once he edits and saves the program takes him to interactive report again with refreshed values. Again if he wants to edit the list I am taking him to editable ALV again now the problem is here ,this time it is not saving the changes made by the user and the ALV is not saving the changes however if I again calls the ALV i can see the changed fig. on the screen. I used the refresh table method also but it is not working. I tried to free the memory used at the time of creating object for grid etc.

    Any feedback?

    Thanks in anticipation.

    pM.

    DB:3.53:Problems With Alv - 2 sc


    Hi All

    The flow of my program is as follows

    First one interactive report is shown to the user.

    When he triggers the At line selection, I am creating editable ALV (using object methods i.e. using set_table_for_first_display) and the user can make changes to the values ,once he edits and saves the program takes him to interactive report again with refreshed values. Again if he wants to edit the list I am taking him to editable ALV again now the problem is here ,this time it is not saving the changes made by the user and the ALV is not saving the changes however if I again calls the ALV i can see the changed fig. on the screen. I used the refresh table method also but it is not working. I tried to free the memory used at the time of creating object for grid etc.

    Any feedback?

    Thanks in anticipation.

    pM.

  • RELEVANCY SCORE 3.52

    DB:3.52:Set Lead Selection For Selection Mode Multi In Alv c1



    Hi,

    I have instantiated ALV with selection mode cl_wd_table=e_selection_mode-multi .....for this i am able to get the selected lead

    selection index but when i am trying to set the lead selection by set_lead_selection_index ,the selection is not set ....

    Thanks,

    Shailaja Ainala.

  • RELEVANCY SCORE 3.52

    DB:3.52:At Line Selection For Alv 3p



    Hello experts ,

    .

    can anybody plz tell me How to implement the line selection event in alv ? I want to retrieve value of the filed clicked by the user and query another table with that field value and display that data ....

    DB:3.52:At Line Selection For Alv 3p


    hello somya ,

    i am new to this subject , can u plz elaborate on the above answer or show with an example . thanks

  • RELEVANCY SCORE 3.48

    DB:3.48:At Line Selection In Alv dx



    hi

    i wish to know how to use at line selection event for selecting multiple lines in alv list display using checkboxes.

    DB:3.48:At Line Selection In Alv dx


    Hi

    blr_selections-set_selection_mode( if_salv_c_selection_mode=row_column/b

    Check these threads which discuss interactive ALV reports -

    interactive alv

    2. How do I program double click in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=11601

    http://www.sapfans.com/forums/viewtopic.php?t=23010

    ALV

    1. Please give me general info on ALV.

    http://www.sapfans.com/forums/viewtopic.php?t=58286

    http://www.sapfans.com/forums/viewtopic.php?t=76490

    http://www.sapfans.com/forums/viewtopic.php?t=20591

    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

    2. How do I program double click in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=11601

    http://www.sapfans.com/forums/viewtopic.php?t=23010

    3. How do I add subtotals (I have problem to add them)...

    http://www.sapfans.com/forums/viewtopic.php?t=20386

    http://www.sapfans.com/forums/viewtopic.php?t=85191

    http://www.sapfans.com/forums/viewtopic.php?t=88401

    http://www.sapfans.com/forums/viewtopic.php?t=17335

    4. How to add list heading like top-of-page in ABAP lists?

    http://www.sapfans.com/forums/viewtopic.php?t=58775

    http://www.sapfans.com/forums/viewtopic.php?t=60550

    http://www.sapfans.com/forums/viewtopic.php?t=16629

    5. How to print page number / total number of pages X/XX in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

    http://www.sapfans.com/forums/viewtopic.php?t=64320

    http://www.sapfans.com/forums/viewtopic.php?t=44477

    7. How can I set the cell color in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=52107

    8. How do I print a logo/graphics in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=81149

    http://www.sapfans.com/forums/viewtopic.php?t=35498

    http://www.sapfans.com/forums/viewtopic.php?t=5013

    9. How do I create and use input-enabled fields in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=84933

    http://www.sapfans.com/forums/viewtopic.php?t=69878

    10. How can I use ALV for reports that are going to be run in background?

    http://www.sapfans.com/forums/viewtopic.php?t=83243

    http://www.sapfans.com/forums/viewtopic.php?t=19224

    11. How can I display an icon in ALV? (Common requirement is traffic light icon).

    http://www.sapfans.com/forums/viewtopic.php?t=79424

    http://www.sapfans.com/forums/viewtopic.php?t=24512

    12. How can I display a checkbox in ALV?

    http://www.sapfans.com/forums/viewtopic.php?t=88376

    http://www.sapfans.com/forums/viewtopic.php?t=40968

    http://www.sapfans.com/forums/viewtopic.php?t=6919

    Check the below report and bold one is important:

    REPORT ZMM_KITCHEN_COST no standard page heading

    line-size 255

    message-id zwave .

    type-pools

    type-pools : slis.

    Tables

    tables : mara,

    makt,

    mbew,

    konp,

    pgmi,

    marc,

    RMCP3,

    sscrfields,

    mvke.

    Internal Table for MARC and MARA

    data : begin of i_join occurs 0,

    matnr like mara-matnr, " Material #

    meins like mara-meins, " Unit of Measure

    werks like marc-werks, " Plant

    zzdept like marc-zzdept," Department

    end of i_join.

    Internal table for PGMI

    data : begin of i_pgmi occurs 0,

    werks like pgmi-werks, " Plant,

    nrmit like pgmi-nrmit, " Material #

    wemit like pgmi-wemit, " Plant

    end of i_pgmi.

    Internal Table for MBEW

    data i_mbew like mbew occurs 0 with header line.

    Internal Table for Output

    data : begin of i_output occurs 0 ,

    matnr like mara-matnr, " Material #

    maktx like makt-maktx, " Material Desc

    VPRSV like mbew-VPRSV, " Price Control Indicator

    VERPR like mbew-VERPR, " Moving Avg Price

    meins like mara-meins, " Base Unit of Measure

    STPRS like mbew-STPRS, " Standard Price

    LPLPR like mbew-LPLPR, " Current Planned Price

    ZPLPR like mbew-ZPLPR, " Future Planned Price

    VPLPR like mbew-VPLPR, " Previous Planned Price

    kbetr like konp-kbetr, " Sales Price

    KMEIN like konp-KMEIN, " Sales Unit

    margin(5) type p decimals 2,

    vmsta like mvke-vmsta, " Material Status.

    end of i_output.

    Internal Table for A004

    data : i_a004 like a004 occurs 0 with header line.

    Variables

    data : wa_lines type i,

    wa_maktx type makt-maktx,

    v_flag type c.

    ALV Function Module Variables

    DATA: g_repid like sy-repid,

    gs_layout type slis_layout_alv,

    g_exit_caused_by_caller,

    gs_exit_caused_by_user type slis_exit_by_user.

    DATA: gt_fieldcat type slis_t_fieldcat_alv,

    gs_print type slis_print_alv,

    gt_events type slis_t_event,

    gt_list_top_of_page type slis_t_listheader,

    g_status_set type slis_formname value 'PF_STATUS_SET',

    g_user_command type slis_formname value 'USER_COMMAND',

    g_top_of_page type slis_formname value 'TOP_OF_PAGE',

    g_top_of_list type slis_formname value 'TOP_OF_LIST',

    g_end_of_list type slis_formname value 'END_OF_LIST',

    g_variant LIKE disvariant,

    g_save(1) TYPE c,

    g_tabname_header TYPE slis_tabname,

    g_tabname_item TYPE slis_tabname,

    g_exit(1) TYPE c,

    gx_variant LIKE disvariant.

    data : gr_layout_bck type slis_layout_alv.

    Selection-screen

    selection-screen : begin of block blk with frame title text-001.

    parameters : p_werks like marc-werks default '1000' obligatory.

    select-options : s_dept for marc-zzdept obligatory,

    s_matnr for mara-matnr,

    s_mtart for mara-mtart,

    s_vprsv for mbew-VPRSV,

    s_PRGRP for RMCP3-PRGRP MATCHCODE OBJECT MAT2 ,

    s_vmsta for mvke-vmsta.

    selection-screen: end of block blk.

    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

    *PARAMETERS: p_vari LIKE disvariant-variant.

    *SELECTION-SCREEN END OF BLOCK b3.

    *

    ----

    At slection screen events *

    ----

    *-- Process on value request

    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.

    PERFORM f4_for_variant.

    *

    ----

    Initialization *

    ----

    Initialization.

    g_repid = sy-repid.

    sscrfields-functxt_01 = 'Clear Selection'.

    selection-screen function key 1.

    AT SELECTION-SCREEN.

    case sscrfields-ucomm.

    when 'Clear Selection' or 'FC01'.

    clear: s_matnr,

    p_werks.

    refresh: s_matnr,

    s_dept,

    s_mtart,

    s_vprsv,

    s_PRGRP,

    s_vmsta.

    endcase.

    ----

    Start-of-selection.

    ----

    start-of-selection.

    Clear the all data.

    perform clear_data.

    Get the data from PGMI Table

    perform get_pgmi.

    Get the data from MARC and MARA Table

    perform get_mara_marc.

    Get the data from MBEW Table

    perform get_mbew.

    Move the data into OUTPUT Table

    perform move_output_internal.

    *end-of-selection.

    end-of-selection.

    if not i_output[] is initial.

    ALV Function Module

    perform print_alv.

    endif.

    ----

    * Form get_pgmi

    ----

    Select the data from PGMI Table

    ----

    FORM get_pgmi.

    clear v_flag.

    If Product group has a value at Selection-screen.

    if not s_prgrp is initial.

    select werks nrmit wemit from pgmi into table i_pgmi

    where prgrp in s_prgrp

    and werks = p_werks

    and wemit = p_werks.

    v_flag = 'X'.

    endif.

    ENDFORM. " get_pgmi

    ----

    * Form get_mara_marc

    ----

    Select the data from MARA and MARC

    ----

    FORM get_mara_marc.

    if v_flag = 'X'.

    select amatnr ameins bwerks bzzdept into table i_join

    from mara as a inner join marc as b on amatnr = bmatnr

    for all entries in i_pgmi

    where a~matnr in s_matnr

    and b~werks = p_werks

    and b~zzdept in s_dept

    and a~mtart in s_mtart

    and a~matnr = i_pgmi-nrmit

    and b~werks = i_pgmi-werks.

    else.

    Get the data from MARA and MARC Table

    select amatnr ameins bwerks bzzdept into table i_join

    from mara as a inner join marc as b on amatnr = bmatnr

    where a~matnr in s_matnr

    and b~werks = p_werks

    and b~zzdept in s_dept

    and a~mtart in s_mtart.

    endif.

    clear wa_lines.

    describe table i_join lines wa_lines.

    if wa_lines is initial.

    message i000(zwave) with 'List contains no data'.

    stop.

    endif.

    sort i_join by matnr werks zzdept.

    ENDFORM. " get_mara_marc

    ----

    * Form get_mbew

    ----

    Select the data from MBEW Table

    ----

    FORM get_mbew.

    Get the data from MBEW.

    select * from mbew into table i_mbew

    for all entries in i_join

    where matnr = i_join-matnr.

    clear wa_lines.

    describe table i_mbew lines wa_lines.

    if wa_lines is initial.

    message i000(zwave) with 'List contains no data'.

    stop.

    endif.

    sort i_mbew by matnr bwkey.

    ENDFORM. " get_mbew

    ----

    * Form move_output_internal

    ----

    Final Results

    ----

    FORM move_output_internal.

    loop at i_join.

    clear wa_maktx.

    Compare the data with MVKE Table

    select single vmsta from mvke into mvke-vmsta

    where matnr = i_join-matnr

    and vkorg = '0001'

    and vtweg = '01'

    and vmsta in s_vmsta.

    if sy-subrc ne 0.

    continue.

    else.

    i_output-vmsta = mvke-vmsta.

    endif.

    read table i_mbew with key matnr = i_join-matnr

    bwkey = i_join-werks

    binary search.

    if sy-subrc eq 0.

    Price Control Indicator

    i_output-VPRSV = i_mbew-VPRSV.

    Moving Average Price

    i_output-VERPR = i_mbew-VERPR / i_mbew-peinh.

    Standard Price

    i_output-STPRS = i_mbew-STPRS / i_mbew-peinh.

    Current Planned Price

    i_output-LPLPR = i_mbew-LPLPR / i_mbew-peinh.

    Future Planned Price

    i_output-ZPLPR = i_mbew-ZPLPR / i_mbew-peinh.

    Previous Planned Price

    i_output-VPLPR = i_mbew-VPLPR / i_mbew-peinh.

    Base Unit of Measure - Added by Seshu 01/09/2007

    i_output-meins = i_join-meins.

    else.

    continue.

    endif.

    Get the sales Price.

    perform get_sales_data.

    if i_mbew-VPRSV = 'V'.

    Get the Percentage of Margin

    if i_output-kbetr ne '0.00'.

    i_output-margin = ( ( i_output-kbetr - i_mbew-VERPR )

    / i_output-kbetr ) * 100 .

    endif.

    else.

    Get the Percentage of Margin

    if i_output-kbetr ne '0.00'.

    i_output-margin = ( ( i_output-kbetr - i_output-stprs )

    / i_output-kbetr ) * 100 .

    endif.

    endif.

    Get the material Description from MAKT Table

    select single maktx from makt into wa_maktx

    where matnr = i_join-matnr

    and spras = 'E'.

    if sy-subrc eq 0.

    i_output-matnr = i_join-matnr.

    i_output-maktx = wa_maktx.

    endif.

    append i_output.

    clear : i_output,

    i_join,

    i_mbew.

    endloop.

    ENDFORM. " move_output_internal

    ----

    * Form get_sales_data

    ----

    Get the Sales Price for each material

    ----

    FORM get_sales_data.

    Get the data from A004 table to get KNUMH

    Added new field Sales Unit - Seshu 01/09/2006

    refresh : i_a004.

    clear : i_a004.

    data : lv_kbetr like konp-kbetr," Condition value

    lv_KPEIN like konp-kpein , "per

    lv_KMEIN like konp-KMEIN. " Sales Unit

    select * from a004 into table i_a004

    where matnr = i_join-matnr

    and vkorg = '0001'

    and vtweg = '01'.

    if sy-subrc eq 0.

    sort i_a004 by DATAB descending.

    Get the Latetest Date

    read table i_a004 with key matnr = i_join-matnr

    vkorg = '0001'

    vtweg = '01'

    binary search.

    Get the Sales Value

    select single kbetr KPEIN KMEIN from konp

    into (lv_kbetr,lv_KPEIN, lv_KMEIN)

    where knumh = i_a004-knumh

    and kappl = i_a004-kappl

    and kschl = i_a004-kschl.

    if sy-subrc eq 0.

    i_output-kbetr = lv_kbetr / lv_KPEIN.

    i_output-KMEIN = lv_KMEIN.

    endif.

    endif.

    clear : lv_kbetr,

    lv_kpein,

    lv_KMEIN.

    ENDFORM. " get_sales_data

    ----

    * Form print_alv

    ----

    ALV Function Module

    ----

    FORM print_alv.

    Fill the Fiedlcat

    PERFORM fieldcat_init using gt_fieldcat[].

    gr_layout_bck-edit_mode = 'D'.

    gr_layout_bck-colwidth_optimize = 'X'.

    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 = g_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 = gr_layout_bck

    IT_FIELDCAT = gt_fieldcat[]

    IT_EXCLUDING =

    IT_SPECIAL_GROUPS =

    IT_SORT =

    IT_FILTER =

    IS_SEL_HIDE =

    I_DEFAULT = 'X'

    I_SAVE = g_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_ADD_FIELDCAT =

    IT_HYPERLINK =

    I_HTML_HEIGHT_TOP =

    I_HTML_HEIGHT_END =

    IT_EXCEPT_QINFO =

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER =

    ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = i_output

    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. " print_alv

    ----

    * Form fieldcat_init

    ----

    Fieldcat

    ----

    FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.

    DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

    Material #

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'MATNR'.

    LS_FIELDCAT-ref_fieldname = 'MATNR'.

    LS_FIELDCAT-ref_tabname = 'MARA'.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Material'.

    ls_fieldcat-seltext_M = 'Material'.

    ls_fieldcat-seltext_S = 'Material'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Material Description

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'MAKTX'.

    LS_FIELDCAT-OUTPUTLEN = 35.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Description'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Price Indicator

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'VPRSV'.

    LS_FIELDCAT-OUTPUTLEN = 7.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Price Control Indicator'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Moving Avg Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'VERPR'.

    LS_FIELDCAT-OUTPUTLEN = 11.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Moving Avg Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Base Unit of Measure

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'MEINS'.

    LS_FIELDCAT-OUTPUTLEN = 7.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Base Unit'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Standard Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'STPRS'.

    LS_FIELDCAT-OUTPUTLEN = 11.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Standard Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Current Planned Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'LPLPR'.

    LS_FIELDCAT-OUTPUTLEN = 11.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Current Planned Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Future Planned Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'ZPLPR'.

    LS_FIELDCAT-OUTPUTLEN = 11.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Future Planned Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Previous Planned Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'VPLPR'.

    LS_FIELDCAT-OUTPUTLEN = 11.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Previous Planned Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Sales Price

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'KBETR'.

    LS_FIELDCAT-OUTPUTLEN = 13.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Sales Price'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Sales Unit

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'KMEIN'.

    LS_FIELDCAT-OUTPUTLEN = 7.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Sales Unit'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    % of Gross Margin

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'MARGIN'.

    LS_FIELDCAT-OUTPUTLEN = 13.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = '% of Gross Margin'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    Material Status

    CLEAR LS_FIELDCAT.

    LS_FIELDCAT-FIELDNAME = 'VMSTA'.

    LS_FIELDCAT-OUTPUTLEN = 13.

    LS_FIELDCAT-TABNAME = 'I_OUTPUT'.

    ls_fieldcat-seltext_L = 'Material Status'.

    APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.

    ENDFORM. " fieldcat_init

    **----

    *

    ** Form f4_for_variant

    **----

    *

    text

    **----

    *

    *FORM f4_for_variant.

    *

    CALL FUNCTION 'REUSE_ALV_VARIANT_F4'

    EXPORTING

    is_variant = g_variant

    i_save = g_save

    i_tabname_header = g_tabname_header

    i_tabname_item = g_tabname_item

    it_default_fieldcat =

    IMPORTING

    e_exit = g_exit

    es_variant = gx_variant

    EXCEPTIONS

    not_found = 2.

    IF sy-subrc = 2.

    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ELSE.

    IF g_exit = space.

    p_vari = gx_variant-variant.

    ENDIF.

    ENDIF.

    *

    *

    *ENDFORM. " f4_for_variant

    ----

    * Form clear_data

    ----

    Clear the Internal table

    ----

    FORM clear_data.

    clear : i_output,

    i_join,

    i_mbew,

    i_a004,

    i_pgmi.

    refresh : i_output,

    i_join,

    i_mbew,

    i_a004,

    i_pgmi.

    ENDFORM. " clear_data

    ----

    FORM USER_COMMAND *

    ----

    FORM user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield. "#EC CALLED

    CASE R_UCOMM.

    WHEN 'IC1'.

    read table i_output index rs_selfield-tabindex.

    SET PARAMETER ID 'MAT' FIELD i_output-matnr.

    SET PARAMETER ID 'WRK' FIELD p_werks.

    if not i_output-matnr is initial.

    call transaction 'MD04' and skip first screen.

    endif.

    ENDCASE.

    ENDFORM.

  • RELEVANCY SCORE 3.48

    DB:3.48:Alv d7



    how 2 use set-pf status in alv, how add set pf-status in selection-screen

    DB:3.48:Alv d7


    hi Sai,

    DO this way..

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    ....................

    b i_callback_pf_status_set = 'PF_STATUS' /b

    tables

    t_outtab = it_out

    exceptions

    program_error = 1

    others = 2.

    Regards,

    Santosh

  • RELEVANCY SCORE 3.47

    DB:3.47:Alv Lead Selection cf



    Hi experts,

    i have problem with lead selection in my editable alv. After deleting row in alv - ( i mean with standart button Delete row ) , another row replaced its possition but lead selection is not set to the another element in context . in the next step i use clear selection method and set_lead_selection_index with no selection parametr method for remove this selection but this "new"lead selection is not removed.

    DB:3.47:Alv Lead Selection cf

    Kuldeep85 wrote:

    Hi ,

    Try Setting the value in set_lead_selection_index of index as -1.

    Hope this will help.

    Regards

    Kuldeep

    thanks problem is solved.

  • RELEVANCY SCORE 3.47

    DB:3.47:Drop Down List In Alv Cell For Date Selection d3



    Hi All

    Is it possible to have a drop down list in Classical ALV CELL that makes DATE SELECTION ?

    Thkx

    Prabhu

    DB:3.47:Drop Down List In Alv Cell For Date Selection d3


    Closing. Not anwsered. Opening a new thread on "DROP DOWN List in Table control for DATE picklist using Calendar"

  • RELEVANCY SCORE 3.46

    DB:3.46:At Line-Selection In Alv fs



    CAN WE USE AT LINE SELECTION EVENT IN ALV, IF YES HOW IT WORKS

    DB:3.46:At Line-Selection In Alv fs


    hi,

    we can't use at line-selection in alv.

    we have to handle this using events of alv and with

    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD

    check below coding for that purpose.

    this is example of alv interactive report

    ----

    * Report ZSR_ALV_INTERACTIVE

    *

    ----

    *

    *

    ----

    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.

    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

  • RELEVANCY SCORE 3.46

    DB:3.46:Alv Report Using Docking Containers With Selection Screen pz



    Hi All,

    Can any tell me how to create an alv report using docking containers with selection screen,an example would be really helpful

    Thanks

    DB:3.46:Alv Report Using Docking Containers With Selection Screen pz


    Hi,

    See [ALV with docking container on selection screen|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/dispalyALVreportoutputintheSAMESelectionScreen]

    Regards

    Marcin

  • RELEVANCY SCORE 3.46

    DB:3.46:How To Assigned The Alv Header Of Selection Text Right-Justified ? 11



    I want RIGHT-JUSTIFIED the ALV header of Selection text,

    How can I do it ?

    Thanks

    Sun

    DB:3.46:How To Assigned The Alv Header Of Selection Text Right-Justified ? 11


    Thanks.

    this issue is solved.

    /people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid

  • RELEVANCY SCORE 3.46

    DB:3.46:Hai Abap Gurus... 9j



    How many secondary lists can be created in an interactive report?

    how to create a check box/option button in a list?

    can you call a bdc program from a report? how?

    can you call a transaction from a report? how?

    what are ALV reports? how they are different from normal reports?

    what are the main events that are used in an ALV report?

    what is the use of SLIS type pool in alv reports?

    difference betn top-of-page and top-of-page during at-line-selection?

    in an interactive report, after going to 5th list, can you come back to

    2nd list? how?

    DB:3.46:Hai Abap Gurus... 9j


    How many secondary lists can be created in an interactive report?

    20

    how to create a check box/option button in a list?

    using parameter statement

    parameter cb_box as check box.

    can you call a bdc program from a report? how?

    yes, RSBDCSUB

    can you call a transaction from a report? how?

    yes, call transaction

    what are ALV reports? how they are different from normal reports?

    Abap List Viewer, Its a tool provied by sap no need to write code for formating display

    what are the main events that are used in an ALV report?

    user command, top-of-page

    what is the use of SLIS type pool in alv reports?

    slis is a type-pool, containing the ALV related type definations

    difference betn top-of-page and top-of-page during at-line-selection?

    top-of-page will fire for the top of page in classical reports

    top-of-page during line selection is fired in interactive reports

    in an interactive report, after going to 5th list, can you come back to

    2nd list? how?

    yes, by setting the sy-lsind varible

  • RELEVANCY SCORE 3.44

    DB:3.44:How To Use At-Line Selection In Alv jc



    Can someone help me about how to use at-line selection in an ALV

    DB:3.44:How To Use At-Line Selection In Alv jc


    Hi Vinod,

    We can not use at-line selection in ALV.

    Please take a look at the example in the link below

    http://www.sap-img.com/abap/an-interactive-alv-report.htm

    Check the subroutine USER_COMMAND you will get an idea on how to achieve interactive reporting in ALV.

    Regards,

    Ferry Lianto

  • RELEVANCY SCORE 3.43

    DB:3.43:Alv For User Selection 3s



    Hi all,

    Can anyone help me how can i get the ALV with check boxes when user selects particular records and selection process further will happen for that records.

    Thanks in advance,

    DB:3.43:Alv For User Selection 3s


    hi,

    sort the table by which you fill the ALV in DESCENDING order

    and loop on the table where check_box = 'X'.

    you find the desired row

    hope this helps

    Regards

    Ritesh

  • RELEVANCY SCORE 3.42

    DB:3.42:Oo Alv With Edit Field (Fieldcat) No Accept Single Line Selection) x1


    I'm create a program using ALV OO, I had 2 fields that I can edit the values, I would like to keep in my alv screen the single line selection:( lw_layout-sel_mode = 'B' ), but when I flag the fieldcat-edit = 'X', the ALV keep the screen like multiple selection, I already try to change the sel_mode with 'A' 'B' 'C' 'D', but nothing change. Anybody know why this happening ?? and if this is possible or not ?Regards Suzuki.

    DB:3.42:Oo Alv With Edit Field (Fieldcat) No Accept Single Line Selection) x1

    Hi Edson,You got an ALV with 2 editable fields, if you double click on a row then only the fields should be ready for input. if this is your requirement then this can be achived.Regards,Kumar M

  • RELEVANCY SCORE 3.42

    DB:3.42:Alv - Problem To Disable Row Selection (Set_Row_Selectable) xk



    Hi,

    I'm using an (non editable) ALV with a supply function to display details to each line.

    I have to buttons "New" and "Modify" to insert a new line or to modify an existing row (in the details).

    This works fine.

    Now what I want to do is, if the user press one of the buttons "New" or "Modify", I want to disable the row selection of the ALV, so the user can't select another row during inserting or editing.

    For this, I've implemented in the WDDOMODIFYVIEW of the view the coding to enable or disable the row selection

    (...)
    lo_value-if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_TRUE ).
    * or
    lo_value-if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_FALSE ).
    (...)

    DB:3.42:Alv - Problem To Disable Row Selection (Set_Row_Selectable) xk


    Hi Rahul,

    thank you very much for your answer.

    That's correct, the ALV is in read only mode.

    I think your suggestion with the confirmation popup could solve my problem.

    I will try it out.

    But I'm still confused about the current behaviour.

    The other steps (disable/enable the buttons) I already do.

    Kind Regards,

    Andreas

  • RELEVANCY SCORE 3.39

    DB:3.39:Web Dynpro: Lead Selection m3


    HI,In web dynpro ALV control, How can i get the lead selection.. For example i have two lines in ALV, When i am using the F4 values for second line field, its sitting in first line. May i know how to get the second line lead selection?

    DB:3.39:Web Dynpro: Lead Selection m3

    Hi Karthik,Createa method like on_leadselection and in the fourth coulmn select the ON_LEAD_SELECT event of the alv grid where u have used the alv component i.e. either in the component controller or view.After in this method u will get to parameterWDEVENTtype ref to CL_WD_CUSTOM_EVENTR_PARAMtype ref to IF_SALV_WD_TABLE_LEAD_SELECTThen within this method u can write your logicMETHOD on_leadselection .DATA : lv_index TYPE i, lv_old_index TYPE i. lv_index = r_param-index. lv_old_index = r_param-old_index.endmethod.Hopes this will helps you.RegardManoj Kumar

  • RELEVANCY SCORE 3.38

    DB:3.38:Alv List Display 89



    Hi,

    My requirement is to convert my classical report dsiplay to ALV list display. Report is all about displaying bill of materials which have MATNR as selection option. Currenlty there is one internal table which have all data and output is displayed in this manner.

    Material1 :Description of material1 .

    line items for Material1.

    Some text for Material1.

    Material2 : Description of material2

    line items for Material2.

    Some text for matrial2.

    .......

    ......

    .....

    Now my requirement is to display the data in ALV format . Line items will be displayed as ALV. I tried to do this using function module REUSE_ALV_BLOCK_LIST_APPEND but the issue is how to call this function module in loop as materials info are fetched based on user entry in selection screen.Kindly suggest if anyone has faced some similar kind of requirement.

    DB:3.38:Alv List Display 89


    REMAING PART

    FORM end_of_list. "#EC CALLED
    DATA :
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
    ls_sort TYPE slis_sortinfo_alv,
    lt_sort TYPE slis_t_sortinfo_alv, " Sort table
    lt_events TYPE slis_t_event,
    ls_event TYPE slis_alv_event.
    m_fieldcat 'MATNR' 'MARA' 'GT_MARA'.
    m_fieldcat 'ERNAM' 'MARA' 'GT_MARA'.
    m_fieldcat 'ERSDA' 'MARA' 'GT_MARA'.
    m_fieldcat 'MTART' 'MARA' 'GT_MARA'.
    m_fieldcat 'MATKL' 'MARA' 'GT_MARA'.
    m_sort 'MATNR'.
    MOVE 'END_OF_LIST' TO ls_event-name.
    MOVE 'END_OF_LIST_2' TO ls_event-form.
    APPEND ls_event TO lt_events.
    gs_layout-list_append = c_x.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    it_fieldcat = lt_fieldcat
    is_layout = gs_layout
    it_sort = lt_sort
    it_events = lt_events
    i_save = 'A'
    TABLES
    t_outtab = gt_mara.
    ENDFORM. " END_OF_LIST
    FORM end_of_list_2. "#EC CALLED
    DATA :
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
    ls_sort TYPE slis_sortinfo_alv,
    lt_sort TYPE slis_t_sortinfo_alv, " Sort table
    lt_events TYPE slis_t_event,
    ls_event TYPE slis_alv_event.
    m_fieldcat 'VBELN' 'VBAK' 'GT_VBAK'.
    m_fieldcat 'VKORG' 'VBAK' 'GT_VBAK'.
    m_fieldcat 'VTWEG' 'VBAK' 'GT_VBAK'.
    m_fieldcat 'KUNNR' 'VBAK' 'GT_VBAK'.
    m_fieldcat 'ERDAT' 'VBAK' 'GT_VBAK'.
    m_sort 'VBELN'.
    MOVE 'TOP_OF_PAGE' TO ls_event-name.
    MOVE 'TOP_OF_PAGE' TO ls_event-form.
    APPEND ls_event TO lt_events.
    gs_layout-list_append = c_x.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    it_fieldcat = lt_fieldcat
    is_layout = gs_layout
    it_sort = lt_sort
    it_events = lt_events
    i_save = 'A'
    TABLES
    t_outtab = gt_vbak.
    ENDFORM. " END_OF_LIST_2

  • RELEVANCY SCORE 3.37

    DB:3.37:Alv Report 89



    is Customer/vendor (ie. FBL1N/FBL5N) line item display is a ALV report?

    DB:3.37:Alv Report 89


    Hello,

    if you have a cpd-vendor/customer, you can display the name NAME1 in the line. For normally vendorthe field NAME1 isn't filled.

    The name is in the BKPF-table only.

    But there is a BADI FI_ITEMS_CH_DATA. Please check the note 1323512. Best regards, Hana

  • RELEVANCY SCORE 3.37

    DB:3.37:Alv-Tree Problem a7



    Hi,

    I am displaying data in ALV Tree. In ALV tree, there is some line items for each of the node. When the user click on the line item and press the button which is on the application toolbar, some Ztable will be updated. Its working when i go back to the selection screen and execute again. But my requirement is, it has to reflected immidiately when the data is changed. Though i am displaying the updated data in the ALV tree, it has to reflected immediately when the user press the button which is there in the application tool bar. Please suggest me.

    Regards,

    Priyaranjan

    DB:3.37:Alv-Tree Problem a7


    hi,

    i think that you can solve this problem using this metods of the class alv_tree:

    CALL METHOD alv_tree-change_item

    EXPORTING

    i_node_key = i_node_key " Node that i have to change

    i_fieldname = 'KUNNR' " Field name

    i_data = lv_kunnr " Value

    i_u_data = 'X' " flag for changing value

    EXCEPTIONS

    node_not_found = 1

    OTHERS = 2.

    CALL METHOD alv_tree-frontend_update. " update the frontend

    cl_gui_cfw=flush( ).

    bye

  • RELEVANCY SCORE 3.36

    DB:3.36:About Alv Report 1m



    Hi Experts,

    I have to create a ALV report.Report should allow user to .change selection criteria via standard Settings Fields for Selection functionality.

    please suggest. Points sure.

    Anshu.

    DB:3.36:About Alv Report 1m


    Hi,

    Check the following link:

    http://sapdev.co.uk/reporting/alv/alvgrid_editable.htm

    The field is:

    fieldcat-edit = 'X'.

    Regards,

    Shiva

  • RELEVANCY SCORE 3.36

    DB:3.36:This Is An Alv Report ds



    If have Displayed a ALV report , i that my requirement is :

    Double click on line - navigation to MM03 (Material master material; Accounting or Costing View) andd skip selection screen.

    for this i have written a call transaction program but i dont know what i should do for this Double click on line -.

    please help me as this is very urgent , i will reward points if helpfull.

    thanks and regards,

    prasadnn

    DB:3.36:This Is An Alv Report ds


    hi,

    simple chk this link.

    code is there.

    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm

    Rgds

    Reshma

  • RELEVANCY SCORE 3.36

    DB:3.36:Alv Reporting mz



    Hello all,

    I need to prepare a report which outputs records from one header table(1st line of the list) and three item table(2nd, 3rd and 4th lines) using ALV.

    Here user have the option to choose which item tables should get dispalyed(checkbox in the selection screen)

    Can you help me out.

    Thanks in advance

    Subramanian.

    PS: 2nd, 3rd and 4th lines can have multiple entries for one header record

    DB:3.36:Alv Reporting mz


    Hello,

    Thanks for your reply.

    Here we are using one header and one item table

    i_tabname_header = 'GT_VBAK'

    i_tabname_item = 'GT_VBAP'

    but in my case we have one header table and 3 item tables.

    To be more precise, I explain the scenario further,

    In the output list,

    1st line - display the header record

    2nd line - display the record from item table 1(one or multiple records)

    3rd line - display the record from item table 2(one or multiple records)

    4th line - display the record from item table 3(one or multiple records)

    Regards,

    Subramanian

  • RELEVANCY SCORE 3.36

    DB:3.36:Alv! Interactive Pf Status za



    Hi!

    I want to do a AlV report with PF Status , using that push buttons i want to navigate to next screens pls give some sample good reports

    at line selection alv report also

    pls give good sample reports

    Thanking you friends

    Rahul.

    DB:3.36:Alv! Interactive Pf Status za


    Rahul,

    Here is an int report which will drill down upto 4 lists.

    Document No - Item leve data of that document-Material details-purchase doc no-ME23N.

    ----

    * Report ZFLUKE *

    * *

    ----

    * *

    * *

    ----

    REPORT ZFLUKE no standard page heading line-size 120 message-id zkk . .

    tables: vbak,vbap,mara,ekpo.

    data:begin of ivbak occurs 0,

    vbeln like vbak-vbeln,

    audat like vbak-audat,

    ernam like vbak-ernam,

    end of ivbak.

    data:begin of ivbap occurs 0,

    vbeln like vbap-vbeln,

    posnr like vbap-posnr,

    matnr like vbap-matnr,

    end of ivbap.

    data:begin of imara occurs 0,

    matnr like mara-matnr,

    mtart like mara-mtart,

    mbrsh like mara-mbrsh,

    matkl like mara-matkl,

    spart like mara-spart,

    end of imara.

    data:begin of iekpo occurs 0,

    ebeln like ekpo-ebeln,

    ebelp like ekpo-ebelp,

    matnr like ekpo-matnr,

    bukrs like ekpo-bukrs,

    werks like ekpo-werks,

    meins like ekpo-meins,

    netwr like ekpo-netwr,

    end of iekpo.

    data: total like ekpo-netwr.

    select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.

    selection-screen begin of block test with frame title text-001.

    select-options:s_vbeln for vbak-vbeln obligatory.

    selection-screen end of block test.

    ****

    *Basic list

    ****

    select vbeln audat ernam from vbak into table ivbak

    where vbeln in s_vbeln.

    if sy-subrc = 0.

    write:/'Date:-',sy-datum.

    write:/'Time:-',sy-timlo.

    write:/'List:-',sy-lsind.

    uline.

    WRITE:/1 sy-vline, 'Document No.' color 6,

    15 sy-vline, 'Document Date' color 6,

    30 sy-vline, 'Name of the Person' color 6,

    49 sy-vline.

    loop at ivbak.

    uline.

    write: /1 sy-vline ,

    ivbak-vbeln hotspot on,

    15 sy-vline,

    ivbak-audat,

    30 sy-vline,

    ivbak-ernam,

    49 sy-vline.

    hide ivbak-vbeln.

    endloop.

    uline.

    endif.

    at line-selection.

    ***

    *List 1.

    ***

    select vbeln posnr matnr from vbap into table ivbap

    where vbeln = ivbak-vbeln.

    if sy-lsind = 1 .

    write:/'Date:-',sy-datum.

    write:/'Time:-',sy-timlo.

    write:/'List:-',sy-lsind.

    uline .

    write:/1 sy-vline, 'Document No.' color 6,

    15 sy-vline, 'Item' color 6,

    25 sy-vline, 'Material No.' color 6,

    41 sy-vline.

    loop at ivbap.

    uline .

    write:/1 sy-vline,

    ivbap-vbeln,

    15 sy-vline,

    ivbap-posnr,

    25 sy-vline,

    ivbap-matnr hotspot on,

    41 sy-vline.

    hide ivbap-matnr.

    endloop.

    uline .

    endif.

    at line-selection.

    ***

    *List 2.

    ***

    select matnr mtart mbrsh matkl spart from mara into table imara

    where matnr = ivbap-matnr.

    if sy-lsind = 2 .

    write:/'Date:-',sy-datum.

    write:/'Time:-',sy-timlo.

    write:/'List:-',sy-lsind.

    uline .

    write:/1 sy-vline, 'Material No.' color 6,

    18 sy-vline,'Material Type' color 6,

    34 sy-vline,'Industrial Sector' color 6,

    53 sy-vline,'Material Group' color 6,

    69 sy-vline,'Division' color 6.

    loop at imara.

    uline .

    write: /1 sy-vline,

    imara-matnr hotspot on,

    18 sy-vline,

    imara-mtart,

    34 sy-vline,

    imara-mbrsh,

    53 sy-vline,

    imara-matkl,

    69 sy-vline,

    imara-spart.

    hide imara-matnr.

    endloop.

    uline.

    endif.

    at line-selection.

    select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.

    if sy-lsind = 3.

    if sy-subrc ne 0.

    Message I000(zkk).

    leave to screen 0.

    else.

    write:/'Date:-',sy-datum.

    write:/'Time:-',sy-timlo.

    write:/'List:-',sy-lsind.

    uline .

    write: /1 sy-vline, 'Pur Doc No.' color 6,

    15 sy-vline, 'Item No. of Pur Doc' color 6,

    35 sy-vline, 'Material No.' color 6,

    53 sy-vline, 'Comp.Code' Color 6,

    65 sy-vline, 'Plant' color 6,

    73 sy-vline, 'Order Unit' color 6,

    85 sy-vline, 'Net Ord Val' color 6,

    103 sy-vline.

    loop at iekpo.

    uline.

    write:/1 sy-vline,

    iekpo-ebeln hotspot on,

    15 sy-vline,

    iekpo-ebelp,

    35 sy-vline,

    iekpo-matnr,

    53 sy-vline,

    iekpo-bukrs,

    65 sy-vline,

    iekpo-werks,

    73 sy-vline,

    iekpo-meins,

    85 sy-vline,

    iekpo-netwr left-justified,

    103 sy-vline.

    hide iekpo-ebeln.

    at end of netwr.

    total = total + iekpo-netwr.

    endat.

    endloop.

    uline.

    write: /74 'Total:-','Rs.',Total left-justified.

    endif.

    endif.

    at line-selection.

    if sy-lsind = 4.

    set parameter id 'BES' field iekpo-ebeln.

    call transaction 'ME23N' AND SKIP FIRST SCREEN.

    endif.

    K.Kiran.

  • RELEVANCY SCORE 3.36

    DB:3.36:Alv Grid cj


    I am using method set_selected_rows to select line of the table grid and then call the method get_selected_rows to check if the selection was done. It work but when it come back to the screen the line is not selected. I have set SEL_MODE to A and put my selection field in layout structure box_fname.Regards.

    DB:3.36:Alv Grid cj

    Hi,There are 2 solutions a) Don't use Refresh table display after checking the Checkbax and doing your activities, if you comeback after this you will have the Checkbox still selected. b) if you have to use refresh table display then use the method w_grid-set_selected_rows to set the selected rows. The following code might help.

    CALL METHOD w_grid-get_selected_rows
    IMPORTING
    et_index_rows = tl_row
    et_row_no = tl_rid.

    LOOP AT tl_row ASSIGNING l_row.
    READ TABLE t_vbak ASSIGNING l_vbak INDEX l_row-index.

    IF sy-subrc = 0.
    SET PARAMETER ID 'AUN' FIELD l_vbak-vbeln.
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    CALL METHOD w_grid-refresh_table_display.
    CALL METHOD w_grid-set_selected_rows
    EXPORTING
    it_index_rows = tl_row
    it_row_no = tl_rid.

    ENDIF.

    ENDLOOP.

  • RELEVANCY SCORE 3.36

    DB:3.36:Alv - Lead Selection Ist Lost When Alv Is Sorted zc



    Hi all,

    I am using ALV having a lead selection when it comes to display.

    But when I am sorting that ALV or having a incoming view personalized (with sorting) then the lead selection is lost.

    What can I do for not loosing the lead selection on the ALV?

    Thanks very much.

    Achim

    DB:3.36:Alv - Lead Selection Ist Lost When Alv Is Sorted zc


    Hi WD_ABAP,

    when setting the lead selection at time of WDDOMODIFYVIEW then all other is overridden e.G. selecting a row by myself after 1st display of ALV.

    So I don't think that is the right time of setting lead selection.

    Do you have another clue ?

    Thanks.

    Achim

  • RELEVANCY SCORE 3.35

    DB:3.35:Line Selection Of Alv Table Using Bdc 83


    Hi Experts,we have a requirement in which we have to settle the AUC (Asset under construction) to fixed assetsusing the AIAB transaction.We are doing the BDC recording for this to settle AuC by preparing the distribution rule.Problem :In the BDC program, the BDC_CURSOR is not capturing the selected line value of the ALV table.Please let us know, how we can use the BDC for the ALV table.Regards,Dixit Miglani

    DB:3.35:Line Selection Of Alv Table Using Bdc 83

    Hi Dixit,no sorry. I'm not an expert in asset managment.Cheers,Martin

  • RELEVANCY SCORE 3.35

    DB:3.35:Tooltip On Pushbutton On Alv Report Selection Screen 9d



    Hi Experts,

    I have a selection screen with two pushbuttons i want to provide tooltip on this button when user takes his cursor on it .. some part of my code

    Selection screen:

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN COMMENT 1(20) text-t02 FOR FIELD p_info.

    PARAMETERS: p_info TYPE string.

    SELECTION-SCREEN: PUSHBUTTON 68(10) but1 USER-COMMAND cli1.

    SELECTION-SCREEN : END OF LINE.

    PARAMETERS: r_exe_im RADIOBUTTON GROUP rb1.

    PARAMETERS: r_st RADIOBUTTON GROUP rb1.

    SELECTION-SCREEN SKIP 1.

    SELECTION-SCREEN: PUSHBUTTON /1(20) exec1 USER-COMMAND cli2.

    SELECTION-SCREEN: FUNCTION KEY 1.

    SELECTION-SCREEN END OF BLOCK b1.

    please tell me on these selection fields how to display tool tip.

    Thanks and regards,

    Roshan.

    DB:3.35:Tooltip On Pushbutton On Alv Report Selection Screen 9d


    Hi,

    After completing your executable program in SE38, activate it and goto SE51(Screen painter).

    Here give the name of your program and screen number as 1000.

    Click on Change.

    Goto Element List Tab.

    Here you will find all your elements from your program.

    Select the required element and click on Properties.

    Here you will find a Tooltip Text property. Click on the button 'Text' of this property.

    You will be given 2 options 1) Text from Text element 2) Text from Variable

    Enter as per requirement

    Save and Activate.

    Hope this will be useful

    Regards

    Bhupal

  • RELEVANCY SCORE 3.34

    DB:3.34:Alv Events jk



    Hi all,

    In my alv output(grid display) i want to perform certain actions when a line is selected and a button is pressed.

    how can this be achieved?

    I am using At line selection followed by At user command and have written my logic after At user command,but the control does not go to my code.

    Any pointers to this would be appreciated.

    Regards,

    S.Subasree

    DB:3.34:Alv Events jk


    hi

    check this standard program.

    it explains the usage of all thre grid events.

    BCALV_TEST_GRID_EVENTS

  • RELEVANCY SCORE 3.34

    DB:3.34:Bcalv_Edit_04 Debug Problem 9p



    Hello All,

    Im making an editable report and i want to be able to add rows and delete rows from ALV.

    I used BCALV_EDIT_04 example and made necessary changes for this alv but the thing is ;

    after i display my ALV,when i push the button to create a new line, it is creating an empty line. I want some of the fields filled automatically from the parameters at my selection screen but i couldn't find how to do it.

    The debug doesnt start when i push "create row" or "delete row" button on alv screen so i cant be sure how to do it.

    Anyone has ideas?

    DB:3.34:Bcalv_Edit_04 Debug Problem 9p


    Hi aydnbk,

    OK now I remember: The buttons only work at the front end in the GUI control, they are not connected to any event processed on the server. I'm not sure if there is any way to catch this on server side, I remember we finally deactivated those buttons and created our own ones connected to custom event handlers.

    Took quite some time but it worked even before our boss told us that he would not want this grid anyway

    Regards

    Clemens

  • RELEVANCY SCORE 3.33

    DB:3.33:Alv Reports 9c



    1.how can we put a end-of-selection in alv reports?

    2.how can we put a hot spot in alv reports?

    3.how can we add our own functionality in alv reports?

    DB:3.33:Alv Reports 9c


    Hi

    i am sending a sample code..

    TYPE-POOLS : slis.

    ----

    * structure declaration

    ----

    TYPES : BEGIN OF st_ekko,

    ebeln TYPE ekko-ebeln, "Purchasing Document Number

    bstyp TYPE ekko-bstyp, "Purchasing Document Category

    bsart TYPE ekko-bsart, "Purchasing Document Type

    aedat TYPE ekko-aedat, "record created on

    ernam TYPE ekko-ernam, "Person who Created the Object

    END OF st_ekko.

    TYPES : BEGIN OF st_ekpo,

    ebeln TYPE ekko-ebeln,

    ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document

    ematn TYPE ekpo-ematn, "Material number

    matkl TYPE ekpo-matkl, "Material group

    netpr TYPE ekpo-netpr, "Net price in purchasing document

    END OF st_ekpo.

    ----

    * internal table and work area declaration

    ----

    DATA : it_ekpo TYPE STANDARD TABLE OF st_ekpo,

    wa_ekpo TYPE st_ekpo,

    it_ekko TYPE STANDARD TABLE OF st_ekko,

    wa_ekko TYPE st_ekko,

    it_fieldcat TYPE slis_t_fieldcat_alv,

    wa_fieldcat TYPE slis_fieldcat_alv,

    wa_layout TYPE slis_layout_alv.

    ----

    * internal table and work area declaration

    ----

    DATA : v_ebeln TYPE ekko-ebeln.

    DATA: t_header TYPE slis_t_listheader,

    wa_header TYPE slis_listheader,

    t_line TYPE slis_listheader-info,

    nl_lines TYPE i,

    nl_linesc(10) TYPE c.

    ----

    * start-of-selection

    ----

    START-OF-SELECTION.

    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-000.

    SELECT-OPTIONS : so_ebeln FOR v_ebeln.

    SELECTION-SCREEN END OF BLOCK a.

    PERFORM data_retrieval.

    PERFORM build_fieldcatalog1.

    PERFORM build_layout.

    PERFORM ekkogriddisplay_alv.

    ----

    * Form build_fieldcatalog2

    ----

    FORM build_fieldcatalog2.

    CLEAR wa_fieldcat.

    REFRESH it_fieldcat.

    wa_fieldcat-fieldname = 'EBELN'.

    wa_fieldcat-seltext_l = 'PURCHASE ORDER'.

    wa_fieldcat-col_pos = 0.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'EBELP'.

    wa_fieldcat-seltext_l = 'ITEM NUMBER'.

    wa_fieldcat-col_pos = 1.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'EMATN'.

    wa_fieldcat-seltext_l = 'MATERIAL TYPE'.

    wa_fieldcat-col_pos = 2.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'MATKL'.

    wa_fieldcat-seltext_l = 'MATERIAL GROUP'.

    wa_fieldcat-col_pos = 3.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'NETPR'.

    wa_fieldcat-seltext_l = 'NET PRICE'.

    wa_fieldcat-col_pos = 4.

    wa_fieldcat-do_sum = 'X'.

    APPEND wa_fieldcat TO it_fieldcat.

    ENDFORM. "build_fieldcatalog

    ----

    * Form build_fieldcatalog1

    ----

    FORM build_fieldcatalog1.

    wa_fieldcat-fieldname = 'EBELN'.

    wa_fieldcat-seltext_l = 'PURCHASE ORDER'.

    wa_fieldcat-col_pos = 0.

    WA_FIELDCAT-HOTSPOT = 'X'.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'BSTYP'.

    wa_fieldcat-seltext_l = 'DOCUMENT CATEGORY'.

    wa_fieldcat-col_pos = 1.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'BSART'.

    wa_fieldcat-seltext_l = 'DOCUMENT TYPE'.

    wa_fieldcat-col_pos = 2.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'AEDAT'.

    wa_fieldcat-seltext_l = 'DATE'.

    wa_fieldcat-col_pos = 3.

    APPEND wa_fieldcat TO it_fieldcat.

    wa_fieldcat-fieldname = 'ERNAME'.

    wa_fieldcat-seltext_l = 'NAME'.

    wa_fieldcat-col_pos = 4.

    APPEND wa_fieldcat TO it_fieldcat.

    ENDFORM. "build_fieldcatalog

    ----

    * Form data_retrieval

    ----

    FORM data_retrieval.

    SELECT ebeln bstyp bsart aedat ernam

    FROM ekko

    INTO TABLE it_ekko

    WHERE ebeln IN so_ebeln.

    ENDFORM. "data_retrieval

    ----

    * form build_layout.

    ----

    FORM build_layout.

    wa_layout-zebra ='X'.

    wa_layout-no_vline = 'X'.

    wa_layout-no_hline = 'X'.

    wa_layout-colwidth_optimize = 'X'.

    ENDFORM. "build_layout

    ----

    * form top-of-page1

    ----

    FORM top-of-page1.

    Title

    wa_header-typ = 'H'.

    wa_header-info = 'PURCHASE ORDER HEADER REPORT'.

    APPEND wa_header TO t_header.

    CLEAR wa_header.

    Total No. of Records Selected

    DESCRIBE TABLE it_ekko LINES nl_lines.

    nl_linesc = nl_lines.

    CONCATENATE 'Total No. of Records Selected: ' nl_linesc

    INTO t_line SEPARATED BY space.

    wa_header-typ = 'A'.

    wa_header-info = t_line.

    APPEND wa_header TO t_header.

    CLEAR: wa_header, t_line.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    it_list_commentary = t_header

    i_logo = 'SUN_TEST_LOGO1'.

    REFRESH t_header.

    ENDFORM. "top-of-page

    ----

    * form top-of-page2

    ----

    FORM top-of-page2.

    Title

    wa_header-typ = 'H'.

    wa_header-info = 'PURCHASE ORDER ITEM REPORT'.

    APPEND wa_header TO t_header.

    CLEAR wa_header.

    Total No. of Records Selected

    DESCRIBE TABLE it_ekpo LINES nl_lines.

    nl_linesc = nl_lines.

    CONCATENATE 'Total No. of Records Selected: ' nl_linesc

    INTO t_line SEPARATED BY space.

    wa_header-typ = 'A'.

    wa_header-info = t_line.

    APPEND wa_header TO t_header.

    CLEAR: wa_header, t_line.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    it_list_commentary = t_header

    i_logo = 'SUN_TEST_LOGO1'.

    REFRESH t_header.

    ENDFORM. "top-of-page

    ----

    * form set_pf_status

    ----

    FORM set_pf_status USING rt_extab TYPE slis_t_extab.

    SET PF-STATUS 'MYMENU'.

    "Copy of 'STANDARD' pf_status from fgroup SALV

    ENDFORM. "set_pf_status

    ----

    * Form AT_user_command

    ----

    FORM at_user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield.

    CASE r_ucomm.

    WHEN 'IC1'.

    IF rs_selfield-fieldname EQ 'EBELN'.

    WRITE:/ 'CHAITHU'.

    READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.

    SELECT ebeln ebelp ematn matkl netpr

    FROM ekpo

    INTO TABLE it_ekpo

    WHERE ebeln EQ wa_ekko-ebeln.

    PERFORM build_fieldcatalog2.

    PERFORM ekpogriddisplay_alv.

    ELSE.

    MESSAGE text-002 TYPE 'I'.

    ENDIF.

    ENDCASE.

    ENDFORM. "AT_user_command

    ----

    * form ekkogriddisplay_alv.

    ----

    FORM ekkogriddisplay_alv.

    IF it_ekko[] IS INITIAL.

    MESSAGE text-001 TYPE 'I'.

    ELSE.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    i_callback_top_of_page = 'TOP-OF-PAGE1'

    i_callback_pf_status_set = 'SET_PF_STATUS'

    i_callback_user_command = 'AT_USER_COMMAND'

    is_layout = wa_layout

    it_fieldcat = it_fieldcat

    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.

    ENDIF.

    ENDFORM. "listdisplay_alv

    ----

    * form ekpogriddisplay_alv.

    ----

    FORM ekpogriddisplay_alv.

    IF it_ekpo[] IS INITIAL.

    MESSAGE text-003 TYPE 'I'.

    ELSE.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    i_callback_top_of_page = 'TOP-OF-PAGE2'

    i_callback_pf_status_set = 'SET_PF_STATUS'

    is_layout = wa_layout

    it_fieldcat = it_fieldcat

    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.

    ENDIF.

    ENDFORM. "ekpogriddisplay_alv

    here i use top-of-page event.like this u can use end-of-selection event.and write code for that in that form.

  • RELEVANCY SCORE 3.33

    DB:3.33:Row Selection In Alv 3s


    Hi ,How do I get row selection for alv records using REUSE_ALV_GRID_DISPLAY, where in user can select multiple records in alv.Thnx

  • RELEVANCY SCORE 3.33

    DB:3.33:Alv df



    hi friends,

    In ALV Report Where we can use At Line-Selection?

    DB:3.33:Alv df


    Hai,

    bAT LINE SELECTION/b is basically used when you are displaying in the Interactive reports. This is used once the BASIC list is generated.

    bEffect/b

    Event in interactive reporting

    This event is processed whenever the user chooses a valid line in the list (i.e. a line generated by statements such as WRITE,ULINE, or SKIP) with the cursor and presses the function key which has the function PICK in the interface definition. This should normally be the function key F2, because it has the same effect as double-clicking the mouse, or clicking once in the case of a hotspot.

    The processing for the event AT LINE-SELECTION usually generates further list output (the details list) which completely covers the current list display. If you want the current list display to remain visible (to aid user orientation), you can do this with the key word WINDOW.

    In most cases, the information from the selected line is used to retrieve more comprehensive information by direct reading. When displaying the original list, you store the key terms needed for this in the HIDE area of the output line.

    Regards,

    Padmam.

  • RELEVANCY SCORE 3.33

    DB:3.33:Pushbuttons On Selection Screen xc



    Hi All,

    As per my requirement I have to createtwo pushbuttons on my selection screen , BUTT1 and BUTT2. That I have created.

    on BUTT1 I have to fill selection screen fields with some values, that is no problem.

    My problem : on BUTT2 I have to generate a ALV report.

    my code so far is as follows.

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN PUSHBUTTON (20) W_BUTN1 USER-COMMAND BUTTON1.

    SELECTION-SCREEN PUSHBUTTON (25) W_BUTN2 USER-COMMAND BUTTON2.

    SELECTION-SCREEN END OF LINE.

    At selection screen.

    I'm checking sccrfields-ucomm here... for

    if BUTT1

    filling the screen field values.

    elseif BUTT2.

    flag = 1.

    endif.

    Start-of-selection.

    if flag = 1.

    Extract data from tables and display ALV report.

    endif.

    Not able to achieve BUTT2 functionality of displaying ALV report. Where should I code for BUTT2.

    Please help.

    Thanks in advance.

    DB:3.33:Pushbuttons On Selection Screen xc


    Hi Pooja,

    Functionlity for BUTT2 can be achieved at START-OF-SELECTION event.

    This event is necessary to perform any data extraction.

    Thus, you can keep BUTT1 functionality as it is and for BUTT2, place your perform in start-of-selection.

    BR,

    Vishal.

  • RELEVANCY SCORE 3.31

    DB:3.31:Short Dump When Pressing Back From Selection Screen x9


    Hi,I created an ALV report using methods and OO, when i click back to go to the selection screen it used to just go back to the SAP start-up menu. So i used CALL TRANSACTION 'xxxxxxx' instead to make sure it always gets back to the selection screen. But now when i try to hit back from the selection screen it dumps!iException condition "CNTL_ERROR" raised./i with the standard line below highlightedi* check control IF CONTROL-H_CONTROL IS INITIAL. RAISE CNTL_ERROR. ENDIF. /i Any help would be appreciated,Thanks.

    DB:3.31:Short Dump When Pressing Back From Selection Screen x9

    Hi Dave, If you are using the OO ALV in a report the std fn.s like BACK will be handled automatically because we are not creating any screens.If you are using methods from cl_salv_table class and using full screen type the above fact works. But if u are using grid type in the same class,then u will have to create a screen only for alv(not for sel.screen).Here for BACK button, u can givewhen 'BACK'. leave to screen 0. In both cases sel screen will be standard only.ieselection-screen begin of block gen with frame.PARAMETERS: name like field obligatory.SELECT-OPTIONS: name for field.selection-screen end of block gen.Reward if helpful.Thanks..

  • RELEVANCY SCORE 3.30

    DB:3.30:Issue With Submitting A Alv Report In Container ... 71



    Hello Gurus,

    I know how to display data in ALV in container on screen. My issue is, I have a container defined on screen. I have a separate report whose output is in the ALV form.

    Now if I submit the report in the PBO, I do not get the ALV output of that report in custom container defined on screen, but the report as a whole gets executed.

    How can I submit a report and still get its output on ALV container.

    MODULE STATUS_0100 OUTPUT.

    CREATE OBJECT CUSTOM2
    EXPORTING
    CONTAINER_NAME = 'CUSTOM2'.

    CREATE OBJECT GRID1
    EXPORTING

    I_PARENT = custom2.

    perform loaddata2.

    ENDMODULE.

    FORM loaddata2.
    DATA: v_sp like rsparams occurs 0 with header line.

    V_SP-SELNAME = 's_usr'.
    V_SP-KIND = 'P'.
    V_SP-LOW = 'X'.
    APPEND V_SP.

    submit ZREPT with selection-table v_sp and return.

    ENDFORM.

    DB:3.30:Issue With Submitting A Alv Report In Container ... 71


    Hi,

    In your ZREPT report define a parameter( called ) one character that is not displayed. Set this parameter 'X' before submit statement. In ZREPT report check this parameter;

    if called is not initial. (It means the report is submitted from the other report)

    export result table to memory id 'MEMORYID'.

    endif.

    Then in report from which you submitted ZREPT, import result table from memory id 'MEMORYID'. Then display the result table in your grid.

  • RELEVANCY SCORE 3.30

    DB:3.30:At Line-Selection In Alv dp


    Can we have AT LINE-SELECTION in ALV??I am displaying a some details from MARA using ALV.Now what I want to do is once we click on any of the line, some details from MAKT table has to be displayed in a saperate window.I tried using AT LINE-SELECTION but cannot get.If we cannot use it, is there any better way?Please guide. Thnx

    DB:3.30:At Line-Selection In Alv dp

    hi , if you want to use at line selection in alv , you have to first define teh field in field catalog of alv as HOT-SPOT , SO when you execute your program the cursor changes to hand , so when you click on particular value of the field , you will come to know abt the value by using slis_selfield .FORM user_command USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD. CASE R_UCOMM . WHEN 'IC1'.(this is code for hot spot , when user click on the field this event is triggereed) IF RS_SELFIELD-FIELDNAME NE 'VBELN'. (Field name will contain the name of field clicked if you have more than one hot spot field). or RS_SELFIELD-VALUE, ( FIELD VALUE IS CAPTURED HERE AS PER USER CLICK) YOUR DESIRED LOGIC. ENDIF.

  • RELEVANCY SCORE 3.30

    DB:3.30:How To Print Traffic Lights In Alv Reports cc



    hi how to print traffic lights on selection screen in alv reports

    DB:3.30:How To Print Traffic Lights In Alv Reports cc


    in MSKU,MSEG,MBEW,KNMT,MAKT

    for the above tables i want to common matnr valu plzzzzzzzzzzzzz

  • RELEVANCY SCORE 3.30

    DB:3.30:Problem In Alv Grid? 3m



    Hi guys,

    I displayed a alv grid report.I added 2 buttons in the toolbar.My layout selection mode is set to 'space' or 'B'.So i m getting list in lines not as rows.Now the user selects any of the line in the list(he can select only one line not multiple lines) and click on the toolbar button,then transaction code mm03 will be executed using the material number in the selected line.

    I know there is a method get_selected_rows.Is there any method for selecting lines?

    Any suggestion please?

    Thanks in advance.

    DB:3.30:Problem In Alv Grid? 3m


    hi dinesh,

    in that case write the code as follw..

    1) when user select the line(if it is multiple lines_ and clicks the button here write the below logic.

    describe table int table name lines lin.

    if line gt 0.

    message i000 with 'Please selct one line at a time'.

    endif.

    thenur problem will be solved.

    thanks,

    maheedhar

  • RELEVANCY SCORE 3.30

    DB:3.30:At Line-Selection a7


    Hello all.I have a program that starts with a selection screen, then it shows al ALV and in the end it shows a list.It works fine except for one thing. In the final list, some parts of the text have hotpsots so it goes to a specific document when clicked. The problem is it says there is no event defined, but the AT LINE-SELECTION is in fact there.Anyone can help on this one?Thank youNuno Silva

    DB:3.30:At Line-Selection a7

    Yes.I use LEAVE TO LIST-PROCESSING to leave to list processing and after that i set my own pf-status wich has the PICK defined as F2, but i dont get any reaction.Thank youNuno Silva

  • RELEVANCY SCORE 3.30

    DB:3.30:Reg Alv Grid Display px



    Hi Experts,

    I have a requirement where i need to display PO number and vendor in the below fashion in alv.

    PO number and vendor should be commonly shown once in alv grid for all line items i.e by merging several row of a column as a single field(like merge field in MS excel).

    Likewise i need to show for numerous PO based on the input in selection screen.

    Please advise.

    Regards

    Balaji R

    Edited by: Balaji Rajendran on Apr 6, 2009 4:47 PM

    DB:3.30:Reg Alv Grid Display px


    we can even use class CL_GUI_ALV_GRID to play with ALV output grid.

  • RELEVANCY SCORE 3.29

    DB:3.29:Short Dump In Alv When Clicked On A Column. zs



    Hi Everyone.

    I have an alv report with following code. Code is given in following posts also as it exceeds the maximum length of a post.

    Main program:

    report z_sample_program.

    include z_top_include. "Data decalrations.

    include z_sample_selection_screen. "Selection screen include

    include z_sample_subroutines. "All subroutines

    *During INITIALIZATION the standard values for parameters or selection criteria,

    which are declared in logical databases, can be changed.

    initialization.

    *Clear all tables and work area.

    perform f_initialize.

    start-of-selection.

    *Retrieve Data

    *NOTE:TABLES as form parameters is obselete. Instead use CHANGING.

    perform f_data_retrieval using p_vkorg p_auart "USING CHANGING Parameter.

    changing i_vbak i_vbap.

    end-of-selection.

    *Build Fieldcatalog for ALV Report

    perform f_build_fieldcatalog.

    *Build layout for ALV grid report

    perform f_build_layout.

    *Build events table

    perform f_build_events.

    if rb_alv eq c_x. "If the first radio button is pressed.

    Display report using ALV grid

    perform f_display_alv_report.

    else.

    Download to an presentation server file.

    perform f_download_to_file using p_path.

    endif.

    When I click on a column it goes to dump. Earlier I hadnu2019t have the line wa_layout-box_fieldname = c_sel

    in form f_build_layout and it was working fine. This line i added for rowselection. Could anyone please help me what is the reason for this dump.?

    DB:3.29:Short Dump In Alv When Clicked On A Column. zs


    Hi Everyone,

    I got the solution of the problem.

    I should have added one more field into the structure of my final table. That field name i have to give in layout. As in my code, it's SEL. I should include a field named SEL to my final table which is passed to ALV.

  • RELEVANCY SCORE 3.29

    DB:3.29:How To Get Rid Of The Loop In Alv Output From At Selection Screen Event? a7



    I have several push buttons on a selection screen.

    Clikc on a button, then it pops up an editable ALV report. (This gets triggered AT SELECTION SCREEN event.). REUSE_ALV_GRID_DISPLAY_LVC..

    On the ALV output, I enabled F4 for a couple of fields. Once I click on the F4 button, ONF4 method gets triggerd and a pop up appears with custom search helps.

    choose a line and it fills the cell.

    Upto this it works fine.

    Now I click on the BACK button at the ALV output, it takes me to the selection screen. I click on the button again, it show the editable ALV. Now when I click on the F4 button, the pop up comes up twice and the cell gets filled from the second pop - up.

    How to control this?

    Probably I am not refreshing something?

    (I am using REUSE_ALV_GRID_DISPLAY_LVC and tooks ome code for ONF4 event from BCALV_*DATATYPES (forgot the exact name) program.)

    Thanks,

    Ven

  • RELEVANCY SCORE 3.28

    DB:3.28:[Wda - Alv] Disabling Dropdown Listbox For View Selection In Alv Toolbar 37



    Is there a way how I can remove the "view selection" dropdown listbox from the ALV grid's toolbar?

    Thanks in advance!

    DB:3.28:[Wda - Alv] Disabling Dropdown Listbox For View Selection In Alv Toolbar 37


    Hi,

    In cl_salv-config_table you have these settings -

    DATA:
    lr_model type ref to cl_salv_wd_config_table,
    lr_filter TYPE REF TO if_salv_wd_std_functions. "Reference for the standard alv function

    *" Set the UI elements.
    if lr_model is not initial.
    lr_filter ?= lr_model. "Model object for ALV


    lr_filter-set_view_list_allowed( abap_false ).

  • RELEVANCY SCORE 3.28

    DB:3.28:Selection Screen On Alv Report ax



    Hello,

    Is there any way to display Selection screen fields details of the program on top of the ALV report?

    Ryan

    DB:3.28:Selection Screen On Alv Report ax


    Ryan,

    Try ALV OOPs with following code.

    DATA:

    lv_selname TYPE rsscr_name.

    *Get the list of selection parameters

    v_prog_name = sy-repid.

    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

    EXPORTING

    curr_report = v_prog_name

    TABLES

    selection_table = lt_seltab

    EXCEPTIONS

    not_found = 1

    no_report = 2.

    IF sy-subrc 0.

    "Do nothing

    ENDIF.

    * Read Selection Texts

    READ TEXTPOOL v_prog_name LANGUAGE sy-langu INTO lt_pool.

    * Loop through the selection parameters print LOOP AT lt_seltab INTO lwa_seltab.* Write out only the filled parameters (This can be changed, if needed)* Selection Parameter Name IF lv_selname NE lwa_seltab-selname. CLEAR: lwa_pool. READ TABLE lt_pool INTO lwa_pool WITH KEY key = lwa_seltab-selname. IF sy-subrc EQ 0. lv_sel_option = lwa_pool-entry+8. ELSE. lv_sel_option = lwa_seltab-selname. ENDIF. lv_selname = lwa_seltab-selname. ENDIF.* Selection Parameter Value lv_sel_option+40 = lwa_seltab-sign. lv_sel_option+45 = lwa_seltab-option. lv_sel_option+50 = lwa_seltab-low. lv_sel_option+70 = lwa_seltab-high. CALL METHOD rt_obj_dyndoc-new_line. CALL METHOD rt_obj_dyndoc-add_text EXPORTING text = lv_sel_option. ENDIF. ENDLOOP.

    PERFORM display_sel_scr_details.

    *---------------------------------------------------------------------** Form display_sel_scr_details*---------------------------------------------------------------------*FORM display_sel_scr_details .* Display the selection screen info into top window.* Creating html control IF g_r_html_ctrl IS INITIAL. CREATE OBJECT g_r_html_ctrl EXPORTING parent = g_r_parent_top. ENDIF.

    CALL METHOD g_r_dd_document-merge_document.

    g_r_dd_document-html_control = g_r_html_ctrl.

    * Display document CALL METHOD g_r_dd_document-display_document EXPORTING reuse_control = 'X' parent = g_r_parent_top EXCEPTIONS html_display_error = 1.

    IF sy-subrc NE 0. "title could not be displayed ENDIF.

    ENDFORM. " display_sel_scr_details

    Regards,

    nimz

  • RELEVANCY SCORE 3.28

    DB:3.28:Object Alv Grid - Line Selection 1m



    Hi all.

    Is there a way to force my grid to have allways a selected line.

    If possible I would like to see the row marker and I don't want users to be able to select more than one line.

    I tried all layout sel_mode... but I didn't find the result I desire...

    Do you have an idea ?

    Thanks a lot

    DB:3.28:Object Alv Grid - Line Selection 1m


    Hi,

    check this

    call method grid1-set_table_for_first_display
    exporting
    is_layout = gs_layout
    is_variant = gs_variant
    i_save = v_save
    i_default = v_default
    it_toolbar_excluding = i_exclude[]
    changing
    it_outtab = i_output[]
    it_fieldcatalog = i_fieldcat[]
    exceptions
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    others = 4.
    if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

    call method grid1-refresh_table_display.

    * Creating object for the single clickevents
    if event_receiver_grid is initial.
    create object event_receiver_grid.
    endif.
    set handler event_receiver_grid-handle_toolbar_200 for grid1.
    call method grid1-set_toolbar_interactive.
    set handler event_receiver_grid-user_command_200 for grid1.

    module user_command_0200 input.
    call method cl_gui_cfw=dispatch.
    case ok_code.
    when c_ddno.
    perform f__display.
    when c_exit.
    perform f_exit_program.
    when c_back.
    perform f_exit_program.
    when c_canc.
    perform f_exit_program.
    when others.
    endcase.
    clear ok_code.
    endmodule. " User_command_0200 INPUT

    form f_display.
    refresh: i_sel_alvrows,
    i_dblclk.
    clear : i_sel_alvrows,
    i_dblclk,
    wa_dblclk.
    v_dbcnt = c_0.
    call method grid1-get_selected_rows
    importing
    et_index_rows = i_sel_alvrows[].
    call method cl_gui_cfw=flush.
    describe table i_sel_alvrows lines v_dbcnt.

    if i_sel_alvrows[] is initial.
    message i176.
    endif.
    if v_dbcnt gt 1.
    message i177. " You cannot select more that one row
    else.
    loop at i_sel_alvrows into wa_sel_alvrows.
    read table i_output into wa_output index wa_sel_alvrows-index.
    if sy-subrc eq c_0.
    move-corresponding wa_output to wa_dblclk.
    append wa_dblclk to i_dblclk.
    clear: wa_dblclk.
    endif.
    endloop.
    endif.
    endform.

  • RELEVANCY SCORE 3.26

    DB:3.26:Symbol As Default In A Selection Screen In Alv fz


    hi all,how to bring GE(=) symbol as default in a selection screen in alv report.byRamesh.

    DB:3.26:Symbol As Default In A Selection Screen In Alv fz

    Hi all ,thanks for yours replay, i will check and let you know.Thank you,Ramesh.

  • RELEVANCY SCORE 3.26

    DB:3.26:Alv Layout Variant As Input In Selection Screen 1m


    I have a ALV grid report with ALV layout variant. i am selecting one ALV layout varient in the selection screen (parameter) and execute the program in background then in background mode the result list will come according to ALV layout variant or not? if yes then how ?

    DB:3.26:Alv Layout Variant As Input In Selection Screen 1m

    HiIf u transfer the ALV variant (chosen in selection-screen) to the fm ALV, the layout will be in according to the variant: this doesn't depend on how the report runs: online or background.If u don't transfer any variant, the fm will use the default one.DATA: GT_VARIANT TYPE DISVARIANT.

    PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.

  • RELEVANCY SCORE 3.26

    DB:3.26:Navigation In Alv List a9



    Dear Friends

    Can anyone help me how to get bSelected row/b value in ALV list. Am displaying ALV output in Basic list using Fun.Module "REUSE_ALV_GRID_DISPLAY".

    Suppose when the user select any row;depend upon SELECTED ROW, I want to display secondary list in ALV format...I had an idea in simple report to display secondary list using HIDE keyword..Can I use the same functionality in ALV list...

    Also when User Select any row in simple report; the AT-LINE SELECTION Event get trigger's...similarily when the user select any row in ALV list, on which event i need to write to get SELECTED row and how??

    Can anyone help me to solve this issue...

    Advance thanks for your help

    Cheer's

    Kamal Babu

    DB:3.26:Navigation In Alv List a9


    Hi,

    using REUSE_ALV_GRID_DISPLAY

    pass additional parameters

    i_callback_program = 'Z_REPORT' "not sy-repid!

    i_callback_user_command = 'ALV_USER_COMMAND'

    The i_callback_program must be passed as your calling report because the ALV does a dynamic from call and wants to know the program to be called.

    Then you need this Form with interface:

    FORM alv_user_command

    USING pv_ucomm TYPE sy-ucomm

    ps_selfield TYPE slis_selfield. "#EC CALLED

    ...

    The 'user selection' or double-click will be passed as pv_ucomm = 'IC1' (using standard ALV Status)

    The selectd row is stored in ps_selfield-TABINDEX.

    The read your displayed table at index ps_selfield-TABINDEX to get the data of the selected record. No hide needed!

    I hope (and think) this is the information you where looking for.

    BTW: You can do much more using the OO Grid control objects, but it is far more simple and quick to implement using the function modules.

    C.

  • RELEVANCY SCORE 3.26

    DB:3.26:Alv dp



    secondary lists in alv

    actually for using user command i need to create a buton on the report but that is not there in my functionality.

    i am looking for an event corresponding to AT LINE SELECTION.

    so that in primary list if i click on a line item i get a secondary list and then further if i click on a line item in secondary list i have to call a transaction

    DB:3.26:Alv dp


    hi

    first thing is u cant use at line-selection for an alv interactive report. for this purpose, u need to create form in the program using perform at_user_command and pass the name of this form in the function module u use for displaying the report such as reuse_alv_list_display.

    *perform at_user_command.

    form at_user_command using ucomm like sy-ucomm

    selfield type slis_selfield.

    complete the logic(get cursor field fieldname)

    endform.

    pass the name of this form in the FM under i_callback_at_user_command parameter.

    this should work.

    reagrds,

    shamim

  • RELEVANCY SCORE 3.26

    DB:3.26:How To Read Multiple Line Data In Alv Grid Display 3p


    HI,How can i get values of selected rows from ALV that has selection '0..n' (multiple selection).i'm using this cl_gui_alv_grid class interface. CALL METHOD GR_ALVGRID-GET_SELECTED_ROWS IMPORTING ET_ROW_NO = LT_ROW_NO[].by using above method im able to get table Assignment of line number. but i need to read Line data.Can any body help me out... Regards,Dileep Reddy

    DB:3.26:How To Read Multiple Line Data In Alv Grid Display 3p

    HI,CALL METHOD GR_ALVGRID-GET_SELECTED_ROWS
    IMPORTING
    ET_ROW_NO = LT_ROW_NO[].

    LOOP AT LT_ROW_NO.
    READ TABLE FINAL_TAB INDEX LT_ROW_NO-row_id.
    IF SY-SUBRC EQ 0.
    " Do your processing
    ENDIF.
    ENDLOOP.

  • RELEVANCY SCORE 3.26

    DB:3.26:Using At Line-Selection In An Alv fz



    I am trying to add functionality to an existing program that is currently displaying the information using ALV with a CALL to FUNCTION 'REUSE_ALV_GRID_DISPLAY'.I wanted to simply use the HIDE and AT LINE-SELECTION to drill down on the detail for the particular owner. However, this does not work. Is there a specific parameter I need to pass?

  • RELEVANCY SCORE 3.26

    DB:3.26:Regarding Interactive Reports sx



    Hi All,

    Yesterday i submitted a query regarding Interactive reports.and i recieved lots of reply .But the replies are all about ALV interactive report.I want to know just about the interactive reports where ew use AT LINE OF SELECTION, HIDE e.c.

    PLZ send methe documents related that.

    Thanks and Regards

    RASHMI

    DB:3.26:Regarding Interactive Reports sx


    Hi rashmi,

    Read the following documentation on hide command.

    HIDE

    Syntax

    HIDE dobj.

    Effect

    This statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:

    For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.

    If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.

    Notes

    The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored - that is, rows in which the list cursor was positioned using statements like SKIP.

    The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.

    Outside of classes, constants and literals that cannot be read in list results and in the statement READ LINE can be specified for dobj outside of classes.

    Example

    Storing square numbers and cubic numbers for a list of numbers. The example shows that arbitrary variables can be stored independently of row content. In the real situation, one would more likely store only the number and execute the calculation, when required, in the the event block for AT LINE-SELECTION.

    REPORT ...

    DATA: square TYPE i,

    cube TYPE i.

    START-OF-SELECTION.

    FORMAT HOTSPOT.

    DO 10 TIMES.

    square = sy-index ** 2.

    cube = sy-index ** 3.

    WRITE / sy-index.

    HIDE: square, cube.

    ENDDO.

    AT LINE-SELECTION.

    WRITE: square, cube.

    Regards

    Lalit

  • RELEVANCY SCORE 3.26

    DB:3.26:Alv Lead Selection cx



    Hi Experts,

    On ALV lead selection, i want to make visible some of my view elements, like labels. How can i do that?

    DB:3.26:Alv Lead Selection cx


    There are standard events exposed by the ALV (similar to those of the TableUI element). You can register event handlers in your component for the events raised by the ALV. You would want to register the onLeadSelection event and there perform your label manipulation. Here is a WIKI link that shows how to register and handle ALV standard events. It uses the on_data_check instead of on_lead_select - but the general process is the same.

    https://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-ALVControllingStandard+Buttons

  • RELEVANCY SCORE 3.26

    DB:3.26:Report Code With Alv ax



    Hi

    Can any body provide me the code for report with selection screen using ALV.

    Thanks in advance

    Prasanna Kumar

    DB:3.26:Report Code With Alv ax


    Take a look at the program BCALV_GRID_VERIFY in your system.

    There are quite a few example programs. Search using BCALV*

    Regards,

    Ravi

  • RELEVANCY SCORE 3.26

    DB:3.26:Line Selection In Alv 83



    Hello Gurus,

    I wrote a code to display the ALV report.

    Now I wanted to select any field in the row (any column of a particular row) of the displyed and I wanted to call a transaction code.

    How do we do this in case of ALV report. For normal reports, I can use at line selection. Please help me.

    Regards,

    Balu

    DB:3.26:Line Selection In Alv 83


    If you are using OOPs check below code.

    Here I am caling 2 diffrent T codes depends on two diffrent coluamns.

    METHODS: handle_double_click

    FOR EVENT double_click OF cl_gui_alv_grid

    IMPORTING e_column

    es_row_no.

    METHOD handle_double_click.

    DATA: ls_final_table TYPE gty_final,

    lv_vbeln TYPE bsid-vbeln.

    To set Jump target with call transaction for VD03 and VF03

    READ TABLE gt_final

    INTO ls_final_table

    INDEX es_row_no-row_id.

    IF sy-subrc EQ 0.

    CLEAR gs_bsid.

    READ TABLE gt_bsid INTO gs_bsid

    WITH KEY vbeln = ls_final_table-vbeln.

    IF sy-subrc EQ 0.

    CLEAR: lv_vbeln.

    MOVE gs_bsid-vbeln TO lv_vbeln.

    ELSE.

    READ TABLE gt_bsid INTO gs_bsid

    WITH KEY belnr = ls_final_table-vbeln.

    IF sy-subrc EQ 0.

    CLEAR: lv_vbeln.

    MOVE gs_bsid-belnr TO lv_vbeln.

    ENDIF.

    ENDIF. " READ TABLE gt_bsid

    IF lv_vbeln IS NOT INITIAL.

    IF e_column EQ 'KUNNR'.

    READ TABLE gt_vbrp INTO gs_vbrp WITH KEY vbeln = lv_vbeln BINARY SEARCH.

    IF sy-subrc = 0 .

    Call Transaction VD03

    SET PARAMETER ID 'KUN' FIELD gs_bsid-kunnr.

    SET PARAMETER ID 'VKO' FIELD gs_vbrp-vkorg_auft.

    SET PARAMETER ID 'VTW' FIELD gs_vbrp-vtweg_auft.

    SET PARAMETER ID 'SPA' FIELD gs_vbrp-spart.

    CALL TRANSACTION 'VD03' AND SKIP FIRST SCREEN.

    ENDIF.

    ELSEIF e_column EQ 'VBELN'.

    Call Transaction VF03

    SET PARAMETER ID 'VF' FIELD lv_vbeln.

    CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

    ENDIF. " e_column EQ 'KUNNR'.

    ENDIF. " IF lv_vbeln IS NOT INITIAL.

    ENDIF. " READ TABLE gt_final

    ENDMETHOD. "handle_data_changed_finished

  • RELEVANCY SCORE 3.26

    DB:3.26:Not Able To Click Or Select A Line In Alv 9s



    Hi All,

    Issue: Not able to select or click on Hyper links in ALV outputs(In Variant selection screen also).

    NOTE: This issue is not happening for all users. Its the issue for only one user desktop. If the same user logs into other machine then he was able to select or click the hyperlinks in the ALV..

    Are there any settings need to be done in the system for the ALV output? Please provide the steps if there are any settings..

    Thanks

    DB:3.26:Not Able To Click Or Select A Line In Alv 9s


    Should be a SAP GUI desktop configuration, update drivers, reinstall SAP GUI, or browse his configuration or restire default settings thru Options of Sap Logon, (upper left icon).

    Regards;

    Raymond

  • RELEVANCY SCORE 3.26

    DB:3.26:Alv Grid Row Selection Possible Options 3c



    Hello Experts,

    I have an ALV Grid output with rows color codes based on certain status for each rows.Now when the user selects one or more lines to do the next process, what happens now as sap standard is the selected lines becomes highlighted ( kind of yellowish) and the selection button gets pressed.

    But what the user is requesting is ,lets say he selects one blue and another red line, then both becomes yellow (because of the SAP standard highlighting) ...he would like those line colors to be still red and blue and only the selection button pressed.

    Is there a way to do that is ALV grid? I'm trying to convince him to look at the status colum if he gets confused with what colors he selected or I will have to use a checkbox field as the first column and and hide the ALV selection option.

    But was curious to find if this is possible in ALV?Or any other suggestions to handle this requirement is welcome.

    Mat

    DB:3.26:Alv Grid Row Selection Possible Options 3c


    Hi Mat,

    I am curious if your user is so arogant when he buys a car too. Does he say to dealer "Sorry I don't want this gear lever to be placed here and here, I want it a litte bit higher. Can you please fix that?". This sounds like you are struggling with dumb user. I have never heard of someone complaining that the standard highlight is in wrong color. You already provided to him row colors, right? I think most of the users would be hugging you for such facilities.

    I think in your case as the user is inalterable you should go for the checkboxes as you say. This way maybe you will somehow satisfy his needs (as the row colors will be kept even during selection). Personally I wouldn't bother such requirements. As long as the program reports correct data, he should not complain at all.

    Good luck then

    Marcin

  • RELEVANCY SCORE 3.25

    DB:3.25:Run Alv Report Without Selection Screen In Background fc



    Hello Every body,

    i programmed a ALV Report without selection screen, and i want to create a job for this alv report.

    Any help?

    Thank u.

    Ouail.

    DB:3.25:Run Alv Report Without Selection Screen In Background fc


    Hi Steve,

    Can you tell me where i have to put your code?

    this is my abap code:

    START-OF-SELECTION. p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'. PERFORM copy_from_xml_to_itab TABLES it_ref_file ref_xml_data USING p_filref. **Begin Extraction File SUBMIT ZZ_FI_IVAT_EXTRACTOR WITH p_bukrs EQ '1000' WITH p_gjahr EQ '1998' WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\' WITH cldata eq space AND RETURN. DATA: FILE_TABLE TYPE TABLE OF SDOKPATH, DIR_TABLE TYPE TABLE OF SDOKPATH. CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES' EXPORTING DIRECTORY = '\\SAPSERVER\f\SAFT\iVAT_Extractie\' FILTER = '*.*' TABLES FILE_TABLE = FILE_TABLE DIR_TABLE = DIR_TABLE EXCEPTIONS CNTL_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. "get file name LOOP AT FILE_TABLE INTO p_filref. ENDLOOP. CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path. PERFORM copy_from_xml_to_itab TABLES t_ext_file ext_xml_data USING path. PERFORM fill_xml_tab_in . perform build_fieldcatalog. PERFORM compare_data_ref_ext. PERFORM send_email. perform display_alv_report. PERFORM delete_extraction_file.

    in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:

    CREATE OBJECT gcl_xml. *Upload XML File CALL METHOD gcl_xml-import_from_file EXPORTING filename = p_filref RECEIVING retcode = gv_subrc. IF gv_subrc = 0. CALL METHOD gcl_xml-render_2_xstring IMPORTING retcode = gv_subrc stream = gv_xml_string size = gv_size. IF gv_subrc = 0. REFRESH gt_xml_data[]. * Convert XML to internal table CALL FUNCTION 'SMUM_XML_PARSE' EXPORTING xml_input = gv_xml_string TABLES xml_table = gt_xml_data return = gt_return. ENDIF. ENDIF.

  • RELEVANCY SCORE 3.25

    DB:3.25:Alv Selection jk



    Hi there,

    I had a WD application with file upload and I used a ALV to list them.

    But I can not get selection any line.

    How can I fix this?

    DB:3.25:Alv Selection jk


    Hi,

    refer to this example

    SALV_WD_TEST_TABLE_PROPS View is Table and Method is SET_TABLE_SETTINGS

  • RELEVANCY SCORE 3.24

    DB:3.24:Using The At-Line Selection m9



    Hi all,

    I have developed a report with two ALV grid displays on one page using the OOPs method. In the first ALV there are some fields displayed like begin date, end date, partner number (rcvprn) and IDOCTP. I want a functionality such that when the user double clicks any of the partner numbers or any of the single records, transaction BDM2 should run with its selection screen filled with the values of that particular row which was selected on the ALV grid.

    Can any one help how this can be done

    Thanks.

    Warm regards,

    Harshad.

    DB:3.24:Using The At-Line Selection m9


    Hi,

    You can use ,

    AT LINE-SELECTION

    Then with, GET CURSOR FIELDNAME

    You can use CALL TRANSACTION 'T-CODE NAME' WITH PARAMETERS

    Hope it helps

    Regards

    Mansi

  • RELEVANCY SCORE 3.24

    DB:3.24:Alv's Default Lead Selection Detemrination? aa



    Hello

    Pls. let me know the 'Initialization Lead Selection' part of context buiding is meant for make 1st line if ALV as default lead selection in ALV (i mean, if its bound for ALV) only?

    DB:3.24:Alv's Default Lead Selection Detemrination? aa


    Hi,

    you can press F1 on lead selection and can see what is the purpose.

    If the selection of a context node is not empty at runtime, exactly one of these selected elements (one

    the table rows) has a prominent status.It is known as the lead selection.

    The property "Initialize Lead Selection" specifies whether the lead selection is to be set automatically

    as soon as it is needed but is not set yet.

    Lead selection matters very prominently when the content of the child node with the property

    "Singleton" depends on the lead selection element of its parent node.

    Defaut: Yes (Set Lead Selection Automatically).

    Thanks

    Vijay Vikram

  • RELEVANCY SCORE 3.24

    DB:3.24:Alv Grid Display cz



    Hi ,

    I am using alv grid display(fn module approach). There when I double click a record , some other details have to be displayed in another screen , based on the record clicked . In other words what is alv's equivalent for at line selection in list . Can anyone provide me with sample code for such situation .

    Regards,

    Kavitha.

    DB:3.24:Alv Grid Display cz


    Hi,

    In the FM, there is an argument named I_CALLBACK_USER_COMMAND. Provide the name of a subroutine from your program that you want to invoke on a double click. In that subroutine, write anything you like to.

    Take a look at CALL transcation from ALV for a code sample.

    Regards