Field catalog problem ,
HI ,
in CALL METHOD ob_grid1->set_table_for_first_display
method how we can delcare the fieldcatalog , manually i created field catalog how we can pass this to this method ,
i am getting NO_FIELDCATALOG_FOUND exception ,
pls tell me
Hi,
refer following code,
tables : zrecords.
data: gr_alv type ref to cl_gui_alv_grid,
gc_custom_control type scrfname value 'CRL',
gr_container type ref to cl_gui_custom_container,
fcat type lvc_t_fcat,
rrecords type table of zrecords.
SELECT-OPTIONS : name FOR zrecords-name.
start-of-selection.
select * from zrecords into table rrecords where name IN name.
call screen 300.
*& Module malv OUTPUT
text
module malv output.
perform display_alv.
endmodule. " malv OUTPUT
FORM display_alv *
form display_alv.
* if grid is empty ---------------------------------------------------------------------
if gr_alv is initial.
create a container
create object gr_container
exporting
container_name = gc_custom_control
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6
create grid object
create object gr_alv
exporting
i_parent = gr_container
exceptions
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5
perform field_cat changing fcat.
data : fcat1 like line of fcat.
clear fcat1.
fcat1-reptext = 'EMPLOYEE DETAILS'.
fcat1-fieldname = 'ID'.
fcat1-COLTEXT = 'ID'.
fcat1-col_pos = 1.
append fcat1 to fcat.
clear fcat1.
fcat1-fieldname = 'NAME'.
fcat1-COLTEXT = 'NAME'.
fcat1-col_pos = 2.
append fcat1 to fcat.
clear fcat1.
fcat1-fieldname = 'ADDRESS'.
fcat1-COLTEXT = 'ADDRESS'.
fcat1-col_pos = 3.
append fcat1 to fcat.
call method gr_alv->set_table_for_first_display
changing
it_outtab = rrecords[]
it_fieldcatalog = fcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4
call method gr_alv->refresh_table_display
exceptions
finished = 1
others = 2
endif.
endform. " form dispay_alv.
*& Module USER_COMMAND_0300 INPUT
text
module user_command_0300 input.
if sy-ucomm = 'EXIT'.
leave program.
endif.
endmodule. " USER_COMMAND_0300 INPUT
Reward pts if useful.
Regards,
Dhan
Similar Messages
-
Hi All
I am doing field catalog merge for a structure using the FM
'LVC_FIELDCATALOG_MERGE' . I am passing the structure to this FM.
Initially there were 14 fields in the structure. I added a new field
and activated the structure. But it still shows only 14 fields instead of 15.
Please Reply ASAP.
Thanks.
Praveena.Yes, go in debug mode.Keep a break point at K_KKB_FIELDCAT_MERGE.
This fm has following code. Keep a break point in second ALV_CHECK_BUFFER.
call function 'ALV_CHECK_BUFFER'
exporting
i_buffer_type = 'A'
i_buffer_active = i_buffer_active
i_bypassing_buffer = i_bypassing_buffer
i_refresh_buffer = ' '
importing
e_import = l_import
e_export = l_export
e_delete = l_delete.
call function 'ALV_CHECK_BUFFER'
exporting
i_buffer_type = 'B'
i_buffer_active = i_buffer_active
i_bypassing_buffer = i_bypassing_buffer
i_refresh_buffer = ' '
importing
e_import = l_import_b
e_export = l_export_b
e_delete = l_delete_b.
After the second ALV_CHECK_BUFFER executes, clear value of variable l_import_b. This will help you to see new added fields to your structure in report output. -
Problem with field catalog after upgrade from 4.0
Hi experts,
We have recently upgraded from CRM 4.0 to 5.2.
I am now experiencing a problem with generation of a transport request for field catalog in transaction CTFC_CRM. I can generate the field catalog without errors.
The problem is that when I want to create the transport request in our dev system a pop up appears saying "Create object directory entry". Here I have to enter a package for some of the fields in the field catalog. The special thing is that the fields are not custom fields but rather SAP standard fields (using standard data elements). For example field BZIRK.
These are SAP standard fields but they are not standard in the field catalog. In 4.0 I did not get this prompt but this has apparently changed from 5.0.
What do I do? I guess if I need to create the objects I will need to use an SAP standard package. But how do I know what package to use?
Any comments or suggestions will be highly appreciated.
Best regards,
AndersHi,
If you did just install database, then you use Embed PL/SQL Gateway.
See this guide
Upgrading Oracle Application Express in Oracle Database Express Edition
I think you have not run step 5 script apxldimg.sql
Regards,
Jari -
Problem in field catalog -help
hi,
i have problem while i try to pass my field catalog internal table to IT_FIELDCAT in REUSE_ALV_HIERSEQ_LIST_DISPLAY .
FORM FIELD_CATALOG .
CLEAR WA_FIELDC.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = WA_REPID
I_INTERNAL_TABNAME = 'IT_HEAD' "I_INTERNAL_TABNAME
I_STRUCTURE_NAME = 'VBAK' "I_STRUCTURE_NAME
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = WA_REPID "I_INCLNAME
I_BYPASSING_BUFFER = I_BYPASSING_BUFFER
I_BUFFER_ACTIVE = I_BUFFER_ACTIVE
CHANGING
CT_FIELDCAT = IT_FIELDC
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
DELETE IT_FIELDC WHERE FIELDNAME <> 'AUTLF' AND
FIELDNAME <> 'KUNNR' AND
FIELDNAME <> 'VSBED' AND
FIELDNAME <> 'LIFSK' AND
FIELDNAME <> 'AUGRU' AND
FIELDNAME <> 'VBELN' AND
FIELDNAME <> 'BSTKD' AND
FIELDNAME <> 'ZTERM' AND
FIELDNAME <> 'PRSDT' AND
FIELDNAME <> 'INCO1' AND
FIELDNAME <> 'INCO2' .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = WA_REPID
I_INTERNAL_TABNAME = 'IT_ITEM' "I_INTERNAL_TABNAME
I_STRUCTURE_NAME = 'VBAP' "I_STRUCTURE_NAME
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = WA_REPID "I_INCLNAME
I_BYPASSING_BUFFER = I_BYPASSING_BUFFER
I_BUFFER_ACTIVE = I_BUFFER_ACTIVE
CHANGING
CT_FIELDCAT = IT_FIELDC1
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
DELETE IT_FIELDC1 WHERE FIELDNAME <> 'POSNR' AND
FIELDNAME <> 'MATNR' AND
FIELDNAME <> ' WERKS' AND
FIELDNAME <> 'LPRIO' AND
FIELDNAME <> 'KWMENG' AND
FIELDNAME <> 'ABGRU' AND
FIELDNAME <> 'MAKTX' AND
FIELDNAME <> 'VDATU' AND
FIELDNAME <> 'PRSDT' AND
FIELDNAME <> 'VBELN' .
LOOP AT IT_FIELDC1 INTO WA_FIELDC.
APPEND WA_FIELDC TO IT_FIELDC. <----
ENDLOOP.
*want to pass IT_FIELDC to IT_FIELDCAT in REUSE_ALV_HIERSEQ_LIST_DISPLAY ,but getting dump error finally.
ganeshHi siva,
when u use APPEND both the workare structure and internal table structure should be same
use this
LOOP AT IT_FIELDC1 INTO WA_FIELDC.
move-corresponding WA_FIELDC TO IT_FIELDC.
append it_fieldc.
ENDLOOP.
Message was edited by:
chandrasekhar jagarlamudi -
Problem Modifying ALV Field Catalog
Hi,
One grid of my ALV report displays material numbers as 0100.2000. But when I use method FILE_SAVE_DIALOG to save ALV report to Excel, the material number changes to 100.2.
I have tried modifying my field catalog as shown at end of this message, but it doesn't change the output in Excel.
Does anyone have a fix for this problem? I will award points! - Beth
FORM build_fieldcatalog.
DATA: ls_fieldcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZBOM_ALV'
CHANGING
ct_fieldcat = gt_fieldcat.
LOOP AT gt_fieldcat INTO ls_fieldcat where fieldname eq 'COLUMN3'.
ls_fieldcat-DATATYPE = 'NUMC'.
ls_fieldcat-LZERO = 'X'.
ls_fieldcat-REF_TABLE = ''.
ls_fieldcat-DECIMALS_O = '4'.
ls_fieldcat-INTTYPE = 'N'.
ls_fieldcat-OUTPUTLEN = '20'.
MODIFY gt_fieldcat FROM ls_fieldcat.
ENDLOOP.
ENDFORM. " build_fieldcatalogHi,
If you want to save any data like 0100.2000 in the excel, you need to write it as Number with decimal places 4, so it will take 4 decimal places . coming to your ALV, you need to pass the same structure to the Excel i mean the passing variable should be lilke Number with 4 decimal places ..
Regards
Sudheer -
"Field Catalog not found" ...problem in ALV reporting !!
Hi,
When i execute my report program where in I generate a Selection screen, I am able to select the values in the selection screen. Once I click on the execute button I get the message
"Field Catalog not found"...
The elabore message is
"Field Catalog cannot be determined becaus the output table structure name was not specified"
Where am I wrong ??
Find below my code ...
*& Report Z_MIGO_TXJCD_REPORT
REPORT Z_MIGO_TXJCD_REPORT.
TYPE-POOLS: slis.
TABLES: makt,mseg,zmigo_extend,ttxj,mkpf.
DATA: BEGIN OF migo_data OCCURS 0,
matnr LIKE mseg-matnr,
werks LIKE mseg-werks,
lgpla LIKE mseg-lgpla,
bwart LIKE mseg-bwart,
menge LIKE mseg-menge,
dmbtr LIKE mseg-dmbtr,
budat LIKE mkpf-budat,
txjcd LIKE zmigo_extend-txjcd,
END OF migo_data.
DATA: it_cat TYPE slis_t_fieldcat_alv,
wa_lay TYPE slis_layout_alv.
FIELD-SYMBOLS: <fs_cat> LIKE LINE OF it_cat.
SELECT-OPTIONS: so_matnr FOR makt-matnr,
so_budat FOR mkpf-budat,
so_werks FOR mseg-werks,
so_lgpla FOR mseg-lgpla,
so_bwart FOR mseg-bwart,
so_txjcd FOR ttxj-txjcd.
START-OF-SELECTION.
SELECT amatnr awerks algpla abwart
amenge admbtr bbudat ctxjcd INTO TABLE
migo_data
FROM mseg AS a INNER JOIN mkpf AS b ON amblnr = bmblnr INNER JOIN
zmigo_extend AS c ON amblnr = cmblnr
WHERE a~matnr IN so_matnr
AND b~budat IN so_budat
AND a~werks IN so_werks
AND a~lgpla IN so_lgpla
AND a~bwart IN so_bwart
AND c~txjcd IN so_txjcd.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-cprog
i_internal_tabname = 'migo_data'
i_inclname = sy-cprog
CHANGING
ct_fieldcat = it_cat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
LOOP AT it_cat ASSIGNING <fs_cat>.
CLEAR <fs_cat>-key.
ENDLOOP.
wa_lay-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_grid_title = 'MIGO report with Tax Jurisdiction Code'
is_layout = wa_lay
it_fieldcat = it_cat
TABLES
t_outtab = migo_data
EXCEPTIONS
program_error = 1
OTHERS = 2.Give 'migo_data' in uppercase as ''MIGO_DATA'.
-
Problem in filling field catalog as table is dynamic
Hi All,
I have to populate the data using the below function module and i am passing dynamic internal table <f_list> in place of list.
i have to populate the field catalog fc_hier which is getting field by standard program but i have to add additional fields which are coming from dynamic internal table .
fc_hier-fieldname = l_fld_name.
fc_hier-tabname = <f_list>.
fc_hier-seltext_s = wa_char-name_char.
append fc_hier . >>>> but it is not allowing this fc_hier-tabname = <f_list> statement..*
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_interface_check = g_interface_check "n777869
i_callback_program = alv_repid
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = alv_layout
is_print = alv_pri
it_fieldcat = fc_hier[]
i_default = 'X'
i_save = 'A'
is_variant = alv_variant
it_events = gt_events[] "n777869
i_tabname_header = 'HEADER'
i_tabname_item = 'LIST'
is_keyinfo = alv_keyinfo
TABLES
t_outtab_header = header[]
t_outtab_item = <f_list>
t_outtab_item = list[]
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.
How can i assign table name to fc_hier-tabname as it is not taking <f_list> as input.
Thanks in advance......
Ankur>
ankur garg wrote:
> fc_hier-fieldname = l_fld_name.
> fc_hier-tabname = <f_list>.
> fc_hier-seltext_s = wa_char-name_char.
> append fc_hier . >>>> but it is not allowing this fc_hier-tabname = <f_list> statement..*
>
> How can i assign table name to fc_hier-tabname as it is not taking <f_list> as input.
TABNAME is the name of the table & not the body of the table (TYPE slis_tabname CHAR30). You have to pass the name of the table & not the table contents !!
Something like this :
fc_hier-fieldname = l_fld_name.
fc_hier-tabname = '<F_LIST>'.
fc_hier-seltext_s = wa_char-name_char.
append fc_hier.
Anyways personally if i have dynamic tables to be used in ALV i prefer SALV which doesn't need a fieldcat
BR,
Suhas -
Hi,
I am trying to create a condition table for inventory management. I require it at material group / movement type level. I added the fields ZZMATKL (type MATKL) and ZZBWART (type BWART) in the structure KOMPBZ2 (which is present in in the include of structure KOMPBME).
I also added the two above custom fields in table V_T161F. But when I try to create a condition table I dont find the above two fields in the field catalog.
Please help.
Am I using an incorrect structure?
Thanks!!
AroopHi Friend,
Looking at your code, I found that you have not the fieldcatalog at all.
You need to fill the fieldcatalog with all the fields you want to display in the alv.
Check the following links regarding field catalog:
http://abap-gallery.blogspot.com/2007/07/field-catalog-in-alv.html
Check this link for sample program:
http://www.****************/Tutorials/ALV/SampleALVGridProgram.htm
Hope this helps you.
Any queries, get back to me.
Regards,
Chandra Sekhar -
Problem filling Arch infostructure for COPA2_S001 - field catalog?
I'm not sure I'm posting this ti the correct forum, but I'll give it a try.
Archivingobject COPA2_S001 is used to archive Copa data (account based CoPa). As the profitability analysis archiving objects depend on the operating concern (generated by the customer), and must also be generated, no appropriate information structures or field catalogs can be delivered as standard with the Archive Information System (SAP AS). You must create these yourself.
This was set up by somenone in the pst, but the Infostructue (the table cretaed for it) stays empty.
The Infostructure is activated, the archiving process shows no errors and even the status info from the AIS shows only green lights!
My guess that the field catalog which was set up is not correct.
Can anyone give my some info how to be sure what the cause, how to solve it and how to fill the AIS without starting a new archiving run.
Thanks in advance!
GerSorry misread the message.
Kind regards,
Robert Loeffen
Message was edited by:
M. van Lieshout -
Field catalog in alv with classes(OOPS)
please refer the code below of field catalog prepared.
this code is for preparing field catalog using ALV and OOPS.In the below field catalog, do_sum is not working.it is going to dump.
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
ls_fcat-fieldname = 'VBELN1'.
ls_fcat-ref_field = 'VBELN'.
ls_fcat-ref_table = 'VBRK'.
ls_fcat-coltext = 'Invoice No'.
ls_fcat-seltext = 'Invoice No'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'DMBTR'.
ls_fcat-ref_field = 'DMBTR'.
ls_fcat-ref_table = 'BSAD'.
ls_fcat-coltext = 'Value of Invoice'.
ls_fcat-seltext = 'Value of Invoice'.
ls_fcat-do_sum = 'X'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR ls_fcat.
ENDFORM. "PREPARE_FIELD_CATALOG
I would apreciate u response.
regards,
veera.Hello Veeranjaneyulu
I prefer to use function module <b>LVC_FIELDCATALOG_MERGE</b> to build my fieldcatalogs.
If you need fields from different structure that is no problem. Simply call the function module for each structure and collect the result in the same itab (e.g. lt_fcat).
Finally, you delete all fields that you do not need.
If the order is important to you then re-order the fields:
LOOP AT lt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY lt_fcat from ls_fcat.
ENDLOOP.
Regards
Uwe -
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. -
Change field catalog in VT05 - Selective logs for collective run
Hi,
Through transaction VT05, we can check shipment log which having following ALV field Catalog.
Collective run
Date
Time
User
Transaction code
Operating mode
Problem class
Expiry date
Keep until expiry
Processing status
But if we want check Delivery number for particular Collective Run then we have to click that collective run and then can check for the Delivery number.
Actually our requirement is to add one more column in above ALV field Catalog of Delivery Number.
I have searched for Enhancements and BADIs, but I did not found suitable one for VT05 log.
Can any one help me out for above issue for adding one more column in above ALV field Catalog of Delivery Number (along with above mentioned ALV field catalog in output) of VT05 log report.Thanks Nabheet once again...
I would like to show you the coding what I have done in implemented implicit Enhancements.
Following code is written under implemented implicit Enhancements - ZSHIPMENT_DETAIL
Properties of Enhancement Implementation ZSHIPMENT_DETAIL (Active)
Enhancem. Technique: Source Code Plug-In
Description Showing SHIPMENT Detail in output
Package $TMP
Original Language EN
Created MNIKAM 02/09/2012
Last Changed MNIKAM 02/19/2012
Superordinate Enhancement Implementation ZSHIPMENT
Enhanced Development Object: V54X
SAPLV54X Static Enhancement Point/Section \PR:SAPLV54X\FO:LOG_HEADER_DISPLAY\SE:BEGIN\EI
ENHANCEMENT 1 ZSHIPMENT_DETAIL. "active version
TYPE-POOLS: szal.
DATA: g_l_header_extr TYPE header_extr.
FIELD-SYMBOLS: <f_g_l_header_extr> TYPE header_extr.
DATA: g_l_log_link TYPE log_link.
FIELD-SYMBOLS: <f_g_l_log_link> TYPE log_link.
DATA: g_l_t_lognumbers TYPE szal_lognumbers WITH HEADER LINE.
FIELD-SYMBOLS: <f_log_nr> TYPE log_nr.
data: messages TYPE TABLE OF balm.
FIELD-SYMBOLS: <f_l_s_message> TYPE balm.
DATA: l_tabix TYPE sy-tabix.
LOOP AT G_HEADER_EXTR_TAB ASSIGNING <f_g_l_header_extr> WHERE status ne 1.
CLEAR: l_tabix.
l_tabix = sy-tabix.
READ TABLE g_log_link_tab ASSIGNING <f_g_l_log_link>
WITH KEY fccnu = <f_g_l_header_extr>-fccnu
BINARY SEARCH.
READ TABLE <f_g_l_log_link>-log_tab ASSIGNING <f_log_nr> index 1.
CLEAR: g_l_t_lognumbers.
g_l_t_lognumbers-item = <f_log_nr>-log_nr.
APPEND g_l_t_lognumbers.
CLEAR: messages.
CALL FUNCTION 'APPL_LOG_READ_DB_WITH_LOGNO'
TABLES
lognumbers = g_l_t_lognumbers[]
messages = messages.
delete messages WHERE MSGNO ne 371 AND MSGNO ne 494 AND MSGNO ne 491.
LOOP AT messages ASSIGNING <f_l_s_message> WHERE LOGNUMBER = <f_log_nr>-log_nr
AND ( MSGTY = 'S' or MSGTY = 'W' ) "Message Type S-success & W-warning
AND MSGID = 'VW'
AND ( MSGNO = 371 or MSGNO = 494 or MSGNO = 491 ). "Message Numbr through which Shipment Number gets
<f_g_l_header_extr>-tknum = <f_l_S_message>-MSGV1. "SHIPMENT NUMBER
CLEAR: g_l_t_lognumbers[].
exit.
ENDLOOP.
ENDLOOP.
ENDENHANCEMENT.
Thanks again,
Mahesh Nikam. -
I have an internal table that needs to be displayed in ALV using abap objects. I have tried to use the sflight templates but I get error in i_structure and it_outtab , when I directly pass my internal table to them
What is the solutions to this problem.
If I am building a field catalog , then how to pass it to the screen
ThankyouHi
refer this program you will find all the things
reward if usefull
*& Report Z_ALV_OOPS
REPORT Z_ALV_OOPS.
*Event class Definition "Event handler class
class event_handle definition.
public section.
methods: handle_user
for event user_command of cl_gui_alv_grid
importing e_ucomm.
endclass.
*Event class Implementation
class event_handle implementation.
method handle_user.
write:/ ''.
endmethod.
endclass.
Data: t_alv type ref to cl_gui_alv_grid, "ALV control
t_cont type ref to cl_gui_custom_container, "Cust Container
t_alv2 type ref to cl_gui_alv_grid, "ALV control
t_cont2 type ref to cl_gui_custom_container, "Cust Container
t_fieldcat type lvc_t_fcat with header line, "Field Cat
t_fieldcat2 type lvc_t_fcat with header line, "Field Cat
t_layout type lvc_s_layo, "Layout
t_event type ref to event_handle, "Event handler
t_sort type LVC_T_SORT with header line, "Sort
t_toolbar type ui_functions with header line. "Toolbar xclude
Types: begin of g_vbak, "Header Table
vbeln like vbak-vbeln,
auart like vbak-auart,
vkorg like vbak-vkorg,
vtweg like vbak-vtweg,
spart like vbak-spart,
kunnr like vbak-kunnr,
bstnk like vbak-bstnk,
seltab,
end of g_vbak.
Types: begin of g_vbap, "Item Table
vbeln like vbap-vbeln,
posnr(6) type c,
* posrn like vbap-posnr,
matnr like vbap-matnr,
netwr like vbap-netwr,
waerk like vbap-waerk,
end of g_vbap.
Data: t_vbak type g_vbak occurs 0,
t_vbap type g_vbap occurs 0.
Start-Of-Selection.
*Fetch data from DB Table
select vbeln auart vkorg vtweg spart kunnr bstnk
from vbak into table t_vbak up to 20 rows.
End-Of-Selection.
*Call ALV screen
call screen 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ALV'.
SET TITLEBAR 'VBAK'.
if t_cont is initial.
create object t_cont
exporting
container_name = 'ALV'.
create object t_alv
exporting
i_parent = t_cont.
*Create event handlers
create object t_event.
set handler t_event->handle_user for t_alv.
perform build_fieldcatlog.
perform build_layout.
perform xclude_toolbar.
CALL METHOD t_alv->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
* I_STRUCTURE_NAME =
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
IS_LAYOUT = t_layout
* IS_PRINT =
* IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = t_toolbar[]
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = t_vbak[]
IT_FIELDCATALOG = t_fieldcat[]
* IT_SORT =
* IT_FILTER =
* EXCEPTIONS
* INVALID_PARAMETER_COMBINATION = 1
* PROGRAM_ERROR = 2
* TOO_MANY_LINES = 3
* others = 4
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
Data: lt_rows type lvc_t_row,
wa_rows type line of lvc_t_row,
wa_vbak type g_vbak,
l_lines type i.
refresh: t_vbap.
case sy-ucomm.
when 'DET'. "Item details
* Get selected rows from ALV
call method t_alv->get_selected_rows
importing
et_index_rows = lt_rows.
* Fetch corresponding Item details from VBAP
loop at lt_rows into wa_rows.
read table t_vbak into wa_vbak index wa_rows-index transporting
vbeln.
select vbeln posnr matnr netwr waerk from vbap
appending corresponding fields of table t_vbap
where vbeln = wa_vbak-vbeln.
endloop.
* Prepare fieldcatlog
* Display Item details in ALV
call screen 200 starting at 8 5.
when 'SHOW'. "Display order
call method t_alv->get_selected_rows
importing
et_index_rows = lt_rows.
Describe table lt_rows lines l_lines.
if l_lines > 1.
message e999(z_error).
else.
read table lt_rows into wa_rows index 1.
read table t_vbak into wa_vbak index wa_rows-index transporting
vbeln.
set parameter id 'AUN' field wa_vbak-vbeln.
call transaction 'VA03' and skip first screen.
endif.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form build_fieldcatlog
* text
form build_fieldcatlog .
clear t_fieldcat.
t_fieldcat-col_pos = '1'.
t_fieldcat-fieldname = 'VBELN'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'VBELN'.
append t_fieldcat.
t_fieldcat-col_pos = '2'.
t_fieldcat-fieldname = 'AUART'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'AUART'.
append t_fieldcat.
t_fieldcat-col_pos = '3'.
t_fieldcat-fieldname = 'VKORG'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'VKORG'.
append t_fieldcat.
t_fieldcat-col_pos = '4'.
t_fieldcat-fieldname = 'VTWEG'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'VTWEG'.
append t_fieldcat.
t_fieldcat-col_pos = '5'.
t_fieldcat-fieldname = 'SPART'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'SPART'.
append t_fieldcat.
t_fieldcat-col_pos = '6'.
t_fieldcat-fieldname = 'KUNNR'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'KUNNR'.
append t_fieldcat.
t_fieldcat-col_pos = '7'.
t_fieldcat-fieldname = 'BSTNK'.
t_fieldcat-ref_table = 'VBAK'.
t_fieldcat-ref_field = 'BSTNK'.
append t_fieldcat.
endform. " build_fieldcatlog
*& Module LEAVE INPUT
* text
module LEAVE input.
case sy-ucomm.
when 'BACK' or 'EXIT' or 'CANCEL'.
leave program.
endcase.
endmodule. " LEAVE INPUT
*& Form build_layout
* text
* --> p1 text
* <-- p2 text
form build_layout .
t_layout-zebra = 'X'.
t_layout-sel_mode = 'A'.
t_layout-grid_title = 'Header Details'.
endform. " build_layout
*& Form build_fcat_vbap
* text
form build_fcat_vbap .
clear t_fieldcat2.
t_fieldcat2-scrtext_m = 'Sales Doc'.
t_fieldcat2-col_pos = 1.
t_fieldcat2-fieldname = 'VBELN'.
t_fieldcat2-tabname = 'T_VBAP'.
t_fieldcat2-no_zero = 'X'.
t_fieldcat2-ref_table = 'VBAP'.
t_fieldcat2-ref_field = 'VBELN'.
append t_fieldcat2.
clear t_fieldcat2.
t_fieldcat2-col_pos = 2.
t_fieldcat2-scrtext_m = 'Item'.
t_fieldcat2-fieldname = 'POSNR'.
t_fieldcat2-tabname = 'T_VBAP'.
t_fieldcat2-intlen = '6'.
t_fieldcat2-inttype = 'C'.
t_fieldcat2-no_zero = 'X'.
* t_fieldcat2-ref_table = 'VBAP'.
* t_fieldcat2-ref_field = 'POSNR'.
append t_fieldcat2.
clear t_fieldcat2.
t_fieldcat2-col_pos = 3.
t_fieldcat2-fieldname = 'MATNR'.
t_fieldcat2-ref_table = 'VBAP'.
t_fieldcat2-ref_field = 'MATNR'.
append t_fieldcat2.
clear t_fieldcat2.
t_fieldcat2-col_pos = 4.
t_fieldcat2-fieldname = 'NETWR'.
t_fieldcat2-ref_table = 'VBAP'.
t_fieldcat2-ref_field = 'NETWR'.
t_fieldcat2-do_sum = 'X'.
append t_fieldcat2.
clear t_fieldcat2.
t_fieldcat2-col_pos = 5.
t_fieldcat2-fieldname = 'WAERK'.
t_fieldcat2-ref_table = 'VBAP'.
t_fieldcat2-ref_field = 'WAERK'.
append t_fieldcat2.
endform. " build_fcat_vbap
*& Module STATUS_0200 OUTPUT
* text
module STATUS_0200 output.
SET PF-STATUS 'ITEM1'.
SET TITLEBAR 'VBAP'.
perform build_fcat_vbap.
perform sort_alv2.
if t_cont2 is initial.
create object t_cont2
exporting
container_name = 'ITEM'.
create object t_alv2
exporting
i_parent = t_cont2.
t_layout-grid_title = 'Item Details'.
CALL METHOD t_alv2->set_table_for_first_display
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
* I_STRUCTURE_NAME =
* IS_VARIANT =
* I_SAVE =
* I_DEFAULT = 'X'
IS_LAYOUT = t_layout
* IS_PRINT =
* IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = t_toolbar[]
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
* IR_SALV_ADAPTER =
CHANGING
it_outtab = t_vbap[]
IT_FIELDCATALOG = t_fieldcat2[]
IT_SORT = t_sort[]
* IT_FILTER =
* EXCEPTIONS
* INVALID_PARAMETER_COMBINATION = 1
* PROGRAM_ERROR = 2
* TOO_MANY_LINES = 3
* others = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
else.
CALL METHOD t_alv2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
* EXCEPTIONS
* FINISHED = 1
* others = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
endmodule. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
* text
module USER_COMMAND_0200 input.
case sy-ucomm.
when 'GOBACK'.
leave to screen 0.
endcase.
endmodule. " USER_COMMAND_0200 INPUT
*& Form sort_alv2
* text
* --> p1 text
* <-- p2 text
form sort_alv2 .
clear t_sort.
t_sort-spos = '1'.
t_sort-fieldname = 'VBELN'.
t_sort-up = 'X'.
t_sort-subtot = 'X'.
append t_sort.
endform. " sort_alv2
*& Form xclude_toolbar
* text
* --> p1 text
* <-- p2 text
form xclude_toolbar .
t_toolbar = '&DETAIL'.
append t_toolbar.
t_toolbar = '&&SEP00'.
append t_toolbar.
t_toolbar = '&&SEP01'.
append t_toolbar.
t_toolbar = '&&SEP02'.
append t_toolbar.
t_toolbar = '&SORT_ASC'.
append t_toolbar.
t_toolbar = '&SORT_DSC'.
append t_toolbar.
t_toolbar = '&FIND'.
append t_toolbar.
t_toolbar = '&MB_FILTER'.
append t_toolbar.
t_toolbar = '&&SEP04'.
append t_toolbar.
t_toolbar = '&MB_SUM'.
append t_toolbar.
t_toolbar = '&MB_SUB_TOTAL'.
append t_toolbar.
t_toolbar = '&PRINT_BACK'.
append t_toolbar.
t_toolbar = '&MB_VIEW'.
append t_toolbar.
t_toolbar = '&MB_EXPORT'.
append t_toolbar.
t_toolbar = '&GRAPH'.
append t_toolbar.
t_toolbar = '&COLO'.
append t_toolbar.
t_toolbar = '&&SEP06'.
append t_toolbar.
t_toolbar = '&&SEP07'.
append t_toolbar.
t_toolbar = '&INFO'.
append t_toolbar.
t_toolbar = '&&SEP03'.
append t_toolbar.
endform. " xclude_toolbar -
Field in Field Catalog Not Showing
Hi,
I have added one field in the copied function module 'zzFI_DOCUMENT_LIST_DISPLAY'.
The field 'Cost center description' is there in the field catalog as well as the internal table.
But it does not show up in the alv columns on output.
Requesting your help.
Varun>
Abhilash.Kuttan wrote:
> Hi Varun,
>
> Can you provide the field catalog options(code) you have provided for this field and also the parameters you have passed for
> 'REUSE_ALV_LIST_DISPLAY'
>
> Regards,
> Abhilash
Declaration of xbseg
DATA: BEGIN OF XBSEG OCCURS 0.
INCLUDE STRUCTURE BSEG.
DATA: KONTO LIKE RFPSD-KONTO,
FAEDT LIKE RFPSD-FAEDT,
KTEXT LIKE RFPSD-KTEXT,
KTEXT_GL LIKE RFPSD-KTEXT_GL,
ASSET_TXT LIKE ANLA-TXT50, "Note 0435578,
GL_LTXT LIKE SKAT-TXT50, "Note 0446719
SAKAN LIKE SKA1-SAKAN,
WAERS LIKE BKPF-WAERS,
HWAER LIKE BKPF-HWAER,
HWAE2 LIKE BKPF-HWAE2,
HWAE3 LIKE BKPF-HWAE3,
* akash *
LTEXT TYPE CSKT-LTEXT,
*end*
projk_ext TYPE PROJK_EXT, "Note 575107
COLOR(3),
COLFW TYPE SLIS_T_SPECIALCOL_ALV,
END OF XBSEG.
*Field Catalog*
fieldcat_wa-fieldname = 'LTEXT'.
fieldcat_wa-tabname = 'XBSEG'.
fieldcat_wa-ref_fieldname = 'LTEXT'.
fieldcat_wa-ref_tabname = 'CSKT'.
APPEND fieldcat_wa TO fieldcat.
ALV Call
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_buffer_active = c_x "ALRK241034
i_callback_program = 'SAPLZZF064'
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'HANDLE_USER_COMMAND'
I_STRUCTURE_NAME = 'BSEG'
is_layout = layout
it_fieldcat = fieldcat
i_default = 'X'
i_save = 'A' "Note 319936
i_save = l_save "Note 319936
is_variant = variant
is_print = gs_print
it_events = events
it_event_exit = it_event_exit
TABLES
t_outtab = xbseg
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.
This is my code. I don't understand whats the problem. Request Help. -
After add a field catalog,how can I post the field value to IPC??
Hi,experts,I've created a field catalog "ZPRD_CHANGED"(I ZPRD_CHANGED D D ZCHG_FLAG(CHAR1))in IMG pricing,and also assigned the value to it
in method "ITEM_COMMUNICATION_STRUCTURE" in mplementation "ZCRM_COND_COM_BADI" of BADI "CRM_COND_COM_BADI".
LIke this:
DATA: lr_obj type ref to ZL_BT115IT__ITEMS_CN00.
create object lr_obj.
CS_ACS_I_COM-ZPRD_CHANGED = lr_obj->zprd_chg_flg.
After that,in the java codings of user exit in IPC,I add below codings:
public BigDecimal overwriteConditionValue(
IPricingItemUserExit pricingItem,
IPricingConditionUserExit pricingCondition)
String prodchanged = pricingItem.getAttributeValue("ZPRD_CHANGED");
But it seems that it doesn't work,variable "productchanged" can not get the value posted from method "ITEM_COMMUNICATION_STRUCTURE" in mplementation "ZCRM_COND_COM_BADI".
What's the problem?Can anybody suggest??
Thanks in advance.
Jerry.Hi Jerry,
did you register the attribute in the customizing for the user exits? Transaction /SAPCND/UEASS. You need to register the attribute on Implementations and Formula level.
Best Regards,
Michael
P.S. Guess you are already aware of the userexit guide attached to note 809820.
Maybe you are looking for
-
Activated iphone on one computer and now cant use on another
I was in Michigan for a couple of months and that is where I bought my iPhone in July. I activated it on my friend's computer up there and now my home computer in Georgia will not even recognize my iPhone when I connect it. I have tried erasing all d
-
Failed to clean up BI delta queue before applying enhp1
Experts: Happy Holiday! During applying enhp1 on BI7.0, we get the error that BW delta queue was not clean up before starting enhp1: 1) I remember I did do the clean up per the guide, why it complains? Should I do it in certain way? 2) how to fix it
-
Strange Situation-Windows on BC
Ok here it is, I installed windows on my Mac through bootcamp about 3 months ago. Since then my harddrive died and I have also upgraded to leopard. I bought fusion because I did not want to go back to bootcamp but now my window's install key says tha
-
Hi experts, OIM 9.1.0.2 I have the following situation (Development environment): I did a resource's request for 3 users (they have different managers). I have defined approval workflow for the resource, where the first step is assigned to Request Ta
-
How do I send photos to craigslist ads.
I am trying to add photos from my mac to craigslist. How do I go about this?