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.
ganesh
Hi 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
Similar Messages
-
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 -
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 -
Hi friends,
I am trying create a field catalog with FM for my internal table. I know I must use "Like" for my internal fields. But I have same field types in my internal. If I use like this. I cann't create field catalog with catalog merge ( I must use this FM for hide/show columns -my prev. message-)
What is your recommend to me for definiton of my internal table. How can create field catalog using REUSE_ALV_FIELDCATALOG_MERGE FM.
My internal table is :
Types : Begin Of TRapor,
Renk, "Satır Rengi
Bilesen_Kodu Like Mseg-Matnr, "Malzeme Numarası
Tanim Like Makt-Maktx, "Malzeme Kısa Metni
Batch Like Mseg-Charg, "Parti Numarası - Batch
Birim Like Mseg-Meins, "Temel ölçü birimi
Malzeme_Fire(12) Type P Decimals 2, "Teorik Malzeme Fire % si
Batch_Fire(12) Type P Decimals 2, "Teorik Batch Fire % si
OMiktar Like Mseg-Menge, "Önceki Dönem Miktar
OYuzde(12) Type P Decimals 2, "Önceki Dönem Yuzde
OTeorik Like Mseg-Menge, "Önceki Dönem Teorik
OSapma_Deger Like Mseg-Menge, "Önceki Dönem Sapma Değeri
OSapma_Oran(12) Type P Decimals 2, "Önceki Dönem Sapma Oranı
SMiktar Like Mseg-Menge, "Seçim Dönemi Miktar
SYuzde(16) Type P Decimals 2, "Seçim Dönemi Yüzde
STeorik Like Mseg-Menge, "Seçim Dönemi Teorik
SSapma_Deger Like Mseg-Menge, "Seçim Dönemi Sapma Değeri
SSapma_Oran(12) Type P Decimals 2, "Seçim Dönemi Sapma Oranı
Hareket Like Mseg-Bwart,
Isyeri Like Crhd-Arbpl,
End Of TRapor.
Data : IRapor Type Standard Table Of TRapor With Header Line.:((( It dowsn't work. What is wrong :((( I give NO_FIELDCATALOG_AVAILABLE error. When I debugging After processing merge FM my alvfc is empty (0x172)
Type-Pools : Slis.
Tables : Mseg, S226, Mara, Mkpf, Crhd, Plpo, Mkal.
Types : Begin Of TRapor,
Renk(4) Type C, "Satır Rengi
Bilesen_Kodu Like Mseg-Matnr, "Malzeme Numarası
Tanim Like Makt-Maktx, "Malzeme Kısa Metni
Batch Like Mseg-Charg, "Parti Numarası - Batch
Birim Like Mseg-Meins, "Temel ölçü birimi
Malzeme_Fire(12) Type P Decimals 2, "Teorik Malzeme Fire % si
Batch_Fire(12) Type P Decimals 2, "Teorik Batch Fire % si
OMiktar Like Mseg-Menge, "Önceki Dönem Miktar
OYuzde(12) Type P Decimals 2, "Önceki Dönem Yuzde
OTeorik Like Mseg-Menge, "Önceki Dönem Teorik
OSapma_Deger Like Mseg-Menge, "Önceki Dönem Sapma Değeri
OSapma_Oran(12) Type P Decimals 2, "Önceki Dönem Sapma Oranı
SMiktar Like Mseg-Menge, "Seçim Dönemi Miktar
SYuzde(16) Type P Decimals 2, "Seçim Dönemi Yüzde
STeorik Like Mseg-Menge, "Seçim Dönemi Teorik
SSapma_Deger Like Mseg-Menge, "Seçim Dönemi Sapma Değeri
SSapma_Oran(12) Type P Decimals 2, "Seçim Dönemi Sapma Oranı
Hareket Like Mseg-Bwart,
Isyeri Like Crhd-Arbpl,
End Of TRapor.
*Data : IRapor Type Table Of TRapor With Header Line.
Data : IRapor Type Standard Table Of TRapor With Header Line.
Data : ZRapor Type TRapor Occurs 0 With Header Line.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvwa TYPE slis_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ZRAPOR'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*---------------Display
LOOP AT alvfc INTO alvwa WHERE fieldname = 'BILESEN_KODU'.
alvwa-ddictxt = 'L'.
alvwa-seltext_l = 'Heading'.
alvwa-outputlen = 15.
MODIFY alvfc FROM alvwa.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid
i_callback_user_command = 'ITAB_USER_COMMAND'
TABLES
t_outtab = zrapor
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " Gecici
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT alvfc INTO alvwa.
IF alvwa-fieldname = 'BUTXT'.
if alvwa-no_out = 'X'.
alvwa-no_out = ''.
else.
alvwa-no_out = 'X'.
endif.
*alvwa-no_out = 'X'.
MODIFY alvfc FROM alvwa.
ENDIF.
ENDLOOP.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ZRAPOR'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*---------------Display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid
i_callback_user_command = 'ITAB_USER_COMMAND'
TABLES
t_outtab = zrapor
EXCEPTIONS
program_error = 1
OTHERS = 2.
*----------- IMPORTANT.
*----------- IMPORTANT.
whatrow-exit = 'X'.
ENDFORM. "itab_user_command -
Help me on field catalog in alv step by step,
Error while running alv field catalouge not found.
points will be awardedHi
Don't declare the internal table with Types which is used in the field catalog..
straight away declare with Occurs o with header line.
See this doc
ABAP List Viewer
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Reward points if useful
Regards
Anji -
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 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 -
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 -
PUSH BUTTON IN FIELD CATALOG - NEED HELP
Hi all,
I have a requirement wherein i need to have a push button in the first column of ALV GRID DISPLAY output to be able to select multiple rows. Now am using SELKZ field in field catalog, though it creats a first column, the push button is not available. Is there any field in FIELD CATALOG other than this field which will satisfy my requirement or any other possible way to achieve this functionality.
PERFORM alv_fieldcat USING :
't_output' 'SELKZ' ' ' ' ',
In form, i've written the following piece of code.
l_fieldcat-tabname = tabname.
l_fieldcat-fieldname = fieldname.
l_fieldcat-reptext_ddic = coltext.
l_fieldcat-hotspot = hotspot.
Any input in this regard will be valuable to me and highly appreciated.
Thanks in advance,
Vaishnavi Varadarajanhi here is an example ..
Button in alv grid cell using REUSE_ALV_GRID_DISPLAY
regards,
venkat. -
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 meHi,
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 -
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. -
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.
Maybe you are looking for
-
Excel ActiveX invoke nodes are broken
I am using LabVIEW 2007. We are using a VI that runs on most of the PC's in our facility however on some the "invoke node" related to Excel functions don't operate. They are broken and the VIs won't run. We get errors that the "Invoke Node: contain
-
Hi Friends, I am trying to run Quick Pay for an employee. I have put the dates and then saved it. Now when I click the Start Run button nothing happens. I click on the Override Payment method field and see this error "APP-PAY-07263: Choose a Quick Pa
-
How to pass the page item data from tabA to TabB of a discoverer report
I have a discoverer repoort, it is master_detail (Dept-Emp) report TabA is a master worksheet, which has a page item Deptno (the data is from a customized query) TabB is detail report which has a Deptno as the page item which show the emp detail info
-
How to show the output of Idoc variable on content server console
Hi, Where & How the IDOC Script functions or variable output i can see.. Mean to say.. I have written idoc script regarding work flow, where can i see the output before implementing to check whether my code is fine or what
-
Is it possible to do an source call-Routing (ANI) on an Cisco IOS Gateway ?
Hi, i´ve the following Problem. I want to route an Call from the PSTN over an IOS Gateway to another Gateway by using the Calling Number (ANI). The Called-Number is allways the same but the Calling Number is different. The IOS-Gateway should route th