OOPS ALV - Short dump
Hi,
While i create a report with grid display with oops ALV using custom container, its giving short dump..
DUMP: CNTL ERROR ouccured..
Hi Phani,
Make sure you have done below things correctly.
While creating a container control in SE51, make sure you have given a name to it in the attributes & use the same name in the ABAP code with data declaration as below:
Suppose you have named the container control in SE51 as CC_CONTAINER
DATA :
g_Container TYPE scrfname VALUE 'CC_CONTAINER',
g_Custom_Container TYPE REF TO CL_GUI_CUSTOM_CONTAINER
g_Grid TYPE REF TO CL_GUI_ALV_GRID.
Also first create a CONTAINER object with reference to container name in the screen & then Create GRID object with reference to parent name
IF g_Custom_Container IS INITIAL.
CREATE OBJECT g_Custom_Container EXPORTING CONTAINER_NAME = g_Container.
CREATE OBJECT g_Grid EXPORTING I_PARENT = g_Custom_Container.
& Finally called method Set table for display for Grid as below :
" SET_TABLE_FOR_FIRST_DISPLAY
CALL METHOD g_Grid->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
Also make sure that you have activated the code in PBO & PAI in SE51.
With these it shouldnt give the above error.
Hope this helps.
Regards
Abhii
Similar Messages
-
Short dump while export grid alv with subtotals.
hello,
its strange and i face first time that my grid alv report goin to short dump while i done subtotals and send it to local file thru export.
if am not doing subtotals then export it to local file it goin fine.
whats it has problem plz give ur helping hends.
here i copied a dump msg also.
Short text
Error at assignment: Overwritten protected field.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
A new value is to be assigned to the field "<L_UNIT>", although this field is
entirely or partly protected against changes.
The following are protected against changes:
- Character literals or numeric literals
- Constants (CONSTANTS)
- Parameters of the category IMPORTING REFERENCE for functions and
methods
- Untyped field symbols not yet assigned a field using ASSIGN
- TABLES parameters if the actual parameter is protected against changes
- USING reference parameters and CHANGING parameters for FORMs, if the
actual parameter is protected against changes and
- Accesses using field symbols if the field assigned using ASSIGN is
protected (or partially protected, e.g. key components of an internal
table with the type SORTED or HASHED TABLE) against changes
- Accesses using references, if the field bound to the reference is
protected (or partially protected) against changes
- External write accesses to READ-ONLY attributes,
- Content of a shared object area instance accessed using a shared lock
(ATTACH_FOR_READ).
regards amit.& Object Id : &
& Object Name : &
& Function Module Name : Sales Register &
& Transaction Code : &
& Author : Amit gujargoud &
& Module Name : SD &
& Sub-Module : &
& Program Type : Dialog Create Date : 02/02/2007 &
& SAP Release : ECC 6.0 &
& Description : Sales Register - Detail &
*& Report ZSALESREGISTER
REPORT zsd_salesregister.
*& TYPE-POOLS
TYPE-POOLS : slis.
*& TABLES
TABLES: vbrp, "Billing Document: Item Data
vbrk, "Billing Document: Header Data
lips, "SD document: Delivery: Item data
lfa1, "Vendor Master (General Section)
kna1, "General Data in Customer Master
vbak, "Sales Document: Header Data
vbpa, "Sales Document: Partner (Gopal)
likp, "SD Document: Delivery Header Data
vbap, "Sales Document: Item Data
vbkd, "Sales Document: Business Data
mara. "General Material Data
*& DATA DECLARATION
DATA: BEGIN OF i_report OCCURS 100,
vbeln LIKE vbrp-vbeln, "Billing Document
posnr LIKE vbrp-posnr,
matnr LIKE mara-matnr ,
aubel LIKE vbrp-aubel, "Sales Document
fkimg LIKE vbrp-fkimg, "Actual billed quantity
vrkme LIKE vbrp-vrkme, "Sales unit
arktx LIKE vbrp-arktx, "Short text for sales order item
vgbel LIKE vbrp-vgbel, "Doc number of the reference document
werks LIKE vbap-werks,
vkgrp LIKE vbrp-vkgrp,
fklmg LIKE vbrp-fklmg,
volum LIKE vbrp-volum,
vkbur LIKE vbrp-vkbur,
vtweg_auft LIKE vbrp-vtweg_auft,
auart LIKE vbak-auart,
tabix LIKE sy-tabix, "Internal Table, Current Row Index
name1 LIKE kna1-name1, "Name1
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
orqty TYPE p DECIMALS 0,
penqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
openqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
ean11 LIKE lips-ean11, "International Article No(EAN/UPC)
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
traid LIKE likp-traid,
ort01 LIKE lfa1-ort01, "City
lifnr LIKE lfa1-lifnr, "A/c Number of Vendor or Creditor
netwr LIKE vbrp-netwr, "Net val of bill item in doc currency
kunnr LIKE vbak-kunnr, "Sold-to party
adrnr LIKE vbpa-adrnr, "Address
city1 LIKE adrc-city1, "City
tprtr LIKE lfa1-name1, "Name 1
knumv LIKE konv-knumv, "Number of the document condition
kposn LIKE konv-kposn,
rate LIKE konv-kbetr, "Rate (cond amount or percentage)
bas_val LIKE konv-kwert, "Rate (cond amount or percentage)
exc_duty LIKE konv-kwert, "Rate (cond amount or percentage)
ed_cess LIKE konv-kwert, "Rate (cond amount or percentage)
freight LIKE konv-kwert, "Rate (cond amount or percentage)
pack LIKE konv-kwert, "Rate (cond amount or percentage)
cst LIKE konv-kwert, "Rate (cond amount or percentage)
vat LIKE konv-kwert, "Rate (cond amount or percentage)
ent_tax LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv_round LIKE konv-kwert, "Rate (cond amount or percentage)
disc_tot LIKE konv-kwert, "Discount total - Z001 to Z020
vat_rate LIKE konv-kbetr,
cst_rate LIKE konv-kbetr,
lst_rate LIKE konv-kbetr,
mwsbk LIKE vbrk-mwsbk,
bas_tax LIKE konv-kwert,
dev_tax LIKE konv-kwert,
tcs_tax LIKE konv-kwert,
bas_tot LIKE konv-kwert,
lst LIKE konv-kwert,
vkorg LIKE vbak-vkorg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
text1 LIKE tvm1t-bezei,
text2 LIKE tvm1t-bezei,
text3 LIKE tvm1t-bezei,
text4 LIKE tvm1t-bezei,
text5 LIKE tvm1t-bezei,
bismit_area TYPE p DECIMALS 4, " Size (L*B) in mm
face_area TYPE p DECIMALS 2, " Face Area Declaration
notional_area TYPE p DECIMALS 2,
stock_pcs TYPE p , " decimals 3 Pcs of Stock
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
bismt LIKE mara-bismt, " Size (L*B) in mm
normt LIKE mara-normt, " Industry Standard Description
temp TYPE p DECIMALS 2,
temp1 TYPE p DECIMALS 2,
temp2 TYPE p DECIMALS 2,
temp3 TYPE p DECIMALS 2,
temp4 TYPE p DECIMALS 2,
temp5 TYPE p DECIMALS 2,
temp6 TYPE p DECIMALS 2,
temp7 TYPE p DECIMALS 2,
temp8 TYPE p DECIMALS 2,
temp9 TYPE p DECIMALS 2,
temp10 TYPE p DECIMALS 2,
temp11 TYPE p DECIMALS 2,
temp12 TYPE p DECIMALS 2,
temp13 TYPE p DECIMALS 0,
temp14 TYPE p DECIMALS 0,
temp15 TYPE p DECIMALS 0,
temp16 TYPE p DECIMALS 2,
temp17 TYPE p DECIMALS 2,
temp18 TYPE p DECIMALS 2,
temp19 TYPE p DECIMALS 2,
temp20 TYPE p DECIMALS 2,
temp21 TYPE p DECIMALS 2,
waybill(20) TYPE c,
audat LIKE vbak-audat, "Document Date (Date Received/Sent)
lgort LIKE vbap-lgort, "Storage location
lgobe LIKE t001l-lgobe, "Description of storage location
erdat LIKE vbrk-erdat, "Date on which the record was created
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
acdt LIKE likp-wadat_ist, "Actual goods movement date
fkdat LIKE vbrk-fkdat,
ship LIKE kna1-name1, "Name1 (Ship-to party)
fksto LIKE vbrk-fksto,
fkart LIKE vbrk-fkart,
bezei LIKE t005u-bezei,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
ferth LIKE mara-ferth,
lbtxt LIKE t024x-lbtxt,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
desc LIKE tvkbt-bezei,
brsch LIKE kna1-brsch,
zeinr LIKE mara-zeinr,
bzirk LIKE vbrk-bzirk,
area_desc LIKE tnlst-bezei,
dist_desc TYPE tkukt-vtext,
taluka_desc TYPE t016t-brtxt,
sales_desc TYPE tvgrt-bezei,
kmein LIKE konv-kmein, "Sales Unit
challan LIKE likp-vbeln,
END OF i_report.
data for MVKE
DATA: BEGIN OF i_report_mvke OCCURS 0,
vbeln LIKE vbrp-vbeln, "Billing Document
aubel LIKE vbrp-aubel, "Sales Document
vkorg LIKE vbak-vkorg,
matnr LIKE mara-matnr ,
vtweg LIKE vbak-vtweg,
END OF i_report_mvke.
***********************TEMP COPY
DATA: BEGIN OF i_report_temp OCCURS 0,
vbeln LIKE vbrp-vbeln, "Billing Document
posnr LIKE vbrp-posnr,
matnr LIKE mara-matnr ,
aubel LIKE vbrp-aubel, "Sales Document
fkimg LIKE vbrp-fkimg, "Actual billed quantity
vrkme LIKE vbrp-vrkme, "Sales unit
arktx LIKE vbrp-arktx, "Short text for sales order item
vgbel LIKE vbrp-vgbel, "Doc number of the reference document
werks LIKE vbap-werks,
vkgrp LIKE vbrp-vkgrp,
fklmg LIKE vbrp-fklmg,
volum LIKE vbrp-volum,
vkbur LIKE vbrp-vkbur,
vtweg_auft LIKE vbrp-vtweg_auft,
auart LIKE vbak-auart,
tabix LIKE sy-tabix, "Internal Table, Current Row Index
name1 LIKE kna1-name1, "Name1
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
orqty TYPE p DECIMALS 0,
penqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
openqty TYPE p DECIMALS 0, "Cumulative order qty in sls units
ean11 LIKE lips-ean11, "International Article No(EAN/UPC)
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
traid LIKE likp-traid,
ort01 LIKE lfa1-ort01, "City
lifnr LIKE lfa1-lifnr, "A/c Number of Vendor or Creditor
netwr LIKE vbrp-netwr, "Net val of bill item in doc currency
kunnr LIKE vbak-kunnr, "Sold-to party
adrnr LIKE vbpa-adrnr, "Address
city1 LIKE adrc-city1, "City
tprtr LIKE lfa1-name1, "Name 1
knumv LIKE konv-knumv, "Number of the document condition
kposn LIKE konv-kposn,
rate LIKE konv-kbetr, "Rate (cond amount or percentage)
bas_val LIKE konv-kwert, "Rate (cond amount or percentage)
exc_duty LIKE konv-kwert, "Rate (cond amount or percentage)
ed_cess LIKE konv-kwert, "Rate (cond amount or percentage)
freight LIKE konv-kwert, "Rate (cond amount or percentage)
pack LIKE konv-kwert, "Rate (cond amount or percentage)
cst LIKE konv-kwert, "Rate (cond amount or percentage)
vat LIKE konv-kwert, "Rate (cond amount or percentage)
ent_tax LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv LIKE konv-kwert, "Rate (cond amount or percentage)
tot_inv_round LIKE konv-kwert, "Rate (cond amount or percentage)
disc_tot LIKE konv-kwert, "Discount total - Z001 to Z020
vat_rate LIKE konv-kbetr,
cst_rate LIKE konv-kbetr,
lst_rate LIKE konv-kbetr,
mwsbk LIKE vbrk-mwsbk,
bas_tax LIKE konv-kwert,
dev_tax LIKE konv-kwert,
tcs_tax LIKE konv-kwert,
bas_tot LIKE konv-kwert,
lst LIKE konv-kwert,
vkorg LIKE vbak-vkorg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
text1 LIKE tvm1t-bezei,
text2 LIKE tvm1t-bezei,
text3 LIKE tvm1t-bezei,
text4 LIKE tvm1t-bezei,
text5 LIKE tvm1t-bezei,
bismit_area TYPE p DECIMALS 4, " Size (L*B) in mm
face_area TYPE p DECIMALS 2, " Face Area Declaration
notional_area TYPE p DECIMALS 2,
stock_pcs TYPE p , " decimals 3 Pcs of Stock
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
bismt LIKE mara-bismt, " Size (L*B) in mm
normt LIKE mara-normt, " Industry Standard Description
temp TYPE p DECIMALS 2,
temp1 TYPE p DECIMALS 2,
temp2 TYPE p DECIMALS 2,
temp3 TYPE p DECIMALS 2,
temp4 TYPE p DECIMALS 2,
temp5 TYPE p DECIMALS 2,
temp6 TYPE p DECIMALS 2,
temp7 TYPE p DECIMALS 2,
temp8 TYPE p DECIMALS 2,
temp9 TYPE p DECIMALS 2,
temp10 TYPE p DECIMALS 2,
temp11 TYPE p DECIMALS 2,
temp12 TYPE p DECIMALS 2,
temp13 TYPE p DECIMALS 0,
temp14 TYPE p DECIMALS 0,
temp15 TYPE p DECIMALS 0,
temp16 TYPE p DECIMALS 2,
temp17 TYPE p DECIMALS 2,
temp18 TYPE p DECIMALS 2,
temp19 TYPE p DECIMALS 2,
temp20 TYPE p DECIMALS 2,
temp21 TYPE p DECIMALS 2,
waybill(20) TYPE c,
audat LIKE vbak-audat, "Document Date (Date Received/Sent)
lgort LIKE vbap-lgort, "Storage location
lgobe LIKE t001l-lgobe, "Description of storage location
erdat LIKE vbrk-erdat, "Date on which the record was created
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
acdt LIKE likp-wadat_ist, "Actual goods movement date
fkdat LIKE vbrk-fkdat,
ship LIKE kna1-name1, "Name1 (Ship-to party)
fksto LIKE vbrk-fksto,
fkart LIKE vbrk-fkart,
bezei LIKE t005u-bezei,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
ferth LIKE mara-ferth,
lbtxt LIKE t024x-lbtxt,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
desc LIKE tvkbt-bezei,
brsch LIKE kna1-brsch,
zeinr LIKE mara-zeinr,
bzirk LIKE vbrk-bzirk,
area_desc LIKE tnlst-bezei,
dist_desc TYPE tkukt-vtext,
taluka_desc TYPE t016t-brtxt,
sales_desc TYPE tvgrt-bezei,
kmein LIKE konv-kmein, "Sales Unit
challan LIKE likp-vbeln,
END OF i_report_temp.
DATA: BEGIN OF i_vbap OCCURS 0 ,
posnr LIKE vbap-posnr,
vbeln LIKE vbap-vbeln ,
matnr LIKE vbap-matnr ,
werks LIKE vbap-werks,
kwmeng LIKE vbap-kwmeng,
lgort LIKE vbap-lgort,
matkl LIKE mara-matkl,
wgbez LIKE t023t-wgbez,
mtart LIKE mara-mtart,
END OF i_vbap .
DATA : w_temp_cal(20) TYPE c.
DATA : w_face_area TYPE p DECIMALS 4,
w_notinal_area TYPE p DECIMALS 4.
**MVKE
DATA: BEGIN OF itab_mvke OCCURS 0,
matnr LIKE mvke-matnr,
vkorg LIKE vbak-vkorg,
vtweg LIKE mvke-vtweg,
mvgr1 LIKE mvke-mvgr1,
mvgr2 LIKE mvke-mvgr2,
mvgr3 LIKE mvke-mvgr3,
mvgr4 LIKE mvke-mvgr4,
mvgr5 LIKE mvke-mvgr5,
END OF itab_mvke.
**TVM1T
DATA : BEGIN OF itab_tvm1t OCCURS 0,
spras LIKE tvm1t-spras,
mvgr1 LIKE tvm1t-mvgr1,
bezei LIKE tvm1t-bezei,
END OF itab_tvm1t.
DATA : BEGIN OF itab_tvm2t OCCURS 0,
spras LIKE tvm2t-spras,
mvgr2 LIKE tvm2t-mvgr2,
bezei LIKE tvm2t-bezei,
END OF itab_tvm2t.
DATA : BEGIN OF itab_tvm3t OCCURS 0,
spras LIKE tvm3t-spras,
mvgr3 LIKE tvm3t-mvgr3,
bezei LIKE tvm3t-bezei,
END OF itab_tvm3t.
DATA : BEGIN OF itab_tvm4t OCCURS 0,
spras LIKE tvm4t-spras,
mvgr4 LIKE tvm4t-mvgr4,
bezei LIKE tvm4t-bezei,
END OF itab_tvm4t.
DATA : BEGIN OF itab_tvm5t OCCURS 0,
spras LIKE tvm5t-spras,
mvgr5 LIKE tvm5t-mvgr5,
bezei LIKE tvm5t-bezei,
END OF itab_tvm5t.
DATA: itab_t024x TYPE STANDARD TABLE OF t024x WITH HEADER LINE,
it_report LIKE LINE OF i_report OCCURS 0,
i_mvke LIKE LINE OF itab_mvke OCCURS 0.
**VBKD
DATA: BEGIN OF i_vbkd OCCURS 0 ,
vbeln LIKE vbkd-vbeln ,
posnr LIKE vbkd-posnr ,
bzirk LIKE vbkd-bzirk ,
END OF i_vbkd .
DATA: BEGIN OF i_lips OCCURS 0,
vbeln LIKE lips-vbeln,
ean11 LIKE lips-ean11,
volum LIKE lips-volum,
lgmng LIKE lips-lgmng,
waybill(20) TYPE c,
END OF i_lips.
DATA: BEGIN OF i_vbrk OCCURS 0,
vbeln LIKE vbrk-vbeln,
rfbsk LIKE vbrk-rfbsk, "Status for transfer to accounting
erdat LIKE vbrk-erdat, "Dt on which the record was created
fkdat LIKE vbrk-fkdat, "CHANGE MADE BY PARTHA RAHAMAN
fksto LIKE vbrk-fksto, "GOPAL:: CANCELLED DOC. DO NOT PRNT.
netwr LIKE vbrk-netwr,
fkart LIKE vbrk-fkart, "Gopal:when billng typ=s1 do not pnt 1jul
knumv LIKE vbrk-knumv,
mwsbk LIKE vbrk-mwsbk,
bzirk LIKE vbrk-bzirk,
vtweg LIKE vbrk-vtweg,
spart LIKE vbrk-spart,
END OF i_vbrk.
*structure for MARD Table by kalika
DATA : BEGIN OF itab_mard OCCURS 0,
matnr LIKE mard-matnr,
werks LIKE mard-werks,
labst LIKE mard-labst, " Valuated Unrestricted-Use Stock
lgort LIKE mard-lgort, " Storage Location
END OF itab_mard.
*structure for MARD Table by kalika
DATA:BEGIN OF i_kna1 OCCURS 0,
vbeln LIKE vbak-vbeln,
name1 LIKE kna1-name1,
kunnr LIKE kna1-kunnr,
regio LIKE kna1-regio,
bezei LIKE t005u-bezei,
land1 LIKE kna1-land1,
vkgrp LIKE vbak-vkgrp,
niels LIKE kna1-niels,
kukla LIKE kna1-kukla,
brsch LIKE kna1-brsch,
vkbur LIKE vbak-vkbur,
END OF i_kna1.
DATA:BEGIN OF i_t005u OCCURS 0,
spras LIKE t005u-spras,
land1 LIKE t005u-land1,
bland LIKE t005u-bland,
bezei LIKE t005u-bezei,
END OF i_t005u.
DATA:BEGIN OF i_tnlst OCCURS 0,
spras LIKE t005u-spras,
niels LIKE tnlst-niels,
bezei LIKE t005u-bezei,
END OF i_tnlst.
DATA:BEGIN OF itab_tkukt OCCURS 0,
spras LIKE tkukt-spras,
kukla LIKE tkukt-kukla,
vtext LIKE tkukt-vtext,
END OF itab_tkukt.
DATA : BEGIN OF itab_t016t OCCURS 0,
spras LIKE t016t-spras,
brsch LIKE t016t-brsch,
brtxt LIKE t016t-brtxt,
END OF itab_t016t.
DATA : BEGIN OF itab_tvgrt OCCURS 0,
spras LIKE tvgrt-spras,
vkgrp LIKE tvgrt-vkgrp,
bezei LIKE tvgrt-bezei,
END OF itab_tvgrt.
*DATA: i_t005u TYPE STANDARD TABLE OF t005u WITH HEADER LINE.
DATA:BEGIN OF i_kna2 OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1, " For Ship-to-Party
END OF i_kna2.
DATA:BEGIN OF i_vbak OCCURS 0,
vbeln LIKE vbak-vbeln,
vbtyp LIKE vbak-vbtyp,
audat LIKE vbak-audat,
auart LIKE vbak-auart,
vtweg LIKE vbak-vtweg,
spart LIKE vbak-spart,
vkbur LIKE vbak-vkbur,
vkorg LIKE vbak-vkorg,
END OF i_vbak.
DATA:BEGIN OF i_adrc OCCURS 0,
vbeln LIKE vbpa-vbeln,
kunnr LIKE kna1-kunnr,
city1 LIKE adrc-city1,
name1 LIKE kna1-name1, "Name1 (Ship-to party)
END OF i_adrc.
DATA:BEGIN OF i_lfa1 OCCURS 0,
lifnr LIKE vbpa-lifnr,
vbeln LIKE vbpa-vbeln,
name1 LIKE lfa1-name1,
END OF i_lfa1.
DATA : BEGIN OF it_knumv OCCURS 0,
vbeln LIKE vbrk-vbeln,
knumv LIKE vbrk-knumv,
END OF it_knumv.
DATA : BEGIN OF it_rate OCCURS 0,
ksteu LIKE konv-ksteu, "Condition control
knumv LIKE konv-knumv, "Number of the document condition
kschl LIKE konv-kschl, "Condition type
kbetr LIKE konv-kbetr, "Rate (condition amount or percentage)
kwert LIKE konv-kwert, "Condition value
kposn LIKE konv-kposn,
kmein LIKE konv-kmein, "Sales Unit
END OF it_rate.
DATA: BEGIN OF itab_exnum OCCURS 0,
exnum LIKE j_1iexchdr-exnum, "Official Excise Document Number
exdat LIKE j_1iexchdr-exdat, "Excise Document Date
rdoc LIKE j_1iexchdr-rdoc, "Reference Document 1
status LIKE j_1iexchdr-status,
END OF itab_exnum.
DATA: BEGIN OF itab_qty OCCURS 0,
kwmeng LIKE vbap-kwmeng,
vbeln LIKE vbap-vbeln,
lgort LIKE vbap-lgort,
END OF itab_qty.
*DATA: BEGIN OF i_stloc OCCURS 0,
lgort LIKE t001l-lgort,
lgobe LIKE t001l-lgobe,
END OF i_stloc.
DATA:t_line LIKE STANDARD TABLE OF tline INITIAL SIZE 0
WITH HEADER LINE,
" itab_tvkbt LIKE STANDARD TABLE OF tvkbt WITH HEADER LINE,
w_tdname LIKE thead-tdname.
DATA : BEGIN OF itab_tvkbt OCCURS 0,
spras LIKE tvkbt-spras,
vkbur LIKE tvkbt-vkbur,
bezei LIKE tvkbt-bezei,
END OF itab_tvkbt.
DATA: BEGIN OF i_exchdr OCCURS 0,
exnum LIKE j_1iexchdr-exnum,
exdat LIKE j_1iexchdr-exdat,
rdoc LIKE j_1iexchdr-rdoc,
END OF i_exchdr.
DATA: BEGIN OF i_likp OCCURS 0,
vbeln LIKE likp-vbeln,
wadat_ist LIKE likp-wadat_ist,
traid LIKE likp-traid,
bolnr LIKE likp-bolnr,
END OF i_likp.
DATA: BEGIN OF i_mara OCCURS 0,
matnr LIKE mara-matnr,
matkl LIKE mara-matkl,
mtart LIKE mara-mtart,
labor LIKE mara-labor,
wgbez LIKE t023t-wgbez,
bismt LIKE mara-bismt,
normt LIKE mara-normt,
ferth LIKE mara-ferth,
zeinr LIKE mara-zeinr,
extwg LIKE mara-extwg,
spart LIKE mara-spart,
END OF i_mara.
DATA: BEGIN OF i_t023t OCCURS 0,
matkl LIKE t023t-matkl,
wgbez LIKE t023t-wgbez,
END OF i_t023t.
DATA : var_length(20) TYPE c,
var_breadth(20) TYPE c.
DATA: p_w_value LIKE konv-kwert.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv, " Event for Table to creater fieldcatalog
wa_fieldcat LIKE LINE OF it_fieldcat, " Work Area for table field catalog
lt_top_of_page TYPE slis_t_listheader, " Header table for top of page
i_layout TYPE slis_layout_alv . " It will fill the layout
gt_event TYPE slis_t_event. " Table Event
*DATA :
"itab_tnlst TYPE STANDARD TABLE OF tnlst WITH HEADER LINE,
" itab_tkukt TYPE STANDARD TABLE OF tkukt WITH HEADER LINE,
*" itab_t016t TYPE STANDARD TABLE OF t016t WITH HEADER LINE,
itab_tvgrt TYPE STANDARD TABLE OF tvgrt WITH HEADER LINE.
*& SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK block
WITH FRAME TITLE text-100.
SELECT-OPTIONS: s_date FOR vbrk-fkdat OBLIGATORY,
s_vkbur FOR vbak-vkbur OBLIGATORY,
s_vtweg FOR vbrk-vtweg OBLIGATORY,
s_werks FOR vbap-werks,
s_spart FOR vbrk-spart OBLIGATORY,
s_matkl FOR mara-matkl.
PARAMETERS:
r_opt3 RADIOBUTTON GROUP grp1,
r_opt2 RADIOBUTTON GROUP grp1.
r_opt4 RADIOBUTTON GROUP grp1,
r_opt5 RADIOBUTTON GROUP grp1,
r_opt1 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK block.
*& INITIALIZATION
INITIALIZATION.
r_opt2 = 'X'.
*& START-OF-SELECTION.
START-OF-SELECTION.
*select data from VBRP
SELECT vbeln
posnr
matnr
aubel
fkimg
vrkme
arktx
vgbel
werks
vkgrp
fklmg
volum
vkbur
vtweg_auft
FROM vbrp
INTO TABLE i_report
WHERE "erdat IN s_date
AND spart IN s_spart
vkbur IN s_vkbur
AND vtweg_auft IN s_vtweg.
**logic for Pending, Summary & Detail Report
IF
r_opt1 EQ 'X' OR
r_opt2 EQ 'X' OR
r_opt3 EQ 'X'.
SELECT vbeln
rfbsk
erdat
fkdat
fksto
netwr
fkart
knumv
mwsbk
bzirk
vtweg
spart
FROM vbrk INTO TABLE i_vbrk
FOR ALL ENTRIES IN i_report
WHERE "vbeln = i_report-vbeln
" and
fkdat IN s_date
AND fkart IN ('ZBHR', 'ZTZT', 'ZKRP', 'ZRUD', 'ZBSR',
'ZGHT', 'ZKOL', 'ZPTN', 'ZRNC', 'ZCND',
'ZDLH', 'ZGZB', 'ZGUR', 'ZHSR', 'ZJPR',
'ZLKW', 'ZBLR', 'ZCHN', 'ZCBM', 'ZHUB',
'ZHYD', 'ZKOC', 'ZAHD', 'ZIND', 'ZMUM',
*********************MODIFICATION BY CHAKRAPANI (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
'ZNGP', 'ZPNE', 'ZRPR' , 'ZEXP', 'ZDEM','ZVIJ', 'ZHWH','JEX' )
*********************MODIFICATION BY CHAKRAPANI (ADDITION OF ZVIJ AND ZHWH ) 18.05.2007
AND vtweg IN s_vtweg
AND spart IN s_spart
AND fksto NE 'X'.
IF i_vbrk[] IS NOT INITIAL.
SELECT vbeln
posnr
matnr
aubel
fkimg
vrkme
arktx
vgbel
werks
vkgrp
fklmg
volum
vkbur
vtweg_auft
FROM vbrp
INTO TABLE i_report
FOR ALL ENTRIES IN i_vbrk
WHERE vbeln = i_vbrk-vbeln "erdat IN s_date
AND spart IN s_spart
AND vkbur IN s_vkbur
AND vtweg_auft IN s_vtweg.
ENDIF.
ELSEIF r_opt4 EQ 'X' OR
r_opt5 EQ 'X'.
SELECT vbeln
rfbsk
erdat
fkdat
fksto
netwr
fkart
knumv
mwsbk
bzirk
vtweg
spart
FROM vbrk INTO CORRESPONDING FIELDS OF TABLE i_vbrk
FROM vbrk INTO TABLE i_vbrk
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-vbeln
AND fkart EQ 'ZEXP'
AND vtweg IN s_vtweg
AND spart IN s_spart
AND fksto NE 'X'.
ENDIF.
SORT i_vbrk BY vbeln ASCENDING.
ENDIF.
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SORT it_report BY aubel.
*select VBAP data
SELECT posnr vbeln matnr werks
kwmeng lgort
FROM vbap
INTO TABLE i_vbap
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel.
ENDIF.
change amit by my self may be removed
*select data from VBKD
IF NOT i_vbap[] IS INITIAL.
SELECT vbeln posnr
FROM vbkd
INTO TABLE i_vbkd
FOR ALL ENTRIES IN i_vbap
WHERE vbeln = i_vbap-vbeln.
ENDIF.
SORT i_vbap BY vbeln ASCENDING.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING matnr.
SORT it_report BY matnr.
SELECT
matnr
matkl
mtart
labor
bismt
normt
ferth
zeinr
extwg
spart
FROM mara
INTO TABLE i_mara
FOR ALL ENTRIES IN i_report
WHERE matnr = i_report-matnr
AND spart IN s_spart.
ENDIF.
IF NOT i_mara[] IS INITIAL.
SORT i_mara BY matnr.
SELECT matnr
labst
FROM mard
INTO TABLE itab_mard
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr.
ENDIF.
ENDIF.
DATA : it_mara LIKE LINE OF i_mara OCCURS 0.
IF NOT i_mara[] IS INITIAL.
REFRESH it_mara.
it_mara[] = i_mara[].
DELETE ADJACENT DUPLICATES FROM it_mara COMPARING matkl.
SORT it_mara BY matkl.
SELECT matkl wgbez
FROM t023t
INTO TABLE i_t023t
FOR ALL ENTRIES IN it_mara
WHERE matkl = it_mara-matkl.
*T024X
REFRESH it_mara.
it_mara[] = i_mara[].
DELETE ADJACENT DUPLICATES FROM it_mara COMPARING labor.
SORT it_mara BY labor.
SELECT * FROM t024x
INTO TABLE itab_t024x
FOR ALL ENTRIES IN it_mara
WHERE labor = it_mara-labor
AND spras = sy-langu.
ENDIF.
*begin of change amit
LOOP AT i_vbap.
READ TABLE i_mara WITH KEY matnr = i_vbap-matnr.
IF sy-subrc = 0.
*material type & material group
i_vbap-mtart = i_mara-mtart.
i_vbap-matkl = i_mara-matkl.
ENDIF.
MODIFY i_vbap.
ENDLOOP.
*Material Group Description
*end of change amit
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
SORT it_report BY vgbel.
SELECT vbeln
ean11
volum
lgmng
FROM lips
INTO TABLE i_lips
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-vgbel.
ENDIF.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY vgbel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vgbel.
IF i_lips[] IS NOT INITIAL.
SELECT vbeln
wadat_ist
traid
bolnr
FROM likp
INTO TABLE i_likp
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-vgbel.
ENDIF.
SORT i_lips BY vbeln ASCENDING.
LOOP AT i_lips.
REFRESH t_line.
CLEAR w_tdname.
w_tdname = i_lips-vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ZVOW'
language = sy-langu
name = w_tdname
object = 'VBBK'
TABLES
lines = t_line
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT t_line.
CONCATENATE i_lips-waybill t_line-tdline INTO i_lips-waybill.
ENDLOOP.
IF sy-subrc EQ 0.
MODIFY i_lips.
ENDIF.
ENDLOOP.
*IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT a~vbeln
b~name1
b~kunnr
b~regio
b~land1
a~vkgrp
b~niels
b~kukla
b~brsch
a~vkbur
FROM vbak AS a
INNER JOIN kna1 AS b
ON akunnr = bkunnr
INTO TABLE i_kna1
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-aubel.
AND land1 = 'IN'.
*endif.
DATA : it_kna1 LIKE LINE OF i_kna1 OCCURS 0.
IF NOT i_kna1[] IS INITIAL.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY regio.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING regio.
SELECT spras
land1
bland
bezei FROM t005u
INTO TABLE i_t005u
FOR ALL ENTRIES IN it_kna1
WHERE bland = it_kna1-regio
AND spras = 'EN' AND land1 = 'IN'.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY niels.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING niels.
SELECT spras niels bezei FROM tnlst
INTO TABLE i_tnlst
FOR ALL ENTRIES IN it_kna1
WHERE niels = it_kna1-niels
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY kukla.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING kukla.
SELECT spras kukla vtext FROM tkukt
INTO TABLE itab_tkukt
FOR ALL ENTRIES IN it_kna1
WHERE kukla = it_kna1-kukla
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY brsch.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING brsch.
SELECT spras brsch brtxt FROM t016t
INTO TABLE itab_t016t
FOR ALL ENTRIES IN it_kna1
WHERE brsch = it_kna1-brsch
AND spras = sy-langu.
REFRESH it_kna1.
it_kna1[] = i_kna1[].
SORT it_kna1 BY vkgrp.
DELETE ADJACENT DUPLICATES FROM it_kna1 COMPARING vkgrp.
SELECT spras vkgrp bezei FROM tvgrt
INTO TABLE itab_tvgrt
FOR ALL ENTRIES IN it_kna1
WHERE vkgrp = it_kna1-vkgrp
AND spras = sy-langu.
ENDIF.
SORT i_kna1 BY vbeln ASCENDING.
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT a~vbeln
a~kunnr
b~city1
FROM vbpa AS a
INNER JOIN adrc AS b
ON aadrnr = baddrnumber
INTO TABLE i_adrc
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel
AND parvw = 'WE'.
SORT i_adrc BY vbeln ASCENDING.
ENDIF.
DATA : it_adrc LIKE LINE OF i_adrc OCCURS 0.
IF i_adrc[] IS NOT INITIAL.
REFRESH it_adrc.
it_adrc[] = i_adrc[].
SORT it_adrc BY kunnr.
DELETE ADJACENT DUPLICATES FROM it_adrc COMPARING kunnr.
SELECT kunnr name1
FROM kna1
INTO TABLE i_kna2
FOR ALL ENTRIES IN it_adrc
WHERE kunnr = it_adrc-kunnr.
ENDIF.
SELECT a~lifnr
a~vbeln
b~name1
FROM vbpa AS a
INNER JOIN lfa1 AS b
ON alifnr = blifnr
INTO TABLE i_lfa1
FOR ALL ENTRIES IN i_report
WHERE vbeln = i_report-vgbel
AND parvw = 'SP'.
SORT i_lfa1 BY vbeln ASCENDING.
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY vbeln.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING vbeln.
SELECT exnum
exdat
rdoc
status
FROM j_1iexchdr
INTO TABLE itab_exnum
FOR ALL ENTRIES IN it_report
WHERE rdoc = it_report-vbeln AND status = 'P' OR status = 'C' .
ENDIF.
change amit by my self may be removed
change amit by my self may be removed
IF i_report[] IS NOT INITIAL.
REFRESH it_report.
it_report[] = i_report[].
SORT it_report BY aubel.
DELETE ADJACENT DUPLICATES FROM it_report COMPARING aubel.
SELECT kwmeng
vbeln
lgort
FROM vbap
INTO TABLE itab_qty
FOR ALL ENTRIES IN it_report
WHERE vbeln = it_report-aubel.
ENDIF.
change amit by my self may be removed
SORT itab_qty BY vbeln.
CHECK NOT i_vbrk[] IS INITIAL.
SORT i_report BY vbeln.
DATA : t_vbrk LIKE LINE OF i_vbrk OCCURS 0.
REFRESH t_vbrk.
t_vbrk[] = i_vbrk[].
SORT t_vbrk BY knumv.
DELETE ADJACENT DUPLICATES FROM t_vbrk COMPARING knumv.
SELECT ksteu
knumv
kschl
kbetr
kwert
kposn
kmein
FROM konv
INTO TABLE it_rate
FOR ALL ENTRIES IN t_vbrk
WHERE knumv = t_vbrk-knumv
AND kschl IN ('ZR00', "Basic Price
'ZR01', "Basic Price
'ZR02', "Basic Price
'ZR03', "Basic Price
'ZR04', "Basic Price
'ZR05', "Basic Price
'JEXP', "Excise
'JECS', "ED
'ZG03', "Freight
'ZG04', "Freight
'JCST', "CST
'JLST', "LST
'ZDEV', "Dev Tax
'Z001', "Discount
'Z002', "Discount
'Z003', "Discount
'Z004', "Discount
'Z005', "Discount
'Z006', "Discount
'Z007', "Discount -
Short dump when I do total or sub total in the ALV report
Hi,
When I do total or sub-total on the currency field in the ALV report, it'll give a short dump like
" The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X)".
Short text of error message:
Technical information about the message:
Message classe...... "0K"
Number.............. 000
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
Trigger Location of Runtime Error
Program SAPLSLVC
Include LSLVCF36
Row 2,726
Module type (FORM)
Module Name FILL_DATA_TABLE
sometime when I do the page down on the ALV report, the same short dump is coming.
Can anyone help me out.
Thanks
SelvaHi,
I'm getting this short dump in the standard program.
I'm getting ALV report display perfectly. the problem is, when I do total or subtotal on the currency fields.
2704
2705 ************************************
2706 * Column per Fieldcat Entry
2707 ************************************
2708 ls_lvc_data-value = space.
2709 clear ls_lvc_data-style.
2710 loop at it_fcat_local assigning <ls_fcat>
2711 where tech ne 'X' and no_out ne 'X'.
2712 if l_invisible eq 'X'.
2713 clear l_invisible.
2714 if <ls_fcat>-do_sum is initial.
2715 continue.
2716 else.
2717 clear ls_lvc_data-col_pos.
2718 endif.
2719 endif.
2720
2721 add 1 to ls_lvc_data-col_pos.
2722
2723 assign component <ls_fcat>-fieldname
2724 of structure <ls_data> to <l_field_value>.
2725 if sy-subrc ne 0.
>>>>> message x000(0k).
2727 endif.
2728
in this standard program, I'm getting the dump. the line is mentioned above in the code. -
Short dump while doing subtotal in the ALV report
Hi All,
I am getting run time error while doing the sub total and total in the ALV .
error is "MESSAGE_TYPE_X" and
discription is "The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X)."
Can anyone help me regarding this.
My alv field catog is like below
DATA: ls_fieldcat TYPE slis_fieldcat_alv,
ls_sort TYPE SLIS_SORTINFO_ALV.
CLEAR:ls_fieldcat,
ls_sort.
REFRESH ot_fieldcat.
ls_fieldcat-FIELDNAME = 'LEASE_NUMBER'.
ls_fieldcat-SELTEXT_M = 'Lease Number'(001).
ls_fieldcat-COL_POS = 0.
ls_fieldcat-OUTPUTLEN = 10.
ls_fieldcat-DO_SUM = 'X'.
ls_fieldcat-KEY = 'X'.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'LEASE_TYPE'.
ls_fieldcat-SELTEXT_M = 'Lease Type'(002).
ls_fieldcat-COL_POS = 1.
ls_fieldcat-OUTPUTLEN = 5.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'LEGACY_NUM'.
ls_fieldcat-SELTEXT_M = 'Legacy Contract No'(003).
ls_fieldcat-COL_POS = 2.
ls_fieldcat-OUTPUTLEN = 10.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'CUSTOMER'.
ls_fieldcat-SELTEXT_M = 'Customer'(004).
ls_fieldcat-COL_POS = 3.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'STATUS'.
ls_fieldcat-SELTEXT_M = 'Status'(017).
ls_fieldcat-COL_POS = 16.
ls_fieldcat-OUTPUTLEN = 10.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'GATEIN_DT'.
ls_fieldcat-SELTEXT_M = 'Gate In Date'(018).
ls_fieldcat-COL_POS = 17.
ls_fieldcat-OUTPUTLEN = 10.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-FIELDNAME = 'SVALUE'.
ls_fieldcat-COL_POS = 18.
ls_fieldcat-DO_SUM = 'X'.
ls_fieldcat-OUTPUTLEN = 12.
APPEND ls_fieldcat TO ot_fieldcat.
CLEAR ls_fieldcat.
DATA SORTING AND SUBTOTAL
CLEAR ls_sort.
ls_sort-FIELDNAME = 'LEASE_NUMBER'.
ls_sort-SPOS = 0.
ls_sort-UP = 'X'.
ls_sort-SUBTOT = 'X'.
APPEND ls_sort TO GT_SORT.
If i coment the code relate dto 'SVALUE' i am getting output without sub total and total.
if i uncomment the same then I am getting short dump.Hi,
Try this coding,
TYPE-POOLS: SLIS. " ALV GLOBAL TYPES
* FORM F_READ_DATA
FORM F_READ_DATA.
SELECT * INTO CORRESPONDING FIELDS OF TABLE GT_VBAK
FROM VBAK
UP TO P_MAX ROWS
WHERE KUNNR IN S_KUNNR
AND VBELN IN S_VBELN
AND VKORG IN S_VKORG.
ENDFORM. " F_READ_DATA
* FORM F_DISPLAY_DATA
FORM F_DISPLAY_DATA.
DEFINE M_FIELDCAT.
ADD 1 TO LS_FIELDCAT-COL_POS.
LS_FIELDCAT-FIELDNAME = &1.
LS_FIELDCAT-REF_TABNAME = 'VBAK'.
LS_FIELDCAT-DO_SUM = &2.
LS_FIELDCAT-CFIELDNAME = &3.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
END-OF-DEFINITION.
DEFINE M_SORT.
ADD 1 TO LS_SORT-SPOS.
LS_SORT-FIELDNAME = &1.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = &2.
APPEND LS_SORT TO LT_SORT.
END-OF-DEFINITION.
DATA:
LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LT_SORT TYPE SLIS_T_SORTINFO_ALV,
LS_SORT TYPE SLIS_SORTINFO_ALV,
LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
M_FIELDCAT 'VKORG' '' ''.
M_FIELDCAT 'KUNNR' '' ''.
M_FIELDCAT 'VBELN' '' ''.
M_FIELDCAT 'NETWR' 'X' 'WAERK'.
M_FIELDCAT 'WAERK' '' ''.
M_SORT 'VKORG' 'X'. " SORT BY VKORG AND SUBTOTAL
M_SORT 'KUNNR' 'X'. " SORT BY KUNNR AND SUBTOTAL
M_SORT 'VBELN' ''. " SORT BY VBELN
LS_LAYOUT-CELL_MERGE = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = LS_LAYOUT
IT_FIELDCAT = LT_FIELDCAT
IT_SORT = LT_SORT
TABLES
T_OUTTAB = GT_VBAK.
ENDFORM. " F_DISPLAY_DATA
Regards,
Nikhil. -
Short dump while filtering an ALV report
Hi ,
I have an ALV report which gives me short dump when I filter any of the 'P' type field. I tried to implement sap note 839839 in debug mode but in vain. Should I implement this note first and then check the chnage?
the short dump error "..........
Error in ASSIGN: Memory protection error.
The current program "SAPLSSEL " uses the ASSIGN statement.
However, the offset of the segment (20208) plus the length (69)
is greater than the length of the segment (20264).
This is not allowed.
If the error is in one of your own ABAP programs or an SAP program that
you have modified, try to correct it.
Reduce the offset and/or length that you are using.
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"ASSIGN_OFFSET+LENGTH_TOOLARGE"
"SAPLSSEL " or "LSSELFDI "
"FILL_DYN_FROM_FIELD_SEL" ........."
I appreciate ur inputs.
thanks in advance,
regards,
shanHi Guys,
I found the answer. I had to define all P type fields with eaxact length of 16 . Its working fine.
thanks for all your help.
regards,
shan -
Hi
I have one Zreport which gives the result in ALV form.
After getting the result(1 row with 33 columns) when I tried to export the ALV results to spread sheet using the option : List-> Export-> Spread Sheet OR by click on Excel icon in the display screen,I'm getting the short dump with the description "No more storage space available for extending an internal table" .
After analysis ,find that dump is raising in the FM : F4_GET_RESULT of Include Program : LSDH3U03.
Can anyone provide us some clue .
Thanks & Regards,
SreeramHi,
If the display is in ALV grid format, then you can try another approach to save the data in a spreadsheet.
- Right-click on any output cell.
- Select 'Spreadsheet' from the drop down list
- radio-button 'All available formats'
- Excel (In existing XXL format)
Thanks!
VS. -
Short Dump while executing ALV Grid.
Hi All,
I m getting a short dump while trying to execute an ALV.
The dump exception is of type
CX_SY_DYN_CALL_ILLEGAL_TYPE class.
The message displayed is : " Call to form 'GI_FIELDCAT' is incorrect .The actual parameter in PERFORM is different data type than requested for form GI_FIELDCAT " .
The part of programe included is as follows:
FORM build_fieldcat .
PERFORM gi_fieldcat USING 'MBLNR' text-014 '1' '20'.
PERFORM gi_fieldcat USING 'ZEILE' text-005 '2' '4'.
PERFORM gi_fieldcat USING 'MATNR' text-006 '3' '18'.
PERFORM gi_fieldcat USING 'MAKTX' text-028 '4' '40'.
PERFORM gi_fieldcat USING 'MATKL' text-029 '5' '40'.
PERFORM gi_fieldcat USING 'BUDAT' text-027 '6' '10'.
PERFORM gi_fieldcat USING 'MENGE' text-026 '7' '9'.
PERFORM gi_fieldcat USING 'DMBTR' text-025 '8' '13'.
PERFORM gi_fieldcat USING 'WAERS' text-011 '9' '5'.
PERFORM gi_fieldcat USING 'RSNUM' text-012 '10' '10'.
PERFORM gi_fieldcat USING 'PSPHI' text-013 '11' '10'.
ENDFORM. " build_fieldcat
FORM gi_fieldcat USING fieldname TYPE slis_fieldcat_alv-fieldname
colmname TYPE slis_fieldcat_alv-seltext_m
colmpos TYPE slis_fieldcat_alv-col_pos
outputlen TYPE slis_fieldcat_alv-outputlen.
wa_fieldcat-fieldname = fieldname.
wa_fieldcat-seltext_m = colmname.
wa_fieldcat-col_pos = colmpos.
wa_fieldcat-outputlen = outputlen.
wa_fieldcat-
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " gi_fieldcat
Can ayone gimmi a solution for the same.Hi,
Try to change ur code like the below.
Attached: sample code
Building field catalog
PERFORM modify_catlog USING:
'GT_OUTPUT' 'AUART' text-t02 '1',
'GT_OUTPUT' 'KUNNR' text-t03 '2',
'GT_OUTPUT' 'NAME' text-t04 '3',
'GT_OUTPUT' 'KWMENG' text-t05 '4',
'GT_OUTPUT' 'VRKME' text-t06 '5',
'GT_OUTPUT' 'LFIMG' text-t07 '6',
'GT_OUTPUT' 'GEWEI' text-t08 '7',
'GT_OUTPUT' 'VOLUM' text-t09 '8',
'GT_OUTPUT' 'VOLEH' text-t10 '9',
'GT_OUTPUT' 'BRGEW' text-t11 '10',
'GT_OUTPUT' 'UOMGW' text-t12 '11',
'GT_OUTPUT' 'VARCE' text-t13 '12',
'GT_OUTPUT' 'UOMVR' text-t14 '13'.
FORM modify_catlog USING pa_tabname TYPE string
pa_field TYPE string
pa_text TYPE string
pa_pos TYPE string.
CLEAR gs_fieldcatalog.
*Modifying field catalog
gs_fieldcatalog-col_pos = pa_pos.
gs_fieldcatalog-fieldname = pa_field.
gs_fieldcatalog-tabname = pa_tabname.
gs_fieldcatalog-seltext_m = pa_text.
APPEND gs_fieldcatalog TO gt_fieldcatalog.
CLEAR gs_fieldcatalog.
l_repid = sy-repid.
To call function to display ALV output
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
it_fieldcat = gt_fieldcatalog
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-t16.
ENDIF.
Reward if helpful.
Regards,
Ramya -
Short dump while on double click event in ALV
Hi ,
I have created a ALV screen to display the customer number and NAme ,my requirement is that when i click on the Key field i.e. Customer number it should call the transaction xd03 for that I have written the following code
gs_layout-box_fieldname = 'SEL'.
gs_layout-colwidth_optimize = 'X'.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
is_layout = gs_layout
it_fieldcat = fieldcatalog[]
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = t_itab
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.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'KUNNR'.
READ TABLE t_itab INTO w_itab
WITH KEY kunnr = rs_selfield-value.
IF sy-subrc = 0.
SET PARAMETER ID 'KUN' FIELD rs_selfield-value.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
CLEAR r_ucomm.
ENDCASE.
ENDFORM. "user_command
FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD1'.
ENDFORM. "pf_status
Problem is when i double click on the Customer No field on the ALV ouput i Am getting a Short dump.. "MOVE_TO_LIT_NOTALLOWED_NODATA"..
How should i overcome this runtime error....
Thanks in advance,
Nishant>
Abhii wrote:
> There was a problem in the SET PARAMETER ID statement.
> Nishant, Make the code changes I have suggested, you will get the output.
Either you possess telepathic skills or you are omniscient.
Before asserting your solution on someone be sure what exactly is the problem. If you check the OP's code, CALL TRANSACTION will be called only when the READ TABLE is successful.
So how does your solution add benefit to the existing one.
BR,
Suhas -
Short Dump while scrolling on the ALV (GETWA_NOT_ASSIGNED)
Hi All,
I have an interactive ALV list, After the user double click on the list line item,
the list control goes to top of the list.
When i want to scroll for further interaction, I am getting a Short dump GETWA_NOT_ASSIGNED.
Please advice
SolomonHi
Please find the ALV code
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = hf_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_fieldcat = int_fieldcat[]
it_sort = int_sort[]
is_layout = fs_layout
i_save = 'A'
is_variant = alv_variant
it_events = int_events[]
TABLES
t_outtab = i_bsid
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " write_alv_report
FORM user_command *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF selfield-tabindex GE 1.
check sy-ucomm <> 'POST'.
READ TABLE i_bsid into i_bsid_alv INDEX selfield-tabindex.
CASE I_BSID-CHECK.
WHEN SPACE.
I_BSID-CHECK = 'X'.
WHEN OTHERS.
I_BSID-CHECK = ''.
ENDCASE.
MODIFY I_BSID TRANSPORTING CHECK WHERE matchkey = i_bsid_alv-matchkey.
ENDIF.
selfield-refresh = 'X'.
*CLEAR selfield.
ENDFORM. "user_command
FORM SET_PF_STATUS *
FORM set_pf_status USING extab TYPE slis_t_extab.
data : lv_answer(1) TYPE c.
SET PF-STATUS 'S200'.
IF SY-UCOMM = 'POST'.
I_BSID_ALV1[] = I_BSID[].
DELETE I_BSID_ALV1 WHERE CHECK = SPACE.
CLEAR I_BSID[].
I_BSID[] = I_BSID_ALV1[].
ENDIF.
2. when I double click on the ALV list line item, after the line is selected the control goes to the top of the list.
I have already setup the ALV menu bar. -
Short Dump when downloading to EXCEL from ALV
Hi,
I have an ALV grid display program. The data in the grid is displayed correctly. But when trying to download the data to excel it gives a short dump.
Assignment error: Overwriting a protected field.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLKKBL" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Some times it allows to download the data, but sometimes it gives short dump.
Thanks,
DeepthiThis is my part of the code:
i_fieldcat-key = gc_x.
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
i_fieldcat-hotspot = gc_x.
perform bild_fieldcat using
'' 'AUFNR' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '12' ' '.
perform bild_fieldcat using
'' 'DISGR' 'GT_REPORT ' ' ' 'MARC' ' ' 'C' '4' ' '.
perform bild_fieldcat using
'' 'AUART' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '04' ' '.
perform bild_fieldcat using
'' 'DISPO' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '06' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'MATNR' 'GT_REPORT ' ' ' 'MARA' ' ' 'C' '18' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'CHARG' 'GT_REPORT ' ' ' 'MDFA' ' ' 'C' '14' ' ' .
*begin insert RCHALASA
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
perform bild_fieldcat using
'' 'FTRMI' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'D' '08' ' '.
*end insert
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
perform bild_fieldcat using
'' 'GLTRP' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'D' '10' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'GLTRS' 'GT_REPORT' ' ' 'CAUFV' ' ' 'D' '10' ' '.
perform bild_fieldcat using
'' 'GSTRP' 'GT_REPORT' ' ' 'CAUFV' ' ' 'D' '10' ' '.
perform bild_fieldcat using
'' 'AGE' 'GT_REPORT' ' ' ' ' 'Age' 'C' '08' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'GAMNG' 'GT_REPORT' ' ' ' ' 'Order Qty' 'QUAN' '09' ' '.
perform bild_fieldcat using
'' 'STK_PROD_FLAG' 'GT_REPORT' ' ' ' ' 'Stk/Prod' 'C' '06' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'IGMNG' 'GT_REPORT' ' ' ' ' 'Order Yield Qty' 'QUAN' '11' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'IASMG' 'GT_REPORT' ' ' ' ' 'Order Scrap Qty' 'QUAN' '11' ' '.
**begin insert RCHALASA
perform bild_fieldcat using
'' 'YIELD_PER' 'GT_REPORT' ' ' ' ' 'Yield' 'C' '05' ' '.
**end insert
DATA: col_pos like sy-colno.
col_pos = '17'.
loop at gt_oper.
gv_tabix = sy-tabix.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
col_pos = col_pos + 1.
perform assign_alv_qty_format.
gv_yield6(03) = gt_oper-vornr1(03).
*begin insert RCHALASA
move gt_oper-ltxa1 to gv_text.
translate gv_text to upper case.
gv_text = gv_yield.
*end insert
gv_tabixn = gv_tabix.
gv_yield+6(03) = gv_tabixn.
gv_fieldname = gv_yield.
translate gv_fieldname to upper case.
perform bild_fieldcat using
'' gv_fieldname 'GT_REPORT' ' ' ' ' gv_text 'QUAN' '04' ' '.
perform assign_alv_qty_format.
gv_scrap6(03) = gt_oper-vornr1(03).
select single
grdtx
from trugt
into gv_text1
where
grund = gt_oper-vornr
and werks in s_werks.
gv_text = gv_scrap.
i_fieldcat-no_zero = gc_x.
gv_tabixn = gv_tabix.
gv_scrap+6(03) = gv_tabixn.
gv_fieldname = gv_scrap.
translate gv_fieldname to upper case.
perform bild_fieldcat using
gv_fieldname 'GT_REPORT' ' ' gv_text1 'X' 'QUAN' '08' ' '.
clear gv_text1.
endloop. " GT_OPER
DATA: count type c.
DESCRIBE table gt_grund lines count.
loop at gt_grund into gl_grund.
gv_tabix = sy-tabix.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
if gl_grund-grund is initial.
gl_grund = 'NONE'.
gv_text = gl_grund.
else.
gv_text = gl_grund-grdtx.
endif.
gv_tabixn = gv_tabix.
gv_scrap_code+11(03) = gv_tabixn.
gv_fieldname = gv_scrap_code.
translate gv_fieldname to upper case.
col_pos = col_pos + 1.
perform bild_fieldcat using
'' gv_fieldname 'GT_REPORT' 'XMNGA' 'AFRU' gv_text 'QUAN' '12' ' ' .
endloop. " GT_OPER
gb_layout-zebra = 'X'.
gb_print-no_print_listinfos = 'X'.
gb_variant-variant = p_varia.
perform create_events using gt_events[].
call function 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Reading SAP Records.......'(600).
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gv_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command = 'CALL_UP_SAP_TRANS'
it_fieldcat = i_fieldcat[]
is_layout = gb_layout
i_grid_title = gb_title
i_default = 'X'
i_save = 'X'
is_variant = gb_variant
is_print = gb_print
it_events = gt_events[]
tables
t_outtab = gt_report
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.
***********ALV SUBROUTINE**************
TYPE-POOLS: slis.
DATA: gv_repid LIKE sy-repid.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: gb_layout TYPE slis_layout_alv.
DATA: gb_selfield TYPE slis_selfield.
DATA: gb_print TYPE slis_print_alv.
DATA: i_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA: gv_keyinfo TYPE SLIS_KEYINFO_ALV.
DATA: gb_variant LIKE disvariant,
gb_def_variant LIKE disvariant.
DATA: gb_title(70).
DATA: gt_events TYPE slis_t_event,
gt_sort TYPE SLIS_T_SORTINFO_ALV,
gt_list_top_of_page TYPE slis_t_listheader,
g_status_set TYPE slis_formname VALUE 'PF_STATUS_SET',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
g_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE',
g_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST',
g_end_of_list TYPE slis_formname VALUE 'END_OF_LIST'.
DATA: it_event_exit TYPE slis_t_event_exit WITH HEADER LINE.
*--- Rotinas ---
FORM alv_init.
CLEAR: gb_variant.
gv_repid = sy-repid.
gb_variant-report = gv_repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gb_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_varia = gb_variant-variant.
ENDIF.
ENDFORM. " ALV_INIT
FORM alv_f4.
gb_variant-report = gv_repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = gb_variant
i_save = 'A'
IMPORTING
es_variant = gb_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_varia = gb_variant-variant.
ENDIF.
ENDFORM. " ALV_F4
FORM bild_fieldcat USING x_pos x_field x_tab x_reffld x_ref x_text x_type x_tam x_sym.
i_fieldcat-col_pos = x_pos.
i_fieldcat-fieldname = x_field.
i_fieldcat-tabname = x_tab.
i_fieldcat-ref_fieldname = x_reffld.
i_fieldcat-ref_tabname = x_ref.
i_fieldcat-seltext_l = x_text.
i_fieldcat-seltext_m = x_text.
i_fieldcat-seltext_s = x_text.
i_fieldcat-ddictxt = 'M' .
i_fieldcat-inttype = x_type.
i_fieldcat-outputlen = x_tam.
i_fieldcat-symbol = x_sym.
APPEND i_fieldcat.
CLEAR i_fieldcat.
ENDFORM. " BILD_FIELDCAT
FORM create_events USING rt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = rt_events.
READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO ls_event-form.
APPEND ls_event TO rt_events.
ENDIF.
ENDFORM. " -
REGARDING ALV REPORT SHORT DUMP
hI ALL,
IAM GETTING FOR THE FOLLOWING CODE,
PLEASE WHY THE ERROR IN ECC 6.0
TABLES AND DATA DECLARATION.
*TABLES: mara,makt.",marc.
data syrepid like sy-repid.
data sydatum(10). " LIKE sy-datum.
data sypagno(3) type n.
WHEN USING MORE THAN ONE TABLE IN ALV WE NEEED TO DECLARE THE TYPE
GROUP (TYPE-POOLS--------->SLIS)
type-pools : slis.
INTERNAL TABLE DECLARATION.
INTERNAL TABLE TO HOLD THE VALUES FROM THE MARA TABLE
data: begin of t_mara occurs 0,
matnr like mara-matnr,
meins like mara-meins,
mtart like mara-mtart,
matkl like mara-matkl,
end of t_mara.
INTERNAL TABLE TO HOLD THE CONTENTS FROM THE EKKO TABLE
data : begin of t_marc occurs 0,
matnr like mara-matnr,
werks like marc-werks,
minbe like marc-minbe.
data: end of t_marc.
INTERNAL TABLE TO HOLD THE VALUES FROM MAKT TABLE.
data : begin of t_makt occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
spras like makt-spras,
end of t_makt.
INTERNAL TABLE WHICH ACTUALLY MERGES ALL THE OTHER INTERNAL TABLES.
data: begin of itab1 occurs 0,
matnr like mara-matnr,
meins like mara-meins,
maktx like makt-maktx,
spras like makt-spras,
werks like marc-werks,
minbe like marc-minbe,
end of itab1.
THE FOLLOWING DECLARATION IS USED FOR DEFINING THE FIELDCAT
AND THE LAYOUT FOR THE ALV.
HERE AS slis_t_fieldcat_alv IS A INTERNAL TABLE WITHOUT A HEADER LINE
WE EXPLICITELY DEFINE AN INTERNAL TABLE OF THE SAME STRUCTURE AS THAT
OF slis_t_fieldcat_alv BUT WITH A HEADER LINE IN THE DEFINITION.
THIS IS DONE TO MAKE THE CODE SIMPLER.
OTHERWISE WE MAY HAVE TO DEFINE THE STRUCTURE AS IN THE NORMAL SAP
PROGRAMS.
IN THE FIELDCATALOG TABLE WE ACTUALLY PASS THE FIELDS FROM ONE OR
MORE TABLES AND CREATE A STRUCTURE
IN THE LAYOUT STRUCTURE WE BASICALLY DEFINE THE FORMATTING OPTIONS
LIKE DISPLAY IN THE ZEBRA PATTERN ,THE HOTSPOT OPTIONS ETC.
data: fieldcatalog type slis_t_fieldcat_alv with header line,
fieldlayout type slis_layout_alv.
DECLARING THE EVENTTABLE INTERNL TABLE FOR USING EVENTS LIKE
TOP-OF-PAGE ETC.
data : eventstab type slis_t_event with header line.
DECLARING AN INTERNAL TABLE TO HOLD THE DATA FOR THE TOP-OF-PAGE
data : heading type slis_t_listheader with header line.
data : heading1 type slis_t_listheader with header line.
data : heading2 type slis_t_listheader with header line.
data : heading3 type slis_t_listheader with header line.
data : heading4 type slis_t_listheader with header line.
data : heading5 type slis_t_listheader with header line.
data : heading6 type slis_t_listheader with header line.
data : heading7 type slis_t_listheader with header line.
data : heading8 type slis_t_listheader with header line.
STRUCTURE TO PASS THE COLOR ATTRIBUTES FOR DISPLAY.
data : colorstruct type slis_coltypes.
INITIALIZATION. *
initialization.
syrepid = sy-repid.
sypagno = sy-pagno.
clear fieldcatalog.
START-OF-SELECTION. *
start-of-selection.
SUBROUTINE TO POPULATE THE COLORSTRUCT
perform fill_colorstruct using colorstruct.
SUBROUTINE TO POPULATE THE FIELDS OF THE FIELD CATALOGUE
perform populate_fieldcatalog.
SUBROUTINE TO SELECT DATA FROM VARIOUS TABLES AND POPULATE IT IN THE
INTERNAL TABLE.
perform selectdata_and_sort.
SUBROUTINE TO POPULATE THE LAYOUT STRUCTURE.
perform populate_layout using fieldlayout.
SUBROUTINE TO CALL THE FUNCTION MERGE TO ENSURE PROPER DISPLAY.
perform merge_fieldcatalog.
SUBROUTINE TO POPULATE THE EVENTSTAB.
perform fill_eventstab tables eventstab.
SUBROUTINE TO POPULATE THE HEADING TABLES.
perform fill_headingtable tables heading using 'HEADING'.
perform fill_headingtable tables heading1 using 'HEADING1'.
perform fill_headingtable tables heading2 using 'HEADING2'.
perform fill_headingtable tables heading3 using 'HEADING3'.
perform fill_headingtable tables heading4 using 'HEADING4'.
perform fill_headingtable tables heading5 using 'HEADING5'.
perform fill_headingtable tables heading6 using 'HEADING6'.
perform fill_headingtable tables heading7 using 'HEADING7'.
perform fill_headingtable tables heading8 using 'HEADING8'.
SUBROUTINE TO DISPLAY THE LIST.
perform display_alv_list.
FORMS
IN THIS SUBROUTINE WE POPULATE THE FIELDCATALOG TABLE WITH THE NAMES
OF THE TABLE,FIELDNAME,WHETHER IT IS KEY FIELD OR NOT,HEADING AND
COLUMN JUSTIFICATION.
form populate_fieldcatalog.
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MATNR' 'X' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MEINS' ' '.
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MAKTX' ' ' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MTART' ' ' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MATKL' ' ' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'SPRAS' ' ' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'WERKS' ' ' .
perform fill_fields_of_fieldcatalog tables fieldcatalog
using 'ITAB1' 'MINBE' ' ' .
endform. " POPULATE_FIELDCATALOG
FORM FILL_FIELDS_OF_FIELDCATALOG *
--> FIELDCATALOG *
--> P_TABNAME *
--> P_FIELDNAME *
--> P_KEY *
--> P_KEY *
form fill_fields_of_fieldcatalog tables fieldcatalog
structure fieldcatalog
using p_tabname
p_fieldname
p_key.
p_no_out.
fieldcatalog-tabname = p_tabname.
fieldcatalog-fieldname = p_fieldname.
fieldcatalog-key = p_key.
fieldcatalog-emphasize = '1234'.
*fieldcatalog-no_out = p_no_out.
append fieldcatalog.
endform. " FILL_FIELDSOFFIELDCATALOG
FORM POPULATE_LAYOUT *
--> FIELDLAYOUT *
form populate_layout using fieldlayout type slis_layout_alv.
fieldlayout-f2code = '&ETA' .
fieldlayout-zebra = 'X'.
FOR THE WINDOW TITLE.
fieldlayout-window_titlebar = 'ALV with Events'.
fieldlayout-colwidth_optimize = 'X'.
fieldlayout-no_vline = ' '.
*fieldlayout-no_input = 'X'.
fieldlayout-confirmation_prompt = ''.
fieldlayout-key_hotspot = 'X'.
This removes the column headings if the flag is set to 'X'
fieldlayout-no_colhead = ' '.
*fieldlayout-hotspot_fieldname = 'MAKTX'.
fieldlayout-detail_popup = 'X'.
fieldlayout-coltab_fieldname = 'X'.
endform. " POPULATE_LAYOUT
FORM SELECTDATA_AND_SORT *
form selectdata_and_sort.
select matnr meins mtart matkl from mara
into corresponding fields of t_mara
up to 500 rows .
select matnr maktx spras from makt
into corresponding fields of t_makt
where matnr = t_mara-matnr and
spras = sy-langu.
select matnr werks minbe from marc
into corresponding fields of t_marc
where matnr = t_mara-matnr.
append t_marc.
endselect.
append t_makt.
endselect.
append t_mara.
endselect.
perform populate_itab1.
sort itab1 by matnr.
endform. " SELECTDATA_AND_SORT
FORM MERGE_FIELDCATALOG *
form merge_fieldcatalog.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = syrepid
i_internal_tabname = 'ITAB1'
i_structure_name = 'COLORSTRUCT'
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = syrepid
changing
ct_fieldcat = fieldcatalog[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
endform. " MERGE_FIELDCATALOG
IN THIS FUNCTION THE MINIMUM PARAMETERS THAT WE NEED TO PASS IS AS
FOLLOWS:-
i_callback_program --> CALLING PROGRAM NAME
i_structure_name --> STRUCTURE NAME.
is_layout --> LAYOUT NAME.
it_fieldcat ---> BODY OF THE FIELD CATALOGUE INTERNAL TABLE
form display_alv_list.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
i_callback_program = syrepid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_structure_name = 'ITAB1'
is_layout = fieldlayout
it_fieldcat = fieldcatalog[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
THE FOLLOWING PARAMETER IS SET AS 'A' INORDER TO DISPLAY THE STANDARD
TOOL BAR
i_save = 'A'
IS_VARIANT = ' '
it_events = eventstab[]
IT_EVENT_EXIT =
IS_PRINT =
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 = itab1
exceptions
program_error = 1
others = 2.
endform. " DISPLAY_ALV_LIST
*& Form POPULATE_ITAB1
text
--> p1 text
<-- p2 text
form populate_itab1.
loop at t_mara.
loop at t_makt where matnr = t_mara-matnr.
loop at t_marc where matnr = t_mara-matnr.
move-corresponding t_mara to itab1.
move-corresponding t_makt to itab1.
move-corresponding t_marc to itab1.
append itab1.
endloop.
endloop.
endloop.
endform. " POPULATE_ITAB1
*& Form FILL_EVENTSTAB
text
-->P_EVENTSTAB text *
form fill_eventstab tables p_eventstab structure eventstab.
WHEN THE FOLLOWING FUNCTION IS CALLED THE SYSTEM POPULATES THE
INTERNAL TABLE EVENTSTAB WITH A LIST OF EVENTS NAME.
AS SHOWN BELOW WHEN USING I_LIST_TYPE = 0 THE FUNCTION RETURNS 14
EVENTS NAME.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_eventstab[]
exceptions
list_type_wrong = 1
others = 2.
BY CALLING THE ABOVE FUNCTION WE FIRST POPULATE THE EVENTSTAB WITH
THE PREDEFINED EVENTS AND THEN WE MOVE THE FORM NAME AS SHOWN BELOW.
WE ASSIGN A FORM NAME TO THE EVENT AS REQUIRED BY THE USER.
FORM NAME CAN BE ANYTHING.THE PERFORM STATEMENT FOR THIS FORM
IS DYNAMICALY CALLED.
read table p_eventstab with key name = slis_ev_top_of_page.
if sy-subrc = 0 .
move 'TOP_OF_PAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_top_of_coverpage.
if sy-subrc = 0 .
move 'TOP_OF_COVERPAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_end_of_coverpage .
if sy-subrc = 0 .
move 'END_OF_COVERPAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_foreign_top_of_page.
if sy-subrc = 0 .
move 'FOREIGN_TOP_OF_PAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_foreign_end_of_page.
if sy-subrc = 0 .
move 'FOREIGN_END_OF_PAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_list_modify.
if sy-subrc = 0 .
move 'LIST_MODIFY' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_top_of_list.
if sy-subrc = 0 .
move 'TOP_OF_LIST' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_end_of_page.
if sy-subrc = 0 .
move 'END_OF_PAGE' to p_eventstab-form.
append p_eventstab.
endif.
read table p_eventstab with key name = slis_ev_end_of_list .
if sy-subrc = 0 .
move 'END_OF_LIST' to p_eventstab-form.
append p_eventstab.
endif.
endform. " FILL_EVENTSTAB
*& Form FILL_HEADINGTABLE
text
-->P_HEADING text *
form fill_headingtable tables p_heading structure heading
using tablename.
case tablename.
when 'HEADING'.
p_heading-typ = 'H'.
concatenate
' REPORT NAME:-' syrepid
' ABB Industry Pte Ltd' into p_heading-info.
append p_heading.
write sy-datum using edit mask '__/__/____' to sydatum.
concatenate
' DATE:-' sydatum ' USER: ' sy-uname 'PAGE NO:' sypagno
into p_heading-info.
append p_heading.
when 'HEADING1'.
p_heading-typ = 'H'.
p_heading-info = 'TOP-OF-COVER-PAGE'.
append p_heading.
when 'HEADING2'.
p_heading-typ = 'H'.
p_heading-info = 'END-OF-COVER-PAGE'.
append p_heading.
when 'HEADING3'.
p_heading-typ = 'H'.
p_heading-info = 'FOREIGN-TOP-OF-PAGE'.
append p_heading.
when 'HEADING4'.
p_heading-typ = 'H'.
p_heading-info = 'FOREIGN-END-OF-PAGE'.
append p_heading.
WHEN 'HEADING5'.
P_HEADING-TYP = 'H'.
P_HEADING-INFO = 'LIST-MODIFY'.
APPEND P_HEADING.
when 'HEADING6'.
p_heading-typ = 'H'.
p_heading-info = 'END-OF-PAGE'.
append p_heading.
when 'HEADING7'.
p_heading-typ = 'H'.
p_heading-info = 'END-OF-LIST'.
append p_heading.
when 'HEADING8'.
p_heading-typ = 'H'.
p_heading-info = 'TOP-OF-LIST'.
append p_heading.
endcase.
endform. " FILL_HEADINGTABLE
FORM TOP_OF_PAGE *
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading[]
exceptions
others = 1.
endform.
*& Form FILL_COLORSTRUCT
text
-->P_COLORSTRUCT text *
form fill_colorstruct using p_colorstruct type slis_coltypes .
p_colorstruct-heacolfir-col = 6.
p_colorstruct-heacolfir-int = 1.
p_colorstruct-heacolfir-inv = 1.
endform. " FILL_COLORSTRUCT
FORM TOP_OF_COVERPAGE *
form top_of_coverpage.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading1[]
exceptions
others = 1.
endform.
FORM END_OF_COVERPAGE *
form end_of_coverpage.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading2[]
exceptions
others = 1.
endform.
FORM FOREIGN_TOP_OF_PAGE *
form foreign_top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading3[]
exceptions
others = 1.
endform.
FORM FOREIGN_END_OF_PAGE *
form foreign_end_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading4[]
exceptions
others = 1.
endform.
FORM LIST_MODIFY *
*FORM LIST_MODIFY.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEADING5[]
EXCEPTIONS
OTHERS = 1.
*ENDFORM.
FORM END_OF_PAGE *
form end_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading6[]
exceptions
others = 1.
endform.
FORM END_OF_LIST *
form end_of_list.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading7[]
exceptions
others = 1.
endform.
FORM TOP_OF_LIST *
form top_of_list.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = heading8[]
exceptions
others = 1.
endform.
SHORT DUMP IS
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
PLEASE GIVE ME ANSWER.
REGARDSHI I MADE SOME CHANGES TO UR CODE...
RUN IF THIS IS THE REQ ...
IN SELECT QUERIES OF RETRIEVING DATA..
form selectdata_and_sort.
select matnr meins mtart matkl from mara
into corresponding fields of TABLE t_mara
WHERE MATNR = T_MARA-MATNR.
up to 200 rows .
IF SY-SUBRC = 0.
MESSAGE I001 WITH ' DATA RET FROM MARA'.
ENDIF.
IF T_MARA[] IS NOT INITIAL .
select
matnr
maktx
spras
From
makt
into corresponding fields of TABLE t_makt
FOR ALL ENTRIES IN T_MARA
where matnr = t_mara-matnr and
spras = sy-langu.
ENDIF.
IF SY-SUBRC = 0 .
MESSAGE I001 WITH ' DATA RET FROM MAKT'.
ENDIF.
IF T_MAKT[] IS NOT INITIAL.
select matnr
werks
minbe
from marc
into corresponding fields of TABLE t_marc
FOR ALL ENTRIES IN
T_MAKT where matnr = t_maKT-matnr.
ENDIF.
ENDFORM. "selectdata_and_sort
JUST TRY THIS CODE.. -
Short dump SAPLSLVC_FULLSCREEN in ALV mode
Hi all
I encountered a short dump in production after i load a text file in my customised program. I did not encountered such error in DEV and UAT. This dump occurs when i add or remove the columns in ALV mode.
Runtime Error PERFORM_NOT_FOUND
Exception CX_SY_DYN_CALL_ILLEGAL_FORM
Occurred on 22.05.2008 at 15:02:44
Call (PERFORM) to a non-existent routine.
What happened?
The current program attempted to call an externally defined routine
that does not exist.
Error in ABAP application program.
The current ABAP program "SAPLSLVC_FULLSCREEN" had to be terminated because one
of the
statements could not be executed.
This is probably due to an error in the ABAP program.
The current ABAP program had to be terminated because the
ABAP processor detected an internal system error.
The current ABAP program "SAPLSLVC_FULLSCREEN" had to be terminated because the
ABAP
processor discovered an invalid system state.
Can anyone kindly advice? Thanks.** WA-NAME = 'TOP_OF_PAGE'. "'SLIS_EV_TOP_OF_PAGE'.
** WA-FORM = 'TOPOFPAGE'.
** APPEND WA TO T_EVENTS.
** WA-NAME = 'END_OF_PAGE'.
** WA-FORM = 'ENDOFPAGE'.
** APPEND WA TO T_EVENTS.
** WA-NAME = 'END_OF_LIST'.
** WA-FORM = 'ENDOFLIST'.
** APPEND WA TO T_EVENTS.
please comment like this code in your code.. -
could anybody advice, ALV GRID FM(field catalog issue)is getting short dump, but workig fine for ALV LIST.
PERFORM create_field_catalog USING:
'TRAFFIC_LIGHT' ' ' 15 'Status' 'Status' ' ',
'VKORG' ' ' 15 'Sales Org' 'Sales Org' ' ',
'VTWEG' ' ' 15 'Dist Channel' 'Dist Channel' ' ',
'KUNRG' ' ' 15 'Payer' 'Payer' ' ',
'PAYER' ' ' 15 'Payer Name' 'Payer Name' ' ',
'KUNAG' ' ' 15 'Ship-To' 'Ship-To' ' ',
'SHIPTO' ' ' 15 'Ship-To Name' 'Ship-To Name' ' ',
'SHIPTOPAR' ' ' 15 'Bill to Party' 'Bill To Party' ' ',
'KDGRP' ' ' 15 'Customer Grp' 'Customer Grp' ' ',
'ZCUSTPO' ' ' 15 'Customer PO' 'Customer PO' ' ',
'VBELN' ' ' 15 'Billing Doc' 'Billing Doc' ' ',
'FKDAT' ' ' 15 'Billing Date' 'Billing Date' ' ',
'FKART' ' ' 15 'Billing Type' 'Billing Type' ' ',
'ZOUTPUT' ' ' 15 'Output Type' 'Output Type' ' ',
'NETWR' ' ' 15 'Net Value' 'Net Value' 'X',
'KWERT' ' ' 15 'Total VAT' 'Total VAT' 'X',
'WAERK' ' ' 15 'Currency' 'Currency' ' ',
'XBLNR' ' ' 15 'Reference' 'Reference' ' ',
'DELNO' ' ' 15 'Delivery #' 'Delivery #' ' ',
'TLINE' ' ' 15 'Manifest #' 'Manifest #' ' ',
'ZBOL' ' ' 15 'Bill Of Ldng' 'Bill of Ldng' ' ',
'LIFEX' ' ' 15 'Ext Del #' 'Ext Del #' ' ',
'POSNR' ' ' 15 'Item' 'Item' ' ',
'MATNR' ' ' 18 'Material' 'Material' ' ',
'KDMAT' ' ' 15 'Cust Matl' 'Cust Matl' ' ',
'WERKS' ' ' 15 'Plant' 'Plant' ' ',
'ZZPLAT' ' ' 10 'Platform' 'Platform' ' ',
'ZZPRONUM' ' ' 10 'Program' 'Program' ' ',
'ZZPROCODE' ' ' 10 'Prod Code' 'Prod Code' ' ',
'FKIMG' ' ' 15 'Qty' 'Qty' ' ',
'VRKME' ' ' 15 'UoM' 'UoM' ' ',
'ARKTX' ' ' 15 'Description' 'Description' ' ',
'KBETR' ' ' 15 'Price' 'Price' ' ',
'VATRT' ' ' 15 'VAT Rate' 'VAT Rate' ' ',
'KWERT_D' ' ' 15 'Item VAT' 'Item VAT' 'X',
'NETWR_D' ' ' 15 'Item Net Value' 'Item Net Value' 'X',
'VGBEL' ' ' 15 'Ref Document' 'Ref Document' ' ',
'VGPOS' ' ' 13 'Ref Doc Line' 'Ref Doc Line' ' ' .
FORM create_field_catalog USING fieldname TYPE c
inttype TYPE c
outputlen TYPE i
coltext TYPE c
seltext TYPE c
do_sum TYPE c.
DATA: l_f_fieldcat TYPE slis_fieldcat_alv.
l_f_fieldcat-fieldname = fieldname.
l_f_fieldcat-inttype = inttype.
l_f_fieldcat-outputlen = outputlen.
l_f_fieldcat-seltext_m = coltext.
l_f_fieldcat-seltext_l = seltext.
l_f_fieldcat-reptext_ddic = coltext.
l_f_fieldcat-do_sum = do_sum.
APPEND l_f_fieldcat TO t_field_catalog.
CLEAR l_f_fieldcat.
ENDFORM. "CREATE_FIELD_CATALOG
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'F_USER_COMMAND'
i_grid_settings = f_grid_settings
is_layout = f_grid_layout
is_print = f_print_settings
i_background_id = 'BACK'
it_events = t_events[]
it_fieldcat = t_field_catalog
it_sort = t_sortcat[]
i_default = 'X'
i_save = 'A'
is_variant = f_variant
TABLES
t_outtab = t_output4
EXCEPTIONS
program_error = 1
OTHERS = 2.BEGIN OF t_output4 OCCURS 0,
traffic_light TYPE c,
vkorg LIKE vbrk-vkorg,
vtweg LIKE vbrk-vtweg,
kunrg LIKE vbrk-kunrg,
payer LIKE adrc-name1,
kunag LIKE vbrk-kunag,
shipto LIKE adrc-name1,
shiptopar LIKE likp-kunnr,
kdgrp LIKE vbrk-kdgrp,
zcustpo LIKE vbkd-bstkd,
vbeln LIKE vbrk-vbeln,
fkdat LIKE vbrk-fkdat,
fkart LIKE vbrk-fkart,
zoutput LIKE dnast-kschl,
netwr LIKE vbrk-netwr,
kwert LIKE konv-kwert,
waerk LIKE vbrk-waerk,
xblnr LIKE vbrk-xblnr,
delno LIKE likp-vbeln,
t_line LIKE tline-tdline,
zbol LIKE likp-bolnr,
lifex LIKE likp-lifex,
posnr LIKE vbrp-posnr,
matnr LIKE vbrp-matnr,
kdmat LIKE lips-kdmat,
werks LIKE vbrp-werks,
zzplat LIKE vbrp-zzplat,
zzpronum LIKE vbrp-zzpronum,
zzprocode LIKE a802-zzprocode,
fkimg LIKE vbrp-fkimg,
vrkme LIKE vbrp-vrkme,
arktx LIKE vbrp-arktx,
kbetr LIKE konv-kbetr,
vatrt TYPE p DECIMALS 1,
kwert_d LIKE konv-kwert,
netwr_d LIKE vbrp-netwr,
vgbel LIKE vbrp-vgbel,
vgpos LIKE vbrp-vgpos,
END OF t_output4, -
If i run oops alv in background, its going dump
If I run oops alv in background its going dump?
can any one suggest me to do this or to overcome
thanks and regards
settyALV's can be run in background if you use a docking container instead of a custom container.
Please search the forum for "ALV in background". You will find tons of threads with solutions.
Re: How to run ALV reports in batch
Sample code to have ALV Grid in Background -
Explicit Search Helps Short-Dump in Editable ALV with included structure
I have an editable ALV grid defined as follows:
TYPES: BEGIN OF gs_outtab200.
TYPES: row_indx(4) TYPE n.
TYPES: multipurp TYPE c.
INCLUDE structure zxrfwc_test.
TYPES: end of gs_outtab200.
DATA:
gt_outtab200 TYPE TABLE OF gs_outtab200,
wa_outtab200 TYPE gs_outtab200.
The included structure zxrfwc_test has a component (field) which is defined with a data element that has an explicit search helps associated with it.
I know that this search help is working properly because it works fine in the program's selection screen.
But when I invoke the search help from within a column of the ALV itself, I get a short dump with a "GETWA_NOT_ASSIGNED" error.
I have done plenty of editable ALVs with search helps defined on the data elements and never encountered this problem.
Am I hitting this problem because the zxrfwc_test structure is defined within the
gs_outtab200 structure ??
If not, what is causing this problem. (Please note that I have set ls_fcat-F4AVAILABL = 'X' in the fieldcat routine - this doesn't seem to help at all.)
Please advise!!!!
I'm really stuck on this one because it's always worked before when I'm not dealing with a dictionary structure that's included within a larger ALV structure.
Thanks.Hi,
How you are creating your field catalog?
Try to create a field catalog in the following way giving reference to your structure. is it possible for you create a DDIC structure as same as
TYPES: BEGIN OF gs_outtab200.
TYPES: row_indx(4) TYPE n.
TYPES: multipurp TYPE c.
INCLUDE structure zxrfwc_test.
TYPES: end of gs_outtab200.
* Form f_generate_fieldcatalog *
* Form generate the field catalog table *
form f_generate_fieldcatalog.
* Private variable
data : v_structure like dd02l-tabname. " Table Name
v_structure = c_yatt_alv. " Structure Name
* Build the fieldcat according to DDIC structure YATT_ALV:
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = v_structure
i_client_never_display = c_x
changing
ct_fieldcat = i_fieldcat[].
endform. " F_generate_fieldcatalog
a®
Maybe you are looking for
-
Payment program- error in payment proposal
frnds i am trying to run payment program and after entring all the parameters, i tried to display proposal, but it gave me following error and message no. Message no: FZ003 Error: Compnay codes TT00/TT00 do not appear in proposal 04/13/2007. Diagnosi
-
Since upgrading to iOS 7.0.3.4 I can link to Folders but not to Albums in Photoshop Elkements 11. Is Apple aware of this bug and can we expect that it will be corrrected in due course? Has anyone got a fix? I can Export Albums from Organiser to Adobe
-
HELP!!! --- Runtime in Linux?
We have a code that was supposed to execute an executable file. It uses the Runtime class. But it does not run on Linux though..help? :(
-
I have a Cisco aironet 1040. On my Accespoint i have 2 vlans: 1 for my wifi phones and 1 for my network. Wifi Lan has the SSID LAN with WPA enterprise authentication to a radius server(ms server 2008). Wifi Phone has SSID PHONE and vlan 50 with local
-
Hi I have configured reciever channel to jdbc adapter.I have queried database by Select col_nam from table wher value=... Please can you tell me the location where i will get the output resulset. Thanking you in advance.