Doubt in calltransaction in ALV
Hi, i have doubt in calltransction in alv..In my report am using ALV grid display to display purchase order number , material docu number ..If i click on purchasing docu number it has to call transaction ME23N for the purchase order number that i have clicked and if i click material document number it has to call trainsaction MIGO for the corresponding material document number..Here i have done some coding plz correct me if iam wrong..
*& Report YCALLTRANSACTIONALV *
REPORT YCALLTRANSACTIONALV .
TYPE-POOLS: icon.
TYPE-POOLS: slis.
TABLES: vbak,vbap,vbep, makt,lips.
DATA: BEGIN OF gt_vbak OCCURS 0,
vbeln LIKE vbak-vbeln,
audat LIKE vbak-audat,
vdatu LIKE vbak-vdatu,
kunnr LIKE vbak-kunnr,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
kwmeng LIKE vbap-kwmeng,
END OF gt_vbak.
DATA: BEGIN OF gt_vbep OCCURS 0,
vbeln LIKE vbep-vbeln,
wadat LIKE vbep-wadat,
END OF gt_vbep.
DATA: BEGIN OF gt_lips OCCURS 0,
vbeln LIKE lips-vbeln,
posnr LIKE lips-posnr,
lfimg LIKE lips-lfimg,
vgbel LIKE lips-vgbel,
vgpos LIKE lips-vgpos,
END OF gt_lips.
DATA: BEGIN OF gt_makt OCCURS 0,
matnr LIKE makt-matnr,
maktx LIKE makt-maktx,
END OF gt_makt.
DATA: gv_tab TYPE slis_tabname VALUE 'GT_REPORT'.
DATA: BEGIN OF gt_report OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbep-posnr,
matnr LIKE vbap-matnr,
maktx LIKE makt-maktx,
kwmeng LIKE vbap-kwmeng,
vdatu LIKE vbak-vdatu,
lfimg LIKE lips-lfimg,
wadat LIKE vbep-wadat,
vgbel LIKE lips-vgbel,
icon TYPE icon-id,
tabcolor TYPE lvc_t_scol,
END OF gt_report.
DATA: gt_fieldcat TYPE slis_t_fieldcat_ alv,
gs_fieldcat TYPE slis_fieldcat_ alv,
gs_layout TYPE slis_layout_ alv,
gt_events TYPE slis_t_event,
gs_events TYPE slis_alv_event,
repid LIKE sy-repid.
DATA: gt_lines TYPE TABLE OF tline WITH HEADER LINE,
gv_name LIKE thead-tdname,
gv_fld(40),gv_ fval(50).
DATA: BEGIN OF gt_outlines OCCURS 0,
text TYPE tdline,
END OF gt_outlines.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-006.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_cust RADIOBUTTON GROUP rad1 USER-COMMAND ch DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) text-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_date RADIOBUTTON GROUP rad1 .
SELECTION-SCREEN COMMENT 5(10) text-002 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-005.
SELECT-OPTIONS: s_sale FOR vbak-vbeln MODIF ID cus,
s_cust FOR vbak-kunnr MODIF ID cus.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-005.
SELECT-OPTIONS: s_sale1 FOR vbak-vbeln MODIF ID dat,
s_dat FOR vbak-audat MODIF ID dat.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-007.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_clas RADIOBUTTON GROUP rad2 ."USER-COMMAND ch DEFAULT'X'.
SELECTION-SCREEN COMMENT 5(20) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_alv RADIOBUTTON GROUP rad2 ."USER-COMMAND ch DEFAULT'X'.
SELECTION-SCREEN COMMENT 5(20) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b4.
AT SELECTION-SCREEN.
CHECK sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
IF p_cust = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DAT'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'CUS'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
IF p_cust = 'X' .
CLEAR gt_vbak.
REFRESH gt_vbak.
SELECT avbeln aaudat avdatu akunnr bposnr bmatnr b~kwmeng
INTO TABLE gt_vbak
FROM vbak AS a INNER JOIN vbap AS b
ON avbeln = bvbeln
WHERE a~vbeln IN s_sale
AND a~kunnr IN s_cust.
ELSEIF p_date = 'X'.
CLEAR gt_vbak.
REFRESH gt_vbak.
SELECT avbeln aaudat avdatu akunnr bposnr bmatnr b~kwmeng
INTO TABLE gt_vbak
FROM vbak AS a INNER JOIN vbap AS b
ON avbeln = bvbeln
WHERE a~vbeln IN s_sale1
AND a~audat IN s_dat.
ENDIF.
PERFORM sel_data.
IF p_alv = 'X'.
PERFORM disp_data1.
ELSE.
PERFORM disp_data.
ENDIF.
AT LINE-SELECTION.
GET CURSOR FIELD gv_fld .
CASE gv_fld.
WHEN 'ICON_DISPLAY_ TEXT'.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
PERFORM write_text.
PERFORM disp_text.
WHEN 'GT_REPORT-VBELN' .
SET PARAMETER ID 'AUN' FIELD gt_report-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDCASE.
*& Form sel_data
FORM sel_data .
CLEAR gt_vbep.
REFRESH gt_vbep.
IF NOT gt_vbak[] IS INITIAL.
SELECT vbeln wadat FROM vbep INTO TABLE gt_vbep
FOR ALL ENTRIES IN gt_vbak
WHERE vbeln = gt_vbak-vbeln.
CLEAR gt_lips.
REFRESH gt_lips.
SELECT vbeln posnr lfimg vgbel vgpos FROM lips INTO TABLE gt_lips
FOR ALL ENTRIES IN gt_vbak
WHERE vgbel = gt_vbak-vbeln
AND vgpos = gt_vbak-posnr.
CLEAR gt_makt.
REFRESH gt_makt.
SELECT matnr maktx FROM makt INTO TABLE gt_makt
FOR ALL ENTRIES IN gt_vbak
WHERE matnr = gt_vbak-matnr.
ENDIF.
REFRESH gt_report.
CLEAR gt_report.
LOOP AT gt_vbak.
gt_report-vbeln = gt_vbak-vbeln.
gt_report-vdatu = gt_vbak-vdatu.
gt_report-posnr = gt_vbak-posnr.
gt_report-matnr = gt_vbak-matnr.
gt_report-kwmeng = gt_vbak-kwmeng.
CLEAR gt_vbep.
READ TABLE gt_vbep WITH KEY vbeln = gt_vbak-vbeln.
gt_report-wadat = gt_vbep-wadat.
CLEAR gt_lips.
READ TABLE gt_lips WITH KEY vgbel = gt_vbak-vbeln
vgpos = gt_vbak-posnr.
gt_report-lfimg = gt_lips-lfimg.
gt_report-vgbel = gt_lips-vbeln.
CLEAR gt_makt.
READ TABLE gt_makt WITH KEY matnr = gt_vbak-matnr.
gt_report-maktx = gt_makt-maktx.
CLEAR gt_report-icon.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
IF gt_lines[] IS NOT INITIAL.
gt_report-icon = '@0P@'.
ENDIF.
APPEND gt_report.
ENDLOOP.
ENDFORM. " sel_data
*& Form disp_data
FORM disp_data .
WRITE:/(8) 'orderno.',
(8) 'lineno.',
(11) 'mat.',
(27) 'matdes.',
(10) 'ord.qty',
(12) 'req.del.',
(10) 'del.qty',
(10) 'gidate',
(10) 'delno.'.
ULINE.
LOOP AT gt_report.
WRITE:/(8) gt_report-vbeln COLOR 6 HOTSPOT,
(8) gt_report-posnr ,
(8) gt_report-matnr,
(25) gt_report-maktx,
(11) gt_report-kwmeng,
(15) gt_report-vdatu,
(7) gt_report-lfimg,
(10) gt_report-wadat,
(10) gt_report-vgbel.
PERFORM concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
IF gt_lines[] IS NOT INITIAL.
WRITE:120 icon_display_ text AS ICON HOTSPOT.
HIDE: gt_report-vbeln, gt_report- posnr.
ENDIF.
ENDLOOP.
ENDFORM. " disp_data
*& Form disp_data1
FORM disp_data1 .
DATA :
ls_tabcolor TYPE lvc_s_scol.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VBELN'.
gs_fieldcat- hotspot = 'X'.
gs_fieldcat- seltext_l = 'ORDERNO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'POSNR'.
gs_fieldcat- seltext_l = 'LINENO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'MATNR'.
gs_fieldcat- seltext_l = 'MATNO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'MAKTX'.
gs_fieldcat- seltext_l = 'MATDESCR'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'KWMENG'.
gs_fieldcat- seltext_l = 'ORDERQTY'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VDATU'.
gs_fieldcat- seltext_l = 'REQ.DEL.DAT' .
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'LFIMG'.
gs_fieldcat- seltext_l = 'QTY.DEL'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'WADAT'.
gs_fieldcat- seltext_l = 'ISS.DATE'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'VGBEL'.
gs_fieldcat- seltext_l = 'DOUC.NO'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat- tabname = gv_tab.
gs_fieldcat- fieldname = 'ICON'.
gs_fieldcat- seltext_l = 'TEXT'.
gs_fieldcat- icon = 'X'.
gs_fieldcat- hotspot = 'X'.
APPEND gs_fieldcat TO gt_fieldcat.
gs_layout-coltab_ fieldname = 'TABCOLOR'.
gs_events-name = 'USER_COMMAND' .
gs_events-form = 'VAL'.
APPEND gs_events TO gt_events.
LOOP AT gt_report.
ls_tabcolor- fname = 'VBELN'.
ls_tabcolor- color-col = 4.
ls_tabcolor- color-int = 1.
ls_tabcolor- color-inv = 0.
INSERT ls_tabcolor INTO TABLE gt_report-tabcolor.
MODIFY gt_report.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_ DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat
it_events = gt_events
TABLES
t_outtab = gt_report.
ENDFORM. " disp_data1
*& Form READ_TEXT .
FORM read_text .
CLEAR gt_lines.
REFRESH gt_lines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = '0002'
language = sy-langu
name = gv_name
object = 'VBBP'
TABLES
lines = gt_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_ to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " READ_TEXT
*& Form WRITE_TEXT.
FORM write_text.
REFRESH gt_outlines.
CLEAR gt_outlines.
CLEAR gt_lines.
LOOP AT gt_lines .
MOVE gt_lines-tdline TO gt_outlines- text .
APPEND gt_outlines.
ENDLOOP.
CLEAR gt_outlines.
ENDFORM. "WRITE_TEXT
*& Form VAL .
FORM val USING
user_command LIKE sy-ucomm
sel TYPE slis_selfield.
IF sel-fieldname = 'VBELN'.
SET PARAMETER ID 'AUN' FIELD gt_report-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
IF sel-fieldname = 'ICON'.
CLEAR gt_report.
READ TABLE gt_report INDEX sel-tabindex.
perform concate_text.
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
PERFORM write_text.
PERFORM disp_text1.
ENDIF.
ENDFORM. "val
*& Form disp_text
FORM disp_text .
CALL FUNCTION 'POPUP_WITH_ TABLE_DISPLAY_ OK'
EXPORTING
endpos_col = 50
endpos_row = 30
startpos_col = 20
startpos_row = 20
titletext = 'TEXT'
TABLES
valuetab = gt_outlines.
ENDFORM. " disp_text
*& Form disp_text1
FORM disp_text1 .
DATA: lt_fieldcat TYPE slis_t_fieldcat_ alv,
ls_fieldcat TYPE slis_fieldcat_ alv.
ls_fieldcat- fieldname = 'TEXT'.
ls_fieldcat- outputlen = 40.
ls_fieldcat- tabname = gt_outlines.
APPEND ls_fieldcat TO lt_fieldcat.
CALL FUNCTION 'REUSE_ALV_POPUP_ TO_SELECT'
EXPORTING
i_title = 'TEXT'
i_tabname = 'TLINE'
it_fieldcat = lt_fieldcat
i_callback_program = sy-repid
TABLES
t_outtab = gt_outlines.
ENDFORM. " disp_text1
*& Form concate_text
FORM concate_text .
CLEAR gv_name.
CONCATENATE gt_report-vbeln gt_report-posnr INTO gv_name.
PERFORM read_text.
ENDFORM. " concate_text
Thanks
Hello skk
Here is a sample report performing the required task using OO-means. I think you will agree that the OO-based approach is much simpler and easier to understand than the FM-based approach.
The screen '0100' has the following flow logic without any dynpro elements:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
*& Report ZUS_SDN_ALVGRID_EVENTS
REPORT zus_sdn_alvgrid_events.
DATA:
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000' OBLIGATORY.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_col_id TYPE lvc_s_col.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CASE e_column_id-fieldname.
WHEN 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'ERNAM'.
* SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
* NOTE: no parameter id available, yet simply show the priciple
CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
WHEN OTHERS.
* do nothing
ENDCASE.
* Set active cell to field BUKRS otherwise the focus is still on
* field KUNNR which will always raise event HOTSPOT_CLICK
ls_col_id-fieldname = 'BUKRS'.
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
is_row_id = e_row_id
is_column_id = ls_col_id.
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
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 ALV grid
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_docking
EXCEPTIONS
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.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
it_fieldcatalog = gt_fcat
EXCEPTIONS
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.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
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.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
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 gt_fcat INTO ls_fcat
WHERE ( fieldname = 'KUNNR' OR
fieldname = 'ERNAM' ).
ls_fcat-hotspot = abap_true.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe
Similar Messages
-
Logo in Object Model ALV ?
Hi Experts
I have a small doubt in object model alv...
Is there any chance to create logo in alv using OBJECT MODEL (CL_SALV_TABLE)..
Regards,
VamsiHey, check this example code:
METHOD alv_set_header.
DATA: lv_grid TYPE REF TO cl_salv_form_layout_grid, "Header Layout
lv_label TYPE REF TO cl_salv_form_label, "Label
lv_logo TYPE REF TO cl_salv_form_layout_logo, "Logo
lv_text TYPE REF TO cl_salv_form_text. "Text
CREATE OBJECT lv_grid.
lv_label = lv_grid->create_label(
text = 'Execution Date:'(008)
row = 1
column = 1 ).
lv_text = lv_grid->create_text(
text = sy-datum
row = 1
column = 2 ).
lv_label = lv_grid->create_label(
text = 'Execution Time:'(009)
row = 2
column = 1 ).
lv_text = lv_grid->create_text(
text = sy-uzeit
row = 2
column = 2 ).
lv_label = lv_grid->create_label(
text = 'Responsible:'(010)
row = 3
column = 1 ).
lv_text = lv_grid->create_text(
text = sy-uname
row = 3
column = 2 ).
lv_grid->add_row( ).
lv_grid->add_row( ).
lv_grid->add_row( ).
lv_label = lv_grid->create_label(
text = 'Total Records:'(011)
row = 5
column = 1 ).
lv_text = lv_grid->create_text(
text = me->mv_total
row = 5
column = 2 ).
lv_label->set_label_for( lv_text ).
CREATE OBJECT lv_logo.
lv_logo->set_left_content( lv_grid ).
lv_logo->set_right_logo( 'CUSTOMER_LOGO' ) .
me->mo_salv_table->set_top_of_list( lv_logo ).
ENDMETHOD. "alv_set_header -
Facing some problems in creating a custom tabs in CRMD_ORDER Transaction
Hi Friends,
I am facing some problems in creating a custom tabs in CRMD_ORDER Transaction code in Solution Manager of SAP.
Actually my requirement is adding of two tabs(one is header & another is item tab) in the above Transaction, i was able to put one tab i.e header tab but i was not able to keep item tab. i found a badi CRM_CUSTOMER_I_BADI in which documentation was given & i processed in the same way.
For information i used the Badi CRM_CUSTOMER_H_BADI for header tab which i was able to add the tab & all functions like change, save working Good.
But i want how to add custom tab in which item details were to be attached.
i was done with the necessary SPRO settings(or Tcode CRMV_SSV) & able to see the 2 tabs thats it, but the functionality save is not working for the second tab & not saving in table CRMD_CUSTOMER_I (in this table there is one CI include where we added our item fields).
And also i had a doubt whether to use ALV or Table Control. And if possible can any one can sent me the screen design & the code for the above requirement in detail.
can any one who have knoweldge in Solution Manager & in the above Badi implementation can give me a right solution which will help me a lot.
Thanks a lot in advance.
Thanks
Ravi.
can any one give the solution regarding to the above one.
Edited by: ravikanth on Jul 23, 2008 8:13 AMHello Priyanka,
I have the same problem by using Service Ticket in SAP CRM 5.0.
Did you already solved this issue? If so, can you please provide the solution!?
How can I activate and check the transfer log?
Thanks and regards
Alex -
How can I select 2 options in Interactive reports
Hi Friends
I have a doubt about Interactive reports/ ALV interactive reports. Is there any option to select multiple selections in interactive reports. If I am displaying in a screen CustNo, Name, Country.
I want to see order details of that customer in another screen using AT Line-Selection. Can I select multiple customer nos at a time and also can I see those order details whom I selected over in first list.
Please send me reply ASAP if there is any option with suitable example.
Thanks
Praveen.Check out this sample. It uses two ALV grids. On the first one you can do multiple selection, hit the continue buttons and it will throw another ALV with those material/plant records. Implement the following program. Create screen 100 and 200. One each screen create a custom container called ALV_CONTAINER(screen 100) and ALV_CONTAINER2(screen 200). Create the gui status for both. Don't forget to create a "CONTINUE" button on the gui-status 100.
report zrich_0006.
tables: mara.
type-pools: slis, icon.
* Internal Tables
data: begin of ialv occurs 0,
matnr type mara-matnr,
maktx type makt-maktx,
end of ialv .
data: begin of ialv2 occurs 0,
matnr type mara-matnr,
werks type marc-werks,
end of ialv2.
* Miscellanous Variables
data: index_rows type lvc_t_row,
index like line of index_rows.
data: alv_container type ref to cl_gui_custom_container,
alv_container2 type ref to cl_gui_custom_container,
alv_grid type ref to cl_gui_alv_grid,
alv_grid2 type ref to cl_gui_alv_grid,
row_table type lvc_t_row with header line,
ok_code like sy-ucomm,
layout type lvc_s_layo,
fieldcat type lvc_t_fcat,
fieldcat2 type lvc_t_fcat.
select-options: s_matnr for mara-matnr.
start-of-selection.
select mara~matnr makt~maktx
into corresponding fields of table ialv
from mara
inner join makt
on mara~matnr = makt~matnr
where mara~matnr in s_matnr
and makt~spras = sy-langu.
sort ialv ascending by matnr.
call screen 100.
* Module status_0100 OUTPUT
module status_0100 output.
set pf-status '0100'.
set titlebar '0100'.
data: lt_exclude type ui_functions.
* Create Controls
create object alv_container
exporting container_name = 'ALV_CONTAINER'.
create object alv_grid
exporting i_parent = alv_container.
* Populate Field Catalog
perform get_fieldcatalog.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
perform exclude_tb_functions changing lt_exclude.
* Set selection mode to "D" -- Multiple Lines
layout-sel_mode = 'D'.
call method alv_grid->set_table_for_first_display
exporting
is_layout = layout
it_toolbar_excluding = lt_exclude
i_structure_name = 'IALV'
changing
it_outtab = ialv[]
it_fieldcatalog = fieldcat[].
endmodule.
* Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
case sy-ucomm.
when 'BACK' or 'CANC'.
perform free_containers.
if sy-subrc = 0.
set screen 0.
leave screen.
else.
leave program.
endif.
when 'EXIT'.
perform free_containers.
leave program.
when 'CONTINUE'.
* Retrieve selected rows from ALV grid
clear index_rows. refresh index_rows.
call method alv_grid->get_selected_rows
importing
et_index_rows = index_rows.
* Do something with those selected rows here
loop at index_rows into index.
read table ialv index index-index.
if sy-subrc = 0.
select * appending corresponding fields of table ialv2
from marc
where matnr = ialv-matnr.
endif.
endloop.
perform free_containers.
leave to screen 200.
endcase.
endmodule.
* Form FREE_CONTAINERS
form free_containers.
if not alv_container is initial.
call method alv_container->free.
clear: alv_container.
free : alv_container.
endif.
if not alv_container2 is initial.
call method alv_container2->free.
clear: alv_container2.
free : alv_container2.
endif.
endform.
* Form Get_Fieldcatalog - Set Up Columns/Headers
form get_fieldcatalog.
data: ls_fcat type lvc_s_fcat.
data: columnno(3) type n value '0'.
refresh: fieldcat.
clear: ls_fcat.
ls_fcat-reptext = 'Material Number'.
ls_fcat-coltext = 'Material Number'.
ls_fcat-fieldname = 'MATNR'.
ls_fcat-ref_table = 'IALV'.
ls_fcat-outputlen = '18'.
ls_fcat-col_pos = 1.
append ls_fcat to fieldcat.
clear: ls_fcat.
ls_fcat-reptext = 'Material Description'.
ls_fcat-coltext = 'Material Description'.
ls_fcat-fieldname = 'MATKX'.
ls_fcat-ref_table = 'IALV'.
ls_fcat-outputlen = '40'.
ls_fcat-col_pos = 2.
append ls_fcat to fieldcat.
endform.
* Form Get_Fieldcatalog2 - Set Up Columns/Headers
form get_fieldcatalog2.
data: ls_fcat type lvc_s_fcat.
data: columnno(3) type n value '0'.
refresh: fieldcat2.
clear: ls_fcat.
ls_fcat-reptext = 'Material Number'.
ls_fcat-coltext = 'Material Number'.
ls_fcat-fieldname = 'MATNR'.
ls_fcat-ref_table = 'IALV2'.
ls_fcat-outputlen = '18'.
ls_fcat-col_pos = 1.
append ls_fcat to fieldcat2.
clear: ls_fcat.
ls_fcat-reptext = 'Plant'.
ls_fcat-coltext = 'Plant'.
ls_fcat-fieldname = 'WERKS'.
ls_fcat-ref_table = 'IALV2'.
ls_fcat-outputlen = '4'.
ls_fcat-col_pos = 2.
append ls_fcat to fieldcat2.
endform.
* Form EXCLUDE_TB_FUNCTIONS
form exclude_tb_functions changing pt_exclude type ui_functions.
* Only allow to change data not to create new entries (exclude
* generic functions).
data ls_exclude type ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
append ls_exclude to pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
append ls_exclude to pt_exclude.
endform.
* Module status_0200 OUTPUT
module status_0200 output.
set pf-status '0200'.
set titlebar '0200'.
* Create Controls
create object alv_container2
exporting container_name = 'ALV_CONTAINER2'.
create object alv_grid2
exporting i_parent = alv_container2.
* Populate Field Catalog
perform get_fieldcatalog2.
call method alv_grid2->set_table_for_first_display
changing
it_outtab = ialv2[]
it_fieldcatalog = fieldcat2[].
endmodule.
* Module USER_COMMAND_0200 INPUT
module user_command_0200 input.
case sy-ucomm.
when 'BACK' or 'CANC'.
perform free_containers.
if sy-subrc = 0.
set screen 0.
leave screen.
else.
leave program.
endif.
when 'EXIT'.
perform free_containers.
leave program.
endcase.
endmodule.
Regards,
Rich Heilman -
BADI - CRM_CUSTOMER_I_BADI - IN SOLUTION MANAGER OF SAP.
Hi Friends,
I am facing some problems in creating a custom tabs in CRMD_ORDER Transaction code in Solution Manager of SAP.
Actually my requirement is adding of two tabs(one is header & another is item tab) in the above Transaction, i was able to put one tab i.e header tab but i was not able to keep item tab. i found a badi CRM_CUSTOMER_I_BADI in which documentation was given & i processed in the same way.
For information i used the Badi CRM_CUSTOMER_H_BADI for header tab which i was able to add the tab & all functions like change, save working Good.
But i want how to add custom tab in which item details were to be attached.
i was done with the necessary SPRO settings(or Tcode CRMV_SSV) & able to see the 2 tabs thats it, but the functionality save is not working for the second tab & not saving in table CRMD_CUSTOMER_I (in this table there is one CI include where we added our item fields).
And also i had a doubt whether to use ALV or Table Control. And if possible can any one can sent me the screen design & the code for the above requirement in detail.
can any one who have knoweldge in Solution Manager & in the above Badi implementation can give me a right solution which will help me a lot.
Thanks a lot in advance.
Thanks
Ravi.Hello Debasis,
Would suggest to debug. Just set the break point in the BADi and wait if it stops at the BADi. All you need is to call the BADi before calling the save FM, or call the BADi from the save event.
This blog may help you
/people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
Award points if this helps.
Regards,
Martin Kuma -
Doubts in alv interactive report
Hello Gurus
i am new to abap i have doubt regarding interactive alv . i wrote one but it gives runtime error . i taken reference to a sample program availiable please explain this code so i can write interactive alv effectively.
FORM POPULATE_EVENT.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
IF ITAB_EMPLOY-EMPID NE ''.
READ TABLE ITAB_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'. MODIFY ITAB_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDIF.
ENDFORM.Hi,
Event form names are appended to an internal table and passed to the ALV. And whatever you write inside that form
can be called through the function module.
What you are trying to do is modify the internal table with the form name, which does not exsist. Instead of this append it.
There are lot of example of this ALV list events.
DATA: T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT."AFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
Thanks & Regards,
Tapodipta Khan -
Doubt in hiding columns in ALV list
Hi Experts ,
I am working on block ALV list . I need to hide certain columns in the list based on condition . For example : ALV structure has fields such MATNR MEINS MBRSH MTART
For a particular material if ITAB-MEINS EQ C_SPACE . Then the column - MEINS should be hidden for particular material record.
Could anyone suggest me code for this logic .
Thanks ,
Kumaran.CHi Rajnesh ,
Thanks for that reply , But one doubt .
Should we have to loop the ITAB before creating the feildcatalog ?
say for ex :
loop at itab.
if itab-meins eq c_space.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-selfield_m = 'UOM'.
fieldcatalog-col_pos = 3.
fieldcatalog-no_out = 'MEINS'.
append fieldcatalog from fieldcatalog.
end if.
endloop.
is this the way to code the above logic , pls explain .
Thanks,
Kumaran.C -
Doubt regarding editable ALV report using Classes
I need to create an ALV report and make few fields editable
and i need to update the changes to the corresponding database tables
for that please suggest me some idea or provide me sample code for that
urgentHi ramesh,
Please check this example program. I think it will help for some extent.
[code]&----
*& Report ZSUMA_INTERACTIVEREPORT *
report zsuma_interactivereport.
tables: vbak.
data :gr_alvgrid type ref to cl_gui_alv_grid,
gr_cc_name type scrfname value 'CC_ALV',
gr_ccontainer type ref to cl_gui_custom_container,
gr_fieldcat type lvc_t_fcat,
gr_layout type lvc_s_layo,
gr_sort type lvc_t_sort,
gr_get_cell type lvc_t_cell,
gr_set_cell type lvc_t_cell,
gr_hyper type lvc_t_hype,
gr_drop_down type lvc_t_drop,
is_variant type disvariant,
line_number type lvc_s_roid-row_id,
line(5) type c ,
cell_value type lvc_value.
data: begin of it_vbak occurs 0,
vbeln type vbak-vbeln,
erdat like vbak-erdat,
erzet like vbak-erzet,
netwr like vbak-netwr,
waerk like vbak-waerk,
*Below field is useful for making the entire row with different colors.
it must be a char of 4.and layout-info_fname should populate with
*this field.
rowcolor(4) type c,
*Below field is useful for making the INDIVIDUAL CELL with different
*colors.for this we have to include structure of type lvc_t_scol.
*layout-ctab_fname should be populate with this field.
cellcolor type lvc_t_scol,
*below field is added for for providing the hyperlinks to perticular
*field. at the time of field catalog , it_fcatalog-web_field should be
*populate with this field.
vbeln_hyper type int4,
*For displaying one cell as button.we have to declare one styles
*internal table .it has to be populate.at layout structure this table
*name has to be populate at layout-stylename.
cellstyle type lvc_t_styl,
end of it_vbak.
*& SELECTION SCREEN
selection-screen begin of block b1 with frame title text-001.
select-options s_vbeln for vbak-vbeln.
selection-screen end of block b1.
start-of-selection.
select vbeln
erdat
erzet
netwr
waerk
from vbak
into corresponding fields of table it_vbak
where vbeln in s_vbeln.
data: wa_cellcolor type lvc_s_scol,
wa_style type lvc_s_styl.
loop at it_vbak.
FOR ROW COLORING
if sy-tabix = 1.
it_vbak-rowcolor = 'C511'.
FOR PUTTING THE HYPERLINKS ON VBELN FIELD
it_vbak-vbeln_hyper = '1'.
modify it_vbak.
endif.
FOR CELL COLORING
if sy-tabix = 2.
wa_cellcolor-fname = 'ERZET'.
wa_cellcolor-color-col = '6'.
wa_cellcolor-color-int = '1'.
wa_cellcolor-color-inv = '1'.
append wa_cellcolor to it_vbak-cellcolor.
modify it_vbak index 2.
endif.
FOR DISPLAYING THE CELL AS A BUTTON
clear it_vbak-cellstyle.
at last.
read table it_vbak index sy-tabix.
wa_style-fieldname = 'NETWR'.
wa_style-style = cl_gui_alv_grid=>mc_style_button.
append wa_style to it_vbak-cellstyle .
modify it_vbak .
endat.
endloop.
if not it_vbak[] is initial.
call screen 100.
endif.
*CLASS DEFINITION FOR HANDLING THE EVENTS IN ALV GRID
class gr_event_handler definition.
public section.
methods:handle_hotspot_click
for event hotspot_click of cl_gui_alv_grid
importing e_row_id e_column_id es_row_no.
endclass.
*CLASS IMPLEMENTATIONFOR HANDLING THE EVENTS IN ALV GRID
class gr_event_handler implementation.
method handle_hotspot_click.
perform handle_hotspot_click using e_row_id e_column_id es_row_no.
endmethod.
endclass.
*& Form BUILDING_FIELDCATALOG
text
<--P_GR_FIELDCAT text
form building_fieldcatalog changing p_gr_fieldcat type lvc_t_fcat.
data s_fieldcat type lvc_s_fcat.
s_fieldcat-fieldname = 'VBELN'.
s_fieldcat-outputlen = '15'.
s_fieldcat-col_pos = '1'.
s_fieldcat-coltext = 'DOCCUMENT NO.'.
s_fieldcat-key = ' '.
s_fieldcat-emphasize = 'C511'.
s_fieldcat-web_field = 'VBELN_HYPER'.
append s_fieldcat to p_gr_fieldcat .
clear s_fieldcat.
s_fieldcat-fieldname = 'ERDAT'.
s_fieldcat-outputlen = '15'.
s_fieldcat-col_pos = '2'.
s_fieldcat-coltext = 'REC CREATE DATE.'.
s_fieldcat-emphasize = 'C311'.
s_fieldcat-hotspot = 'X'.
append s_fieldcat to p_gr_fieldcat .
clear s_fieldcat.
s_fieldcat-fieldname = 'ERZET'.
s_fieldcat-outputlen = '15'.
s_fieldcat-col_pos = '3'.
s_fieldcat-coltext = 'TIME ENTRY.'.
*S_FIELDCAT-EMPHASIZE = 'C311'.
append s_fieldcat to p_gr_fieldcat .
clear s_fieldcat.
s_fieldcat-fieldname = 'NETWR'.
s_fieldcat-outputlen = '15'.
s_fieldcat-col_pos = '4'.
s_fieldcat-emphasize = 'C311'.
s_fieldcat-coltext = 'NET WEIGHT.'.
s_fieldcat-do_sum = 'X'.
append s_fieldcat to p_gr_fieldcat .
clear s_fieldcat.
s_fieldcat-fieldname = 'WAERK'.
s_fieldcat-outputlen = '5'.
s_fieldcat-col_pos = '5'.
s_fieldcat-emphasize = 'C511'.
s_fieldcat-coltext = 'CURR.'.
FOR PUTTING THE DROP DOWN BOX.
s_fieldcat-drdn_hndl = '1'.
s_fieldcat-edit = 'X'.
append s_fieldcat to p_gr_fieldcat .
clear s_fieldcat.
endform. " BUILDING_FIELDCATALOG
*& Form CREATE_CCONTAINER_INSTANCE
text
--> p1 text
<-- p2 text
form create_ccontainer_instance .
create object gr_ccontainer
exporting
container_name = gr_cc_name
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.
endform. " CREATE_CCONTAINER_INSTANCE
*& Form CREATE_ALVGRID_INSTANCE
text
--> p1 text
<-- p2 text
form create_alvgrid_instance .
create object gr_alvgrid
exporting
i_parent = gr_ccontainer
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.
endform. " CREATE_ALVGRID_INSTANCE
*& Form DISPLAYING_ALVGRID
text
--> p1 text
<-- p2 text
form displaying_alvgrid .
call method gr_alvgrid->set_table_for_first_display
exporting
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
is_variant = is_variant
i_save = 'A'
I_DEFAULT = 'X'
is_layout = gr_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
it_hyperlink = gr_hyper
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
changing
it_outtab = it_vbak[]
it_fieldcatalog = gr_fieldcat
it_sort = gr_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.
*CALL METHOD GR_ALVGRID->GET_FRONTEND_LAYOUT
IMPORTING
ES_LAYOUT = GR_LAYOUT
*GR_LAYOUT-GRID_TITLE = 'HAI ALV'.
*CALL METHOD GR_ALVGRID->SET_FRONTEND_LAYOUT
EXPORTING
IS_LAYOUT = GR_LAYOUT
endform. " DISPLAYING_ALVGRID
*& Form REFRESH_DISPLAY_TABLE
text
--> p1 text
<-- p2 text
form refresh_display_table .
call method gr_alvgrid->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
exceptions
finished = 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. " REFRESH_DISPLAY_TABLE
*& Form SETTING_LAYOUT
text
<--P_GR_LAYOUT text
form setting_layout changing p_gr_layout type lvc_s_layo.
p_gr_layout-grid_title = 'ALV GRID USING ABAP OBJECTS'.
p_gr_layout-zebra = 'X'.
p_gr_layout-no_toolbar = ''.
p_gr_layout-sel_mode = 'D'.
p_gr_layout-info_fname = 'ROWCOLOR'.
p_gr_layout-ctab_fname = 'CELLCOLOR'.
p_gr_layout-stylefname = 'CELLSTYLE'.
endform. " SETTING_LAYOUT
*& Module STATUS_0100 OUTPUT
text
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
set pf-status 'MENU'.
if gr_alvgrid is initial.
*CREATING THE CONTAINER INSTANCE BY SENDING THE CONTAINER NAME( IT HAS
*TO COINSIDE WITH COSTUM CONTROL NAME OF TRANSACTION SCREEN
perform create_ccontainer_instance.
perform create_alvgrid_instance.
*VARIANT POPULATION.
perform setting_variants changing is_variant.
*BELOW FORM IS USEFUL TO FILL THE HYPER LINK TABLE AND WE PASS THAT
*TABLE TO 'IT_HYPERLINK' PARAMETER IN FIRST DISPLAY METHOD.
perform setting_hyperlinks_field changing gr_hyper.
*TO MAKE THE COLOUMN AS DROP DOWN.
perform setting_dropdown_column changing gr_drop_down.
perform building_fieldcatalog changing gr_fieldcat.
perform setting_layout changing gr_layout.
perform setting_sorting changing gr_sort.
perform setting_cells changing gr_set_cell.
perform displaying_alvgrid.
*PERFORM GETTING_CELL_DETAILS CHANGING GR_GET_CELL. " IT IS NOT WORKING
FOR ME AND I HAVE DOUBT .
perform creating_event_object.
*PERFORM REFRESH_DISPLAY_TABLE.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
module user_command_0100 input.
case sy-ucomm.
when 'BACK'.
leave to screen 000.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& Form SETTING_SORTING
text
<--P_GR_SORT text
form setting_sorting changing p_gr_sort type lvc_t_sort.
data: lr_sort type lvc_s_sort.
lr_sort-spos = '1'.
lr_sort-fieldname = 'VBELN'.
lr_sort-up = 'X'.
append lr_sort to p_gr_sort.
lr_sort-spos = '2'.
lr_sort-fieldname = 'ERDAT'.
lr_sort-up = 'X'.
append lr_sort to p_gr_sort.
endform. " SETTING_SORTING
*& Form GETTING_CELL_DETAILS
text
<--P_GR_GET_CELL text
form getting_cell_details changing p_gr_get_cell.
call method gr_alvgrid->get_selected_cells
importing
et_cell = p_gr_get_cell
*CELL_VALUE = P_GR_GET_CELL-VALUE.
endform. " GETTING_CELL_DETAILS
*& Form SETTING_CELLS
text
<--P_GR_SET_CELL text
form setting_cells changing p_gr_set_cell type lvc_t_cell.
data:s_gr_set_cell type lvc_s_cell.
s_gr_set_cell-col_id-fieldname = 'NETWR'.
s_gr_set_cell-row_id-index = '3'.
append s_gr_set_cell to p_gr_set_cell.
call method gr_alvgrid->set_selected_cells
exporting
it_cells = p_gr_set_cell.
endform. " SETTING_CELLS
*& Form SETTING_HYPERLINKS_FIELD
text
<--P_GR_HYPER text
form setting_hyperlinks_field changing p_gr_hyper type lvc_t_hype.
data: is_hype type lvc_s_hype.
is_hype-handle = '1'.
is_hype-href = 'HTTP://WWW.GOOGLE.CO.IN'.
append is_hype to p_gr_hyper.
is_hype-handle = '2'.
is_hype-href = 'HTTP://SDN.SAP.COM'.
append is_hype to p_gr_hyper.
endform. " SETTING_HYPERLINKS_FIELD
*& Form SETTING_DROPDOWN_COLUMN
text
<--P_GR_DROP_DOWN text
form setting_dropdown_column changing p_gr_drop_down type lvc_t_drop.
data: wa_drop type lvc_s_drop.
wa_drop-handle = '1'.
wa_drop-value = '$'.
append wa_drop to p_gr_drop_down.
wa_drop-handle = '1'.
wa_drop-value = 'Rs'.
append wa_drop to p_gr_drop_down.
wa_drop-handle = '1'.
wa_drop-value = 'CUR'.
append wa_drop to p_gr_drop_down.
call method gr_alvgrid->set_drop_down_table
exporting
it_drop_down = p_gr_drop_down
IT_DROP_DOWN_ALIAS =
endform. " SETTING_DROPDOWN_COLUMN
*& Form SETTING_VARIANTS
text
<--P_IS_VARIANT text
form setting_variants changing p_is_variant type disvariant.
p_is_variant-report = sy-repid.
endform. " SETTING_VARIANTS
*& Form HANDLE_HOTSPOT_CLICK
text
-->P_E_ROW text
-->P_E_COLUMN text
-->P_E_ROW_NO text
form handle_hotspot_click using p_e_row_id type lvc_s_row
p_e_column_id type lvc_s_col
p_es_row_no type lvc_s_roid.
read table it_vbak index p_es_row_no-row_id.
if sy-subrc = 0 and p_e_column_id-fieldname = 'ERDAT'.
line = p_es_row_no-row_id.
line_number = p_es_row_no-row_id.
leave to screen 200.
endif.
endform. " HANDLE_HOTSPOT_CLICK
*& Form CREATING_EVENT_OBJECT
text
--> p1 text
<-- p2 text
form creating_event_object .
data event_handle type ref to gr_event_handler.
create object event_handle.
set handler event_handle->handle_hotspot_click for gr_alvgrid.
endform. " CREATING_EVENT_OBJECT
*& Module STATUS_0200 OUTPUT
text
module status_0200 output.
set pf-status 'BB'.
SET TITLEBAR 'xxx'.
*LINE = LINE_NUMBER.
endmodule. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
module user_command_0200 input.
if sy-ucomm = 'BACK'.
leave to screen 100.
endif.
endmodule. " USER_COMMAND_0200 INPUT[/code]
Reward points if helpful
Thanks,
Suma. -
how can i page breakin alv report ?
what are the types of variants and events in alv report?
how to hide field in alv?
how to change standard pf status in alv reports?
plz give me sample program for how to use variants in alv?
<THREAD LOCKED. Please stop asking interview questions. There is already a lot of information out there, refer to the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] on how to ask a good question and learn to search>
Edited by: Mike Pokraka on Oct 15, 2008 4:52 PMhow can i page breakin alv report ?
- Yes... using NEW-PAGE
what are the types of variants and events in alv report?
- DATA: g_variant LIKE disvariant.
- DATA: gt_eventos TYPE slis_t_event.
how to hide field in alv?
- When you define the field catalog mark this field ls_fieldcat-no_out = 'X'.
how to change standard pf status in alv reports?
CLEAR ls_extab.
ls_extab-fcode = 'ZASSIG'.
APPEND ls_extab TO extab.
SET PF-STATUS 'Z09_STATUS' EXCLUDING extab. -
Hi Expart,
In ALV report ,what is the work of
1) REUSE_ALV_VARIANT_DEFAULT_GET function module
2) SLIS_LAYOUT_ALV
Regards
BhabaniHi,
1.SELECTING THE VARIANTS FOR INITIAL LIST DISPLAY (DEFAULT VARIANT)
The variants in the list display can be both user-specific and general. The user can programmatically set the initial (default) variant for list display.
The default variant can be found using the function module 'REUSE_ALV_VARIANT_DEFAULT_GET'.
Sample code:
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = variant save condition ( A=all, U = user-specific )
CHANGING
cs_variant = internal table containing the program name (and the default variant---optional )
EXCEPTIONS
not_found = 2.
2.A layout is build for the report output list description USING the internal table declared above (I_LAYOUT).
Output list description structure.
The parameters are described under the following heads:
Display options
Exceptions
Totals
Interaction
Detail screen
Display variants (only for hierarchical-sequential lists)
Color
Other
The layout table is of type slis_layout_alv_spec and has the following fields:
Reward,if useful.
Thanks,
Chandu -
Doubt in ALV grid (OO ALV) download to Excel
Hi All,
I done Report using OOALV when down loading to Excel one row got automatically inserted to the ALV Excel downloaded sheet at the top and the row contains Sy datum , Dynamic list display , page no
my requirement is to delete that row. Is that possible. If so please suggest me how to handle that
Thanks
KiranHi,
Check this link:
Re: Digit missing in the alv export
Hope this helps.
Regards,
Satish Kanteti -
Hi!
In Block AlV we r using Fun Mod
REUSE_ALV_BLOCK_LIST_APPEND
To display data in blocks and called again to display other data in block in same screen.
I want to know REUSE_ALV_BLOCK_LIST_DISPLAY Fun mod is optional or mandatory
without using this also shall i get the required o/p.
Looking for your reply.
Rahul.REUSE_ALV_BLOCK_LIST_DISPLAY is mandatory, without calling this FM, you will not get any disply.
In the below ALV if you comment out t REUSE_ALV_BLOCK_LIST_DISPLAY FM call call you will not get disply.
REPORT ztest1 .
TABLES: ekko, mara.
TYPE-POOLS: slis.
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
TYPES: BEGIN OF t_mara,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF t_mara.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
it_mara TYPE STANDARD TABLE OF t_mara INITIAL SIZE 0.
*ALV data declarations
DATA: fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
fieldcatalog2 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_layout TYPE slis_layout_alv,
gt_events_ekko TYPE slis_t_event,
xs_event TYPE slis_alv_event,
gt_events_mara TYPE slis_t_event,
gd_repid TYPE sy-repid,
gt_print TYPE slis_print_alv.
* START-OF-SELECTION
START-OF-SELECTION.
PERFORM data_retrival.
PERFORM build_fieldcat.
PERFORM build_layout.
PERFORM events_ekko.
PERFORM events_mara.
PERFORM display_alv_report.
*SUBROUTINES
*& Form data_retrival
FORM data_retrival .
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
SELECT matnr mtart matkl
UP TO 10 ROWS
FROM mara
INTO TABLE it_mara.
ENDFORM. " data_retrival
*& Form build_fieldcat
FORM build_fieldcat .
* FOR EKKO
fieldcatalog1-fieldname = 'EBELN'.
fieldcatalog1-seltext_m = 'Purchase Order'.
fieldcatalog1-col_pos = 0.
fieldcatalog1-outputlen = 10.
fieldcatalog1-emphasize = 'X'.
fieldcatalog1-key = 'X'.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'EBELP'.
fieldcatalog1-seltext_m = 'PO Item'.
fieldcatalog1-col_pos = 1.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'STATU'.
fieldcatalog1-seltext_m = 'Status'.
fieldcatalog1-col_pos = 2.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'AEDAT'.
fieldcatalog1-seltext_m = 'Item change date'.
fieldcatalog1-col_pos = 3.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'MATNR'.
fieldcatalog1-seltext_m = 'Material Number'.
fieldcatalog1-col_pos = 4.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'MENGE'.
fieldcatalog1-seltext_m = 'PO quantity'.
fieldcatalog1-col_pos = 5.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'MEINS'.
fieldcatalog1-seltext_m = 'Order Unit'.
fieldcatalog1-col_pos = 6.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'NETPR'.
fieldcatalog1-seltext_m = 'Net Price'.
fieldcatalog1-col_pos = 7.
fieldcatalog1-outputlen = 15.
fieldcatalog1-do_sum = 'X'. "Display column total
fieldcatalog1-datatype = 'CURR'.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
fieldcatalog1-fieldname = 'PEINH'.
fieldcatalog1-seltext_m = 'Price Unit'.
fieldcatalog1-col_pos = 8.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
* FOR MARA
fieldcatalog2-fieldname = 'MATNR'.
fieldcatalog2-seltext_m = 'Material No'.
fieldcatalog2-col_pos = 0.
fieldcatalog2-outputlen = 10.
fieldcatalog2-emphasize = 'X'.
fieldcatalog2-key = 'X'.
APPEND fieldcatalog2 TO fieldcatalog2.
CLEAR fieldcatalog1.
fieldcatalog2-fieldname = 'MTART'.
fieldcatalog2-seltext_m = 'Material type'.
fieldcatalog2-col_pos = 1.
APPEND fieldcatalog2 TO fieldcatalog2.
CLEAR fieldcatalog2.
fieldcatalog2-fieldname = 'MATKL'.
fieldcatalog2-seltext_m = 'Material Group'.
fieldcatalog2-col_pos = 2.
APPEND fieldcatalog2 TO fieldcatalog2.
CLEAR fieldcatalog2.
ENDFORM. " build_fieldcat
*& Form build_layout
FORM build_layout .
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
ENDFORM. " build_layout
*& Form events_ekko
FORM events_ekko .
CLEAR xs_event.
xs_event-name = slis_ev_top_of_page.
xs_event-form = 'TOP_OF_PAGE-EKKO'.
APPEND xs_event TO gt_events_ekko.
CLEAR xs_event.
xs_event-name = slis_ev_end_of_list.
xs_event-form = 'END_OF_LIST_EKKO'.
APPEND xs_event TO gt_events_ekko.
ENDFORM. " events_ekko
*& Form TOP_OF_PAGE-EKKO
FORM top_of_page-ekko.
WRITE: / 'TOP OF PAGE : Purchase Order'.
ENDFORM. "XTOP_OF_PAGE
*& Form END_OF_LIST_EKKO
FORM end_of_list_ekko.
WRITE: / 'end OF list : Purchase Order'.
ENDFORM. "END_OF_LIST_EKKO
*& Form events_mara
FORM events_mara .
CLEAR xs_event.
xs_event-name = slis_ev_top_of_list.
xs_event-form = 'TOP_OF_LIST-MARA'.
APPEND xs_event TO gt_events_mara.
CLEAR xs_event.
xs_event-name = slis_ev_end_of_page.
xs_event-form = 'END_OF_PAGE_MARA'.
APPEND xs_event TO gt_events_mara.
ENDFORM. "events_mara
*& Form TOP_OF_LIST-MARA
FORM top_of_list-mara.
WRITE: / 'TOP OF LIST : Material Master'.
ENDFORM. "TOP_OF_LIST-MARA
*& Form END_OF_PAGE_MARA
FORM end_of_page_mara.
WRITE: / 'End OF Page : Material Master'.
ENDFORM. "END_OF_PAGE_MARA
*& Form display_alv_report
FORM display_alv_report .
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = gd_layout
it_fieldcat = fieldcatalog1[]
i_tabname = 'it_ekko'
it_events = gt_events_ekko
TABLES
t_outtab = it_ekko
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 = gd_layout
it_fieldcat = fieldcatalog2[]
i_tabname = 'it_mara'
it_events = gt_events_mara
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.
gt_print-reserve_lines = 2.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
is_print = gt_print.
ENDFORM. " display_alv_report -
Hi All
I am creating a ALV report and had realized that we can use REUSE_ALV_FIELDCATALOG_MERGE to create a fieldcatalog.
However in I_STRUCTURE_NAME parameters I have to pass only structure that are defined in DDIC. I can"t pass my internal table defined for output.
So this option maynot be much useful. instead I can build fieldcatalog manually.
Am I right ? also at this time I am only concentrating on ALV using Functional Modules. Please let me know.
Regards
Madhu.Hi ERIC and others,
Thanks you once again.
Can you please let me know where I am doing mistake, i am not getting totals on price but I getting sort on carrid and they are grouping.
Please help me.
REPORT ZALV_REPORT_SFLIGHT.
TABLES : SFLIGHT.
TYPE-POOLS : SLIS.
DATA : IT_SFLIGHT TYPE TABLE OF SFLIGHT.
**DATA DECLARTION
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_sort type STANDARD TABLE OF slis_sortinfo_alv WITH HEADER LINE,
I_REPID LIKE SY-REPID.
i_repid = sy-repid.
perform get_data.
perform build_fieldcat.
perform display.
*& Form get_data
form get_data .
select * from sflight into table it_sflight.
endform. " get_data
*& Form build_fieldcat
form build_fieldcat .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = i_repid
I_INTERNAL_TABNAME = 'IT_SFLIGHT'
I_STRUCTURE_NAME = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = FIELDCATALOG[]
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.
GD_sort-fieldname = 'CARRID'.
GD_sort-tabname = 'SFLIGHT'.
*GD_sort-up =
*GD_sort-down =
*GD_sort-group = 'X'.
GD_sort-subtot = 'X'.
append gd_sort TO GD_SORT.
endform. " build_fieldcat
*& Form display
form display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = I_REPID
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = FIELDCATALOG[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GD_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_SFLIGHT
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
Thank you -
Doubt in Alv Report Coloumn Heading
Hi Gurus
I want to print 2 coloumn headings in ALv Report.
For eg: 1st line coloumn heading contains
Name Number Date status
2nd line coloumn heading contains under status
Active Incative
Then if my list size is not enough to show the full details. so i can cut it in 2 lines
if my list contains 20 coloumns
i have to put 10 coloumns in first line
then remaning 10 coloums in second line.
i want the solution for both the questions.
Help me.
Regards.
Bhuvana.For the first issue
Use Top of Page Event to write a simple list which will act as a header for the alv list.
Second issue:
In the fieldcat,
Position all the first 10 coloums row_pos = 1
Position all the next 10 coloums row_pos = 2
Regards,
Lijo Joseph
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:35 PM -
hi,
I am trying to pass top of page to my alv report.
DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
CLEAR TY_EVENTS.
TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
TY_EVENTS-FORM = 'TOP_OF_PAGE'.
APPEND TY_EVENTS TO IT_EVENTS.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = 'itab'
IS_LAYOUT = s_layout
IT_FIELDCAT = t_fieldcatalog[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = 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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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.
Now i have to write the code for top of page in the perform 'TOP_OF_PAGE'.
My problem is when i double click the 'TOP_OF_PAGE'
in here TY_EVENTS-FORM = 'TOP_OF_PAGE'.
,its not creating a form but insted it is asking
Program text 'TOP_OF_PAGE' does not exist.
Do you want to create the object .
and when i click yes its taking to text elements
I need to get some like this
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
SKIP.
ULINE.
WRITE :/2 ' DATE :', SY-DATUM,
ENDFORM. "TOP_OF_PAGE
waiting for replies
How do i get the form so that i can write the code for my top of pagehi Preeti,
if you click on the 'TOP_OF_PAGE', it will not create a form routine, because, the name of the form is passed as a character text to the function module. So you need to manually write the form routine with the name top_of_page.
Please use the following code; your requirement would be met!!!!
form top_of_page.
data:
ls_line type slis_listheader,
lt_line type table of slis_t_listheader,
lv_date(10).
ls_line-typ = 'H'.
concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4)
into lv_date separated by '/'.
concatenate 'Date' lv_date into ls_line-info
separated by space.
append ls_line to lt_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = lt_line.
endform.
Hope this works.
Sajan.
Maybe you are looking for
-
In Numbers, is there a way to limit the number of characters in a cell?
Hi, New to communities, so I apologize for the length of this question. I have exported a spreadsheet from one source and am opening it using Numbers. In one column - lets say column C - the list contains 35 characters. I am trying to import this sp
-
What needs to be done to include the leave request type in the work flow
what needs to be done to include the leave request type in the work flow? the present request for work flow includes the notificationto be sent to the approver which doesnt include leave request type inthe description to include this we need to main
-
Restore factory configuartion Macintosh SE
Hi! I'm trying to restore the factory settings from my Macintosh SE. I don't have my floppy working and I bought a hard drive with system 7 Installed but I have 4 simm of 256 kb and can't use system 7. is there any way to restore factory configuratio
-
New Nano won't charge - please help!
Hey guys! Hoping you can help me. Bought a new Nano 4g 2nd generation. I plugged it into my laptop, installed it and put music onto it. When I disconnect it, there is no battery life, even though it was plugged in for hours. I also have an AC adapter
-
NB100 internal microphone not working
Hi I did a fresh XP SP3 install on my NB100. I did not do it from the Toshiba recovery disc as my NB100 would not write that Toshiba disc creator that came with it to my external DVDR/CDR even though it works fine with Veritas. So I downloaded all th