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,
Venkat
use 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.
Similar Messages
-
Alv date format error in output report
Hello All,
I'm new to ABAP
I have requirement in alv report shows wrong characters in date field.
Input : - 27.04.2015
Output: - 20.4..01.0
i want to shows output as same as i am fetching from database table.
plz give details to achieve this requirement. i have tried CONVERT_DATE_TO_INTERNAL fm but dont know how to usehi yogesh,
Declare ur date filed of Sy-datum type,
or u cane also give the refrence of ANY table and there DATE type field while building Field Catalog,
for Example,
wa_fieldcat-ref_tabname = 'MARA',
wa_filedcat-ref_fieldname = 'ERSDA'
regards, -
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. "displayHi,
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.. -
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 -
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. -
Re: Display format in the ALV report output
Hi Expert,
In the alv report how to display below format in the output.
Example: Jan 2011 feb 2011 march 2011 .......................
no amount no amount no amount
As you seen in the above output i need Below jan 2011 NO and AMOUNT similar for other months.
Can any one throw some light...............
Regards,
Am.
Edited by: anitha.mava on Nov 5, 2011 12:37 PM
Moderator message : Spec dumping is not allowed, search for available information. Thread locked.
Edited by: Vinod Kumar on Nov 7, 2011 9:31 AMHi,
Are you able to populate NO ? If yes i don't see why u can't populate No Amount.
If you are not able to populate No.. just pass the same based on the condition to the (string) field that column is referring to ..
Or are u not able to align the columns ? If yes, you will have to do some hit and trial with write statement ..or better why not use grid display ..
Please provide more details ..
Regards,
Pranav. -
Text getting truncated in alv report...
hi friends,
i am doing an alv report..the requirement is i need to display the user inputs at the top of the alv grid..in that, for a particular field, if the user is not selecting any option, then i need to display all the values in that category...i have concatenated all those values into a variable and displayed it...but the problem is, it is not taking beyond 60 characters as P_HEADING-INFO is only defined as characters of length 60...how to expand the character value of p_heading? thanks all..max size is
types: begin of slis_listheader,
typ(1) type c, " H = Header, S = Selection, A = Action
key(20) type c,
info type slis_entry,
end of slis_listheader.
slis_entry(60) type c,
so try to create one more Line if u have to much more data to display.
regards
Prabhu -
Hi Gurus,
I am Facing a problem in Tcode VF03. Here when i try to See the Header text for the Payment procedures it Shows the following Error Msg.
Text is formatted -> Details
The Error Message no. VX202
Though i checked with the Functional Cons. As thay were configured well still i am getting this Error.
So, can i get some idea how to resolve this issue?. Pls Help me.
Regards,
Raja.If this happened after an upgrade it is probably due to a problem in the text setup. I've been researching a similiar issue in OSS. There are several good notes.
I unfortunetly did not keep them. I didn't need them because it was configuration that had to be completed.
If you need more information - please send an e-mail. I'll see if I can find them again. The notes were related to the sales order long text. I worked with my functional configuration people to resolve the issue. -
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 -
Need to display grand total text in OOPS ABAP ALV report
Hi
I am using OOPS for alv display and need to display grand "total text" in any column in th eoutput display.
I know the procedure to display in ALV display. but dont have idea in OOPS. Please help.
Thanks
Amminesh.hi,
follow this link for alv's with oop's oncept.
http://abapreports.blogspot.com/2008/06/alv-grid-display-with-oops.html
for calculating total to the specific field.....
while creating the fieldcatalog pass the value 'X' to field do_sum of lvc_t_fcat( field catalog).
data: fcat type lvc_t_fcat.
fcat-fieldname = <field-name>.
fcat-ref_table = <ref-tablename>.
fcat-ref_field = <ref-fieldname>.
fcat-do_sum = 'X'.
regards,
Ashok -
Text Formating Error In VF02 VF03 in Billing Header
Hi All,
I am getting the below error when i am trying to navigate to Header Text in Billing Document through VF02 or VF03. I am able to go to text tab in sales order fine, any idea why and what i should do?
Message no. VX201 the SD_WORD_PROCESSING function module is for creating the "Maintain Text" dialog box. You have called up the function module with the wrong values so it is not possible to edit text properly.
Thanks
VHi ,
maybe the problem is in customizing transaction VOTXN, where you could assign header type to your billing type,
check it..
best regards
Giuseppe -
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 -
Crystal report : Export to Text format from BI Launch pad
Hi,
We are facing issue in exporting the Crystal report to text format option from BI Launch pad view mode. Currently BI launch pad doesn’t support export to Text format option for crystal report in view mode. But export to text format option is feasible in schedule mode. But customer is not interested in exporting the reports through schedule mode.
Please advise, if we have any alternative way of exporting the crystal report to text format option from BI Launch pad.
Thanks,
Chinnu AHi Chinnu,
The question is better suited to be asked in the BI Platform space.
-Abhilash -
ALV Report output in Excel format
Hi ,
I am facing a different behaviour in two computers , while trying to take an Excel format of an ALV report output. After generating the ALV output ,in one , when I click on the Excel Format button - the Excel spreadsheet opens with the output data. In the second computed , under the same action , a blank Excel sheet opens .
Could someone tell me a solution . What aspect is responsible for this ?
Regards ,
SujataReduce the MACRO security settings in the Excel to Medium.
Open an execl sheet, Chose from menu Tootls->Macro->Security.
Chose the radio-buton medium. Close the file and all excel applications.Then try downloading again.
Regards,
Ravi
Maybe you are looking for
-
today i popped the phone in the dock and it says an iphone has been previously synced with this computer . after spending a long time adding nicknames and birthdays, itunes wants me to restore frm back up , meaning i will lose the updates i just did.
-
HT1923 How do I uninstall itunes 11 and revert to itunes 10?
Hi, How do I uninstall itunes 11, which I find a chore to use, and revert to itunes 10? Is it possible? Or should I just get on with it? Thanks Spudzulyke
-
My internal macintosh HD died and I want to use an SSD drive if possible. I either want to replace the internal HD or boot to an external SSD drive if possible. I would have to connect with FW800 since I am lacking thunderbolt on my iMac. Would FW800
-
Bidders dont have authorization to view Bids
Hi Experts, We are using SRM 5.0 Extended Classic Scenario. We are getting error message for the bidder as "You have no display authorization" . They are able to login to the system . The Bidder has got assigned with the proper roles SAP_BBP_STAL_BI
-
Incremental Backups in Time Machine taking forever
Greetings all, I have read the various posts about slow initial backups with Time Machine. I, on the other hand, had no such problem. However, now that my initial backup is complete I find it takes quite a long time for Time Machine to do its hourly