Error in alv report
hi expert i have created alv report ... it is giving runtime error .. in CALL FUNCTION 'REUSE_ALV_EVENTS_GET' how to solve this plz help ....
*& Report ZALVTRIAL *
REPORT ZALVTRIAL .
tables : vbak,vbap.
type-pools: slis.
types : begin of scr1,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
end of scr1.
data : i_vbak type standard table of scr1,
wa_vbak type scr1.
types : begin of scr2,
vbeln type VBELN_VA,
matnr type matnr,
posnr type posnr_va,
end of scr2.
data : i_vbap type standard table of scr2,
wa_vbap type scr2.
types : begin of scr_final,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
matnr type matnr,
posnr type posnr_va,
end of scr_final.
data : i_final type standard table of scr_final,
wa_final type scr_final.
**START OF DATA DECLERATION FOR ALV
*DATA FOR CATLOG
DATA: wa_fldcat TYPE slis_fieldcat_alv,
i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .
*DATA FOR EVENT
DATA : wa_event TYPE slis_alv_event,
i_event TYPE slis_t_event WITH HEADER LINE.
*DATA FOR HEADER
DATA: wa_head TYPE slis_listheader,
i_head TYPE slis_t_listheader WITH HEADER LINE.
*data for layout
DATA: wa_layout TYPE slis_layout_alv.
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 ernam
from vbak
into table i_vbak where vbeln in s_vbeln.
if sy-subrc <> 0.
leave list-processing.
else.
sort i_vbak by vbeln.
endif.
if i_vbak[] is not initial.
select vbeln matnr posnr
from vbap
into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
loop at i_vbak into wa_vbak.
wa_final-vbeln = wa_vbak-vbeln.
wa_final-erdat = wa_vbak-erdat .
wa_final-ernam = wa_vbak-ernam .
append wa_final to i_final.
endloop.
if sy-subrc = 0.
loop at i_final into wa_final.
read table i_vbap into wa_vbap
with key vbeln = wa_vbak-vbeln binary search.
if sy-subrc = 0.
wa_final-matnr = wa_vbap-matnr.
wa_final-posnr = wa_vbap-posnr.
modify i_final from wa_final transporting matnr posnr.
endif.
clear : wa_vbap , wa_final.
endloop.
endif.
**WRITE:/1 sy-uline(63).
**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5
**ON
**,21'|',22 'Name' COLOR 4 ON,35'|',
36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON
**63'|'.
**WRITE:/1 sy-uline(63).
**LOOP AT i_final INTO wa_final.
WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22
wa_final-ernam,35'|',
36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.
**endloop.
perform builtcatalog.
perform event.
perform listheader.
perform layout.
perform display.
*& Form builtcatalog
text
form builtcatalog.
wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'vbeln'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'erdat'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Date'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'ernam'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Name'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'matnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Material Number'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'posnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document Item'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
endform. "builtcatalog
*& Form event
text
form event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = i_final[].
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc = 0.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc = 0.
wa_event-form = slis_ev_top_of_page.
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_pf_status_set .
IF sy-subrc = 0.
wa_event-form = slis_ev_pf_status_set .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_user_command.
IF sy-subrc = 0.
wa_event-form = slis_ev_user_command .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "event
*& Form
text
form listheader.
wa_head-typ = 'H'.
wa_head-info = 'ALV PROGRAM AUTHOR jessy'
APPEND wa_head TO i_head.
endform. "listheader
*& Form layout
text
form layout.
wa_layout-zebra = 'X'.
wa_layout-f2code = 'DUB'.
endform. "layout
*& Form display
text
form display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' sy-repid '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = wa_layout
IT_FIELDCAT = i_fldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_event[]
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
Hi,
The error has been corrected.
Copy the following code and execute. You won't get any runtime errors.
*& Report ZALVTRIAL *
REPORT ZALVTRIAL .
tables : vbak,vbap.
type-pools: slis.
types : begin of scr1,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
end of scr1.
data : i_vbak type standard table of scr1,
wa_vbak type scr1.
types : begin of scr2,
vbeln type VBELN_VA,
matnr type matnr,
posnr type posnr_va,
end of scr2.
data : i_vbap type standard table of scr2,
wa_vbap type scr2.
types : begin of scr_final,
vbeln type VBELN_VA,
erdat type erdat,
ernam type ernam,
matnr type matnr,
posnr type posnr_va,
end of scr_final.
data : i_final type standard table of scr_final,
wa_final type scr_final.
**START OF DATA DECLERATION FOR ALV
*DATA FOR CATLOG
DATA: wa_fldcat TYPE slis_fieldcat_alv,
i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE .
*DATA FOR EVENT
DATA : wa_event TYPE slis_alv_event,
i_event TYPE SLIS_T_EVENT." WITH HEADER LINE. "-----> correction done here
*DATA FOR HEADER
DATA: wa_head TYPE slis_listheader,
i_head TYPE slis_t_listheader WITH HEADER LINE.
*data for layout
DATA: wa_layout TYPE slis_layout_alv.
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 ernam
from vbak
into table i_vbak where vbeln in s_vbeln.
if sy-subrc = 0.
leave list-processing.
else.
sort i_vbak by vbeln.
endif.
if i_vbak[] is not initial.
select vbeln matnr posnr
from vbap
into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
loop at i_vbak into wa_vbak.
wa_final-vbeln = wa_vbak-vbeln.
wa_final-erdat = wa_vbak-erdat .
wa_final-ernam = wa_vbak-ernam .
append wa_final to i_final.
endloop.
if sy-subrc = 0.
loop at i_final into wa_final.
read table i_vbap into wa_vbap
with key vbeln = wa_vbak-vbeln binary search.
if sy-subrc = 0.
wa_final-matnr = wa_vbap-matnr.
wa_final-posnr = wa_vbap-posnr.
modify i_final from wa_final transporting matnr posnr.
endif.
clear : wa_vbap , wa_final.
endloop.
endif.
**WRITE:/1 sy-uline(63).
**WRITE:/1'|', 2 'Sales Document' COLOR 4 ON ,11'|',12 'Date' COLOR 5
**ON
**,21'|',22 'Name' COLOR 4 ON,35'|',
*36 'Material Number' COLOR 5 ON, 55'|',56 'line no' COLOR 4 ON
**63'|'.
**WRITE:/1 sy-uline(63).
**LOOP AT i_final INTO wa_final.
WRITE:/1'|', 2 wa_final-vbeln,11'|',12 wa_final-erdat,21'|',22
wa_final-ernam,35'|',
36 wa_final-matnr, 55'|',56 wa_final-posnr,63'|'.
**endloop.
perform builtcatalog.
perform event.
perform listheader.
perform layout.
perform display.
**& Form builtcatalog
*text
form builtcatalog.
wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'vbeln'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'erdat'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Date'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'ernam'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Name'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'matnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Material Number'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'posnr'.
wa_fldcat-tabname = 'I_FINAL'.
wa_fldcat-reptext_ddic = 'Sales Document Item'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
endform. "builtcatalog
**& Form event
*text
form event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = i_event "-----> correction done here
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc = 0.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc = 0.
wa_event-form = slis_ev_top_of_page.
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_pf_status_set .
IF sy-subrc = 0.
wa_event-form = slis_ev_pf_status_set .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
READ TABLE i_event INTO wa_event
WITH KEY name = slis_ev_user_command.
IF sy-subrc = 0.
wa_event-form = slis_ev_user_command .
MODIFY i_event FROM wa_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "event
**& Form
*text
form listheader.
wa_head-typ = 'H'.
wa_head-info = 'ALV PROGRAM AUTHOR jessy'
APPEND wa_head TO i_head.
endform. "listheader
**& Form layout
*text
form layout.
wa_layout-zebra = 'X'.
wa_layout-f2code = 'DUB'.
endform. "layout
**& Form display
*text
form display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
*I_INTERFACE_CHECK = ' '
*I_BYPASSING_BUFFER = ' '
*I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' sy-repid '
*I_CALLBACK_PF_STATUS_SET = ' '
*I_CALLBACK_USER_COMMAND = ' '
*I_CALLBACK_TOP_OF_PAGE = ' '
*I_CALLBACK_HTML_TOP_OF_PAGE = ' '
*I_CALLBACK_HTML_END_OF_LIST = ' '
*I_STRUCTURE_NAME =
*I_BACKGROUND_ID = ' '
*I_GRID_TITLE =
*I_GRID_SETTINGS =
IS_LAYOUT = wa_layout
IT_FIELDCAT = i_fldcat[]
*IT_EXCLUDING =
*IT_SPECIAL_GROUPS =
*IT_SORT =
*IT_FILTER =
*IS_SEL_HIDE =
*I_DEFAULT = 'X'
*I_SAVE = ' '
*IS_VARIANT =
IT_EVENTS = i_event[] "-----> correction done here
*IT_EVENT_EXIT =
*IS_PRINT =
*IS_REPREP_ID =
*I_SCREEN_START_COLUMN = 0
*I_SCREEN_START_LINE = 0
*I_SCREEN_END_COLUMN = 0
*I_SCREEN_END_LINE = 0
*IT_ALV_GRAPHICS =
*IT_HYPERLINK =
*IT_ADD_FIELDCAT =
*IT_EXCEPT_QINFO =
*I_HTML_HEIGHT_TOP =
*I_HTML_HEIGHT_END =
*IMPORTING
*E_EXIT_CAUSED_BY_CALLER =
*ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_final "-----> correction done here
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
You need to check the TYPE before passing the internal tables or workareas to the PARAMETERS of a Function Module.
Regards,
Ravi Kiran..
Similar Messages
-
Error in alv report (fieldcatlog is not found)
Hai Genious
i am a new of the sap-abap, i have a one problem in my alv report, now i am using the reuse_alv_ fieldcatlog_merge,
i declared with my internal table with type,
my error is :- fieldcatlog not found
for example
types: begin of ty_mara,
matnr type matnr,
meins type meins,
ersda type ersda,
ernam type ernam,
end of ty_mara.
data: wa_mara type ty_mara,
it_mara like table of wa_mara.
select matnr meins ersda ernam from mara into table it_mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_MARA'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
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_list_display'Hi,
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_MARA'
I_STRUCTURE_NAME = 'TY_MARA'-->give it
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
also use...
CHANGING
ct_fieldcat = i_fieldtab
data :i_fieldtab TYPE slis_t_fieldcat_alv,
s_fieldtab_body TYPE slis_fieldcat_alv.
fill i_fieldtab like this...
CASE s_fieldtab_body-fieldname.
WHEN 'OA_NO'.
s_fieldtab_body-seltext_l = 'Order Accep. No.'.
MODIFY i_fieldtab FROM s_fieldtab_body INDEX sy-tabix.
CLEAR s_fieldtab_body.
WHEN 'KTEXT'.
s_fieldtab_body-seltext_l = 'Ramco Order No.'.
MODIFY i_fieldtab FROM s_fieldtab_body INDEX sy-tabix.
CLEAR s_fieldtab_body.
and so on -
Time Limit exceeded error in ALV report
I am gettting error "Time Limit Exceeded" when i execute ALV report. Can i run the program in background and how to do that?. I had already optimized my query in the program but even then i am facing the same issue.
You can process the alv in background by pressing F9...I guess that the output would be available as a spool in SP01.
You may need to re-check your query...And also, review the alv catalog and any events you are using....
Greetings,
Blag. -
Hello,
I am tring to run my first ALV report and I am getting a dump when I run it. it is dumping at
<b> Program SAPLSLVC
Include LSLVCF36
Row 3,221
Module type (FORM)
Module Name FILL_DATA_TABLE
macro_cell_data_get
<ls_fcat>
<ls_data>
<l_field_value>
ls_lvc_data-value. </b>
I searched the forum for the "macro_cell_data_get" and I found 1 response that gave a response of
<i>field symbol errors in ALV are usually down to fieldcat columns incorrectly defined. Check your internal table fields of the table you pass to the alv FM against the columns defined in the fieldcat</i>
I am not sure what I should be checking. I am looked at the structure that I have created for the ALV and the internal tables and I am not sure what to look for.
any help would be greatly appreciated.I hope this is what you are looking for.
FORM create_fieldcatalog USING value(p1_repid) TYPE sy-repid
CHANGING p_it_fieldcat TYPE slis_t_fieldcat_alv.
Local data declarations
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CONSTANTS: c_l TYPE c VALUE 'L'.
Call the FM to build the required field catalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = p1_repid
i_internal_tabname = 'IT_OUTDATA'
i_structure_name = 'zfi_ap_unpln_dlvry_csts_STRUCT'
CHANGING
ct_fieldcat = p_it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
LOOP AT p_it_fieldcat INTO wa_fieldcat.
wa_fieldcat-ddictxt = c_l.
Update the fieldcatalog parameters
CASE wa_fieldcat-fieldname.
WHEN 'BUKRS'.
wa_fieldcat-key = c_check.
WHEN OTHERS.
ENDCASE.
MODIFY p_it_fieldcat FROM wa_fieldcat INDEX sy-tabix.
ENDLOOP.
ENDIF.
ENDFORM. " FORM CREATE_FIELDCATALOG
$$----
$$ Form display_report
$$----
FORM display_alv CHANGING p_it_outdata TYPE ty_t_outdata
p_it_fieldcat TYPE slis_t_fieldcat_alv
p_it_alv_sort TYPE ty_t_sort_alv
p1_layout TYPE slis_layout_alv
value(p1_repid) TYPE sy-repid
value(p1_var) TYPE disvariant.
Call the FM to generate the ALV in grid format.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = p1_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = p1_layout
i_structure_name = 'ZFI_AP_UNPLN_DLVRY_CSTS_STRUCT'
it_fieldcat = p_it_fieldcat
it_sort = p_it_alv_sort
i_save = 'A'
is_variant = p1_var
TABLES
t_outtab = p_it_outdata
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
FREE: p_it_outdata.
ENDIF.
ENDFORM. "display_alv
also I checked all of the entries and they seemed to match. I am using the field BELNR which looks like it is a combination of two fields. I am not sure if this is causing my problem or not -
Text format error in ALV report
Hi Experts,
I am trying to download the ALV report output in to text format but the system is not downloaded the columns correctly. some of the columns are repeating and the alignment also not correct.
Please let me know if anyone have solution for this.
Reward points for good solutions.
Regards,
Venkatuse the Option(SHort Cut) CTRLSHFTF9
Local File->Spread sheet option.
And download to excel file.
Text file you can see format distorted, though it is not distorted.
Better use XLS format.
IF columns are repeating then the problem is with the Fieldcatalog. -
Dear friends
When I try to run the following code, I keep getting a message that says
"The field "GT_FIELD" specified here has a different field type.".
I have run this in many occassions and it has worked before. I would appreciate if some one can help me with this. Following is the code
CODE FOLLOWS----
REPORT ZSAPMZRFT_ZWMSCHED_REPORT MESSAGE-ID zrammessage LINE-SIZE 168
LINE-COUNT 20(6) NO STANDARD PAGE HEADING.
TABLES: zwmsched,
zwmwave.
Data : v_repid LIKE sy-repid,
BEGIN OF s_zwmsched occurs 1,
mandt LIKE zwmsched-mandt,
werks LIKE zwmsched-werks,
lgnum LIKE zwmsched-lgnum,
ship_date LIKE zwmsched-ship_date,
carrier LIKE zwmsched-carrier,
vbeln LIKE zwmsched-vbeln,
kunnr LIKE zwmsched-kunnr,
custname LIKE zwmsched-custname,
city LIKE zwmsched-city,
state LIKE zwmsched-state,
zip LIKE zwmsched-zip,
qty LIKE zwmsched-qty,
uom LIKE zwmsched-uom,
wt LIKE zwmsched-wt,
wt_uom LIKE zwmsched-wt_uom,
volumn LIKE zwmsched-volumn,
vol_uom LIKE zwmsched-vol_uom,
inco LIKE zwmsched-inco,
equipment LIKE zwmsched-equipment,
door LIKE zwmsched-door,
wavenum LIKE zwmsched-wavenum,
load_seq LIKE zwmsched-load_seq,
notes LIKE zwmsched-notes,
pick_stat LIKE zwmsched-pick_stat,
load_stat LIKE zwmsched-load_stat,
bol_stat LIKE zwmsched-bol_stat,
mbol LIKE zwmsched-mbol,
seal LIKE zwmsched-seal,
gm_status LIKE zwmsched-gm_status,
createdate LIKE zwmsched-createdate,
created_by LIKE zwmsched-created_by,
changedate LIKE zwmsched-changedate,
changed_by LIKE zwmsched-changed_by,
END of s_zwmsched,
Begin of temp_zwmsched occurs 1,
so_lgnum LIKE zwmsched-lgnum,
so_vbeln LIKE zwmsched-vbeln,
pa_date LIKE zwmsched-ship_date,
pa_wvno LIKE zwmsched-wavenum,
pa_door LIKE zwmsched-door,
carrier LIKE zwmsched-carrier,
pickstat LIKE zwmsched-pick_stat,
mbol LIKE zwmsched-mbol,
loadstat LIKE zwmsched-load_stat,
bol_stat LIKE zwmsched-bol_stat,
pgi_stat LIKE zwmsched-gm_status,
end of temp_zwmsched.
TYPE-POOLS : slis.
DATA :
gt_field TYPE slis_t_fieldcat_alv,
wa_field TYPE slis_fieldcat_alv,
gt_layout TYPE slis_layout_alv.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS: so_lgnum FOR zwmsched-lgnum,
so_vbeln FOR zwmsched-vbeln,
pa_date FOR zwmsched-ship_date,
pa_wvno FOR zwmsched-wavenum,
pa_door FOR zwmsched-door,
carrier FOR zwmsched-carrier,
pickstat FOR zwmsched-pick_stat,
mbol FOR zwmsched-mbol.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
SELECTION-SCREEN SKIP.
PARAMETERS: loadstat LIKE zwmsched-load_stat,
bol_stat LIKE zwmsched-bol_stat,
pgi_stat LIKE zwmsched-gm_status.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK block2.
select * from zwmsched into corresponding fields of table temp_zwmsched
where
lgnum in so_lgnum AND
vbeln in so_vbeln AND
ship_date in pa_date AND
wavenum in pa_wvno AND
door in pa_door AND
carrier in carrier AND
pick_stat in pickstat AND
mbol in mbol AND
load_stat = loadstat AND
bol_stat = bol_stat AND
gm_status = pgi_stat.
wa_field-col_pos = 1.
wa_field-tabname = 'ZWMSCHED'.
wa_field-fieldname = 'LGNUM'.
wa_field-seltext_l = 'WARE HOUSE'.
wa_field-outputlen = 11.
APPEND wa_field TO gt_field.
*wa_field-col_pos = 2.
*wa_field-fieldname = 'VBELN'.
*wa_field-seltext_l = 'DELIVERY'.
*wa_field-outputlen = 10.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 3.
*wa_field-fieldname = 'SHIP_DATE'.
*wa_field-seltext_l = 'SHIP DATE'.
*wa_field-outputlen = 11.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 4.
*wa_field-fieldname = 'WAVENUM'.
*wa_field-seltext_l = 'WAVENUM'.
*wa_field-outputlen = 11.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 5.
*wa_field-fieldname = 'DOOR'.
*wa_field-seltext_l = 'DOOR'.
*wa_field-outputlen = 5.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 6.
*wa_field-fieldname = 'CARRIER'.
*wa_field-seltext_l = 'CARRIER'.
*wa_field-outputlen = 8.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 7.
*wa_field-fieldname = 'PICK_STAT'.
*wa_field-seltext_l = 'PICK STAT'.
*wa_field-outputlen = 10.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 8.
*wa_field-fieldname = 'MBOL'.
*wa_field-seltext_l = 'MBOL'.
*wa_field-outputlen = 5.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 9.
*wa_field-fieldname = 'LOAD_STAT'.
*wa_field-seltext_l = 'LOAD STAT'.
*wa_field-outputlen = 10.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 10.
*wa_field-fieldname = 'BOL_STAT'.
*wa_field-seltext_l = 'BOL STAT'.
*wa_field-outputlen = 11.
*APPEND wa_field TO gt_field.
*wa_field-col_pos = 11.
*wa_field-fieldname = 'GM_STATUS'.
*wa_field-seltext_l = 'PFI STAT'.
*wa_field-outputlen = 9.
*APPEND wa_field TO gt_field.
gt_layout-zebra = 'X'.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = gt_field
IT_FIELDCAT = gt_layout
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = temp_zwmsched
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.You problem is right here.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
<b>IS_LAYOUT = gt_field
IT_FIELDCAT = gt_layout</b>
IT_EXCLUDING =
Should be....
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
<b>IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_field</b>
IT_EXCLUDING =
Regarsd,
Rich Heilman -
Geting an error in alv reporting
HELLO EVERYONE
I AM A BEGINNER . THIS IS THE PROBLEM AM GETTING IN MY PROGRAM.PLZ HELP ME WITH IT.
ERROR MSG,
"THE DATA OBJECT 'WA_FCAT' DOES NOT HAVE A COMPONENT CALLED 'FIELDNAME ".
FOLLOWING STATEMENT HAVING THE PROBLEM
FIELD CATLOG
WA_FCAT-FIELDNAME = 'VBELN'.
WA_FCAT-SELTEXT_M = 'SALES DOC'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
Edited by: arunkumarsethi on Jan 11, 2010 11:15 PMHi
It seems that the problem is not at
WA_FCAT-FIELDNAME = 'VBELN'.
WA_FCAT-SELTEXT_M = 'SALES DOC'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT
But, at the point where you are declaring the work area for field catalog. Try declaring it as follows:
DATA: wa_fcat type lvc_s_fcat.
wa_fcat-fieldname = 'VBELN'.
wa_fcat-seltext_m = 'SALES DOC'.
append w_fcat to it_fcat.
clear wa_fcat.
Hope this solves your problem.
Regards
Gaurav -
Problem with subtotal calculation in ALV reports
Hi All,
I am doing one program for calculating subtoals in ALV . For this i want to display subtotal text at each envey subtotal 's row.
For that i have created one form 'SUB_SUBTOT_TEXT' and it has given to IT_EVENTS-FORM. But SUB_SUBTOT_TEXT Form is not called by IT_EVENTS event.
what are all the mandatories for displaying subtotal text.
Can any one please help me.
Thanks in Advance.Hi Sree,
*& Table declaration
&----TABLES: ekko.&----
*& Type pool declaration
TYPE-POOLS: slis. " Type pool for ALV&----
*& Selection screen
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.&----
*& Type declaration
&----* Type declaration for internal table to store EKPO data
TYPES: BEGIN OF x_data,
ebeln TYPE char30, " Document no.
ebelp TYPE ebelp, " Item no
matnr TYPE matnr, " Material no
matnr1 TYPE matnr, " Material no
werks TYPE werks_d, " Plant
werks1 TYPE werks_d, " Plant
ntgew TYPE entge, " Net weight
gewe TYPE egewe, " Unit of weight
END OF x_data.&----
*& Internal table declaration
DATA:* Internal table to store EKPO data
i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
Internal table for storing field catalog information
i_fieldcat TYPE slis_t_fieldcat_alv,
Internal table for Top of Page info. in ALV Display
i_alv_top_of_page TYPE slis_t_listheader,
Internal table for ALV Display events
i_events TYPE slis_t_event,
Internal table for storing ALV sort information
i_sort TYPE slis_t_sortinfo_alv,
i_event TYPE slis_t_event.&----
*& Work area declaration
&----DATA:
wa_ekko TYPE x_data,
wa_layout TYPE slis_layout_alv,
wa_events TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.&----
*& Constant declaration
&----CONSTANTS:
c_header TYPE char1
VALUE 'H', "Header in ALV
c_item TYPE char1
VALUE 'S'.&----
*& Start-of-selection event
&----START-OF-SELECTION.* Select data from ekpo
SELECT ebeln " Doc no
ebelp " Item
matnr " Material
matnr " Material
werks " Plant
werks " Plant
ntgew " Quantity
gewei " Unit
FROM ekpo
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln
AND ntgew NE '0.00'. IF sy-subrc = 0.
SORT i_ekpo BY ebeln ebelp matnr .
ENDIF.* To build the Page header
PERFORM sub_build_header.* To prepare field catalog
PERFORM sub_field_catalog.* Perform to populate the layout structure
PERFORM sub_populate_layout.* Perform to populate the sort table.
PERFORM sub_populate_sort.* Perform to populate ALV event
PERFORM sub_get_event.END-OF-SELECTION.* Perform to display ALV report
PERFORM sub_alv_report_display.
*& Form sub_build_header
To build the header
No Parameter
FORM sub_build_header .* Local data declaration
DATA: l_system TYPE char10 , "System id
l_r_line TYPE slis_listheader, "Hold list header
l_date TYPE char10, "Date
l_time TYPE char10, "Time
l_success_records TYPE i, "No of success records
l_title(300) TYPE c. " Title
Title Display
l_r_line-typ = c_header. " header
l_title = 'Test report'(001).
l_r_line-info = l_title.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR l_r_line.* Run date Display
CLEAR l_date.
l_r_line-typ = c_item. " Item
WRITE: sy-datum TO l_date MM/DD/YYYY.
l_r_line-key = 'Run Date :'(002).
l_r_line-info = l_date.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR: l_r_line,
l_date.ENDFORM. " sub_build_header
*& Form sub_field_catalog
Build Field Catalog
No Parameter
FORM sub_field_catalog .* Build Field Catalog
PERFORM sub_fill_alv_field_catalog USING: '01' '01' 'EBELN' 'I_EKPO' 'L'
'Doc No'(003) ' ' ' ' ' ' ' ', '01' '02' 'EBELP' 'I_EKPO' 'L'
'Item No'(004) 'X' 'X' ' ' ' ', '01' '03' 'MATNR' 'I_EKPO' 'L'
'Material No'(005) 'X' 'X' ' ' ' ', '01' '03' 'MATNR1' 'I_EKPO' 'L'
'Material No'(005) ' ' ' ' ' ' ' ',
'01' '04' 'WERKS' 'I_EKPO' 'L'
'Plant'(006) 'X' 'X' ' ' ' ', '01' '04' 'WERKS1' 'I_EKPO' 'L'
'Plant'(006) ' ' ' ' ' ' ' ', '01' '05' 'NTGEW' 'I_EKPO' 'R'
'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.ENDFORM. " sub_field_catalog&----
*& Form sub_fill_alv_field_catalog
*& For building Field Catalog
*& p_rowpos Row position
*& p_colpos Col position
*& p_fldnam Fldname
*& p_tabnam Tabname
*& p_justif Justification
*& p_seltext Seltext
*& p_out no out
*& p_tech Technical field
*& p_qfield Quantity field
*& p_qtab Quantity table
FORM sub_fill_alv_field_catalog USING p_rowpos TYPE sycurow
p_colpos TYPE sycucol
p_fldnam TYPE fieldname
p_tabnam TYPE tabname
p_justif TYPE char1
p_seltext TYPE dd03p-scrtext_l
p_out TYPE char1
p_tech TYPE char1
p_qfield TYPE slis_fieldname
p_qtab TYPE slis_tabname.* Local declaration for field catalog
DATA: wa_lfl_fcat TYPE slis_fieldcat_alv. wa_lfl_fcat-row_pos = p_rowpos. "Row
wa_lfl_fcat-col_pos = p_colpos. "Column
wa_lfl_fcat-fieldname = p_fldnam. "Field Name
wa_lfl_fcat-tabname = p_tabnam. "Internal Table Name
wa_lfl_fcat-just = p_justif. "Screen Justified
wa_lfl_fcat-seltext_l = p_seltext. "Field Text
wa_lfl_fcat-no_out = p_out. "No output
wa_lfl_fcat-tech = p_tech. "Technical field
wa_lfl_fcat-qfieldname = p_qfield. "Quantity unit
wa_lfl_fcat-qtabname = p_qtab . "Quantity table IF p_fldnam = 'NTGEW'.
wa_lfl_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_lfl_fcat TO i_fieldcat.
CLEAR wa_lfl_fcat.
ENDFORM. " sub_fill_alv_field_catalog&----
*& Form sub_populate_layout
Populate ALV layout
No Parameter
FORM sub_populate_layout . CLEAR wa_layout.
wa_layout-colwidth_optimize = 'X'." Optimization of Col widthENDFORM. " sub_populate_layout&----
*& Form sub_populate_sort
Populate ALV sort table
No Parameter
FORM sub_populate_sort .* Sort on material
wa_sort-spos = '01' .
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.* Sort on plant
wa_sort-spos = '02'.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
ENDFORM. " sub_populate_sort&----
*& Form sub_get_event
Get ALV grid event and pass the form name to subtotal_text
event
No Parameter
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
'SUBTOTAL_TEXT'. DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.* Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.ENDFORM. " sub_get_event&----
*& Form sub_alv_report_display
For ALV Report Display
No Parameter
FORM sub_alv_report_display .
DATA: l_repid TYPE syrepid .
l_repid = sy-repid .* This function module for displaying the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_top_of_page = 'SUB_ALV_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
it_events = i_event
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = i_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error in ALV report display'(055).
ENDIF.ENDFORM. " sub_alv_report_display&----
FORM sub_alv_top_of_page
Call ALV top of page
No parameter
----FORM sub_alv_top_of_page. "#EC CALLED* To write header for the ALV
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_alv_top_of_page.
ENDFORM. "alv_top_of_page&----
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'MATNR'.
p_subtot_text-display_text_for_subtotal
= 'Material level total'(009).
ENDIF.* Plant level sub total
IF p_subtot_text-criteria = 'WERKS'.
p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
ENDIF.
ENDFORM. "subtotal_text
Hopes its helpful.
Regards,
Raj. -
Error message log in session method of ALV report,
In ALV report please let me know:
1) In session method:
where all error messages are stored,I know that error messages are stored in a log file, so please tell me where is it stored.
2)transaction method:
How to handle error messages in transaction methos(for eg if a weight field text box value is negative)Ans for 2nd point.
CALL TRANSACTION c_mb USING i_bdcdata
MODE g_ctumode
UPDATE g_cupdate
MESSAGES INTO i_messtab.
COMMIT WORK.
IF sy-subrc EQ 0. " BDC Executed Successfully
CLEAR wa_messtab.
LOOP AT i_messtab INTO wa_messtab .
IF wa_messtab-msgtyp = 'S' AND
wa_messtab-msgid = 'M7' AND
wa_messtab-msgnr = '060'.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = wa_messtab-msgid
msgnr = wa_messtab-msgnr
msgv1 = wa_messtab-msgv1
msgv2 = wa_messtab-msgv2
msgv3 = wa_messtab-msgv3
msgv4 = wa_messtab-msgv4
IMPORTING
message_text_output = l_msg.
APPEND l_msg TO i_sucsess.
CLEAR l_msg.
g_docsuc = 1.
ELSE.
IF wa_messtab-msgtyp = 'E'.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = wa_messtab-msgid
msgnr = wa_messtab-msgnr
msgv1 = wa_messtab-msgv1
msgv2 = wa_messtab-msgv2
msgv3 = wa_messtab-msgv3
msgv4 = wa_messtab-msgv4
IMPORTING
message_text_output = l_msg.
g_errflg = 1.
APPEND l_msg TO i_error.
CLEAR: l_msg.
ENDIF. -
Error when OO ALV report run in background
Hello all,
We recently applied stack 12 for a 7.0 system. My custom ALV report using CL_GUI_CUSTOM_CONTAINER coding now returns an error when run in Background. It works fine in dialog.
The error occurred in program CL_GUI_CUSTOM_CONTAINER=======CP. The log message was "Control Framework: Fatal error - GUI cannot be reached".
Is there a solution for OO ALV reports run in the background? I would not like to re-write my ALV reports using the function call. Any advice is appreciated. Thanks!!Yes, you need to code it a little differently, but you can still use CL_GUI_ALV_GRID. Here is an example.
REPORT ZRICH_0006 .
DATA: ITAB TYPE TABLE OF MARA.
DATA: R_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: R_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA: G_DOCK TYPE REF TO CL_GUI_DOCKING_CONTAINER.
DATA: OKCODE type sy-ucomm.
START-OF-SELECTION.
SELECT * FROM MARA INTO TABLE ITAB up to 100 rows.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
IF R_CONTROL IS INITIAL.
* Check whether the program is run in batch or foreground
IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
* Run in foreground
CREATE OBJECT R_CONTROL EXPORTING CONTAINER_NAME = 'CONTAINER_1'.
CREATE OBJECT R_GRID EXPORTING I_PARENT = R_CONTROL.
ELSE.
* Run in background
CREATE OBJECT R_GRID EXPORTING I_PARENT = G_DOCK.
ENDIF.
CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'MARA'
CHANGING
IT_OUTTAB = ITAB.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE OKCODE.
WHEN 'BACK'.
leave program.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Regards,
Rich Heilman -
While Saving ALV report in Local File getting error
Hello Experts,
Did one alv report.
Getting output properly , but while saving(downloading) the output result getting Dump from system.
Runtime Errors GETWA_NOT_ASSIGNED
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
NOT GETTING WHERE EXACTLY IT IS WRONG....
Please suggest the solution..
Thanks in advanceUsually this is due to wrong fieldcatalog, or inconsistenecy between field catalog, internal table or some fields of the layout (bselect box or lights for example) -> The FIRST thing to do is the execution of [The Consistency Check|http://help.sap.com/saphelp_470/helpdata/en/d6/23253963143e6ae10000000a11402f/frameset.htm], then correct the program to adjust field catalog or layout.
Regards,
Raymond -
Run-time error '13' in ALV report
Hello,
In a standard ALV report we are using Excel report layout. The Excel contains a table and a graph. The excel table refreshes with no errors.
In order to refresh the graph data we recorded a VB Macro but when we run the report (which runs the macro) we are getting the error:
run-time error '13'
When we open the excel report from our workstation (not trough the SAP system) we are not getting this error.
Please Advice,
Amirhi
this is a bug(error )in microsoft excel:
Run-time error:'13' Type Mismatch" error message when you click a macro or a function on a menu in Excel 2002
Please chec kthis link for the details:
http://support.microsoft.com/kb/821292
Regards
Neha -
How to display error logs of Processed Data chain in a ALV Report
Hi Experts,
I have a requirement, to display all the errors of a Processed chain in Business Warehouse.
Is there any approach to achieve this requirement ?
Your replies will be appreciated.
Thanks in Advance,
Regards,
GiriHi Kodanda Pani,
Thanks your reply,
Normally we will be having many Process chains in real time BW, and those all will be scheduled in Back Ground.
If any process chain gets stuck up with any error, that error we have capture and to be display in a ABAP Report( i.e, ALV Report ).
Regards,
Giri -
Error in print preview in ALV report
Hi....All,
Good Day.
I have developed a ALV report. It is displaying all data properly. The problem is...
When I am pressing the print preview button... it is getting dump.
The dump short message is....... "Field symbol has not yet been assigned".
Hope that I will get a solution from you as previous.
With Thanks
SohelDo you use a field for coloring a column or cell?
If the coding is not too large it could be helpfull to post the coding as well.
Regards,
John. -
How to resolve the error in bdc call transaction in ALV report
Dear Experts, i am executing the alv report program and in alv report program one bdc is there..
after executing output is showing in alv format but one button is there (update master)..when i am clicking update button the bdc is run but is not updated in the material master..after executing my bdc is not updated in mm02.
how to resove it?
CALL TRANSACTION 'MM02' USING BDCDATA MODE MODE
UPDATE 'S'
MESSAGES INTO MESSTAB.Hi Kaustav,
Looking at the code you attached, it appears to me that your BDC (Form USER_COMMAND) is not executed at all as you haven't passed the 'USER_COMMAND' in FM REUSE_ALV_GRID_DISPLAY for ALV display.
You must pass the importing parameter I_CALLBACK_USER_COMMAND of this FM as 'USER_COMMAND', only then this form will be executed and your BDC will run.
Thereafter, in case your BDC update fails, you can put a break-point in the form (at CALL TRANSACTION statement) and analyze the message table MESSTAB.
Hope it helps.
Regards,
Sapeksh
Maybe you are looking for
-
Foreign currency valuation exchange rate
Dear Forum, In the listing after execute of F.05, there are 2 exchange rate column. The first exchange rate is the exch rate type for translation which enter in FASB 52 tab in F.05. The second exchange rate is the rate captured during posting of the
-
Webdynpro Development: On change of input field Event
hi, Is there any event in Web Dynpro(Java), that chaught the event of change in an input field? ie, if I change the value of a perticular field, it will caught that event and populate another field accordingly. Thanks, Angshuman
-
Dear All, When we try to create a new report server it throws the error. Command : opmnctl createcomponent -adminUsername username -adminHost myserverhost -adminPort myserverport -oracleHome E:\Oracle\Middleware\oracle_common -oracleInstance E:\Oracl
-
Dynamic System Domains = zone?
Is Dynamic System Domains the same thing as zones?
-
Short dump on zautoclear.
Hi All, I am getting error "CALL_FUNCTION_NOT_FOUND" while executing tcode zautoclear.Please help. Moderator message: obvious message, please try solving problems yourself first, search for information. Message was edited by: Thomas Zl