ALV Display Error
I am using FM <b>REUSE_ALV_GRID_DISPLAY</b>. When I execute my report, in the output screen, I get question marks - <b>??????????????</b> in the top menu instead of the menu name.
I believe this has something to do with the system since the same code has worked for me before.
Please advise.
Message was edited by: Sam
Hi
The Problem would be that some part of the stanrard GUIs or progream related to the standard display screen would not be activated properly.
Just go to
System -> status and then double click on the GUI
Once the GUI program is opened Reactive the Program and all its sub components by opening the object browser for it.
Now come back to your Program and Execute it now. I had a same problem with Menu bar and my problem was solved by doing this.
Hopefully it does solve yours
Regards
Santosh
Similar Messages
-
ALV Display - Error in field catalog
Hi ,
I am facing a problem in ALV... Field catalot is not getting populated... I am getting a message field catalog not found...
Can anyone please help me....... <URGENT DOES NOT EXIST HERE>...
I am enclosing my code also.. please go thourh it and help it....
REPORT ZINVENTORY
LINE-SIZE 120
LINE-COUNT 64.
MESSAGE-ID Z2
NO STANDARD PAGE HEADING..
type-pools : slis.
Tables *
tables: zasset,
anla,
itob,
equi.
data: v_repid LIKE sy-repid.
Selection Screen *
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS : S_bukrs FOR anla-bukrs OBLIGATORY ,
S_kostl FOR itob-kostl .
SELECTION-SCREEN : END OF BLOCK B1 .
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS: p_screen RADIOBUTTON GROUP gr1,
p_list RADIOBUTTON GROUP gr1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.
Internal Tables *
types: BEGIN OF ty_zasset, " occurs 0,
equnr like zasset-equnr,
ANLN1 LIKE zasset-ANLN1, " Asset number
ANLN2 LIKE zasset-ANLN2, " Sub Asset number
BUKRS LIKE zasset-BUKRS, " Company Code
KOSTL like zasset-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset.
DATA: wa_zasset TYPE ty_zasset.
DATA: it_zasset TYPE TABLE OF ty_zasset with header line..
types: BEGIN OF ty_zasset1, " occurs 0,
equnr TYPE equi-equnr,
ANLN1 LIKE anla-ANLN1, " Asset number
ANLN2 LIKE anla-ANLN2, " Sub Asset number
BUKRS LIKE anla-BUKRS, " Company Code
ernam like anla-ernam,
erdat like anla-erdat,
KOSTL like anlz-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset1.
DATA: wa_zasset1 TYPE ty_zasset1.
DATA: it_zasset1 TYPE TABLE OF ty_zasset1 with header line..
types: BEGIN OF ty_zasset2, " occurs 0,
equnr like itob-equnr,
ANLNr LIKE itob-ANLNr, " Asset number
ANLuN LIKE itob-ANLuN, " Sub Asset number
BUKRS LIKE itob-BUKRS, " Company Code
timbi like itob-timbi,
kostl like itob-kostl,
KOSTL like anlz-kostl,
SCANNEDBY type zasset-scannedby,
SCANNINGDATE type zasset-SCANNINGDATE,
SCANNINGTIME type zasset-scanningtime,
UPDATEDATE type zasset-updatedate,
UPDATETIME type zasset-updatetime,
END OF ty_zasset2.
DATA: wa_zasset2 TYPE ty_zasset2.
DATA: it_zasset2 TYPE TABLE OF ty_zasset2 with header line..
types: begin of ty_final , "occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of ty_final.
DATA: wa_final TYPE ty_final.
DATA: it_final TYPE TABLE OF ty_final with header line..
*DATA: it_zasset TYPE TABLE OF ty_zasset.
*data: it_zasset1 type table of ty_zasset1.
*data:wa_zasset type ty_zasset.
*data:wa_zasset1 type ty_zasset1.
Flags and Variables *
DATA : F_ERROR. " Flag for No Data
*pop field cat for f7
data: V_SYREPID LIKE SY-REPID,
IT_FLDCAT type slis_t_fieldcat_alv , "with header line,
wa_fldcat type slis_fieldcat_alv.
*DATA : IT_FLDCATS TYPE SLIS_T_FIELDCAT_ALV.
data: itab_events type slis_t_event,
wa_events type slis_alv_event.
*data: wa_layout type slis_layout_alv.
DATA : IT_COMMENTS TYPE SLIS_T_LISTHEADER,
WA_COMMENTS TYPE SLIS_LISTHEADER.
DATA : IT_SORTINFO TYPE SLIS_T_SORTINFO_ALV,
WA_SORTINFO TYPE SLIS_SORTINFO_ALV.
Initialization *
initialization.
SY-REPID = V_REPID.
At Selection Screen *
AT SELECTION-SCREEN.
PERFORM validation.
Start Of Selection *
start-of-selection.
perform select_data.
IF P_LIST = 'X'.
perform get_field_catalog.
PERFORM MODIFYFIELDCAT.
perform get_events.
perform write_comments.
perform grid_display.
*perform list_display.
ENDIF.
IF sy-subrc = 0.
IF p_list = 'X'.
loop at it_final.
perform get_events.
endloop.
endif.
endloop.
else.
*endif.
End Of Selection *
END-OF-SELECTION.
*perform display_Recorsds.
*loop at zasset.
*& Form validation
text
--> p1 text
<-- p2 text
FORM validation.
*Local variables.
DATA:
lv_bukrs type anla-bukrs,
lv_kostl type itob-kostl,
lv_anln1 TYPE anla-anln1, "MAterial Number
lv_anln2 TYPE anla-anln2.
*Validation for company code
if not s_bukrs is initial.
select single bukrs from anla
into lv_bukrs
where bukrs in s_bukrs.
if sy-subrc <> 0.
*Message used : Invalid company code.
endif.
endif .
Validation for cost center
if not s_kostl is initial.
select single kostl from itob
into lv_kostl
where kostl in s_kostl.
if sy-subrc <> 0.
*Message used : Invalid company code.
endif.
endif .
ENDFORM. " validation
*& Form display
text
--> p1 text
<-- p2 text
FORM display.
write :/15 it_final-anln1,
it_final-anln2,
sy-vline.
*-bukrs,
it_zasset-anln1.
ENDFORM. " display
*& Form get_field_catalog
text
--> p1 text
<-- p2 text
FORM get_field_catalog.
*REFRESH IT_FLDCAT.
*CLEAR IT_FLDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = V_REPID
I_INTERNAL_TABNAME = 'IT_FINAL'
I_INCLNAME = V_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = IT_FLDCAT
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.
ENDFORM. " get_field_catalog
*& Form get_events
text
--> p1 text
<-- p2 text
FORM get_events.
WA_COMMENTS-TYP = 'H'.
WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
APPEND WA_COMMENTS TO IT_COMMENTS.
ENDFORM. " get_events
*& Form grid_display
text
--> p1 text
<-- p2 text
FORM grid_display.
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 = 'FIRST PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = 'LIST OF FLIGHT DETAILS'
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = it_fldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = itab_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 = it_final
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. " grid_display
*& Form write_comments
text
--> p1 text
<-- p2 text
FORM write_comments.
WA_COMMENTS-TYP = 'H'.
WA_COMMENTS-KEY = 'THIS IS THE HEADING.'.
WA_COMMENTS-INFO = 'LIST OF SALES ORDERS'.
APPEND WA_COMMENTS TO IT_COMMENTS.
ENDFORM. " write_comments
*& Form select_data
text
--> p1 text
<-- p2 text
FORM select_data.
clear: it_zasset, it_zasset[].
select equnr "bukrs
anln1
anln2
bukrs
KOSTL
SCANNEDBY
SCANNINGDATE
SCANNINGTIME
UPDATEDATE
UPDATETIME
into table it_zasset "(g_anln1,g_anln2)
from zasset
where bukrs = zasset-bukrs..
and kostl = zasset-kostl.
if sy-subrc = 0.
sort it_zasset by anln1 anln2.
endif.
append it_zasset.
clear it_zasset1.
select
equnr
anln1
anln2
bukrs
ernam
erdat
bukrs
KOSTL
SCANNEDBY
SCANNINGDATE
SCANNINGTIME
UPDATEDATE
UPDATETIME
into table it_zasset1 "(g_anln1,g_anln2)
from anla
where bukrs = it_zasset-bukrs.
WHERE BUKRS IN S_BUKRS.
and kostl = anla-kostl.
if sy-subrc = 0.
select equnr
anlnr
anlun
bukrs
timbi
kostl
into table it_zasset2
from itob
for all entries in it_zasset1
where bukrs = it_zasset1-bukrs
WHERE anlnr = it_zasset1-anln1.
endif.
APPEND IT_ZASSET1.
IF SY-SUBRC = 0.
*loop at it_zasset1 into wa_zasset1.
loop at it_ZASSET1 into wa_zasset1.
move wa_zasset1-bukrs to wa_final-bukrs.
move wa_zasset1-anln1 to wa_final-anln1.
move wa_zasset1-anln2 to wa_final-anln2.
append wa_final to it_final.
endloop.
ENDIF.
sort it_final.
*LOOP AT IT_FINAL.
*ENDLOOP.
*ENDIF.
*if sy-subrc = 0.
*loop at it_zasset into wa_asset.
*read table it_zasset into wa_asset with key anln2 = wa_asset-anln2
*binary search.
*read table it_final into wa_final with key anln2 = wa_final-anln2
*binary search.
*if wa_asset-anln2 = wa_final-anln2.
*write : / 'error'.
*endif.
If sy-subrc <> 0.
f_error = 'X'.
write : 'No data Exists for the given selection in FA table'.
else.
loop at it_final.
perform display.
endloop.
records exits in anla table also.
endif.
ENDFORM. " select_data
*& Form MODIFYFIELDCAT
text
--> p1 text
<-- p2 text
FORM MODIFYFIELDCAT.
LOOP AT IT_FLDCAT INTO WA_FLDCAT.
CASE WA_FLDCAT-FIELDNAME.
WHEN 'EQUNR'.
WA_FLDCAT-COL_POS = 1.
WA_FLDCAT-SELTEXT_L = 'aSSET'.
WHEN 'ANLN1'.
wa_FLDCAT-KEY = 'X'.
WA_FLDCAT-COL_POS = 5.
WA_FLDCAT-SELTEXT_L = 'aSSET'.
WHEN 'ANLN2'.
WA_FLDCAT-KEY = 'X'.
WA_FLDCAT-COL_POS = 6.
wa_FLDCAT-HOTSPOT = 'X'.
WHEN 'BUKRS'.
WA_FLDCAT-CURRENCY = 'INR'.
WA_FLDCAT-SYMBOL = 'X'.
ENDCASE.
MODIFY IT_FLDCAT FROM WA_FLDCAT.
*IT_FLDCAT-fieldname = 'EQUNR'.
IT_FLDCAT-seltext_m = 'DOCUM_TYPE'.
IT_FLDCAT-col_pos = 1.
IT_FLDCAT-outputlen = 10.
IT_FLDCAT-emphasize = 'X'.
IT_FLDCAT-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append IT_FLDCAT TO IT_FLDCAT.
IT_FLDCAT-fieldname = 'ANLN1'.
IT_FLDCAT-seltext_m = 'DOCUM_TYPE'.
IT_FLDCAT-col_pos = 1.
IT_FLDCAT-outputlen = 10.
IT_FLDCAT-emphasize = 'X'.
IT_FLDCAT-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append IT_FLDCAT TO IT_FLDCAT.
ENDLOOP.
ENDFORM. " MODIFYFIELDCAT
*& Form list_display
text
--> p1 text
<-- p2 text
*FORM list_display.
*CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_SYREPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'FRM_USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT = wa_layout
IT_FIELDCAT = IT_FLDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = ITAB_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 = IT_FINAL
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. " list_display
Edited by: Craig Cmehil on Jul 18, 2008 10:01 AMThe problem is with this...
types: begin of ty_final , "occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of ty_final.
DATA: wa_final TYPE ty_final.
DATA: it_final TYPE TABLE OF ty_final with header line.
when you are using Fieldcatalog merge you have to avoid using the TYPES Declaration of the internal table.
Instead of that you can do this
data: begin of it_final occurs 0,
equnr like itob-equnr,
anln1 like anla-anln1,
anln2 like anla-anln2,
bukrs like anla-bukrs,
ernam
erdat
kostl like itob-kostl,
end of it_final. -
Editable alv: add custom validation and display "errors" in protocol list
Hi,
What I want to do:
PAI validation of editable alv with displaying error's in the protocol list by adding custom entries to the existing protocol object.
What is my problem:
After registering "data_changed event", the protocol list don't appear.
My understanding is, that the object "er_data_changed" is passed by the event "data_changed"
an so I thought I can add some more entries to the protocol list.
After "de-registering" the "data_changed" event, the protocol appears with the standard errros messages (e.g. "input to numeric" by enter charachters)
One more hint:
By creating a new object "er_data_changed" in the handler method the protocol list works, but I would like to append entries to the object that was passed with the event.
Probably I've misunderstand something, please help !
My coding:
PAI:
trigger event "data_changed" -> calls handler method
CALL METHOD r_myalv->check_changed_data
IMPORTING
e_valid = is_valid.
stop processing
IF is_valid NE 'X'.
MESSAGE 'invalid input' TYPE 'E' .
ENDIF.
handler method:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING e_ucomm
er_data_changed.
METHOD handle_data_changed.
data: ls_mod_cell type lvc_s_modi.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'SU'
i_msgty = 'E'
i_msgno = '000'
i_msgv1 = 'This is a test !'
i_fieldname = ls_mod_cell-fieldname.
er_data_changed->refresh_protocol( ).
er_data_changed->DISPLAY_PROTOCOL( ).
ENDMETHOD. "handle_data_changedDear Olaf,
If understood correctly, you want to Edit an ALV and do some data validations when some data is changed in an ALV. To do this follow the following steps:
1. Before displaying ALV, Register the edit event.
* Set cell modified to trigger data_changed
CALL METHOD go_alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
2. Register the event DATA_CHANGED of class CL_GUI_ALV_GRID & handle the event.
SET HANDLER lo_event_receiver->handle_data_changed FOR go_alv_grid.
The event DATA_CHANGED of class CL_GUI_ALV_GRID has a parameter ER_DATA_CHANGED which is of type CL_ALV_CHANGED_DATA_PROTOCOL.
This er_data_changed has internal table MT_MOD_CELLS(contains index of records changed ) & MP_MOD_ROWS(contains the changed row), using these update your internal table accordingly.
DATA : wa_mod_cell TYPE lvc_s_modi.
FIELD-SYMBOLS: <fs> TYPE table.
LOOP AT er_data_changed->mt_mod_cells INTO wa_mod_cell.
ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
READ TABLE <fs> INTO wa_output INDEX wa_mod_cell-tabix.
MODIFY lt_output FROM wa_output INDEX wa_mod_cell-row_id.
ENDLOOP.
3. Here it self you can do the required data validations(No need of any PAI modules) as below.
IF wa_orders-zfstfirmtyp = c_9.
MESSAGE s288(zcsp).
DELETE er_data_changed->mt_mod_cells.
EXIT.
ENDIF.
Regards
Kesava -
F4 for Editable field in ALV, display Name but capture ID
Hi Friends,
I have a ALV for which i have defined a Structure, which is passed to Fieldcatlog.
I have defined a Search help - ZUSER_NAME which has following fields to display.
USERID - USR02-BNAME
FNAME
LNAME
FULLNAME
So my structure for fieldcatalog has User-id which is linked to this search help with Domain XUBNAME.
So in my report i made this User-Id as editable and F4 available, everything is working fine.
when user does a F4, its displaying Userid,Fname,Lname and complete name.upon selection and save i am capturing the id and storing in the ztable.
But now i have a requirement that when user selects a value from this search help on F4, i need to display Fullname but capture the User Id. How can i do that?
This is something similar to the one we have in BSP- key-value pair.
how to do this in ALV.
Appreciate if someone can guide me thru.
Thanks,
Simha
Edited by: Simha on Sep 6, 2008 2:24 PMhai , this is example code for editing the F4 display .. check out this
REPORT zalv_editf4display.
*Type pools for alv
TYPE-POOLS : slis.
*structure for t582a tbale
TYPES : BEGIN OF ty_table,
infty TYPE infty,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_table.
*Structure for infotype text
TYPES : BEGIN OF ty_itext,
infty TYPE infty,
itext TYPE intxt,
sprsl TYPE sprsl,
END OF ty_itext.
*Structure for output display
TYPES : BEGIN OF ty_output,
infty TYPE infty,
itext TYPE intxt,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_output.
*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.
*Data declarations for dropdown lists for f4
DATA: it_dropdown TYPE lvc_t_drop,
ty_dropdown TYPE lvc_s_drop,
*data declaration for refreshing of alv
stable TYPE lvc_s_stbl.
*Global variable declaration
DATA: gstring TYPE c.
*Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout
*ok code declaration
DATA:
ok_code TYPE ui_func.
*initialization event
INITIALIZATION.
*start of selection event
START-OF-SELECTION.
*select the infotypes maintained
SELECT infty
pnnnn
zrmkz
zeitb
dname
davo
davoe
FROM t582a UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE it_table.
*Select the infotype texts
IF it_table[] IS NOT INITIAL.
SELECT itext
infty
sprsl
FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE infty = it_table-infty
AND sprsl = 'E'.
ENDIF.
*Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table.
wa_output-infty = wa_table-infty.
wa_output-pnnnn = wa_table-pnnnn.
wa_output-zrmkz = wa_table-zrmkz.
wa_output-zeitb = wa_table-zeitb.
wa_output-dname = wa_table-dname.
wa_output-davo = wa_table-davo.
wa_output-davoe = wa_table-davoe.
For texts
READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
wa_output-itext = wa_ittext-itext.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
Calling the ALV screen with custom container
CALL SCREEN 0600.
*On this statement double click it takes you to the screen painter SE51.
*Enter the attributes
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen ,
Here we can give a title and customized menus
*create 2 buttons with function code 'SAVE' and 'EXIT'.
GIVE A SUITABLE TITLE
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module PBO OUTPUT
text
MODULE pbo OUTPUT.
*Creating objects of the container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CCONT'.
create object for alv grid
create object c_alvgd
exporting
i_parent = c_ccont.
SET field for ALV
PERFORM alv_build_fieldcat.
Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " PBO OUTPUT
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
*subroutine to build fieldcat
FORM alv_build_fieldcat.
DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'INFTY'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'Infotype'.
lv_fldcat-icon = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PNNNN'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Structure'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'ITEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '5'.
lv_fldcat-fieldname = 'ZRMKZ'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 1.
lv_fldcat-scrtext_m = 'PERIOD'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '6'.
lv_fldcat-fieldname = 'ZEITB'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 5.
lv_fldcat-scrtext_m = 'Time constraint'.
lv_fldcat-edit = 'X'.
*To avail the existing F4 help these are to
*be given in the field catalogue
lv_fldcat-f4availabl = 'X'.
lv_fldcat-ref_table = 'T582A'.
lv_fldcat-ref_field = 'ZEITB'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '7'.
lv_fldcat-fieldname = 'DNAME'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Dialogmodule'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '8'.
lv_fldcat-fieldname = 'DAVO'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Start'.
lv_fldcat-edit = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '9'.
lv_fldcat-fieldname = 'DAVOE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'End'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
*To create drop down for the field 'DAVO'
with our own f4 help
ty_dropdown-handle = '1'.
ty_dropdown-value = ' '.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '1'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '2'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '3'.
APPEND ty_dropdown TO it_dropdown.
CALL METHOD c_alvgd->set_drop_down_table
EXPORTING
it_drop_down = it_dropdown.
LOOP AT it_fcat INTO lv_fldcat.
CASE lv_fldcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'DAVO'.
lv_fldcat-drdn_hndl = '1'.
lv_fldcat-outputlen = 15.
MODIFY it_fcat FROM lv_fldcat.
ENDCASE.
ENDLOOP.
ENDFORM. " alv_build_fieldcat
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
*Subroutine for setting alv layout
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.
ENDFORM. " alv_report_layout
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module PAI INPUT
text
MODULE pai INPUT.
*To change the existing values and refresh the grid
*And only values in the dropdown or in the default
*F4 can be given , else no action takes place for the dropdown
*and error is thrown for the default F4 help and font changes to red
*and on still saving, value is not changed
c_alvgd->check_changed_data( ).
*Based on the user input
*When user clicks 'SAVE;
CASE ok_code.
WHEN 'SAVE'.
*A pop up is called to confirm the saving of changed data
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
IMPORTING
answer = gstring
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*When the User clicks 'YES'
IF ( gstring = '1' ).
MESSAGE 'Saved' TYPE 'S'.
*Now the changed data is stored in the it_pbo internal table
it_pbo = it_output.
*Subroutine to display the ALV with changed data.
PERFORM redisplay.
ELSE.
*When user clicks NO or Cancel
MESSAGE 'Not Saved' TYPE 'S'.
ENDIF.
**When the user clicks the 'EXIT; he is out
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
CLEAR: ok_code.
ENDMODULE. " PAI INPUT
*& Form REDISPLAY
text
--> p1 text
<-- p2 text
FORM redisplay .
*Cells of the alv are made non editable after entering OK to save
CALL METHOD c_alvgd->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
*Row and column of the alv are refreshed after changing values
stable-row = 'X'.
stable-col = 'X'.
*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
CALL METHOD c_alvgd->refresh_table_display
EXPORTING
is_stable = stable
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " REDISPLAY -
A way to display error messages from the program
Dear all,
I am looking forward to display a set of error messages(in a internal table) during the execution of the program to the user.
I wanted to know the better way of displaying error messages from my program with more options.
Well I tried out using displaying errors as ALV list/Grid or as simple list processing.
But I found some stanadard transactions (Like in MM and FI where errors are shown in a better way, but failed to find out how they are done.
Please guide me.
Thanks in advance
AryanTry to use application logging it has a very good way to display a set of messages.
[http://abap4.tripod.com/Using_Application_Logging.html|http://abap4.tripod.com/Using_Application_Logging.html]
Run this report in se38 an example sap report to understand logging way to show a set of messages
Report Name : SBAL_DEMO_01
Edited by: Vighneswaran CE on Dec 19, 2010 3:01 PM
Edited by: Vighneswaran CE on Dec 19, 2010 3:11 PM -
Download to excel from alv display
Hi,
How to download to excel from alv display.I am using object oriented abap for using alv.If i click export->spreadsheet i am getting fatal error and if i export->local file->spreadsheet i am getting only the column names and heading but no contents.Can anyone tell me how to overcome this problem.
Regards,
Sowmya.Hi Sowmya,
Just put break point near FM reuse_alv_grid_display and check if internal table which is used to display output is popullated or not.
Regards Sachin. -
hi gurus,
In my report program i have a monthly report displaying the data for that month.
1. Now in my ALV grid i want The SUB-TOTALS for the work center wise data for a field of the alv. there are many workcenters data in my report. So after the end of each work center , i want the subtotal of a calculated TAT field.
2. At the end of the report, I want the average TAT(field calculated by my report program) for that month.
So how can i make the coding for the above.
Iam a fresher to this field, so give me in detail.
regards,
chaitanyaHi
i am giving a sample example for subtotals of alv.
REPORT z_alv_subtotal.
*& 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 width
ENDFORM. " 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. -
OO ALV displaying without Values despite Internal table contains
My below OO ALV displaying without Values despite Internal table contains the values ...
Help please ...
REPORT zsd_concession1 NO STANDARD PAGE HEADING
LINE-SIZE 285
LINE-COUNT 64
MESSAGE-ID zz.
Program Description ******************************
This report is to Calculate consession against Quotations
complying standards for enhanced Performance, Readability &
Maintenance.
Change Log *********************************
Remedy # / Who When Why / What
Transport #
CLASS lcl_event_handler DEFINITION DEFERRED.
*& Data Definitions .
DATA: BEGIN OF vbap_wa,
vbeln TYPE vbak-vbeln, "Quotation#
erdat TYPE vbak-erdat, "Quot date
knumv TYPE vbak-knumv, "Cond Rec#
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF vbap_wa,
BEGIN OF konv_wa,
knumv TYPE konv-knumv, "Cond#
kposn TYPE konv-kposn, "Cond Item#
kappl TYPE konv-kappl, "Applic
kschl TYPE konv-kschl, "Cond Typ
kbetr TYPE konv-kbetr, "Price ZBP1,ZNAA,ZNAX
END OF konv_wa,
BEGIN OF vbpa_wa,
vbeln TYPE vbpa-vbeln, "Quot#
posnr TYPE vbpa-posnr, "Item#
parvw TYPE vbpa-parvw, "Prt Fn
kunnr TYPE vbpa-kunnr, "Cust#
END OF vbpa_wa,
BEGIN OF result_wa,
posnr TYPE vbap-posnr, "Line Item
matnr TYPE vbap-matnr, "Mat#
zansicat TYPE zmarall-zansicat, "AnsiCat#
zansigrd TYPE zmarall-zansigrd, "Grade
zcurrvaltnarea TYPE zco002-zcurrvaltnarea,"Val Area
zcurrcstusd TYPE zco002-zcurrcstusd, "Cost$
zzbrndnm TYPE mara-zzbrndnm, "Brand
zqedscgrp TYPE zglbprc-zqedscgrp, "QE Disc Grp
mstav TYPE mara-mstav, "Status
kwmeng TYPE vbap-kwmeng, "Qty
lprc TYPE konv-kbetr, "List Price ZBP1
sprc TYPE konv-kbetr, "Std Pric ZNAA,ZNAX
netpr TYPE vbap-netpr, "Quot price
mrgn TYPE konv-kbetr, "margin%
END OF result_wa.
DATA: ikonv LIKE STANDARD TABLE OF konv_wa,
ivbap LIKE STANDARD TABLE OF vbap_wa,
ivbpa LIKE STANDARD TABLE OF vbpa_wa,
iresult LIKE STANDARD TABLE OF result_wa.
*Work storage
DATA: BEGIN OF ws,
vbeln TYPE vbak-vbeln,
ok_code TYPE sy-ucomm,
alv_save TYPE c, "ALV save
alv_variant TYPE disvariant, "ALV Variant
alv_sort TYPE lvc_t_sort, "Sort table
END OF ws.
*Data declarations for ALV Main list
DATA : ty_lay1 TYPE lvc_s_layo,
it_fieldcat TYPE lvc_t_fcat ,
ty_fieldcat TYPE lvc_s_fcat ,
l_smenu TYPE REF TO cl_ctmenu,
c_alv1 TYPE REF TO cl_gui_alv_grid,
c_cont1 TYPE REF TO cl_gui_custom_container,
e_dclick TYPE REF TO lcl_event_handler.
*Data declarations for ALV Interactive list
DATA : ty_lay2 TYPE lvc_s_layo,
it_fcat TYPE lvc_t_fcat ,
ty_fcat TYPE lvc_s_fcat ,
c_alv2 TYPE REF TO cl_gui_alv_grid,
c_cont2 TYPE REF TO cl_gui_custom_container.
*Field-Symbols
FIELD-SYMBOLS:
<konv> LIKE konv_wa,
<vbap> LIKE vbap_wa.
*Constants
CONSTANTS:
c_end_row TYPE i VALUE 65000.
*CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row.
ENDCLASS. "lcl_event_handler DEFINITION
*CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_handler IMPLEMENTATION.
METHOD handle_double_click.
DATA: sec_wa LIKE LINE OF iresult.
*Reading the selected data into a variable
READ TABLE iresult INDEX e_row-index INTO sec_wa.
*Select the field details of the selected table
SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
WHERE tabname EQ ls_dd02l-tabname.
*Calling the ALV containing the field values
CALL SCREEN 101.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_event_handler IMPLEMENTATION
*& SELECTION-SCREEN.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS:
s_vbeln FOR ws-vbeln DEFAULT '2002354788' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
INITIALIZATION.
PERFORM setup_screen_defaults.
START-OF-SELECTION.
PERFORM gather_report_data.
END-OF-SELECTION.
PERFORM create_output.
*& Form initialization
FORM setup_screen_defaults.
CLEAR: ws, konv_wa, vbap_wa, vbpa_wa.
REFRESH: ivbpa, ikonv, ivbap, iresult.
ENDFORM. " setup_screen_defaults
*& Form gather_report_data
FORM gather_report_data.
SELECT vbeln posnr parvw kunnr
INTO TABLE ivbpa
FROM vbpa
WHERE vbeln IN s_vbeln
AND ( parvw = 'SP' OR "SoldTO
parvw = 'WE' OR "ShipTo
parvw = 'ZT' ). "Top Parent
SELECT vkvbeln vkerdat vkknumv vpposnr vp~matnr
z1zansicat z1zansigrd z2~zcurrvaltnarea
z2zcurrcstusd m1zzbrndnm zg~zqedscgrp
m1mstav vpkwmeng vp~netpr
INTO CORRESPONDING FIELDS OF TABLE ivbap
FROM vbak AS vk
INNER JOIN vbap AS vp
ON vpvbeln = vkvbeln
INNER JOIN zmarall AS z1
ON z1matnr = vpmatnr
INNER JOIN zco002 AS z2
ON z2matnr = vpmatnr
INNER JOIN zglbprc AS zg
ON zgmatnr = vpmatnr
INNER JOIN mara AS m1
ON m1matnr = vpmatnr
WHERE vk~vbeln IN s_vbeln
AND vk~auart = 'AG'."AG = Quot
SORT ivbap BY posnr matnr.
SELECT kvknumv kvkposn kvkappl kvkschl kv~kbetr
INTO TABLE ikonv
FROM konv AS kv
FOR ALL ENTRIES IN ivbap
WHERE kv~knumv = ivbap-knumv
AND kv~kposn = ivbap-posnr
AND kv~kappl EQ 'V'
AND ( kv~kschl EQ 'ZBP1'
OR kv~kschl EQ 'ZNAX'
OR kv~kschl EQ 'ZNAA' ).
SORT ikonv BY knumv kposn.
LOOP AT ivbap ASSIGNING <vbap>.
CLEAR konv_wa.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZBP1'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-lprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAX'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
READ TABLE ikonv INTO konv_wa WITH KEY
knumv = <vbap>-knumv
kposn = <vbap>-posnr
kschl = 'ZNAA'
BINARY SEARCH.
IF sy-subrc EQ 0.
<vbap>-sprc = konv_wa-kbetr.
ENDIF.
ENDLOOP.
SORT ivbap BY posnr matnr.
LOOP AT ivbap INTO vbap_wa.
MOVE-CORRESPONDING vbap_wa TO result_wa.
APPEND result_wa TO iresult.
CLEAR: vbap_wa, result_wa.
ENDLOOP.
ENDFORM. " gather_report_data
*& Form create_output
FORM create_output.
CALL SCREEN 100.
FREE: iresult.
ENDFORM. " create_output
*& Module PBO_0100 OUTPUT
text
MODULE pbo_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
IF c_cont1 IS INITIAL.
*Creating object of container
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CCONT1'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Creating object of alv
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Alv layout
PERFORM alv_100_layout.
PERFORM save_alv_layout.
*Alv field catalogue
PERFORM alv_100_fieldcat.
*Displaying the ALV grid
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
is_layout = ty_lay1
i_save = ws-alv_save
is_variant = ws-alv_variant
CHANGING
it_outtab = iresult[]
it_sort = ws-alv_sort
it_fieldcatalog = it_fieldcat[].
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Create object of the event class
*and setting handler for double click
CREATE OBJECT e_dclick.
SET HANDLER e_dclick->handle_double_click FOR c_alv1.
ENDIF.
ENDMODULE. " PBO_0100 OUTPUT
*& Module PAI_0100 INPUT
text
MODULE pai_0100 INPUT.
ws-ok_code = sy-ucomm.
CASE ws-ok_code.
WHEN 'BACK'.
CALL SELECTION-SCREEN 1000.
CLEAR ws-ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
CLEAR ws-ok_code.
EXIT.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " PAI_0100 INPUT
*& Form alv_100_layout
text
--> p1 text
<-- p2 text
FORM alv_100_layout.
ty_lay1-numc_total = 'X'. " Numc total line
ty_lay1-cwidth_opt = 'X'. " Optimal column width
ty_lay1-detailinit = 'X'. " Show values that are initial in
ty_lay1-sel_mode = 'A'. " Column selection mode
ty_lay1-no_merging = 'X'. " No merging while sorting columns
ty_lay1-keyhot = 'X'.
ty_lay1-grid_title = 'SD Concessions'.
ty_lay1-zebra = 'X'.
ty_lay1-no_toolbar = ' '.
ENDFORM. " alv_100_layout
*& Form alv_100_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_100_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 6.
ty_fieldcat-fieldname = 'zcurrcstusd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Cost $'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 7.
ty_fieldcat-fieldname = 'zzbrndnm'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Brand'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 8.
ty_fieldcat-fieldname = 'zqedscgrp'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'QE'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'mstav'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Status'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 9.
ty_fieldcat-fieldname = 'kwmeng'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Qty'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 10.
ty_fieldcat-fieldname = 'lprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'List Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 11.
ty_fieldcat-fieldname = 'sprc'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Discount'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 12.
ty_fieldcat-fieldname = 'netpr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Quot Price'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 13.
ty_fieldcat-fieldname = 'mrgn'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Margin%'.
ty_fieldcat-outputlen = 15.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_100_fieldcat
*& Module PBO_0101 OUTPUT
text
MODULE pbo_0101 OUTPUT.
*Check if the Custom container exists.
IF c_cont2 IS INITIAL.
*Creating container object
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CCONT2'.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*creating ALV grid for interactive list
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ALV layout
PERFORM alv_101_layout.
*ALV fieldcatalogue
PERFORM alv_101_fieldcat.
*Sorting the output by field position
SORT iresult BY posnr.
*ALV for display field details
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
is_layout = ty_lay2
CHANGING
it_outtab = iresult[]
it_fieldcatalog = it_fieldcat.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " PBO_0101 OUTPUT
*& Module PAI_0101 INPUT
text
MODULE pai_0101 INPUT.
ENDMODULE. " PAI_0101 INPUT
*& Form alv_101_layout
text
--> p1 text
<-- p2 text
FORM alv_101_layout.
ty_lay2-grid_title = 'Line Details'.
ty_lay2-zebra = 'X'.
ty_lay2-no_toolbar = 'X'.
ENDFORM. " alv_101_layout
*& Form alv_101_fieldcat
text
--> p1 text
<-- p2 text
FORM alv_101_fieldcat.
REFRESH it_fieldcat.
REFRESH it_fcat.
CLEAR ty_fcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 1.
ty_fieldcat-fieldname = 'posnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Item#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 2.
ty_fieldcat-fieldname = 'matnr'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Mat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 3.
ty_fieldcat-fieldname = 'zansicat'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'AnsiCat#'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 4.
ty_fieldcat-fieldname = 'zansigrd'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Grade'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
CLEAR ty_fieldcat.
ty_fieldcat-row_pos = 1.
ty_fieldcat-col_pos = 5.
ty_fieldcat-fieldname = 'zcurrvaltnarea'.
ty_fieldcat-tabname = 'iresult'.
ty_fieldcat-coltext = 'Val Area'.
ty_fieldcat-outputlen = 10.
APPEND ty_fieldcat TO it_fieldcat.
ENDFORM. " alv_101_fieldcat
*& Form save_alv_layout
text
--> p1 text
<-- p2 text
form save_alv_layout.
ws-alv_save = 'A'.
ws-alv_variant-report = sy-repid.
endform. " save_alv_layoutHello
Creating fieldcatalogs manually is one of the major error sources in ALV programming.
There is hardly any reason why NOT to use the standard-fm LVC_FIELDCATALOG_MERGE in order to create a proper fieldcatalog.
If you need some modification of the standard fieldcatalog (e.g. renaming of columns, etc.) just do your post-processing after calling the fm.
Regards
Uwe -
Incorrect date is being saved in excelsheet downloaded from ALV display
Hi ,
When I use export to spreadsheet option in ALV display (function REUSE_ALV_DISPLAY ) then Delivery date 10.02.2011 is being saved as 402213(some number not date format) .
Can you please suggest , what 's wrong in the report.
Thanks in Advance.Hi,
Just check your fieldcatalog.If all the fields are in right order and all.
Genearlly excel download issues occur because of errors in Field Catalog. -
Hi Guys,
I am getting a Page can not be displayed error while uploading a COntract Document in SAP-E-soucing 7.0.
Maximum Size set in Our SYSTEM is :9765MB.
Approx size of the Document tried is more then 300MB.
Appreciate your help on this.
Regards
TarunHi Tarun,
Please check the below system properties using system user login
attachments.maxSizeKB.buyers - "Maximum size in KB of a employer-attached attachment file"
attachments.upload.enable.buyers- " Enable/Disable uploading of attachments by internal users"
Also Please check with other attachment, contracts related properties in the System.
Let me know if this helps.
Thanks,
Raj. -
Display error message in batch job log
Hello
I have a batch job running and I have an error coming during some validation logic.
The problem is I need to continue the batch job when this error message comes and it should not cancel the batch job as it is doing currently but display that error message in batch job log, there are more similar error messages coming in job log and job gets finished, but when my error message comes job gets cancelled.
I cannot give it as info message as it will give wrong idea about message type.
Is there any FM by which we can add message in job log?Sanjeev I have done that but problem is I do not want to give that as Information message but Error message only and continue processing.
If you see in screenshot 3rd message is given by me as information and you can see error messages also 6th and 7th and job continued till it is finished
Basically I want that 'I' to be displayed as 'E'.
Display error message in batch job log -
Hi,
Windows 7 or Windows Server 2008 R2 domain join displays error "Changing the Primary Domain DNS name of this computer to "" failed...."
DC:windows Server 2008 R2
Domain functional level:Windows Server 2003
When Winxp join domain, have no this error message.
I checked http://support.microsoft.com/kb/2018583?wa=wsignin1.0 does't work.
There have 3 suggestion in this article:
1.The "Disable NetBIOS over TCP/IP" checkbox has been disabled in the IPv4 properties of the computer being joined.
Doesnt's work.
2.Connectivity over UDP port 137 is blocked between client and the helper DC servicing the join operation in the target domain.
On my DC, I run netstat -an, reslut as below:
UDP 192.168.20.3:137 *:*
3.The TCP/IPv4 protocol has been disabled so that the client being joined or the DC in the destination domain targeted by the LDAP BIND is running TCP/IPv6 only.
We are not using IPV6.
This server recently updated from Windows Server 2003 to Windows Server 2008 R2. Before upgrade, when Win7 and Win2008 join this domain, also have the same error message.
Please help to check this issue.
Thank you very much.
BR
Guo YingHuiHi Guo Ying,
I have faced this critical error which makes over-writes the host names in the domain when you join.
For example: Already you had a host name called as PC.domain.com in the domain.com Domain.
When you try to add the another host name called as PC in the domain.com Domain, it doesn't give you the duplicate name error on the network it does over-write the existing host name called as PC.domain.com & it will add the new host name into the domain.
Host name which got over-written will get removed from the domain. I faced this issue in my project. My DPM host name got removed from the Domain & new host name got joined into the domain which halted my backups for one day.
Final Resolution is as follows:
You need to start the dns console on the DC & drop down the domain name.
Select the _msdcs when you click on _msdcs it will show the Name Server's list on the right hand side.
You need to add the Domain Naming Master under the _msdcs or add all the domain controllers which you had.
After you add the Name server's try joining the PC OR Laptop to the domain which is successfully joins it.
Regards
Anand S
Thanks & Regards Anand Sunka MCSA+CCNA+MCTS -
In ALV display model ,how to accept the ENTER key event?
Dear All,
I have used ALV by GRID DISPLAY model ,not class model.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'T_ITAB'
is_layout = gs_layout
it_fieldcat = t_fieldcat[]
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = t_itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
For example :
IN ALV DISPLAY, there are two fields, one is MATNR, the other is MAKTX.
When user input the material value in MATNR field and press ENTER, then ALV can run my code to select the MAKTX into MAKTX field and display it synchronization.
Now I have realized update edit in ALV,but I found only I double click ALV row, then the MAKTX can update.
Please give me help,
Thanks
SunThis is the document written by me on Interactive ALV.. hope this maybe helpful for u..
When an Interactive Report is needed in Classical Display, we go for AT LINE-SELECTION. But when the same is needed in ALV Display, this method won't work. Instead, we need to use other way which is explained below:
We use REUSE_ALV_GRID_DISPLAY for ALV Display. Now, normally we call that FM in the following way:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'PROGRAM_NAME'
it_fieldcat = tb_fieldcat
TABLES
t_outtab = tb_output.
When it is needed to get an Interactive ALV, call the same FM in the following manner:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST75599_1'
it_fieldcat = tb_fieldcat
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = tb_output.
Now, in the report, create a subroutine with the name USER_COMMAND as follows:
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'. " &IC1 - SAP standard code for double-clicking
Based on the requirement, write the logic *
ENDCASE.
ENDFORM.
No need to call the subroutine as PERFORM user_command. This will be takane care by REUSE_ALV_GRID_DISPLAY. We need to just write the subroutine in the report. That suffices.
Some more useful points for Interactive ALV:
1. If Hotspot is needed, then that should be done by declaring hotspot (one field in slis_t_fieldcat_alv) as 'X' in tb_fieldcat which is of type slis_t_fieldcat_alv. When hotspot is active, single click will be enough or else you should double click on the output data.
2. In Classical Display, when it is needed to read the record on which we double clicked, we do that in following way:
AT LINE-SELECTION.
GET CURSOR LINE wf_line. " wf_line gives the line number on which it has been clicked
READ LINE wf_line OF CURRENT PAGE.
But this won't work for ALV. Instead, the following logic can be used:
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'. " &IC1 - SAP standard code for double-clicking
READ TABLE tb_output INTO wa_output INDEX p_selfield-tabindex.
IF sy-subrc EQ 0.
Based on the requirement, write the logic *
ENDIF.
ENDCASE.
ENDFORM. -
Hi all.
we are phasing a problem.
I am using alv to display in output.
I am using a Quantiti field (BDMNG),.
in this field if nodata is there then it is showing 0.000(that is the default value).
I don't want those zeros.I want only space(blank only).
Can any body help me to solve this issue.
Thanks in advance
Eswar.Hai,
While building field catalog For quantity field Set the NO-ZERO attribute to 'X'.
Or you can change the quantity filed to character in the alv display.
Mark points if helpful.
Regards,
Umasankar -
"XML page cannot be displayed" error
Using XML output on a table with more than a few rows falls over with a "XML page cannot be displayed" error. Sometimes only the error is displayed, sometimes some rows are displayed with this error at the end of the page (eg the DEMO_STATES table)
Can anyone advise if there is some sort of limiter at work here?
Thanks,
Barryi'm pretty sure that error comes up when your browser (ie, specifically, i believe) can't render the xml data it's received. i'm also pretty sure, as the full message implies, it's because it doesn't know what style sheet to use when you go to that page. in short, it's a browser config issue. one way to bypass it (to at least prove that it's a browser issue) would be to create a link to your page, right click the link, and do a "Save Target As...". the resulting file will be your valid XML one. fwiw, i've had better luck controlling the manner in which my xml data is received when i use mozilla or netscape (but i'd imagine there's just some setting you'd toggle in IE to avoid your issue).
hope this helps,
raj
Maybe you are looking for
-
where can I buy a new 3.5" SATA HDD with the extra thermal sensor port for my late 2009 imac?
-
If I buy a new iphone, can I still use the old one like an ipod with my iMac and download music, videos and apps?
-
I have an iTOUCH that my wife plays Word with friends on, but now she wants to use the iPAD for the same game. How do I delete the user name that the iTOUCH uses so I can create the same user name on the iPAD? Thanks
-
I received a reply from 99jon on this issue yesterday, and do not know how to reply to his response, so I am starting a new discussion. I purchased Elements 12 as a boxed upgrade to 11. I installed it on my PC, followed all the instructions to set i
-
Weird stuff going on! FCPro 4.5 HD 1.8 ghz PC G5 1gb ddr sd ram OSX 10.3.9 Little odd things are starting to happen. When I set an in and out point on the timeline and try to export as a QT movie, it begins the process and then gives an "operation no