How to generate Inventory Report to display all details at end of mon/yr?
Hi Guys..
I would like to know how we can generate a
Inventory report to display all inventory details at the end of every
month or year?
Also, another question.How can we create a PO past delivery date report?
Any help is appreciated.
Thanks,
Sri Harsha;
Hi,
Pls the code here-
TYPES :
BEGIN OF ty_mard,
matnr TYPE matnr,
werks TYPE werks_d,
lgort TYPE lgort_d,
labst TYPE labst,
retme TYPE retme,
umlme TYPE umlme,
END OF ty_mard.
TYPES :
BEGIN OF ty_mska,
matnr TYPE matnr,
kalab TYPE labst,
vbeln TYPE vbeln,
posnr TYPE posnr,
END OF ty_mska.
TYPES :
BEGIN OF ty_vbap,
matnr TYPE matnr,
kwmeng TYPE kwmeng,
pstyv TYPE pstyv,
END OF ty_vbap.
TYPES :
BEGIN OF ty_mbew,
matnr TYPE matnr,
salk3 TYPE salk3,
stprs TYPE stprs,
END OF ty_mbew.
TYPES :
BEGIN OF ty_mchb,
matnr TYPE matnr,
charg TYPE charg_d,
END OF ty_mchb.
TYPES :
BEGIN OF ty_mara,
matnr TYPE matnr,
mfrpn TYPE mfrpn,
END OF ty_mara.
TYPES :
BEGIN OF ty_makt,
matnr TYPE matnr,
maktx TYPE maktx,
END OF ty_makt.
TYPES :
BEGIN OF ty_ekpo,
matnr TYPE matnr,
netpr TYPE bprei,
meins TYPE bstme,
END OF ty_ekpo.
DATA :
BEGIN OF final OCCURS 0,
matnr LIKE mard-matnr,
maktx LIKE makt-maktx,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
mfrpn LIKE mara-mfrpn,
usp LIKE mbew-stprs,
labst LIKE mard-labst,
salk3 LIKE mbew-salk3,
kalab LIKE mska-kalab,
vbeln LIKE mska-vbeln,
sov LIKE ekpo-netpr,
uom LIKE ekpo-meins,
posnr LIKE mska-posnr,
pstyv LIKE vbap-pstyv,
kwmeng LIKE vbap-kwmeng,
retme LIKE mard-retme,
umlme LIKE mard-umlme,
END OF final.
DATA :
BEGIN OF itab OCCURS 0,
matnr LIKE mard-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
labst LIKE mard-labst,
retme LIKE mard-retme,
umlme LIKE mard-umlme,
charg LIKE mchb-charg,
END OF itab.
DATA :
i_mard TYPE STANDARD TABLE OF ty_mard,
i_mbew TYPE STANDARD TABLE OF ty_mbew,
i_mchb TYPE STANDARD TABLE OF ty_mchb,
i_mara TYPE STANDARD TABLE OF ty_mara,
i_vbap TYPE STANDARD TABLE OF ty_vbap,
i_mska TYPE STANDARD TABLE OF ty_mska,
i_makt TYPE STANDARD TABLE OF ty_makt,
i_ekpo TYPE STANDARD TABLE OF ty_ekpo.
DATA :
wa_mard TYPE ty_mard,
wa_mbew TYPE ty_mbew,
wa_mchb TYPE ty_mchb,
wa_mara TYPE ty_mara,
wa_vbap TYPE ty_vbap,
wa_mska TYPE ty_mska,
wa_makt TYPE ty_makt,
wa_ekpo TYPE ty_ekpo.
DATA :
sov_total TYPE currency,
urestrict_total type currency.
*Select options:
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR gf_matnr, " Material No.
s_werks FOR gf_werks, " Plant
s_lgort FOR gf_lgort, " Storage Location
s_charg FOR gf_charg. " Batch No.
SELECTION-SCREEN END OF BLOCK a.
*Validation of Selection Fields
AT SELECTION-SCREEN.
IF s_matnr IS INITIAL
AND s_werks IS INITIAL
AND s_lgort IS INITIAL
AND s_charg IS INITIAL.
MESSAGE e001(zcir).
ENDIF.
*Function Module for Checking the inputs
CALL FUNCTION 'MMIM_ENTRYCHECK_MAIN'
TABLES
it_matnr = s_matnr
it_werks = s_werks
it_lgort = s_lgort.
*Checking of input values for S_CHARG
IF NOT s_charg-low IS INITIAL OR NOT s_charg-high IS INITIAL.
SELECT charg FROM mchb into table LT_charg WHERE charg IN s_charg.
IF sy-subrc NE 0.
MESSAGE e002(zcir).
ENDIF.
clear wa_mchb.
ENDIF.
*TOP OF PAGE
TOP-OF-PAGE.
FORMAT COLOR COL_HEADING.
WRITE sy-uline(105).
WRITE :/ '|',2 text-101, "MATERIAL NO:
16 text-102, "MATERIAL DESCRIPTION
52 text-103, "PLANT
60 text-104, "STORAGE LOCATION.
74 text-105, "MANUFACTURE PARTNER NO.
88 text-106, "VALUATED STOCK.
95 text-107. "STANDARD PRICE.
105 '|'.
FORMAT COLOR COL_GROUP.
WRITE :/ '|',2 text-108, " UNRESTRCTED STOCK
16 text-109, " SALES DOCUMENT NO:
20 text-110, " ITEM NO:
27 text-111, " UNIT
32 text-112, " NET VALUE
39 text-113, " ITEM CATEGRY
50 text-114, " QUANTITY
60 text-115, " BLOCKED STOCK
79 text-116, " TOTAL STOCK
95 text-117. " STOCK TRANSFER
87 '|'.
FORMAT COLOR OFF.
WRITE sy-uline(105).
*START OF SELECTION
START-OF-SELECTION.
IF NOT s_matnr IS INITIAL
OR NOT s_werks IS INITIAL
OR NOT s_lgort IS INITIAL.
PERFORM select1.
ELSEIF NOT s_charg IS INITIAL.
PERFORM select2.
ELSEIF NOT s_matnr IS INITIAL
OR NOT s_werks IS INITIAL
OR NOT s_lgort IS INITIAL
AND NOT s_charg IS INITIAL.
PERFORM select3.
ENDIF.
PERFORM final1.
PERFORM collect.
*END OF SELECTION
END-OF-SELECTION.
LOOP AT LT_FINAL.
FORMAT COLOR COL_KEY.
WRITE :/2 LT_FINAL-matnr,
14 LT_FINAL-maktx,
52 LT_FINAL-werks,
58 LT_FINAL-lgort,
69 LT_FINAL-mfrpn,
73 LT_FINAL-labst,
87 LT_FINAL-usp.
FORMAT COLOR OFF.
FORMAT COLOR COL_NORMAL.
WRITE :/2 LT_FINAL-kalab,
14 LT_FINAL-vbeln,
17 LT_FINAL-posnr,
24 LT_FINAL-uom,
28 LT_FINAL-sov,
36 LT_FINAL-pstyv,
46 LT_FINAL-kwmeng,
57 LT_FINAL-retme,
65 LT_FINAL-salk3,
75 LT_FINAL-umlme.
ENDLOOP.
FORMAT COLOR COL_TOTAL.
WRITE :/2 text-119, " TOTAL VALUE
28 V_sov_total,
87 V_urestrict_total.
FORMAT COLOR OFF.
Form Name: select1
text: Population of internal table LT_MARD and using LT_MARD populating
the internal table LT_MCHB
FORM select1.
SELECT matnr
werks
lgort
labst
retme
umlme
FROM mard
INTO TABLE LT_mard
WHERE matnr IN s_matnr
AND werks IN s_werks
AND lgort IN s_lgort.
SELECT matnr
charg
FROM mchb
INTO TABLE LT_mchb
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
ENDFORM. "select1
Form Name: select2
text:Population of internal table LT_MCHB and using LT_MCHB populating
LT_MARD
FORM select2.
SELECT matnr
charg
FROM mchb
INTO TABLE LT_mchb
WHERE charg IN s_charg.
SELECT matnr
werks
lgort
labst
retme
umlme
FROM mard
INTO TABLE LT_mard
FOR ALL ENTRIES IN LT_mchb
WHERE matnr EQ LT_mchb-matnr.
ENDFORM. "select2
Form Name: select3
text: Population of internal table LT_TAB using inner join and then
populating internal tables LT_MARD and LT_MCHB
FORM select3.
SELECT a~matnr
a~werks
a~lgort
a~labst
a~retme
a~umlme
b~charg
INTO CORRESPONDING FIELDS OF TABLE LT_TAB
FROM mard AS a
INNER JOIN mchb AS b ON bmatnr = amatnr
WHERE a~matnr IN s_matnr
OR a~werks IN s_werks
OR a~lgort IN s_lgort
AND b~charg IN s_charg.
LOOP AT LT_TAB.
MOVE: LT_TAB-matnr TO wa_mard-matnr,
LT_TAB-werks TO wa_mard-werks,
LT_TAB-lgort TO wa_mard-lgort,
LT_TAB-labst TO wa_mard-labst,
LT_TAB-retme TO wa_mard-retme,
LT_TAB-umlme TO wa_mard-umlme,
LT_TAB-matnr TO wa_mchb-matnr,
LT_TAB-charg TO wa_mchb-charg.
APPEND wa_mard TO LT_mard.
APPEND wa_mchb TO LT_mchb.
ENDLOOP.
ENDFORM. "select3
Form Name:collect
text:population of LT_FINAL internal table-LT_FINAL using other internal
tables
FORM collect.
LOOP AT LT_mard INTO wa_mard.
MOVE : wa_mard-matnr TO LT_FINAL-matnr,
wa_mard-werks TO LT_FINAL-werks,
wa_mard-lgort TO LT_FINAL-lgort,
wa_mard-labst TO LT_FINAL-labst,
wa_mard-retme TO LT_FINAL-retme,
wa_mard-umlme TO LT_FINAL-umlme.
READ TABLE LT_makt INTO wa_makt WITH KEY matnr = wa_mard-matnr.
MOVE wa_makt-maktx TO LT_FINAL-maktx.
READ TABLE LT_mska INTO wa_mska WITH KEY matnr = wa_mard-matnr.
MOVE: wa_mska-kalab TO LT_FINAL-kalab,
wa_mska-vbeln TO LT_FINAL-vbeln,
wa_mska-posnr TO LT_FINAL-posnr.
READ TABLE LT_vbap INTO wa_vbap WITH KEY matnr = wa_mard-matnr.
MOVE: wa_vbap-kwmeng TO LT_FINAL-kwmeng.
READ TABLE LT_mara INTO wa_mara WITH KEY matnr = wa_mard-matnr.
MOVE : wa_mara-mfrpn TO LT_FINAL-mfrpn.
READ TABLE LT_mbew INTO wa_mbew WITH KEY matnr = wa_mard-matnr.
Calculation of Unrestricted value
LT_FINAL-usp = wa_mard-labst * wa_mbew-stprs.
V_urestrict_total = V_urestrict_total + ( wa_mard-labst * wa_mbew-stprs ).
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = V_urestrict_total
IMPORTING
OUTPUT = V_urestrict_total
MOVE wa_mbew-salk3 TO LT_FINAL-salk3.
READ TABLE LT_ekpo INTO wa_ekpo WITH KEY matnr = wa_mard-matnr.
MOVE wa_ekpo-meins TO LT_FINAL-uom.
Calculation of Sales Order Value
LT_FINAL-sov = wa_mska-kalab * wa_ekpo-netpr.
V_sov_total = V_sov_total + ( wa_mska-kalab * wa_ekpo-netpr ).
APPEND LT_FINAL.
ENDLOOP.
ENDFORM. "collect
*Form Name:FINAL1
*Population of all the internal tables
FORM FINAL1.
SELECT matnr
kalab
vbeln
posnr
FROM mska
INTO TABLE LT_mska
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
SELECT matnr
kwmeng
pstyv
FROM vbap
INTO TABLE LT_vbap
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
SELECT matnr
salk3
stprs
FROM mbew
INTO TABLE LT_mbew
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
SELECT matnr
mfrpn
FROM mara
INTO TABLE LT_mara
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
SELECT matnr
maktx
FROM makt
INTO TABLE LT_makt
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
SELECT matnr
netpr
FROM ekpo
INTO TABLE LT_ekpo
FOR ALL ENTRIES IN LT_mard
WHERE matnr EQ LT_mard-matnr.
ENDFORM. "final1
Reward if helpful.
Chandralekha
Similar Messages
-
How to generate the reports in BI and display in EP ?
Hi All
I am new to BI but i am working on EP
Can any one help me how to generate the reports in BI and should be displayed
in EP frontend? So what and all settings and installations i need to do ?
Any documents on this will be really helpful to me..........
Adv...thanks and regards
KopsHi kops,
Check the links below.What you need is there..
How can i place a query developed in BEX to portal
http://help.sap.com/saphelp_nw04s/helpdata/en/43/92dceb49fd25e5e10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm -
How to generate classical report
Hi guys,
I need a help from you. how to generate classical report can you guide me please.
Thanks guys.Vijay,
To generate a report, follow the steps below
1) Determine the desired output for End-user
2) Based on the desired output, write a program with data declarations for all the variales u will display in the report
3) Write extraction routines to fetch data from the DB tables
4) Read extracted data and bind the data for final output
5) Output data
here's a simple example for your ref
report ztest.
Table declaration
data: it_mara type table of mara with header line.
SELECTION SCREEN
parameters: p_matnr like mara-matnr.
start-of-selection.
select * from mara into table it_mara where matnr = p_matnr.
end-of-selection.
loop at it_mara.
write: it_mara-matnr, it_mara-mtart, it_mara-mbrsh.
endloop.
reward if helpful,
Karthik
Message was edited by:
Karthik -
How 2 creat report for displaying the details of a Delivery Document using
how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
thank you
regards,
jagrut bharatkumar shukla
points will be rewardedHI
I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
*& Report ZDELIVERY *
report zdelivery message-id z9bhu .
types: begin of t_likp,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
* LFDAT TYPE LIKP-LFDAT, "Delevery Date
* WAERK TYPE LIKP-WAERK, "Currency
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
end of t_likp.
types: begin of t_lips,
vbeln type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr,
* MEINS TYPE LIPS-MEINS, "Base Unit of Measure
vgbel type lips-vgbel, "Doc no of the reference document
end of t_lips.
types: begin of t_vbpa,
vbeln type vbpa-vbeln, "SD DocumenT Number
posnr type vbpa-posnr, "Item number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
end of t_vbpa.
types: begin of t_kna1,
kunnr type kna1-kunnr, "Customer Number 1
name1 type kna1-name1, "Name 1
ort01 type kna1-ort01, "City
adrnr type kna1-adrnr, "Address
end of t_kna1.
types: begin of t_li_vbpa,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
* LFDAT TYPE LIKP-LFDAT, "Delevery Date
* WAERK TYPE LIKP-WAERK, "Currency
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
vbeln1 type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr, "Net Price
* MEINS TYPE LIPS-MEINS, "Base Unit of Measure
vgbel type lips-vgbel, "Doc no of the reference document
vbeln3 type vbpa-vbeln, "SD DocumenT Number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
end of t_li_vbpa.
types: begin of t_final,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
vbeln1 type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr, "Net Price
vgbel type lips-vgbel, "Doc no of the reference document
vbeln3 type vbpa-vbeln, "SD DocumenT Number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
name1 type kna1-name1, "Name 1
ort01 type kna1-ort01, "City
adrnr1 type kna1-adrnr, "Address
name2 type kna1-name1, "Name 1
ort02 type kna1-ort01, "City
adrnr2 type kna1-adrnr, "Address
name3 type kna1-name1, "Name 1
ort03 type kna1-ort01, "City
adrnr3 type kna1-adrnr, "Address
end of t_final.
* D A T A D E C L A R A T I O N
*&*********Internal Table Declaration****************&*
data: it_likp type standard table of t_likp.
data: it_lips type standard table of t_lips.
data: it_vbpa type standard table of t_vbpa.
data: it_kna1 type standard table of t_kna1.
data: it_li_vbpa type standard table of t_li_vbpa.
data: it_li_vbpa_temp type standard table of t_li_vbpa.
data: it_final type standard table of t_final.
*&*********Work Area Declaration********************&*
data: wa_likp type t_likp.
data: wa_lips type t_lips.
data: wa_vbpa type t_vbpa.
data: wa_kna1 type t_kna1.
data: wa_li_vbpa type t_li_vbpa.
data: wa_li_vbpa_temp type t_li_vbpa.
data: wa_final type t_final.
*&*********Data Declaration************************&*
data: d_vbeln type likp-vbeln.
data: flag type i value 0.
* S E L E C T I O N S C R E E N D E C L A R A T I O N
selection-screen begin of block block2 with frame title text-001.
select-options: s_vbeln for d_vbeln obligatory. "Delivery no
selection-screen end of block block2.
* A T S E L E C T I O N - S C R E E N E V E N T S
*AT SELECTION-SCREEN.
*PERFORM VALIDATE_DATA.
* S T A R T O F S E L E C T I O N E V E N T S
start-of-selection.
perform fetch_data.
perform merge_data_kna1.
*INCLUDE Z9BT_SH_***4_FORMS.
call function 'OPEN_FORM'
exporting
* APPLICATION = 'TX'
* ARCHIVE_INDEX =
* ARCHIVE_PARAMS =
device = 'PRINTER'
* DIALOG = 'X'
* FORM = ' '
language = sy-langu
* OPTIONS =
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJECT =
* RAW_DATA_INTERFACE = '*'
* SPONUMIV =
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
exceptions
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
others = 12
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
sort it_final by vbeln.
loop at it_final into wa_final.
call function 'START_FORM'
exporting
* ARCHIVE_INDEX =
form = 'Z9BT_DELIVERY'
language = sy-langu
* STARTPAGE = ' '
* PROGRAM = ' '
* MAIL_APPL_OBJECT =
* IMPORTING
* LANGUAGE =
exceptions
form = 1
format = 2
unended = 3
unopened = 4
unused = 5
spool_error = 6
codepage = 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.
call function 'WRITE_FORM'
exporting
element = 'ITEM_LIST'
function = 'SET'
type = 'BODY'
window = 'MAIN'
* IMPORTING
* PENDING_LINES =
* EXCEPTIONS
* ELEMENT = 1
* FUNCTION = 2
* TYPE = 3
* UNOPENED = 4
* UNSTARTED = 5
* WINDOW = 6
* BAD_PAGEFORMAT_FOR_PRINT = 7
* SPOOL_ERROR = 8
* CODEPAGE = 9
* OTHERS = 10
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'END_FORM'
* IMPORTING
* RESULT =
exceptions
unopened = 1
bad_pageformat_for_print = 2
spool_error = 3
codepage = 4
others = 5
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
call function 'CLOSE_FORM'
* IMPORTING
* RESULT =
* RDI_RESULT =
* TABLES
* OTFDATA =
exceptions
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
others = 6
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 VALIDATE_DATA
* text
* --> p1 text
* <-- p2 text
form validate_data .
select single vbeln into wa_likp-vbeln
from likp where vbeln in s_vbeln.
append wa_likp to it_likp.
if sy-subrc <> 0.
flag = 1.
endif.
endform. " VALIDATE_DATA
*& Form FETCH_DATA
* text
* --> p1 text
* <-- p2 text
form fetch_data .
select a~vbeln
a~erdat
a~kunnr
a~kunag
a~traty
b~vbeln
b~posnr
b~matnr
b~arktx
b~lfimg
b~netpr
b~vgbel
c~vbeln
c~parvw
c~kunnr
into table it_li_vbpa
from likp as a
left outer join lips as b on a~vbeln = b~vbeln
inner join vbpa as c on b~vgbel = c~vbeln
where a~vbeln in s_vbeln and
c~parvw = 'RE'.
endform. " FETCH_DATA
*& Form MERGE_DATA_KNA1
* text
* --> p1 text
* <-- p2 text
form merge_data_kna1 .
if it_li_vbpa[] is not initial.
it_li_vbpa_temp[] = it_li_vbpa[].
sort it_li_vbpa_temp by kunnr.
delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
loop at it_li_vbpa into wa_li_vbpa.
read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
wa_li_vbpa-kunag.
if sy-subrc <> 0.
wa_li_vbpa_temp = wa_li_vbpa.
append wa_li_vbpa_temp to it_li_vbpa_temp.
endif.
read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
wa_li_vbpa-kunnrb.
if sy-subrc <> 0.
wa_li_vbpa_temp = wa_li_vbpa.
append wa_li_vbpa_temp to it_li_vbpa_temp.
endif.
endloop.
endif.
if it_li_vbpa_temp[] is not initial.
select kunnr
name1
ort01
adrnr into table it_kna1 from kna1
for all entries in it_li_vbpa_temp
where kunnr = it_li_vbpa_temp-kunnr.
endif.
loop at it_li_vbpa into wa_li_vbpa .
wa_final-vbeln = wa_li_vbpa-vbeln.
wa_final-erdat = wa_li_vbpa-erdat.
*it_final-LFART = it_li_vbpa-LFART.
wa_final-kunnr = wa_li_vbpa-kunnr.
wa_final-kunag = wa_li_vbpa-kunag.
*it_final-VSTEL = it_li_vbpa-VSTEL.
wa_final-traty = wa_li_vbpa-traty.
wa_final-vbeln1 = wa_li_vbpa-vbeln.
wa_final-posnr = wa_li_vbpa-posnr.
wa_final-matnr = wa_li_vbpa-matnr.
wa_final-arktx = wa_li_vbpa-arktx.
wa_final-lfimg = wa_li_vbpa-lfimg.
wa_final-netpr = wa_li_vbpa-netpr.
*wa_final-GEWEI = it_li_vbpa-GEWEI.
*it_final-VOLUM = it_li_vbpa-VOLUM.
*it_final-VOLEH = it_li_vbpa-VOLEH.
wa_final-vgbel = wa_li_vbpa-vgbel.
wa_final-vbeln3 = wa_li_vbpa-vbeln.
*wa_final-PARVW = wa_li_vbpa-PARVW.
wa_final-kunnrb = wa_li_vbpa-kunnrb.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
if sy-subrc = 0.
wa_final-name1 = wa_kna1-name1.
wa_final-ort01 = wa_kna1-ort01.
wa_final-adrnr1 = wa_kna1-adrnr.
endif.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
if sy-subrc = 0.
wa_final-name2 = wa_kna1-name1.
wa_final-ort02 = wa_kna1-ort01.
wa_final-adrnr2 = wa_kna1-adrnr.
endif.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
if sy-subrc = 0.
wa_final-name3 = wa_kna1-name1.
wa_final-ort03 = wa_kna1-ort01.
wa_final-adrnr3 = wa_kna1-adrnr.
endif.
append wa_final to it_final.
clear wa_final.
endloop.
endform. -
How to generate a report direct in PDF with oracle developer 6i
hi all
Please help me about this issue.
THAT How to generate a report directly in PDF using oracle developer 6i.
Regards
Yousuf Ahmed SiddiquiHi,
You can create the Report directly in PDF by setting some of the Report Parameters
i.e. DESTYPE, DESNAME AND DESFORMAT as follows before calling the Report.
DECLARE
PL_ID PARAMLIST;
PL_NAME VARCHAR2(10) := 'param_list';
BEGIN
PL_ID := GET_PARAMETER_LIST (PL_NAME);
IF NOT ID_NULL (PL_ID) THEN
Destroy_Parameter_List(PL_ID);
END IF;
PL_ID := Create_Parameter_List(PL_NAME);
Add_Parameter (PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
Add_Parameter (PL_ID, 'DESNAME', TEXT_PARAMETER, 'c:\test.pdf');
Add_Parameter (PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
RUN_PRODUCT (REPORTS, 'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
END;Hope this helps.
Best Regards
Arif Khadas
Edited by: Arif Khadas on Apr 22, 2010 9:24 AM -
How to generate interactive report in alv
hi,
how to generate interactive report in alv,for this what are the requirements,
give me one sample report.
thankyou.Hi,
Chk these helpful links..
ALV
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Regards
Anversha -
How to generate my report in HTML format
Hi
I am using Forms and reports 6i . How to generate a report in Html format.
Please explain what are the option available in reports and the way to do
thanks in advance
prasanth a.s.*specify desformat=html in cmd line
refer
* Forms Reports integration 6i
http://otn.oracle.com/products/forms/pdf/277282.pdf
[ All Docs for all versions ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i ]
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
--------------------------------------------------------------------------------- -
How to generate PDF report directly instead of RPT report by using JRC ?
Hi,
Good Day !
How to generate PDF report directly instead of RPT report by using Crystal Reports XI Release 2 Java Reporting Component (JRC) in desktop (Swing thick-client) ?
My GUI program will generate a RPT report, then i can export to PDF file, this is ok, no problem.
BUT
i want it direct to generate a PDF report, not a RPT report.
The code like below (2 java files)
ClassA.java
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(XXX, 0);
ParameterFieldController paramFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
paramFieldController.setCurrentValue("", "XXX", DomainClass.getXXX());
new ReportViewerFrame(reportClientDoc);
// End of ClassA.java
// Begin ReportViewerFrame.java
public class ReportViewerFrame extends JFrame
//Initial window frame properties.
private final int XPOS = 80;
private final int YPOS = 60;
private final int WIDTH = 760;
private final int HEIGHT = 550;
private ReportViewerBean reportViewer = new ReportViewerBean();
private ReportClientDocument reportClientDoc = new ReportClientDocument();
public ReportViewerFrame(ReportClientDocument reportClientDoc) throws Exception
//Initialize frame properties.
this.setResizable(true);
this.setLocation(XPOS, YPOS);
this.setSize(WIDTH, HEIGHT);
this.setTitle("Crystal Report Java Viewer");
//Add GUI components to the frame including the ReportViewerBean.
addComponents();
//Add GUI listeners to the frame.
addListeners();
//Set the report that the ReportViewerBean will display.
this.reportClientDoc = reportClientDoc;
reportViewer.setReportSource(reportClientDoc.getReportSource());
reportViewer.init();
reportViewer.start();
//Display the frame.
this.setVisible(true);
How to set the export option to PDF base on existing code ?
Where can i download this package/jar ?
regardsPlease find a console app that you can extend it to a JFrame app by importing the relevant swing package:
//Crystal Java Reporting Component (JRC) imports.
import com.crystaldecisions.reports.sdk.*;
import com.crystaldecisions.sdk.occa.report.lib.*;
import com.crystaldecisions.sdk.occa.report.exportoptions.*;
//Java imports.
import java.io.*;
public class ExportReport {
static final String REPORT_NAME = "ExportReport.rpt";
static final String EXPORT_FILE = "C:\\myExportedReport.pdf";
public static void main(String[] args) {
try {
//Open report.
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_NAME, 0);
//NOTE: If parameters or database login credentials are required, they need to be set before.
//calling the export() method of the PrintOutputController.
//Export report and obtain an input stream that can be written to disk.
//See the Java Reporting Component Developer's Guide for more information on the supported export format enumerations
//possible with the JRC.
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
//Release report.
reportClientDoc.close();
//Use the Java I/O libraries to write the exported content to the file system.
byte byteArray[] = new byte[byteArrayInputStream.available()];
//Create a new file that will contain the exported result.
File file = new File(EXPORT_FILE);
FileOutputStream fileOutputStream = new FileOutputStream(file);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
byteArrayOutputStream.writeTo(fileOutputStream);
//Close streams.
byteArrayInputStream.close();
byteArrayOutputStream.close();
fileOutputStream.close();
System.out.println("Successfully exported report to " + EXPORT_FILE);
catch(ReportSDKException ex) {
ex.printStackTrace();
catch(Exception ex) {
ex.printStackTrace();
As to the relevant jar(s) deployment refer to this link (Java Reporting Component Configuration):
http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/JRC_SDK/jrc_java_dg_doc/doc/jrcsdk_java_dg/WorkingWithJRC2.html#1004391
Cheers -
How to generate pdf report and automatically save in the folder?
Hi all,
I want to ask, how to generate pdf report and automatically save in the folder?
Actually, if i run pdf report and show to screen. Now do not need to show to the screen but save the pdf file in the folder.
If anyone know, please share to me.
Thanks and regards,
IwanHi all,
Thanks for the reply.
when i run pdf report, and i got this URL to show the pdf report.
http://190.180.55.73:7778/reports/rwservlet/getjobid3828?server=sitcnrepsvr
Do any body know where can i get this pdf report that i have run in application server report folder ?
Thanks and regards,
Iwan -
A report to display all PO by vendor?
Hi,
Report me2L/me2m is to display open purchase order by vendor, Is there a report to display all PO(preferrably can select a time period, say since last year) by vendor?
Thanks,
MegHello Meg,
ME2L is the best report in purchasing meeting all the requirement i.e. open purchase order, closed purchase order, pending invoice etc.
The output will be based on your "Selection parameters" so check which one is most appropriate selection parameter to meet your requirement.
Here you have time line selection also.
Hope this helps.
Regards
Arif Mansuri -
How to generate a report in pdf from a stored proc
Hi, i need guidance on how to generate a report in pdf from an oracle stored proc.
The environment is oracle 10gas + 10gdb.
On a specific event, a PL/SQL stored procedure is called to do some processing and at the end of the processing to generate report which has to be sent to the printer (and optionally previewed by the user).
Can anyone assist me with this?Hi ,
One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
Read for further info in 'PL/SQL Packages and Types Reference'.
If you have access to OEM ... you can configure this there using wizard.....
Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
My greetings,
Sim -
How to generate a report in Excel with multiple sheets using oracle10g
Hi,
I need a small help...
we are using Oracle 10g...
How to generate a report in Excel with multiple sheets.
Thanks in advance.
Regards,
RamThanks Denis.
I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
rdf paperlayout format will not workout for generating multiple worksheets.
Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
Regards,
Ram -
How to generate a report based on account description
Hi Experts,
How to generate the report based on account description, that means
i want to generate a report on G/L account and which account numbers are having 'CASH' description.
for Ex: G/L a/c no: 25010026-Cash and Bank balance(des)
G/L a/c no: 101000-Cash-freight
like this.
please help to do this,
good answer will be appreciated with points,
Thanks in advance
VenkatHi shana,
my requirement is
I have G/L account numbers, that account numbers having some descriptions, in these some descriptions are belongs to cash transactions, i want to generate the report on these cash transactions, and the report is " G/L account, debit cash, credit cash, balance".
is it possible or not,
thanks in advance,
Venkat -
Report to display all the contacts of an opportunity.
Hello,
I have a requirement, can we create a report which displays all the contacts of an opportunity apart from primary contact.
Any inputs on the same will be appreciatable. TIA
Edited by: 1004233 on May 6, 2013 12:16 AM
Edited by: 1004233 on May 6, 2013 3:28 AM
Edited by: 1004233 on May 6, 2013 3:28 AMHey Aveek;
Try this, which will get the most recent one. You would just need to change it to loop at the edids records to get at them all...
TABLES: *edidc, *edids, *t100.
DATA: wf_string type string.
CLEAR *edids.
SELECT SINGLE *
INTO *edids
FROM edids
WHERE docnum = *edidc-docnum
AND status = '51'.
SELECT SINGLE text
INTO *t100-text
FROM t100
WHERE sprsl = 'EN'
AND arbgb = *edids-stamid
AND msgnr = *edids-stamno.
CLEAR wf_string.
MOVE *edids-stapa1 TO wf_string.
REPLACE '&' WITH wf_string INTO *t100-text.
IF sy-subrc EQ 0.
CLEAR wf_string.
MOVE *edids-stapa2 TO wf_string.
REPLACE '&' WITH wf_string INTO *t100-text.
IF sy-subrc EQ 0.
CLEAR wf_string.
MOVE *edids-stapa3 TO wf_string.
REPLACE '&' WITH wf_string INTO *t100-text.
IF sy-subrc EQ 0.
CLEAR wf_string.
MOVE *edids-stapa4 TO wf_string.
REPLACE '&' WITH wf_string INTO *t100-text.
ENDIF.
ENDIF.
ENDIF.
A little sloppy (OK, alot!), but it gets the job done...
Cheers,
John -
How to develop a report for display unused materials
how to develop a report for display unused materials? where can i find them?
Hi Phani,
I didnt get what u acually mean by unsued material. These are some sample materail types which u can find in table 'Mara' field 'Mtart'.
ABF Waste
AEM Samples
BLG BLG Empties External
BLGA BLGAEmpties Fixed assets
CH00 CH Contract Handling
COMP Prod. alloc., purchased
CONT KANBAN Container
COUP Coupons
DIEN Service
DOCU documentary batch
ERSA Spare parts
FERT Finished product(fert)
FGTR Drinks
FHMI Prod. resources/tools
FOOD Foods (excl. perishables)
FRIP Perishables
GR01 material type 01
GR02 material type 02
HALB Semi-finished product
HAWA Trading goods
HERS Manufacturer parts
HIBE Operating supplies
IBAU Maintenance assembly
INTR Intra material
KMAT Configurable material
LEER Empties
LEIH Returnable packaging
LGUT Empties (retail)
MODE Apparel (seasonal)
NLAG Non-stock material
NOF1 Nonfoods
PIPE Pipeline material
PLAN Trading goods (planned)
etc.
ex:
select * from mara where mtart = 'ABF'.
Regards,
Kiran B
Maybe you are looking for
-
ACS 5.3 Integration With RSA
Hi People, I have Integrated the ACS 5.3 with AD. Now my next goal is to Integrate ACS with RSA in such a way that all my Cisco devices should use the username and password from the AD. The enable privilege level should come from the RSA Token OTP. I
-
I have several machines in the office using Time Machine over a network to back up to a partitioned hard drive on our network. The size of the partition for each machines backup is ~3x the size of the data being backed up. Everthing hums along fine
-
I just got my iPhone in the mail
Just got off the phone with Sprint-I was her first iPhone customer. I am up and running! I couldn't believe that everything automatically synced from my Macbook to my phone. I love this-now to figure out how to use it!
-
Windows 7 slow to boot after setting up windows backup to additional drive.
I have an issue with windows taking forever to boot after setting up Windows backup. PC Setup: 2 Samsung SSD Mirrored for Hardware raid on (MOBO OS/Programs) 2 Seagate 4TB Mirrored for Hardware raid (Data storage) 1 Seagate 4tb HD used solely for Win
-
I cannot view videos - I am getting "blocked plug-in". I tried to update Flash Player but it does not work. I keep getting Error 404, and a "Broken Link". I suspect that there is a problem with their site, but I'm not sure. Any ideas? Right now, I