2007 Sep 13 10:19 AM
Hi guys,
I have a problem in a alv report.actually the prog is copied from ECC 6.0 to 4.6 C.When the report is executed in 4.6 C a column that should display a date in the report is empty.but if we execute the same report in ecc 6.0 the date is being displayed in that date column.
What could be the problem?any suggestions please.
Thanks in advacne.
Hi guys,
I have a problem in a alv report.actually the prog is copied from ECC 6.0 to 4.6 C.When the report is executed in 4.6 C a column that should display a date in the report is empty.but if we execute the same report in ecc 6.0 the date is being displayed in that date column.
What could be the problem?any suggestions please.
Thanks in advacne.
2007 Sep 13 10:23 AM
Hi
Dinesh U can do one thing. Debug the same program in Ecc6.0 and repeat the same debugging in 4.6 also u can find the difference easily
Or else if not solved plz paste ur code here we can try for that
Reward all helpfull answers
Regards
Pavan
2007 Sep 13 10:40 AM
Hi pavan
the date field is DLINL is coming from table MARD.here is my code if u can find something please let me know
TABLES : mara,
mard,
t001l,
t001w,
t134,
ikpf,
iseg,
t134m.
************************************************************************
Parameters / Select Options
*****************************
*----
-
selection screen
*----
-
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECT-OPTIONS: s_werks FOR t001w-werks OBLIGATORY.
SELECT-OPTIONS: s_lgort FOR mard-lgort.
SELECT-OPTIONS: s_mtart FOR mara-mtart.
SELECT-OPTIONS: s_lgpbe FOR mard-lgpbe.
SELECT-OPTIONS: s_sobkz FOR ikpf-sobkz.
SELECTION-SCREEN SKIP.
PARAMETERS p_del AS CHECKBOX.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
SELECTION-SCREEN SKIP.
PARAMETERS p_count AS CHECKBOX.
SELECTION-SCREEN SKIP.
PARAMETERS p_dlinl TYPE sy-datum.
SELECTION-SCREEN COMMENT 46(4) text-005.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b2.
************************************************************************
Internal Tables
*****************
DATA : BEGIN OF i_z095 OCCURS 0.
INCLUDE STRUCTURE z095.
DATA : END OF i_z095.
************************************************************************
Data
******
CONSTANTS: c_structure TYPE dd02l-tabname VALUE 'z095'.
DATA : g_index TYPE i.
DATA : g_title(70) TYPE c.
DATA: ok_code LIKE sy-ucomm,
gt_z095 TYPE TABLE OF z095,
g_container TYPE scrfname VALUE 'BCALVC_TOOLBAR_D100_C1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container1 TYPE REF TO cl_gui_custom_container.
DATA : fieldcat TYPE lvc_t_fcat.
DATA : wa_fieldcat TYPE lvc_s_fcat.
DATA: gs_layout TYPE lvc_s_layo,
gt_exclude TYPE ui_functions,
gs_toolbar TYPE stb_button.
DATA : gs_variant TYPE disvariant.
INCLUDE .
****************************************************************
LOCAL CLASSES: Definition
****************************************************************
*===============================================================
class lcl_event_receiver: local class to
define and handle own functions.
*
Definition:
~~~~~~~~~~~
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive,
handle_menu_button
FOR EVENT menu_button OF cl_gui_alv_grid
IMPORTING e_object e_ucomm,
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
PRIVATE SECTION.
ENDCLASS. "lcl_event_receiver DEFINITION
*
lcl_event_receiver (Definition)
*===============================================================
****************************************************************
LOCAL CLASSES: Implementation
****************************************************************
*===============================================================
*
*
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
§ 2.At event TOOLBAR define a toolbar element of type 1 by using
event paramenter E_OBJECT. Remember its function code.
*.......
Part I: Define a menu button including a function code that
is evaluated in 'handle_MENU_BUTTON
*.......
append a separator to normal toolbar
CLEAR gs_toolbar.
MOVE 3 TO gs_toolbar-butn_type.
APPEND gs_toolbar TO e_object->mt_toolbar.
*...................
append a menu with default button (Type 1)
The function code of the default button is the same as
the one for the menu.
If the user klicks on the default button ALV raises
directly event BEFORE_USER_COMMAND
(then USER_COMMAND, AFTER_USER_COMMAND).
If the user klicks on the menu button ALV raises event MENU_BUTTON.
ENDMETHOD. "handle_toolbar
*----
-
METHOD handle_menu_button.
§ 3.At event MENU_BUTTON query your function code and define a
menu in the same way as a context menu.
*..........
Part II: Evaluate 'e_ucomm' to see which menu button of the toolbar
has been clicked on.
Define then the corresponding menu.
The menu contains function codes that are evaluated
in 'handle_user_command'.
*...........
query e_ucomm to find out which menu button has been clicked on
ENDMETHOD. "handle_menu_button
*----
-
METHOD handle_user_command.
refresh the display after any changes
PERFORM retrieve_data.
CALL METHOD grid1->refresh_table_display.
ENDMETHOD. "handle_user_command
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
************************************************************************
Top Of Page
*************
************************************************************************
*at selection-screen.
************************************************************************
AT SELECTION-SCREEN.
IF p_count = 'X' AND p_dlinl IS INITIAL.
MESSAGE e000(z1) WITH text-012.
ENDIF.
validate entered data - first plant ....
IF NOT s_werks-low IS INITIAL.
SELECT SINGLE werks FROM t001w INTO t001w-werks
WHERE werks = s_werks-low.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-013 s_werks-low text-016.
ENDIF.
ENDIF.
IF NOT s_werks-high IS INITIAL.
SELECT SINGLE werks FROM t001w INTO t001w-werks
WHERE werks = s_werks-high.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-013 s_werks-high text-016.
ENDIF.
ENDIF.
... then storage location
IF NOT s_lgort-low IS INITIAL.
SELECT SINGLE lgort FROM t001l INTO t001l-lgort
WHERE lgort = s_lgort-low.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-014 s_lgort-low text-016.
ENDIF.
ENDIF.
IF NOT s_lgort-high IS INITIAL.
SELECT SINGLE lgort FROM t001l INTO t001l-lgort
WHERE lgort = s_lgort-high.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-014 s_lgort-high text-016.
ENDIF.
ENDIF.
... then material type
IF NOT s_mtart-low IS INITIAL.
SELECT SINGLE mtart FROM t134 INTO t134-mtart
WHERE mtart = s_mtart-low.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-015 s_mtart-low text-016.
ENDIF.
ENDIF.
IF NOT s_mtart-high IS INITIAL.
SELECT SINGLE mtart FROM t134 INTO t134-mtart
WHERE mtart = s_mtart-high.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH text-015 s_mtart-high text-016.
ENDIF.
ENDIF.
************************************************************************
Start of selection
********************
START-OF-SELECTION.
PERFORM retrieve_data.
PERFORM report_data.
END-OF-SELECTION.
*----
*
MODULE PBO OUTPUT *
*----
*
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR '100'.
CLEAR gs_variant.
'gs_layout' must at least contain the report-id to allow
gs_variant-report = sy-repid.
this is to stop the PC from repeatedley allocating memory to this
process
IF g_custom_container1 IS INITIAL.
CREATE OBJECT g_custom_container1
EXPORTING container_name = g_container.
remove buttons from the toolbar that we do not require
gs_exclude = cl_gui_alv_grid=>mc_fc_print.
append gs_exclude to gt_exclude.
gs_exclude = cl_gui_alv_grid=>mc_fc_graph.
append gs_exclude to gt_exclude.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container1.
*some of these values are required in order to be able to save displays
*?
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
i_default = 'X'
it_toolbar_excluding = gt_exclude
CHANGING
it_fieldcatalog = fieldcat
it_outtab = gt_z095.
ENDIF.
********
->Create Object to receive events and link them to handler methods.
When the ALV Control raises the event
the corresponding method is automatically called FOR ALL INSTANCES.
(Complies to their definition as CLASS-METHODS).
*
SET HANDLER lcl_event_receiver=>handle_user_command
lcl_event_receiver=>handle_menu_button
lcl_event_receiver=>handle_toolbar FOR ALL INSTANCES.
*
********
apply sort criteria
perform sort_summary_alv_output.
call method grid1->refresh_table_display.
raise event TOOLBAR:
CALL METHOD grid1->set_toolbar_interactive.
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = grid1.
ENDMODULE. "pbo OUTPUT
*----
*
MODULE PAI INPUT *
*----
*
MODULE pai INPUT.
to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
PERFORM exit_program.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "pai INPUT
*----
*
FORM EXIT_PROGRAM *
*----
*
FORM exit_program.
The instance custom_container2 is freed not until the program
exits from the main screen.
no matter how many times the second window is called).
*
CALL METHOD g_custom_container1->free.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'No details'(502)
txt2 = sy-subrc
txt1 = 'Error in Flush'(500).
ENDIF.
CASE sy-dynnr.
WHEN 200.
CLEAR g_custom_container1.
CLEAR : grid1.
PERFORM customise_alv_output.
LEAVE TO SCREEN 100.
WHEN 100.
CLEAR g_custom_container1.
CLEAR : grid1.
need the leave screen to maintain the screen chain properly
LEAVE TO SCREEN 0.
WHEN OTHERS.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM. "exit_program
*----
*
FORM retrieve_data *
*----
*
........ *
*----
*
FORM retrieve_data.
DATA: l_mblnr TYPE mblnr,
l_no_of_lines TYPE i,
l_sobkz LIKE iseg-sobkz,
l_shkzg TYPE shkzg,
la_z095 TYPE z095,
li_z095 TYPE STANDARD TABLE OF z095.
IF s_sobkz[] IS INITIAL.
*-----get most of the data via an initial join
SELECT dwerks lgort matkl mtart amatnr dlinl lgpbe abcin a~lvorm
INTO CORRESPONDING FIELDS OF TABLE i_z095
FROM mard AS d
JOIN mara AS a
ON amatnr EQ dmatnr
JOIN marc AS c
ON dmatnr EQ cmatnr
AND dwerks EQ cwerks
WHERE d~matnr IN s_matnr
AND d~werks IN s_werks
AND d~lgort IN s_lgort
AND a~mtart IN s_mtart
AND d~lgpbe IN s_lgpbe
AND c~abcin <> space.
ENDIF.
*-----Check special stock records
SELECT d~werks d~sobkz lifnr matkl mtart a~matnr lbdll a~lvorm
INTO CORRESPONDING FIELDS OF TABLE li_z095
FROM mslb AS d
JOIN mara AS a
ON a~matnr EQ d~matnr
JOIN marc AS c
ON d~matnr EQ c~matnr
AND d~werks EQ c~werks
WHERE d~matnr IN s_matnr
AND d~werks IN s_werks
AND a~mtart IN s_mtart
AND d~sobkz IN s_sobkz.
DESCRIBE TABLE li_z095 LINES l_no_of_lines.
IF l_no_of_lines > 0.
LOOP AT li_z095 INTO la_z095.
MOVE la_z095 TO i_z095.
APPEND i_z095.
ENDLOOP.
ENDIF.
CLEAR : li_z095,
l_no_of_lines.
SELECT d~werks d~sobkz lifnr matkl mtart a~matnr d~kodll a~lvorm
INTO CORRESPONDING FIELDS OF TABLE li_z095
FROM mkol AS d
JOIN mara AS a
ON a~matnr EQ d~matnr
JOIN marc AS c
ON d~matnr EQ c~matnr
AND d~werks EQ c~werks
WHERE d~matnr IN s_matnr
AND d~werks IN s_werks
AND a~mtart IN s_mtart
AND d~sobkz IN s_sobkz.
DESCRIBE TABLE li_z095 LINES l_no_of_lines.
IF l_no_of_lines > 0.
LOOP AT li_z095 INTO la_z095.
MOVE la_z095 TO i_z095.
APPEND i_z095.
ENDLOOP.
ENDIF.
SORT i_z095 BY matnr werks lgort.
then loop checking exclusion options
LOOP AT i_z095.
check deleted status if flagged to ignore
IF p_del = '' AND i_z095-lvorm = 'X'.
CONTINUE.
ENDIF.
IF i_z095-lbdll NE space.
MOVE i_z095-lbdll TO i_z095-dlinl.
ELSEIF i_z095-kodll NE space.
MOVE i_z095-kodll TO i_z095-dlinl.
ENDIF.
check count date against screen limit if checked
IF p_count = 'X' AND i_z095-dlinl > p_dlinl.
CONTINUE.
ENDIF.
check material is subject to quantity updating
CLEAR t134m.
SELECT SINGLE mengu INTO t134m-mengu
FROM t134m
WHERE bwkey = i_z095-werks
AND mtart = i_z095-mtart.
IF sy-subrc <> 0 OR t134m-mengu = ''.
CONTINUE.
ENDIF.
get material description
CLEAR i_z095-maktx.
SELECT SINGLE maktx INTO i_z095-maktx
FROM makt
WHERE matnr = i_z095-matnr
AND spras = sy-langu.
IF i_z095-sobkz NE space.
Get variance quantity
SELECT mblnr shkzg erfmg erfme
INTO (l_mblnr, l_shkzg, i_z095-erfmg, i_z095-erfme)
FROM mseg UP TO 1 ROWS
WHERE matnr = i_z095-matnr
AND werks = i_z095-werks
AND ( bwart = '701' OR bwart = '702' )
AND sobkz = i_z095-sobkz
ORDER BY mblnr DESCENDING.
ENDSELECT.
IF sy-subrc <> 0.
CLEAR: i_z095-erfmg, i_z095-erfme.
ELSE.
IF l_shkzg = 'H'.
i_z095-erfmg = i_z095-erfmg * '-1'.
ENDIF.
ENDIF.
ELSE.
Get variance quantity
SELECT mblnr shkzg erfmg erfme
INTO (l_mblnr, l_shkzg, i_z095-erfmg, i_z095-erfme)
FROM mseg UP TO 1 ROWS
WHERE matnr = i_z095-matnr
AND werks = i_z095-werks
AND ( bwart = '701' OR bwart = '702' )
AND sobkz = space
AND lgort = i_z095-lgort
ORDER BY mblnr DESCENDING.
ENDSELECT.
IF sy-subrc <> 0.
CLEAR: i_z095-erfmg, i_z095-erfme.
ELSE.
IF l_shkzg = 'H'.
i_z095-erfmg = i_z095-erfmg * '-1'.
ENDIF.
ENDIF.
ENDIF.
APPEND i_z095 TO gt_z095.
ENDLOOP.
ENDFORM. " retrieve_data
*&----
*
*& Form report_data
*&----
*
Prepare and output data
*----
*
--> p1 text
<-- p2 text
*----
*
FORM report_data.
ALV Grid will error in background ....
IF sy-batch <> 'X'.
PERFORM customise_alv_output.
CALL SCREEN 100.
EXIT.
... so display as ALV List instead
ELSE.
PERFORM background_report.
ENDIF.
ENDFORM. " report_data
*&----
*
*& Form CUSTOMISE_ALV_OUTPUT
*&----
*
This routine is used to customise the ALV grid headings and other
characteristics
*----
*
--> p1 text
<-- p2 text
*----
*
FORM customise_alv_output.
this function call is needed to obtain the field catalog
which we are going to customise
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = c_structure
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
CHANGING
ct_fieldcat = fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
modify entry of field catalog
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'LGORT'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 14.
wa_fieldcat-coltext = 'Storage Location'(006).
wa_fieldcat-scrtext_l = 'Storage Location'(006).
wa_fieldcat-reptext = 'Storage Location'(006).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'MATKL'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 12.
wa_fieldcat-coltext = 'Material Group'(007).
wa_fieldcat-scrtext_l = 'Material Group'(007).
wa_fieldcat-reptext = 'Material Group'(007).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'MTART'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 12.
wa_fieldcat-coltext = 'Material Type'(008).
wa_fieldcat-scrtext_l = 'Material Type'(008).
wa_fieldcat-reptext = 'Material Type'(008).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'DLINL'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 15.
wa_fieldcat-coltext = 'Date Last Counted'(009).
wa_fieldcat-scrtext_l = 'Date Last Counted'(009).
wa_fieldcat-reptext = 'Date Last Counted'(009).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'ABCIN'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 12.
wa_fieldcat-coltext = 'ABC Parameter'(010).
wa_fieldcat-scrtext_l = 'ABC Parameter'(010).
wa_fieldcat-reptext = 'ABC Parameter'(010).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'LVORM'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-outputlen = 14.
wa_fieldcat-coltext = 'Deletion indicator'(011).
wa_fieldcat-scrtext_l = 'Deletion indicator'(011).
wa_fieldcat-reptext = 'Deletion indicator'(011).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'ERFMG'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-coltext = 'Variance quantity'(017).
wa_fieldcat-scrtext_l = 'Variance quantity'(017).
wa_fieldcat-reptext = 'Variance quantity'(017).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'ERFME'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-coltext = 'Unit'(018).
wa_fieldcat-scrtext_l = 'Unit'(018).
wa_fieldcat-reptext = 'Unit'(018).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'LIFNR'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-coltext = 'Vendor'(019).
wa_fieldcat-scrtext_l = 'Vendor'(019).
wa_fieldcat-reptext = 'Vendor'(019).
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'LBDLL'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-no_out = 'X'.
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
READ TABLE fieldcat INTO wa_fieldcat
WITH KEY fieldname = 'KODLL'.
IF sy-subrc = 0.
g_index = sy-tabix.
wa_fieldcat-no_out = 'X'.
MODIFY fieldcat FROM wa_fieldcat INDEX g_index.
ENDIF.
set ALV title
g_title = 'Physical Inventory - Last count date report'(001).
customise the layout
PERFORM layout_init USING gs_layout.
ENDFORM. " CUSTOMISE_ALV_OUTPUT
*&----
*
*& Form LAYOUT_INIT
*&----
*
This routine sets default values for the layout of the ALV
examples are -: headings, selection mode etc
*----
*
-->P_GS_LAYOUT text
*----
*
FORM layout_init USING rs_layout TYPE lvc_s_layo.
rs_layout-sel_mode = 'D'.
rs_layout-grid_title = g_title.
ENDFORM. " LAYOUT_INIT
*&----
*
*& Form background_report
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM background_report .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_structure_name = c_structure
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_z095
EXCEPTIONS
program_error = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE e000(z1) WITH 'Error calling background report'(004).
ENDIF.
ENDFORM. " background_report
2007 Sep 13 11:01 AM
Hi
To check this report from my end it is not possible bcz u have declared an Z table which was of ur own. So i can only suggest u.
1st perform the debugging in both ECC 6 and 4.6 also and after that check in ECC 6.0 the date is in which format and in nw in 4.6 also check for the same if it is not at all fetching the date at 4.6 then check in the related table whether the date is present or not?? If it is not solved even though after debugging let me know
Regards
Pavan
2007 Sep 13 11:47 AM
Hi pavan
I am checking with different valus in both the systems.Each system has different plants.they don't have data nothing in common.
where do u want me to check the date format?i checked in the z tables of both systems.they r same.
Thanks.
2007 Sep 13 11:52 AM
Hi Dinesh
<b>
I am checking with different valus in both the systems.Each system has different plants.they don't have data nothing in common.</b>
By this statement i got a point that is the data in the table are same or not??
I mean if u r fetching the date from a table in ecc which is having a date and check for the same in4.6
Regards
Pavan
2007 Sep 13 12:12 PM
hi
ya i checked in the table with dates in 4.6 system with the plant no i m testing in the report.It has dates in the table but in the report output i couldn't get the dates.
2007 Sep 13 10:27 AM
Hi,
Please check the field whether it is having the data in the 4.6 if yes then debug the same before calling the ALV and try to validate the same
Regards
Shiva
2007 Sep 13 10:28 AM
2007 Sep 13 10:41 AM
HI,
<b>1. chk the lenght of the date field, make it to 10.
2. in the itab, while assigning the date, check whether it is get assigned.
3. if sy-datum is not formated, then
use this ..
data : date(10),
write sy-datum to date DD/MM/YYYY.</b>
Reply Back..
With Rgds,
S.BArani
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |