Reg Class lcl_event_receiver
hi friends
class lcl_event_receiver definition deferred.
In alv sample we have this statement, what is purpose of this statement ?
Exactly what it mean in the program ?
Regards
Deva
This is used so you can refer to this class BEFORE you have actually defined the class. This is particularly useful where you split a program up into a number of includes
program A.
include A_TOP
include A_CL
include A_FORMS
etc.
so if in the A_TOP include you refer to the class in the A_CL you waon't get a syntax error.
for example in A_TOP you have
include <icon>.
field-symbols: <fs> type any,
<fsa>,
<fsb>.
*class lcl_event_handler definition deferred. " Event handler*
then rest of your data
data: go_handler type ref to lcl_event_handler, "<================== syntax error if the definition deferred stmt missing
etc
The class is in your include A_CL
class lcl_event_handler definition.
* add other methods etc here at will depending on the
* application --such as new buttons on toolbars etc.
public section.
methods:
handle_double_click for event double_click of cl_gui_alv_grid
importing
e_row
e_column
es_row_no
sender,
etc etc.
cheers
jimbo
Similar Messages
-
Reg : Classes And Methods In ABAP HR
Hii...
Can anyone tell me what are the standard OOPS classes and Interfaces related to ABAP HR Technical. I want to know the detailed view of all the classes and interfaces which can be used in HR technically.
Or is there any way I can find.
Your suggestions will be helpful for me. So, Kindly help me with this.
Thanks,
Regards,
Rahul GuptaVenkat,
Try look for any SAP Note or create Customer Message to SAP. It's clearly Program Error. We can't collect "lcl_transform" class into Transport Request Independently as it was local Class not Global Class.
Try transporting Transformations again, if it still gives problem. Contact SAP.
Let us know if you implement any SAP Notes.
all the best.
Regards,
Nagesh Ganisetti.
Assign Points if it helps. -
Reg: Classes and memory IDs
Hi All,
I have a class which has 5 methods and around 15 attributes.
DATA: lr_document TYPE REF TO zcl_ps_pricing_document,
" Retrieve the Document Object
lr_document = gr_runtime_context->get_document( ).
in this example, lr_document is refferencing to class zcl_ps_pricing_document.
Now Can I export and Import lr_document to memory IDs?
Regards,
Selva MHello friend,
please refer to statement in ABAP on line help if you want to export a reference object to ABAP memory.
To export objects, which are referenced by reference variables, use the statement CALL TRANSFORMATION to serialize and export these objects if the class of these objects implements the interface IF_SERIALIZABLE_OBJECT.
Best Regards,
Jerry -
hi all
how to find the use or purpose of CL_RECA_DDIC_DOMA and the methods declared in it.Hi,
actualy constructor is a special method in OOABAP which is used for initialisation and it is always named as constructor.
Constructors are of 2 type 1. CLASS or Static Constructor
and 2 . Method Constructor.
Check the following code for the use and effect of both types of constructors
REPORT demo_constructor_ANIRBAN.
CLASS cl1 DEFINITION
CLASS cl1 DEFINITION.
PUBLIC SECTION.
METHODS:
add,
constructor IMPORTING v1 TYPE i
v2 TYPE i,
display.
CLASS-METHODS:
class_constructor.
PRIVATE SECTION.
DATA:
w_var1 TYPE i,
w_var2 TYPE i,
w_var3 TYPE i,
w_result TYPE i.
ENDCLASS. "cl1 DEFINITION
CLASS cl1 IMPLEMENTATION
CLASS cl1 IMPLEMENTATION.
METHOD constructor.
w_var1 = v1.
w_var2 = v2.
ENDMETHOD. "constructor
METHOD class_constructor.
WRITE:
/ 'Tihs is a class or static constructor.'.
ENDMETHOD. "class_constructor
METHOD add.
w_result = w_var1 + w_var2.
ENDMETHOD. "add
METHOD display.
WRITE:
/'The result is = ',w_result.
ENDMETHOD. "display
endclass.
" Main program----
data:
ref1 type ref to cl1.
parameters:
w_var1 type i,
w_var2 type i.
start-of-selection.
create object ref1 exporting v1 = w_var1
v2 = w_var2.
ref1->add( ).
ref1->d isplay( ). -
Reg: Class copy to Custom one
Hi,
We want to copy the CL_RSTRAN_TRFN class interface to custom class (Z class) and want to do change in method if_rso_tlogo_maintain~prepare.
Copied the CL_RSTRAN_TRFN to custom one. When i am trying to activate it giving error message as "You cannot access private method "CHECK_RECORDMODE(". not allowed." Not only for this Mehtod, for remaining methods under this class also i am getting same error message
What is the issue here? i am vey new to classes, Is there any check needed to copy the SAP class to custom class.
Please share any ideas on this.
Thx
RajHi Aaron Morden ,
Thx very much for the answer.
So how can i make it work. Please suggest me some steps to copy that class into custom one.
since after copying that class, need to chage in one class, but i am facing problem in initial step only, that is at copying.
can pls help me in this.
Thx
Raj -
Reg : class for creating table control
hi everyone,
is there any class for creating table control?my requirement is
created 2 custom containers,one for alv display and other for table control display.
For alv i used cl_gui_alv->set_table_first_display,likewise any class for creaitng table control?????????
pleas find me a solution......
thanks in advance......Hi,
You can use the class CL_TABLECONTROL for creating table control and the method SET_VALUES shall be used to fill values for tha tabcntrl.
Else, you can use the Table Control Wizard to create the tabcntrl easily.
Regards,
Renjith Michael. -
Hi,
in the following code im not getting the output.plz tell me why
tables:mara.
data:obj type ref to cl_gui_alv_grid.
data:cust type ref to cl_gui_custom_container.
data:itab like mara occurs 0 with header line.
select-options:s_matnr for mara-matnr.
start-of-selection.
select matnr matkl mtart from mara into corresponding fields of table itab where matnr in s_matnr.
CREATE OBJECT CUST
EXPORTING
PARENT =
CONTAINER_NAME = 'CUST'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT OBJ
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CUST
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
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 METHOD OBJ->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'MARA'
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = ITAB[]
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi Mahesh,
pls note the changes I have made in your code..Now it will work.
FIRST - Design a screen '100' which contains the ALV container and the ALV Grid with the name 'CUST'
SECOND - Include the object , grid creation and the set_table_for_first_display in the PBO method.
THIRD - CALL THE SCREEN 100
Please reward points if found useful.
tables:mara.
data:obj type ref to cl_gui_alv_grid.
data:cust type ref to cl_gui_custom_container.
data:itab like mara occurs 0 with header line.
select-options:s_matnr for mara-matnr.
start-of-selection.
select matnr matkl mtart from mara into corresponding fields of table itab where matnr in s_matnr.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
CREATE OBJECT CUST
EXPORTING
PARENT =
CONTAINER_NAME = 'CUST'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT OBJ
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CUST
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
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 METHOD OBJ->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'MARA'
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = ITAB[]
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT -
Abour report containing classes - urgent pls
hi to all,
i have to study this report and analyse output coming how. iam in debugging observed that value(total) last column in the output giving some value in debugging but in output it is giving some other value. can any one pls help me.
like if in debugging it is giving total-as -68.13 but in grid display it is displaying as 473.10 like.
REPORT ZFIRD035 MESSAGE-ID zfi_e1
NO STANDARD PAGE HEADING
LINE-COUNT 58
LINE-SIZE 200.
Author.......:*
Date Created.: Aug 21, 2006
Request #....: *
Purpose......: This program summarizes accounting journal entries
by biller. The biller is recognized by the first three
chararcters of the reference field.
Inputs.......:
Outputs......: *
Selections...: *
Logical D/B..: *
Includes.....: *
Predefine a local class for event handling to allow the
declaration of a reference variable before the class is defined.
CLASS lcl_event_receiver DEFINITION DEFERRED.
TABLES:
bkpf, "Accounting document header
bseg, "Accounting document segment
zmapzce1. "CostElement to ZCE1COPA Mapping
TYPES: BEGIN OF disp_tab , "Internal Table D_TAB
usnam LIKE bkpf-usnam, "User Id
blart LIKE bkpf-blart, "Document type
bukrs LIKE bkpf-bukrs, "Company code
bldat LIKE bkpf-bldat, "Date of the document
xblnr LIKE bkpf-xblnr, "refernce number
belnr LIKE bkpf-belnr, "Accounting document number
buzei LIKE bseg-buzei, "Line Item Number
prctr LIKE bseg-prctr, "Profit center
kostl LIKE bseg-kostl, "Cost center
hkont LIKE bseg-hkont, "Account number
matnr LIKE bseg-matnr, "Product code
aufnr LIKE bseg-aufnr, "Internal order
projk LIKE bseg-projk, "WBS Element
budat LIKE bkpf-budat, "Posting date
bschl LIKE bseg-bschl, "Posting Key
dmbtr LIKE bseg-dmbtr, "Amount in document currency
sgtxt LIKE bseg-sgtxt, "Description
zuonr LIKE bseg-zuonr, "Allocation
shkzg LIKE bseg-shkzg, "Debit/Credit Indicator
END OF disp_tab.
DATA: gv_prdha_all LIKE mara-prdha.
FIELD-SYMBOLS: .
DATA: BEGIN OF gv_prdha,
wwph1(5) TYPE c,
wwph2(5) TYPE c,
wwph3(8) TYPE c.
DATA: END OF gv_prdha.
DATA save_matnr LIKE mara-matnr.
DATA: d_tab TYPE disp_tab OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF out_tab2. "Internal Table out_TAB
INCLUDE STRUCTURE zfirevje.
TYPES: END OF out_tab2.
DATA: BEGIN OF zfirevje OCCURS 50.
INCLUDE STRUCTURE zfirevje.
DATA: END OF zfirevje.
DATA: ok_code LIKE sy-ucomm,
gt_jesum TYPE TABLE OF zfirevje,
gt_jesum2 TYPE zfirevje OCCURS 100 WITH HEADER LINE,
g_container TYPE scrfname VALUE 'ZFIRD035_0100_CONT1',
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Added:
Field catalog table
git_fieldcat TYPE lvc_t_fcat, "field catalog table
End of Change - DR1K901005 - JIRA#: ENT-93----
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
event_receiver TYPE REF TO lcl_event_receiver.
lcl_event_receiver (Implementation)
LOCAL CLASSES: Definition
*===============================================================
class lcl_event_receiver: local class to handle event DOUBLE_CLICK
and CLOSE.
Definition:
~~~~~~~~~~~
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
PRIVATE SECTION.
DATA: dialogbox_status TYPE c. "'X': does exist, SPACE: does not ex.
ENDCLASS.
lcl_event_receiver (Definition)
*===============================================================
LOCAL CLASSES: Implementation
*===============================================================
class c_event_receiver (Implementation)
In this example, only event DOUBLE_CLICK is caught
CLASS lcl_event_receiver IMPLEMENTATION.
§3.At doubleclick(1): The event DOUBLE_CLICK provides
parameters of the clicked row and column.
Use row parameter to select a line of the
corresponding internal table.
METHOD handle_double_click.
DATA: ls_jesum LIKE LINE OF gt_jesum.
read selected row from internal table gt_sflight
read table gt_jesum index e_row-index into ls_jesum.
call function 'REMD_SHOW_MASTER_DATA'
exporting
i_objnr = ls_jesum-recnobjnr
I_IMKEY =
I_INTRENO =
I_CHANGE = ' '
exceptions
unknown_type = 1
object_key_inconsistent = 2
others = 3.
ENDMETHOD.
ENDCLASS.
DATA: x_save, "for Parameter I_SAVE
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant. "for parameter IS_VARIANT
DATA: BEGIN OF fieldnames OCCURS 25,
fieldname(30) TYPE c, "download col names
END OF fieldnames.
DATA:
program_name LIKE sy-repid, "Program Name for Call
title_line_1 LIKE sy-title, "Report Title Line 1
title_line_2 LIKE sy-title, "Report Title Line
title_line_3 LIKE sy-title, "Report Title Line
sum_cdmbtr LIKE bseg-dmbtr, "Sum credit amt for document
sum_ddmbtr LIKE bseg-dmbtr, "Sum debit amt for document
total_cdmbtr LIKE bseg-dmbtr, "Total credit amount
total_ddmbtr LIKE bseg-dmbtr, "Total debit amount
ddmbtr LIKE bseg-dmbtr, "Debit amount
cdmbtr LIKE bseg-dmbtr, "Credit amount
dec_dmbtr(16) TYPE p DECIMALS 2, "Amount in decimal format
disp_prctr(5) TYPE c, "Work var for prctr
gv_zuonr LIKE bseg-zuonr, "Assignment field
gv_shkzg LIKE bseg-shkzg, "Dr/Cr Ind.
gv_hkont LIKE bseg-hkont, "Account nbr
gv_amount LIKE bseg-pswbt, "G/L amount
gv_currncy LIKE bseg-pswsl, "Currency
gv_matnr LIKE bseg-matnr, "Product
BEGIN OF w_filename,
w_directory(22) TYPE c, "file directory name
w_userid(7) TYPE c, "User Id
w_filenm2(20) TYPE c, "file name continuation
END OF w_filename.
Selection Screen Options ******************
SELECTION-SCREEN BEGIN OF BLOCK rpt WITH FRAME TITLE text-003.
SELECT-OPTIONS: sbukrs FOR bkpf-bukrs OBLIGATORY,
sbelnr FOR bkpf-belnr,
sgjahr FOR bkpf-gjahr OBLIGATORY,
smonat FOR bkpf-monat OBLIGATORY,
sxblnr FOR bkpf-xblnr,
sprctr FOR bseg-prctr,
shkont FOR bseg-hkont.
shkont FOR zmapzce1-saknr."G/L account number
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Removed:
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(31) text-005.
*PARAMETERS: p_pdtls AS CHECKBOX DEFAULT ' '. "flag
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(31) text-004.
*PARAMETERS: p_hdtls AS CHECKBOX DEFAULT ' '. "flag
*SELECTION-SCREEN END OF LINE.
End of Change - DR1K901005 - JIRA#: ENT-93----
SELECTION-SCREEN END OF BLOCK rpt.
INITIALIZATION.
init accounts
MOVE 'I' TO shkont-sign.
MOVE 'EQ' TO shkont-option.
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Removed:
MOVE '0000200000' TO shkont-low.
MOVE '0000299999' TO shkont-high.
*>>> Added:
MOVE '0000400100' TO shkont-low.
MOVE '0000400199' TO shkont-high.
End of Change - DR1K901005 - JIRA#: ENT-93----
APPEND shkont.
START-OF-SELECTION.
set pf-status 'VDOC'.
PERFORM get_je_data
TABLES gt_jesum.
IF sy-subrc = 0.
CALL SCREEN 100.
ELSE.
MESSAGE ID 'F5' TYPE 'S' NUMBER '194'.
ENDIF.
END-OF-SELECTION.
*& Form get_je_data
loads the internal table for jesum
FORM get_je_data TABLES gt_jesum STRUCTURE zfirevje.
SELECT *
FROM bkpf
WHERE bukrs IN sbukrs
AND belnr IN sbelnr
AND gjahr IN sgjahr
AND monat IN smonat
AND xblnr IN sxblnr.
PERFORM save_to_dtab.
CLEAR: gv_zuonr, gv_shkzg, gv_amount,
gv_hkont, gv_currncy, gv_matnr.
SELECT zuonr shkzg pswbt
pswsl hkont matnr
INTO (gv_zuonr, gv_shkzg, gv_amount,
gv_currncy, gv_hkont, gv_matnr)
FROM bseg
WHERE bukrs EQ bkpf-bukrs "IN sbukrs
AND belnr EQ bkpf-belnr "IN sbelnr
AND gjahr EQ bkpf-gjahr "IN sgjahr
AND hkont IN shkont
AND prctr IN sprctr.
PERFORM save_to_outtab TABLES gt_jesum.
ENDSELECT.
ENDSELECT.
ENDFORM.
FORM SAVE_TO_DTAB *
FORM save_to_dtab.
CLEAR d_tab.
MOVE-CORRESPONDING bkpf TO d_tab.
APPEND d_tab.
ENDFORM.
FORM SAVE_TO_OUTTAB *
FORM save_to_outtab TABLES gt_jesum STRUCTURE zfirevje.
DATA: tempamount LIKE tdrxx-wrbtr,
subacct(2) TYPE c.
CLEAR: gt_jesum, tempamount, subacct.
IF d_tab-xblnr+0(1) = '@'.
gt_jesum-zbiller = d_tab-xblnr+1(2).
Start of Change - DR1K901241 - JIRA#: ENT-102----
*>>> Removed:
gt_jesum-zcyclenbr = gv_zuonr+6(2).
*>>> Added:
gt_jesum-zcyclenbr = gv_zuonr+3(2).
SELECT SINGLE zbillname
INTO gt_jesum-zbillname
FROM zbillers
WHERE zbiller = gt_jesum-zbiller.
IF sy-subrc <> 0.
gt_jesum-zbillname = 'Non-biller entries'.
ENDIF.
End of Change - DR1K901241 - JIRA#: ENT-102----
ELSE.
gt_jesum-zbiller = d_tab-xblnr+0(2).
gt_jesum-zbillname = 'Non-biller entries'.
ENDIF.
*>>> Removed: IES out now identified by biller @NX
IF gt_jesum-zbillname = 'IES'.
IF gv_matnr IS INITIAL.
gt_jesum-zbillname = 'IES-OUT'.
ELSE.
gt_jesum-zbillname = 'IES-IN'.
ENDIF.
ENDIF.
Start of Change - DR1K901241 - JIRA#: ENT-102----
*>>> Removed:
gt_jesum-zruntype = gv_zuonr+3(2).
*>>> Added:
gt_jesum-zruntype = gv_zuonr(2).
End of Change - DR1K901241 - JIRA#: ENT-102----
IF d_tab-xblnr+0(1) = '@'.
CASE gt_jesum-zruntype.
WHEN 'RB'. gt_jesum-zruntype_desc = 'Billed'.
WHEN 'UB'. gt_jesum-zruntype_desc = 'Unbilled'.
WHEN OTHERS. gt_jesum-zruntype_desc = 'Other bller entries'.
ENDCASE.
ELSE.
gt_jesum-zruntype_desc = 'Non-biller entry'.
ENDIF.
IF gv_shkzg = 'H'.
tempamount = gv_amount * -1.
ELSE.
tempamount = gv_amount.
ENDIF.
subacct = gv_hkont+8(2).
CASE subacct.
WHEN '00'. "Gross Billing
gt_jesum-vvgrb001 = tempamount.
WHEN '80'. "Accruals
gt_jesum-vvbaa001 = tempamount.
WHEN '85'. "Reversals
gt_jesum-vvrba001 = tempamount.
WHEN '15'. "Discount
gt_jesum-vvdis001 = tempamount.
WHEN '81'. "Discount Accruals
gt_jesum-vvdac001 = tempamount.
WHEN '86'. "Discount Reversals
gt_jesum-vvrda001 = tempamount.
WHEN '70'. "Other
gt_jesum-vvoth001 = tempamount.
WHEN '65'. "Sale Allowance
gt_jesum-vvsa001 = tempamount.
WHEN '60'. "Reba tes
gt_jesum-vvrab001 = tempamount.
WHEN '10'. "Adjustments
gt_jesum-vvadj001 = tempamount.
WHEN '75'. "Manual Bils
gt_jesum-vvman001 = tempamount.
WHEN '20'. "Inbound Settlements
gt_jesum-vvinb001 = tempamount.
ENDCASE.
gt_jesum-total = tempamount.
gt_jesum-pswsl = gv_currncy.
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Removed:
IF p_pdtls = 'X' OR p_hdtls = 'X'.
PERFORM get_product_hierarchy
USING gv_matnr
CHANGING gt_jesum-matnr
gt_jesum-wwph1
gt_jesum-wwph2
gt_jesum-wwph3.
ENDIF.
End of Change - DR1K901005 - JIRA#: ENT-93----
COLLECT gt_jesum.
SORT gt_jesum BY zbiller zruntype.
ENDFORM.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
CALL METHOD grid1->get_frontend_layout
IMPORTING
es_layout = gs_layout.
gs_layout-cwidth_opt = 'X'.
CALL METHOD grid1->set_3d_border
EXPORTING
border = 1.
gs_layout-grid_title =
'Revenue journal entry summary by biller and type'(100).
x_save = 'A'.
gs_variant = '/ZFIRD035'.
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Added:
PERFORM prepare_field_catalogue.
End of Change - DR1K901005 - JIRA#: ENT-93----
CALL METHOD grid1->set_table_for_first_display
EXPORTING
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Removed:
i_structure_name = 'ZFIREVJE'
End of Change - DR1K901005 - JIRA#: ENT-93----
is_variant = gs_variant
is_layout = gs_layout
i_save = x_save
CHANGING it_outtab = gt_jesum
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Added:
it_fieldcatalog = git_fieldcat[]
End of Change - DR1K901005 - JIRA#: ENT-93----
->Create Object to receive events and link them to handler methods.
When the ALV Control raises the event for the specified instance
the corresponding method is automatically called.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_double_click FOR grid1.
*CALL METHOD grid1->refresh_table_display
EXPORTING
IS_STABLE = <structure of type LVC_S_STBL >
I_SOFT_REFRESH = 'X'.
ENDIF.
ENDMODULE.
MODULE PAI INPUT *
MODULE pai INPUT.
to react on oi_custom_events:
DATA: lt_t_row TYPE lvc_t_row,
wa_t_row LIKE LINE OF lt_t_row,
ls_jesum LIKE LINE OF gt_jesum.
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN 'BACK'.
PERFORM exit_listing.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE.
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD g_custom_container->free.
CALL METHOD cl_gui_cfw=>flush.
LEAVE PROGRAM.
ENDFORM.
*& Form exit_Listing
text
--> p1 text
<-- p2 text
FORM exit_listing.
CALL METHOD g_custom_container->free.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO TRANSACTION 'ZF06'.
ENDFORM. " exit_Listing
*& Form get_product_hierarchy
text
-->P_GV_MATNR text
<--P_GT_WWPH1 text
<--P_GT_WWPH2 text
<--P_GT_WWPH3 text
FORM get_product_hierarchy USING p_gv_matnr
CHANGING p_gt_matnr
p_gt_wwph1
p_gt_wwph2
p_gt_wwph3.
IF p_gv_matnr = gv_prdha_all.
ENDIF.
ENDSELECT.
ELSE.
ENDIF.
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Removed:
IF p_pdtls = 'X'.
p_gt_matnr = p_gv_matnr.
ENDIF.
IF p_hdtls = 'X'.
p_gt_wwph1 = gv_prdha-wwph1.
p_gt_wwph2 = gv_prdha-wwph2.
p_gt_wwph3 = gv_prdha-wwph3.
ENDIF.
End of Change - DR1K901005 - JIRA#: ENT-93----
ENDFORM. " get_product_hierarchy
Start of Change - DR1K901005 - JIRA#: ENT-93----
*>>> Added:
FORM prepare_summary_catalogue
Prepare catalogue for Report
FORM prepare_field_catalogue.
DATA: lwa_fieldcat TYPE lvc_s_fcat.
REFRESH: git_fieldcat.
CLEAR git_fieldcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'ZFIREVJE'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
CHANGING
ct_fieldcat = git_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.
Do not display Material, ProH1, ProH2, and ProHLe3.
READ TABLE git_fieldcat INTO lwa_fieldcat
WITH KEY fieldname = 'MATNR'.
lwa_fieldcat-no_out = 'X'.
MODIFY git_fieldcat FROM lwa_fieldcat INDEX sy-tabix.
READ TABLE git_fieldcat INTO lwa_fieldcat
WITH KEY fieldname = 'WWPH1'.
lwa_fieldcat-no_out = 'X'.
MODIFY git_fieldcat FROM lwa_fieldcat INDEX sy-tabix.
READ TABLE git_fieldcat INTO lwa_fieldcat
WITH KEY fieldname = 'WWPH2'.
lwa_fieldcat-no_out = 'X'.
MODIFY git_fieldcat FROM lwa_fieldcat INDEX sy-tabix.
READ TABLE git_fieldcat INTO lwa_fieldcat
WITH KEY fieldname = 'WWPH3'.
lwa_fieldcat-no_out = 'X'.
MODIFY git_fieldcat FROM lwa_fieldcat INDEX sy-tabix.
ENDFORM. "prepare_field_catalogue
End of Change - DR1K901005 - JIRA#: ENT-93----Hi,
I would suggest that you post this on the ABAP forum.
From a functional point of view is there any exchange rate involved that is converting the field to the local currency?
Steve B -
Hi All,
I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.
Points are awarded,
Regards,
Bharat Mistry
Message was edited by: Bharat MistryHi Bharat,
Read the internal table contents in double click event with e_row-index , then you will get the data of that particular row.
check below code :
local class to handle semantic checks
CLASS lcl_event_receiver DEFINITION DEFERRED.
DATA: g_event_receiver TYPE REF TO lcl_event_receiver.
LOCAL CLASS Definition
*§4.Define and implement event handler to handle event DATA_CHANGED.
CLASS lcl_event_receiver DEFINITION.
public section.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_double_click.
read table gt_outtab index e_row-index into
Regards
Appana
*Reward Points for helpful answers
Message was edited by: L Appana -
How to use aggregation -Average using a class
Hi Gurus,
In my report i have used cl_salv_table and for event i have used cl_salv_events_table, now i want to calculate average for some of the fields as such subtotal calculation . In my normal alv reports i have used the class lcl_event_receiver also, but for the report which iam using a class , i d'not know how to compain both the class (i.e) cl_salv_table, class lcl_event_receiver. Help me to solve the problem.cancelled
-
How to make a field manadatory within ALV Grid using methods and classes
Hi,
I am using ALV Grid using set_table_for_first_display
inside my dialog programming. I have a field called project number inside my grid which has to be made as mandatory field.
I have defined a method called catch_data_changed inside my class lcl_event_receiver. This method captures the changes made to one of the fields inside my ALV grid and displays all the default values of the other fields from the grid.
Now, i have to make project number which is one of my fields inside my ALV grid as mandatory. At the field catalog level i did not find any such option for making a field as required field.
Is there any other way, i can accomplish this within the ALV grid?from my understanding from ur question, i understood that u want the editable field inside alvgrid to be mandatory.
i dont know anthing in fieldcat, but u can try the following logic.
FORM DATA_CHANGED USING P_ER_DATA_CHANGED TYPE REF TO
CL_ALV_CHANGED_DATA_PROTOCOL .
DATA: L_VALUE TYPE LVC_VALUE,
ls_mod_cell type lvc_s_modi.
READ TABLE P_ER_DATA_CHANGED->MT_MOD_CELLS INTO LS_MOD_CELL.
if sy-subrc = 0.
CALL METHOD P_ER_DATA_CHANGED->GET_CELL_VALUE
EXPORTING
I_ROW_ID = LS_MOD_CELL-row_id
I_FIELDNAME = LS_MOD_CELL-fieldname
IMPORTING
E_VALUE = L_VALUE.
IF LS_MOD_CELL-FIELDNAME <> 'fieldname what u want'
MESSAGE 'ENTER VALUE INTO (fieldname u want) ' TYPE 'I'.
ENDIF.
ELSE.
MESSAGE 'ENTER VALUE INTO (fieldname u want) ' TYPE 'I'.
ENDIF. -
SE24 or In-line Declaration of Custom Class to be Used in a Custom Exit ???
After our implementation of a custom screen in EXIT_SAPLIE01_007, the function-group XQSM contained the following custom elements:
XQSM
Function Modules
EXIT_SAPLIE01_007 (this just includes ZXQSMU06)
PBO Modules
STATUS_9000
PAI Modules
USER_COMMAND_9000
SCREENS
9000 (custom screen (modal dialog box))
GUI_STATUS
9000 (status for custom screen)
INCLUDES
ZXQSMI01 (contains PAI module)
ZXQSMO01 (contains PBP module)
ZXQSMTOP (declares custom global variables)
ZXQSMZZZ (this just includes ZXQSMI01/ZXQSMO01
ZXQSMU06 (this calls custom screen 9000)
Then the users decided they wanted an editable ALV on custom screen 9000 (to handle multi-item GR postings in MIGO, not just single-item postings.)
Since I never coded an editable ALV before, I first created a working editable ALV program from the SAP demo program BCALV_EDIT_03 plus some additions/modifications kindly provided by Uwe Schieferstein down in the ABAP Objects Forum.
But now I'm stuck because I don't know which components of the XQSM function group I should put the following pieces of code in:
1)
class lcl_event_receiver definition deferred.
data: g_event_receiver type ref to lcl_event_receiver.
2)
class lcl_event_receiver definition.
public section.
private section.
endclass.
3)
class lcl_event_receiver implementation.
endclass.
Can someone please tell me where (1-3) belong inside XQSM - what components they should be put into?
Or should I just build a custom class in SE24 and use it in the exit ??? (By "use it", I mean instantiate it and call its methods.)
It seems to me that if I could define the class in SE24,it would be a lot easier, because everything else except (1-3) above clearly belongs in the PBO or PAIof the screen.Hello David
In thread
how to activate or deactivate a user-exit based a specific condition
I have described a general strategy for implementing CMOD/SMOD exits. In your case, I would create a function group <b>ZXQSM</b> having two function modules:
- <b>Z_EXIT_SAPLIE01_007</b> (= copy of EXIT_SAPLIE01_007) => calls the following fm
- <b>Z_EXIT_SAPLIE01_007_SPEC</b> (-> specific exit that is executed only if certain conditions are fulfilled
All you implementations for you editable ALV grid belong into your customer function group ZXQSM.
Regards
Uwe -
Could you please send me the material Opps concepts Classes and Methods
Hi Experts,
I am working on Opps concepts.I am new to this concept.
Could you please send me the detailed presentation on Abap oops.
Thanks inadvance,
Regards,
Rekha.Hi this will help u.
OOPs ABAP uses Classes and Interfaces which uses Methods and events.
If you have Java skills it is advantage for you.
There are Local classes as well as Global Classes.
Local classes we can work in SE38 straight away.
But mostly it is better to use the Global classes.
Global Classes or Interfaces are to be created in SE24.
SAP already given some predefined classes and Interfaces.
This OOPS concepts very useful for writing BADI's also.
So first create a class in SE 24.
Define attributes, Methods for that class.
Define parameters for that Method.
You can define event handlers also to handle the messages.
After creation in each method write the code.
Methods are similar to ABAP PERFORM -FORM statements.
After the creation of CLass and methods come to SE38 and create the program.
In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
Example:
REPORT sapmz_hf_alv_grid .
Type pool for icons - used in the toolbar
TYPE-POOLS: icon.
TABLES: zsflight.
To allow the declaration of o_event_receiver before the
lcl_event_receiver class is defined, decale it as deferred in the
start of the program
CLASS lcl_event_receiver DEFINITION DEFERRED.
G L O B A L I N T E R N A L T A B L E S
*DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
To include a traffic light and/or color a line the structure of the
table must include fields for the traffic light and/or the color
TYPES: BEGIN OF st_sflight.
INCLUDE STRUCTURE zsflight.
Field for traffic light
TYPES: traffic_light TYPE c.
Field for line color
types: line_color(4) type c.
TYPES: END OF st_sflight.
TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
DATA: gi_sflight TYPE tt_sflight.
G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
Work area for internal table
g_wa_sflight TYPE st_sflight,
ALV control: Layout structure
gs_layout TYPE lvc_s_layo.
Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container,
o_event_receiver TYPE REF TO lcl_event_receiver.
DATA:
Work area for screen 200
g_screen200 LIKE zsflight.
Data for storing information about selected rows in the grid
DATA:
Internal table
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
C L A S S E S
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object e_interactive,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
Event handler method for event toolbar.
CONSTANTS:
Constants for button type
c_button_normal TYPE i VALUE 0,
c_menu_and_default_button TYPE i VALUE 1,
c_menu TYPE i VALUE 2,
c_separator TYPE i VALUE 3,
c_radio_button TYPE i VALUE 4,
c_checkbox TYPE i VALUE 5,
c_menu_entry TYPE i VALUE 6.
DATA:
ls_toolbar TYPE stb_button.
Append seperator to the normal toolbar
CLEAR ls_toolbar.
MOVE c_separator TO ls_toolbar-butn_type..
APPEND ls_toolbar TO e_object->mt_toolbar.
Append a new button that to the toolbar. Use E_OBJECT of
event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
This class has one attribute MT_TOOLBAR which is of table type
TTB_BUTTON. The structure is STB_BUTTON
CLEAR ls_toolbar.
MOVE 'CHANGE' TO ls_toolbar-function.
MOVE icon_change TO ls_toolbar-icon.
MOVE 'Change flight' TO ls_toolbar-quickinfo.
MOVE 'Change' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
METHOD handle_user_command.
Handle own functions defined in the toolbar
CASE e_ucomm.
WHEN 'CHANGE'.
PERFORM change_flight.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
ENDCLASS.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
DATA:
For parameter IS_VARIANT that is sued to set up options for storing
the grid layout as a variant in method set_table_for_first_display
l_layout TYPE disvariant,
Utillity field
l_lines TYPE i.
After returning from screen 200 the line that was selected before
going to screen 200, should be selected again. The table gi_index_rows
was the output table from the GET_SELECTED_ROWS method in form
CHANGE_FLIGHT
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
EXPORTING
it_index_rows = gi_index_rows.
CALL METHOD cl_gui_cfw=>flush.
REFRESH gi_index_rows.
ENDIF.
Read data and create objects
IF go_custom_container IS INITIAL.
Read data from datbase table
PERFORM get_data.
Create objects for container and ALV grid
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
Create object for event_receiver class
and set handlers
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
Layout (Variant) for ALV grid
l_layout-report = sy-repid. "Layout fo report
Setup the grid layout using a variable of structure lvc_s_layo
Set grid title
gs_layout-grid_title = 'Flights'.
Selection mode - Single row without buttons
(This is the default mode
gs_layout-sel_mode = 'B'.
Name of the exception field (Traffic light field) and the color
field + set the exception and color field of the table
gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
gs_layout-info_fname = 'LINE_COLOR'.
LOOP AT gi_sflight INTO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
Value of traffic light field
g_wa_sflight-traffic_light = '1'.
Value of color field:
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
ELSE.
g_wa_sflight-traffic_light = '3'.
ENDIF.
MODIFY gi_sflight FROM g_wa_sflight.
ENDLOOP.
Grid setup for first display
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
is_variant = l_layout
i_save = 'A'
is_layout = gs_layout
CHANGING it_outtab = gi_sflight.
*-- End of grid setup -
Raise event toolbar to show the modified toolbar
CALL METHOD go_grid->set_toolbar_interactive.
Set focus to the grid. This is not necessary in this
example as there is only one control on the screen
CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0200 INPUT
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'EXIT200'.
LEAVE TO SCREEN 100.
WHEN'SAVE'.
PERFORM save_changes.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Form get_data
FORM get_data.
Read data from table SFLIGHT
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
ENDFORM. " load_data_into_grid
*& Form change_flight
Reads the contents of the selected row in the grid, ans transfers
the data to screen 200, where it can be changed and saved.
FORM change_flight.
DATA:l_lines TYPE i.
REFRESH gi_index_rows.
CLEAR g_selected_row.
Read index of selected rows
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
Check if any row are selected at all. If not
table gi_index_rows will be empty
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a line'.
EXIT.
ENDIF.
Read indexes of selected rows. In this example only one
row can be selected as we are using gs_layout-sel_mode = 'B',
so it is only ncessary to read the first entry in
table gi_index_rows
LOOP AT gi_index_rows INTO g_selected_row.
IF sy-tabix = 1.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Transfer data from the selected row to screenm 200 and show
screen 200
CLEAR g_screen200.
MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
LEAVE TO SCREEN '200'.
ENDFORM. " change_flight
*& Form save_changes
Changes made in screen 200 are written to the datbase table
zsflight, and to the grid table gi_sflight, and the grid is
updated with method refresh_table_display to display the changes
FORM save_changes.
DATA: l_traffic_light TYPE c.
Update traffic light field
Update database table
MODIFY zsflight FROM g_screen200.
Update grid table , traffic light field and color field.
Note that it is necessary to use structure g_wa_sflight
for the update, as the screen structure does not have a
traffic light field
MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
g_wa_sflight-traffic_light = '1'.
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
clear g_wa_sflight-line_color.
ELSE.
g_wa_sflight-traffic_light = '3'.
clear g_wa_sflight-line_color.
ENDIF.
MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
Refresh grid
CALL METHOD go_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN '100'.
ENDFORM. " save_changes
chk this blog
/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
with regards,
Hema.
pls give points if helpful. -
Classes and Methods - handle_double_click
Hi All,
I am working on classes and methods now. I have a doubt.
I have declared as:
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION.
Method to handle the double click.
METHOD handle_double_click.
IF e_row-rowtype IS INITIAL.
READ TABLE tb_output INDEX e_row-index INTO wa_out.
PERFORM get_secondary_list.
PERFORM display_secondary_list.
ENDIF.
ENDMETHOD. "handle_double_click
ENDCLASS.
Now, can't i define the same method 'handle_double_click' with some other functionality in IMPLEMETATION?
From the first screen when it is double clicked it should take me to screen 200. Inside 200, if i double click on somthing..it should take me to screen 3. But it is taking me to screen 200 again. Please help me put. It's urgent.
Thanks a lot.
Regards,
Seenudefine next screen as 3 in the properties of 200 screen
or in event handler method write statement:
call screen 3. -
Is there any class similar as cl_GUi_alv_grid for normal report
we have a requirement to put one report some part of in the screen.
so we know there is class on which we can display ALV
i.e "cl_GUi_alv_grid".in the same way is there any class in which we can use as a normal report.
right now i have an idea of keeping a container on the screen and i want some class whcih can handle as normal report.
please help. this is very urgent.
Thanks & Regards
Anil Kumar KEND_OF_LIST will trigger at the end of list only. but to see the o/p u have to pass print parameters into set_table_for firstdisplay.
DATA: lt_lvcfieldcat type lvc_t_fcat,
ls_lvcfieldcat type lvc_s_fcat,
LS_PRINT TYPE LVC_S_PRNT.
CLASS LCL_EVENT_RECEIVER DEFINITION.
PUBLIC SECTION.
METHODS HANDLE_TOP_OF_PAGE
FOR EVENT PRINT_TOP_OF_PAGE OF CL_GUI_ALV_GRID.
METHODS HANDLE_END_OF_LIST
FOR EVENT PRINT_END_OF_LIST OF CL_GUI_ALV_GRID.
ENDCLASS. "cl_event_receiver DEFINITION
CLASS CL_EVENT_RECEIVER IMPLEMENTATION
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
METHOD HANDLE_TOP_OF_PAGE.
perform top_of_page.
ENDMETHOD . "handle_top_of_page
METHOD HANDLE_END_OF_LIST .
PERFORM END_OF_LIST.
ENDMETHOD . "handle_end_of_list
ENDCLASS . "cl_event_receiver IMPL
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
DATA: V_HEAD LIKE YBUYOFFQA_QDMST-QA_DESC.
SKIP 1.
SELECT SINGLE QA_DESC FROM YBUYOFFQA_QDMST INTO V_HEAD
WHERE QUALITYAUDIT = S_AUDIT-LOW.
FORMAT INTENSIFIED OFF.
WRITE: 40 'V-MSD/AM8',70 'DATE :'.
WRITE:/40 'REVISION NO.01', 70 'SHIFT:'.
SKIP 1.
WRITE:/35 V_HEAD .
ENDFORM. "TOP_OF_PAGE
*& Form END_OF_LIST
text
FORM END_OF_LIST.
SKIP.
uline at 1(44).
WRITE:/ sy-vline,
8 'No. Of Vehicles without any defects',44 sy-vline.
write:/ sy-vline, 'FRC%=',10 sy-uline(35).
write:/ sy-vline,12 'No. Of Vehicles Checked',44
sy-vline.
write:/ sy-uline(44).
uline at 1(44).
skip.
uline at 1(47).
WRITE:/ sy-vline,
8 'No. Of Vehicles worked within tact time',47 sy-vline.
write:/ sy-vline, 'FBO%=',10 sy-uline(38).
write:/ sy-vline,12 'No. Of Vehicles Checked',47
sy-vline.
write:/ sy-uline(47).
uline at 1(47).
ENDFORM. "END_OF_LIST
*& Form PRINT_PARAMS
text
--> p1 text
<-- p2 text
FORM PRINT_PARAMS .
LS_PRINT-GRPCHGEDIT = 'X'.
LS_PRINT-RESERVELNS = '3'.
LS_PRINT-NO_COLWOPT = 'X'.
ENDFORM. " PRINT_PARAMS
********display data******
perform PRINT_PARAMS.
CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_LAYOUT = LS_LVCLAYOUT
IS_PRINT = LS_PRINT
IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
CHANGING
IT_OUTTAB = <TEMP_TAB>
IT_FIELDCATALOG = LT_LVCFIELDCAT[]
IT_SORT = LVC_TSORT[].
ENDFORM. " DISP_DATA
Maybe you are looking for
-
I used to be able to watch video clips off a streaming website, but it's been getting more difficult and now it no longer works. I suspect that my older Power PC G5 Mac is not compatible with the newer Firefox version of 3.6.24. I suspect that if I u
-
How can I get my contacts from Address book on my computer to iCloud?
I recently updated my IOS on my iPhone and my iPad and, of course, lost all my contacts. I've followed the directions for enabling iCloud; however, my contacts are not being sent to iCloud. I checked my Settings on my phone, Info in iTunes, and Accou
-
Ports management in Solaris 10 Zones
Hi, I am new in this area. We have a software vendor who stated that their applications should be able to: - open TCP connections to ports in the ranges 21400-21404 and 50000-50199 on the server - telnet port 23 for Galaxy 2000, http port 80 for View
-
Reports output to file has garbage
Using Report Builder 6.0.5 on NT, I have a report that prints perfectly. I'd like to have the same report sent to a text file if the user selects File as the Destination Type. Indeed, the file gets created in the specified directory, but the contents
-
Why can't I add artwork for wav files
I have a few music in my iTunes that are in WAV audio format, in the get info I am not able to add missing artwork like I can do all the others audio format and yes I have tried the get album artwork from iTunes but it says could not be found. What