08-21-2007 4:04 PM
Hi,
i am having 175 fields in a internal table.
among this i have two fields of type c.
when passing this internal table to FM fieldcatalog merge
iam getting in display only those with type c, i.e, 2 columns.
can anyone plz tell why is this.?
Regards,
Bindu.
08-21-2007 4:08 PM
have u declared other fields as 'like'?
i also encountered the same only fields with type p were displayed..
but if we execute it after sometime it worked fine...
just execute it after sometime.
08-21-2007 4:07 PM
08-21-2007 4:08 PM
have u declared other fields as 'like'?
i also encountered the same only fields with type p were displayed..
but if we execute it after sometime it worked fine...
just execute it after sometime.
08-21-2007 4:09 PM
hi
good
your field catalog should contain the number of field you r going to display in the output screen so pls check your fieldcatalog creation properly.
thanks
mrutyun^
08-21-2007 4:17 PM
check the definition of internal table which you are passing to fieldcatelog merge FM .. fields of internal table should be defined using LIKE statement..
08-21-2007 4:29 PM
Like someone else said is it possible for you to post your code so that we have a look at it. unless im missunderstanding somthing you should not have to declare your fields with the like statement, but without seeing your code it is very hard to diagnose. The ALV function module call should look something like this:
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = 'ZDEMO_ALVGRID'
i_internal_tabname = 'IT_EKKO'
i_inclname = 'ZDEMO_ALVGRID_STRUCTURE'
changing
ct_fieldcat = gd_fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
and you should define the internal table with an include ( in this case 'ZDEMO_ALVGRID_STRUCTURE' ) something like this:
----
INCLUDE ZDEMO_ALVGRID_STRUCTURE *
----
*
data: begin of it_ekko_alt occurs 0,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
statu type ekpo-statu,
aedat type ekpo-aedat,
matnr type ekpo-matnr,
menge type ekpo-menge,
mains type ekpo-meins,
netpr type ekpo-netpr,
peinh type ekpo-peinh,
end of it_ekko_alt.
Regards
Mart
08-21-2007 4:47 PM
Thank u Mart.
Here is the code.
This is an upgrade program.
In i_inclname they have passed sy-repid.
even then iam getting the expected output.
pls explain me why is that so.
gv_table = 'T_SUMMARY'(002).
gv_repid = sy-repid.
call function 'REUSE_ALV_FIELDCATALOG_MERGE
EXPORTING
i_program_name = gv_repid
i_internal_tabname = gv_table
i_inclname = gv_repid
CHANGING
ct_fieldcat = t_fldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
others = 3.
*-- Internal table for Output
data: begin of t_summary occurs 0,
loc_no like /sapapo/loc-locno,
prod_no like /sapapo/matkey-matnr,
maktx like /sapapo/mattxt-maktx,
meins like /sapapo/matkey-meins,
*-- Administrative tab
createutc_loc like /sapapo/matloc-createutc,
changeutc_loc like /sapapo/matloc-changeutc,
planner_pps like /sapapo/matloc-planner_pps,
planner_snp like /sapapo/matloc-planner_snp,
planner_demand like /sapapo/matloc-planner_demand,
planner_trans like /sapapo/matloc-planner_trans,
planner_vmi like /sapapo/matloc-planner_vmi,
leg_prod like /sapapo/matkey-att01,
*--Properties tab
createutc like /sapapo/matkey-createutc,
changeutc like /sapapo/matkey-changeutc,
matkl like /sapapo/matkey-matkl,
prdha like /sapapo/matkey-prdha,
herkl like /sapapo/matkey-herkl,
tragr like /sapapo/matkey-tragr,
brgew like /sapapo/matkey-brgew,
ntgew like /sapapo/matkey-ntgew,
volum like /sapapo/matkey-volum,
stfac like /sapapo/matkey-stfac,
gewei like /sapapo/matkey-gewei,
voleh like /sapapo/matkey-voleh,
ts_sdp_use like /sapapo/matkey-ts_sdp_use,
shelf_life_dur like /sapapo/matkey-shelf_life_dur,
maturity_dur like /sapapo/matkey-maturity_dur,
shlf_lfe_req_min like /sapapo/matkey-shlf_lfe_req_min,
shlf_lfe_req_max like /sapapo/matkey-shlf_lfe_req_max,
sldrnd like /sapapo/matkey-sldrnd,
att01 like /sapapo/matkey-att01,
att02 like /sapapo/matkey-att02,
att03 like /sapapo/matkey-att03,
att04 like /sapapo/matkey-att04,
att05 like /sapapo/matkey-att05,
*--properties2 tab
apntype like /sapapo/matapn-apntype,
altpn like /sapapo/matapn-altpn,
**-- Attribute tab
reqd_min_shelf like /sapapo/matkey-shlf_lfe_req_min,
*-- Unit of measure tab
umren like /sapapo/marm-umren,
meinh like /sapapo/marm-meinh,
umrez like /sapapo/marm-umrez,
ean11 like /sapapo/marm-ean11,
eancat like /sapapo/marm-eancat,
gtin_variANT like /sapapo/marm-gtin_variant,
capause like /sapapo/marm-capause,
laeng like /sapapo/marm-laeng,
breit like /sapapo/marm-breit,
hoehe like /sapapo/marm-hoehe,
meabm like /sapapo/marm-meabm,
maxstack like /sapapo/marm-maxstack,
nest_ftr like /sapapo/marm-nest_ftr,
*-- Classification tab
class_nam like /sapapo/tmc01kl-class_name,
*--PKG Data
packgr like /sapapo/matkey-packgr,
hutyp_dflt like /sapapo/matkey-hutyp_dflt,
pmtyp like /sapapo/matpack-pmtyp,
ps_smartform like /sapapo/matpack-ps_smartform,
hutyp like /sapapo/matpack-hutyp,
maxw like /sapapo/matpack-maxw,
maxw_tol like /sapapo/matpack-maxw_tol,
maxv like /sapapo/matpack-maxv,
maxv_tol like /sapapo/matpack-maxv_tol,
max_fill_up like /sapapo/matpack-max_fill_up,
maxc like /sapapo/matpack-maxc,
maxc_tol like /sapapo/matpack-maxc_tol,
maxl like /sapapo/matpack-maxl,
maxb like /sapapo/matpack-maxb,
maxh like /sapapo/matpack-maxh,
maxdim_uom like /sapapo/matpack-maxdim_uom,
*--Storage
whmatgr like /sapapo/matexec-whmatgr,
whstc like /sapapo/matexec-whstc,
hndlcode like /sapapo/matexec-hndlcode,
itmtpg like /sapapo/matexec-itmtpg,
mfrgr like /sapapo/matexec-mfrgr,
qgrp like /sapapo/matexec-qgrp,
qqtime like /sapapo/matexec-qqtime,
qqtimeuom like /sapapo/matexec-qqtimeuom,
serial like /sapapo/matexec-serial,
dgprofl like /sapapo/matexec-dgprofl,
*-- ATP tab
kosch like /sapapo/matkey-kosch,
vmikosch like /sapapo/matkey-vmikosch,
kosch_grp like /sapapo/matkey-kosch_grp,
vmikosch_grp like /sapapo/matkey-vmikosch_grp,
kosch_loc like /sapapo/matloc-kosch,
vmikosch_loc like /sapapo/matloc-vmikosch,
kosch_loc_grp like /sapapo/matloc-kosch_grp,
vmikosch_loc_grp like /sapapo/matloc-vmikosch_grp,
atp_chmod like /sapapo/matloc-atp_chmod,
chkhor like /sapapo/matloc-chkhor,
mtvfp like /sapapo/matloc-mtvfp,
chkhorcal like /sapapo/matloc-chkhorcal,
rcrrcphor like /sapapo/matloc-rcrrcphor,
diuom like /sapapo/matloc-diuom,
*--snp1 tab
*-- Demand tab
stra1 like /sapapo/matrq-stra1,
text40 like /sapapo/stratxt-text40,
tbid_rpm like /sapapo/matrq-tbid_rpm,
vrmod like /sapapo/matrq-vrmod,
vint1 like /sapapo/matrq-vint1,
vint2 like /sapapo/matrq-vint2,
bdgrp like /sapapo/matrq-bDgrp,
get_alerts like /sapapo/matloc-get_alerts,
*-- Lot size tab
lot_process(20) type c,
lszky like /sapapo/matlotsz-lszky,
lsztx like /sapapo/matlotsz-lsztx,
lsuom like /sapapo/matlotsz-lsuom,
bstfe like /sapapo/matlotsz-bstfe,
pervr like /sapapo/matlotsz-pervr,
per_amount like /sapapo/matlotsz-per_amount,
tstrid like /sapapo/matlotsz-tstrid,
snplotstrat like /sapapo/matlotsz-snplotstrat,
reord_method like /sapapo/matlotsz-reord_method,
reord_dur like /sapapo/matlotsz-reord_dur,
saftyc like /sapapo/matloc-safty,
msdp_sb_metod like /sapapo/matloc-msdp_sb_method,
saftyc_min like /sapapo/matloc-saftyc_min,
reordc like /sapapo/matloc-reord,
lgrad like /sapapo/matloc-lgrad,
saftyc_max like /sapapo/matloc-saftyc_max,
fedem like /sapapo/matloc-fedem,
ferld like /sapapo/matloc-ferld,
reldt like /sapapo/matloc-reldt,
*-- Minimum lot size tab
bstmi like /sapapo/matlotsz-bstmi,
bstma like /sapapo/matlotsz-bstma,
svtty like /sapapo/matlotsz-svtty,
msdp_sb_method like /sapapo/matloc-msdp_sb_method,
*-- SNP2 tab
dprex like /sapapo/snp01-dprex,
fcsth like /sapapo/snp01-fcsth,
pullh like /sapapo/snp01-pullh,
pspli like /sapapo/snp01-pspli,
prmty like /sapapo/snp01-prmty,
sprex like /sapapo/snp02-sprex,
pkzprodh like /sapapo/snp02-pkzprodh,
prodh like /sapapo/snp02-prodh,
phext like /sapapo/snp02-phext,
shiph like /sapapo/snp02-shiph,
pkzshiph like /sapapo/snp02-pkzshiph,
pushh like /sapapo/snp02-pushh,
dsbph like /sapapo/snp02-dsbph,
dplex like /sapapo/snp11-dplex,
dplpu like /sapapo/snp11-dplpu,
dplfs like /sapapo/snp11-dplfs,
prio like /sapapo/matloc-prio,
snpchkhor like /sapapo/matloc-snpchkhor,
ekgrp like /sapapo/matloc-ekgrp,
vegrp like /sapapo/matloc-vegrp,
kdmatid like /sapapo/matloc-kdmatid,
atdsp like /sapapo/matloc-atdsp,
atddm like /sapapo/matloc-atddm,
selhorz like /sapapo/matloc-selhorz,
earlyship like /sapapo/matloc-earlyship,
*-- PP/DS tab
rrp_type like /sapapo/matloc-rrp_type,
planning(50) type c,
heur_id like /sapapo/matloc-heur_id,
package_id like /sapapo/matloc-package_id,
frTme like /sapapo/matloc-frTme,
1rrp_sel_group like /sapapo/matloc-rrp_sel_group,
whatbom like /sapapo/matloc-whatbom,
expldate_finder like /sapapo/matloc-expldate_finder,
profid like /sapapo/matloc-profid,
fixhz like /sapapo/matloc-fixhz,
ajhoz like /sapapo/matloc-ajhoz,
erhor like /sapapo/matloc-erhor,
cthor like /sapapo/matloc-cthor,
convh like /sapapo/matloc-convh,
*-- Procurement tab
beskz like /sapapo/matloc-beskz,
plifz like /sapapo/matloc-plifz,
cosex like /sapapo/snp14-cosex,
proc_cost like /sapapo/matloc-proc_cost,
maabc like /sapapo/matloc-maabc,
scost like /sapapo/matloc-scost,
sspen like /sapapo/matloc-sspen,
*-- GR/GI tab
grprt like /sapapo/matloc-grprt,
giprt like /sapapo/matloc-giprt,
piprt like /sapapo/matloc-piprt,
tlprt like /sapapo/matloc-tlprt,
os_limit like /sapapo/matloc-os_limit,
hugrp like /sapapo/matloc-hugrp,
maxcover like /sapapo/matloc-maxcover,
maxcoverup like /sapapo/matloc-maxcoverup,
mixtp like /sapapo/matloc-mixtp,
conhap like /sapapo/matloc-conhap,
conhap_out like /sapapo/matloc-conhap_out,
coninp like /sapapo/matloc-coninp,
ladgr like /sapapo/matloc-ladgr,
*--extra tab
at102 like /sapapo/matloc-at102,
at103 like /sapapo/matloc-at103,
at104 like /sapapo/matloc-at104,
end of t_summary.