2008 Sep 22 7:24 PM
Hi all,
I am facing a problem while building the ALV output.
I have a internal table.This internal table is filled with data coming from 3 tables.
I have used function modules REUSE_ALV_FIELDCATALOG_MERGE and REUSE_ALV_FIELDCATALOG_MERGE.
While I am executing this I am getting dump.
The dump is NO_FIELDCATALOG_AVAILABLE.
How to rectify this.
Thanks in Advance,
Sudheer.
2008 Sep 23 4:30 AM
hi,
you just need to make field catalog manually, it will definnately solve ur problem:
how to make field catalog manually:
*&---------------------------------------------------------------------*
*& Form build_catalogue
*&---------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
FORM build_catalogue .
*-- Filling catalogue with
PERFORM fill_catalogue USING :
* Column O/P field Ref Table Ref field Length Desc
01 'WERKS' '' '' 04 'DC'(026),
02 'KUNNR' 'KNA1' 'KUNNR' 10 'Account'(027),
03 'NAME1' 'KNA1' 'NAME1' 10 'Acct Name'(003),
04 'ORT01' 'KNA1' 'ORT01' 10 'City'(004),
05 'REGIO' 'KNA1' 'REGIO' 03 'ST'(005),
06 'BAHNS' 'KNA1' 'BAHNS' 10 'DEA'(006),
07 'FKDATPF2' '' '' 08 'INV DT'(007),
08 'VBELNPF2' '' '' 10 'INV'(008),
09 'POSNRPF2' '' '' 06 'Item'(028),
10 'FKIMGPF2' '' '' 10 'Qty'(009),
11 'NETPR' '' '' 10 'Billed ea'(010),
12 'NETWR' '' '' 10 'Billed Total'(011),
13 'NEW_PRICE' '' '' 9 'Correct ea'(012),
14 'TOT_DIFF' '' '' 10 'Total Diff'(013),
15 'VBELNPC3' '' '' 10 'CR INVC'(014),
16 'FKDATPC3' '' '' 08 'CR INVC DT'(015),
17 'NEW_PRICE1' '' '' 9 'Correct Total'(029),
18 'NETWRPC3' '' '' 10 'Credit Amt'(016),
19 'VBELNPD3' '' '' 10 'Rebill#'(017),
20 'NETWRPD3' '' '' 10 'Rebill Amt'(018),
21 'MATNR' '' '' 18 'Econo'(019),
22 'MAKTX' '' '' 10 'SellDescription',
23 'EAN11' '' '' 18 'NDC#'(021),
24 'LNAME' 'LFA1' 'NAME1' 10 'Vendor'(022),
25 'BSTNK' '' '' 10 'PO'(023),
26 'ERNAM' '' '' 12 'User'(030),
27 'PR_COR_RSN_CD' '' '' 2 'Reason Code'(031),
28 'YY_CALL_ID' '' '' 10 'SFO Call Id'(032),
29 'KONZS' '' '' 10 'Chain Id'(033).this will make a structure and to fill that structure use any method like ALV GRID DISPLAY OR ALV LIST DISPLAY
HOPE IT WILL HELP YOU
RAHUL
Edited by: RAHUL SHARMA on Sep 23, 2008 5:30 AM
hi,
you just need to make field catalog manually, it will definnately solve ur problem:
how to make field catalog manually:
*&---------------------------------------------------------------------*
*& Form build_catalogue
*&---------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
FORM build_catalogue .
*-- Filling catalogue with
PERFORM fill_catalogue USING :
* Column O/P field Ref Table Ref field Length Desc
01 'WERKS' '' '' 04 'DC'(026),
02 'KUNNR' 'KNA1' 'KUNNR' 10 'Account'(027),
03 'NAME1' 'KNA1' 'NAME1' 10 'Acct Name'(003),
04 'ORT01' 'KNA1' 'ORT01' 10 'City'(004),
05 'REGIO' 'KNA1' 'REGIO' 03 'ST'(005),
06 'BAHNS' 'KNA1' 'BAHNS' 10 'DEA'(006),
07 'FKDATPF2' '' '' 08 'INV DT'(007),
08 'VBELNPF2' '' '' 10 'INV'(008),
09 'POSNRPF2' '' '' 06 'Item'(028),
10 'FKIMGPF2' '' '' 10 'Qty'(009),
11 'NETPR' '' '' 10 'Billed ea'(010),
12 'NETWR' '' '' 10 'Billed Total'(011),
13 'NEW_PRICE' '' '' 9 'Correct ea'(012),
14 'TOT_DIFF' '' '' 10 'Total Diff'(013),
15 'VBELNPC3' '' '' 10 'CR INVC'(014),
16 'FKDATPC3' '' '' 08 'CR INVC DT'(015),
17 'NEW_PRICE1' '' '' 9 'Correct Total'(029),
18 'NETWRPC3' '' '' 10 'Credit Amt'(016),
19 'VBELNPD3' '' '' 10 'Rebill#'(017),
20 'NETWRPD3' '' '' 10 'Rebill Amt'(018),
21 'MATNR' '' '' 18 'Econo'(019),
22 'MAKTX' '' '' 10 'SellDescription',
23 'EAN11' '' '' 18 'NDC#'(021),
24 'LNAME' 'LFA1' 'NAME1' 10 'Vendor'(022),
25 'BSTNK' '' '' 10 'PO'(023),
26 'ERNAM' '' '' 12 'User'(030),
27 'PR_COR_RSN_CD' '' '' 2 'Reason Code'(031),
28 'YY_CALL_ID' '' '' 10 'SFO Call Id'(032),
29 'KONZS' '' '' 10 'Chain Id'(033).this will make a structure and to fill that structure use any method like ALV GRID DISPLAY OR ALV LIST DISPLAY
HOPE IT WILL HELP YOU
RAHUL
Edited by: RAHUL SHARMA on Sep 23, 2008 5:30 AM
2008 Sep 22 7:31 PM
Are those 3 tables database tables? if not you have to populate field-catalog in the semi-automatic method...
also check if you are you passing the field catalog to the FM REUSE_ALV_GRID_DISPLAY.
2008 Sep 22 7:35 PM
sorry Sourav,I have used this function module too
REUSE_ALV_GRID_DISPLAY.Its was a mistake.
Yes I am using 1 database table,& 2 Z created tables.
I am passing this data to another 3 internal tables.And Iam appending those records to the final Internal table and using this 2 FUnction Modules....
Thanks....Sudheer
2008 Sep 22 8:37 PM
Hi Sudheer,
When you already know the output fields then there is no requirement of using field catalog merge..
you can simply write the code in the following way
REPORT ZTEST_ALV .
type-pools:slis.
data : it_fieldcat type slis_t_fieldcat_alv,
it_fieldcat1 type slis_t_fieldcat_alv.
data: x_fieldcat type
slis_fieldcat_alv.
data : itab2 type table of mara.
* Create field catalog for all the fields you want to display
x_fieldcat-fieldname = 'MATNR'.
x_fieldcat-tabname = 'MARA'.
x_fieldcat-col_pos = 1.
append x_fieldcat to it_fieldcat.
clear x_fieldcat.
* Create the structure (local) and select data from all the tables required.
select * from mara into table itab2.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
*i_callback_program = sy-repid
*i_callback_pf_status_set = 'POPUP'
**i_callback_user_command = 'HANDLE_USER_COMMAND'
*I_GRID_TITLE = 'TOP'
*IT_EVENTS = i_eve
**I_GRID_SETTINGS =
*i_callback_top_of_page = 'TOP-OF-PAGE'
it_fieldcat = it_fieldcat
TABLES
t_outtab = itab2
EXCEPTIONS
program_error = 1
others = 2.Hope this helps.
Regards,
Kinshuk
2008 Sep 23 3:27 AM
when you are working with MERGE function then you have to pass the below parameters, and If you are using the internal table then the internal table should be defined in the below mentioned way...
data: begin of it_data occurs 0, "you need to define using occurs 0
field like db-field, " when you define fields using Like then only they will come in catalog
field2 like db2-field,
end of it_data.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy-repid "Must
i_internal_tabname = 'IT_DATA' "<----Internal table
i_inclname = sy-repid "Must
changing
ct_fieldcat = it_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2.
2008 Sep 22 8:23 PM
2008 Sep 23 4:30 AM
hi,
you just need to make field catalog manually, it will definnately solve ur problem:
how to make field catalog manually:
*&---------------------------------------------------------------------*
*& Form build_catalogue
*&---------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
FORM build_catalogue .
*-- Filling catalogue with
PERFORM fill_catalogue USING :
* Column O/P field Ref Table Ref field Length Desc
01 'WERKS' '' '' 04 'DC'(026),
02 'KUNNR' 'KNA1' 'KUNNR' 10 'Account'(027),
03 'NAME1' 'KNA1' 'NAME1' 10 'Acct Name'(003),
04 'ORT01' 'KNA1' 'ORT01' 10 'City'(004),
05 'REGIO' 'KNA1' 'REGIO' 03 'ST'(005),
06 'BAHNS' 'KNA1' 'BAHNS' 10 'DEA'(006),
07 'FKDATPF2' '' '' 08 'INV DT'(007),
08 'VBELNPF2' '' '' 10 'INV'(008),
09 'POSNRPF2' '' '' 06 'Item'(028),
10 'FKIMGPF2' '' '' 10 'Qty'(009),
11 'NETPR' '' '' 10 'Billed ea'(010),
12 'NETWR' '' '' 10 'Billed Total'(011),
13 'NEW_PRICE' '' '' 9 'Correct ea'(012),
14 'TOT_DIFF' '' '' 10 'Total Diff'(013),
15 'VBELNPC3' '' '' 10 'CR INVC'(014),
16 'FKDATPC3' '' '' 08 'CR INVC DT'(015),
17 'NEW_PRICE1' '' '' 9 'Correct Total'(029),
18 'NETWRPC3' '' '' 10 'Credit Amt'(016),
19 'VBELNPD3' '' '' 10 'Rebill#'(017),
20 'NETWRPD3' '' '' 10 'Rebill Amt'(018),
21 'MATNR' '' '' 18 'Econo'(019),
22 'MAKTX' '' '' 10 'SellDescription',
23 'EAN11' '' '' 18 'NDC#'(021),
24 'LNAME' 'LFA1' 'NAME1' 10 'Vendor'(022),
25 'BSTNK' '' '' 10 'PO'(023),
26 'ERNAM' '' '' 12 'User'(030),
27 'PR_COR_RSN_CD' '' '' 2 'Reason Code'(031),
28 'YY_CALL_ID' '' '' 10 'SFO Call Id'(032),
29 'KONZS' '' '' 10 'Chain Id'(033).this will make a structure and to fill that structure use any method like ALV GRID DISPLAY OR ALV LIST DISPLAY
HOPE IT WILL HELP YOU
RAHUL
Edited by: RAHUL SHARMA on Sep 23, 2008 5:30 AM
2008 Sep 23 11:48 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |