Backorder Reports V.15 and V_RA
Hi !
Can someone explain to me how exactly these reports works. These reports show orders that are fully confirmed. I was hoping these reports will only show orders that the fully or partially unconfirmed (which is my client's definition of a Backorder)
What is SAP's definition of a Backorder (in the context of these reports).
I am not liking these reports and I am inclined to develop custom Backorder reports for my client... though I would like to avoid that if possible.
Input from anyone experienced in these reports is greatly appreciated.
Thanks,
Anisha.
Hi Anisha,
See, basically back order means following:
Your customer had placed an order for 100 qty, out of which you could confirm only 30 & deliver the same. At this point of time a sales order will deliver only confirmed qty that is 30 & rest will be on backorder (that qty deliverable after some days after availibility check & confirmation).
Later when stocks arrive you can either run availibility check thru sales order or by using the reports you mentioned.
These are not only reports, but also used as transaction. see when you run V_RA you can see material wise the backorder quantities, wherein you can manually change the confirmation.
Other use of these transaction is that, suppose you have created two orders in sequence but the second one has to be delivered first. But due to availibility check you entire stock is in fiest sales order. Using these reports you can also release stock from first order & confirm it for second & deliver it.
Customised reports is a good options but its always better to use standard SAP functionality.
Hope this is very much helpful to you.
Regards,
Dhananjay
Similar Messages
-
Backorder report and order types
Experts,
We have a standard backorder report in ECC called as t-code v.15
I want to know, if this is only for standard order types or it is for every sales order created in ECC.
Thanks
Shankar.Hi,
Backorder processing is only available for materials with individual requirements. If any of the orders mentioned by you carry material number (with individual requirement), then it applies to those orders also.
Regards, -
Needs Help in Backorder Report!
Good day to everyone.
I would like to ask for help in checking the Backorder Report below. The user requirement is to include the plant field in the Report. Though I already included the plant field, the program encounters ABAP runtime upon execution. Please help me correct the errors that is being encountered.
Thank you very much.
Raffee
REPORT zsdr_out_of_stock LINE-SIZE 380
LINE-COUNT 65 NO STANDARD PAGE HEADING.
TABLES: mara,
zcust,
vbrk,
vbak,
vbap.
Start of Internal tables for Out of Stock
DATA: BEGIN OF it_total_out_stock1 OCCURS 0,
fkdat LIKE vbrk-fkdat, "Billing Date
bukrs LIKE vbrk-bukrs, "Company
knumv LIKE vbrk-knumv, "No of the document condition
vbeln LIKE vbrp-vbeln, "Billing Doc
posnr LIKE vbrp-posnr, "Item
aubel LIKE vbrp-aubel, "Sales Order
aupos LIKE vbrp-aupos, "Sales Item
matnr LIKE vbrp-matnr, "Material No.
fkimg TYPE p DECIMALS 2, "Billed Quantity
auart LIKE vbak-auart,
kunnr LIKE vbak-kunnr,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
zcusno LIKE zcust-zcusno,
zregion LIKE zcust-zregion,
END OF it_total_out_stock1.
DATA: BEGIN OF it_total_out_stock2 OCCURS 0,
vbeln LIKE vbak-vbeln,
auart LIKE vbak-auart,
kunnr LIKE vbak-kunnr,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
zcusno LIKE zcust-zcusno,
zregion LIKE zcust-zregion,
END OF it_total_out_stock2.
DATA: BEGIN OF it_vbap OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
netwr LIKE vbap-netwr,
kwmeng LIKE vbap-kwmeng,
bukrs_vf LIKE vbak-bukrs_vf,
knumv LIKE vbak-knumv,
kunnr LIKE vbak-kunnr,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
END OF it_vbap.
DATA: BEGIN OF it_vbap_stock OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
netwr LIKE vbap-netwr,
kwmeng TYPE p DECIMALS 2,
bukrs_vf LIKE vbak-bukrs_vf,
knumv LIKE vbak-knumv,
kunnr LIKE vbak-kunnr,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
END OF it_vbap_stock.
DATA: BEGIN OF it_out_stock OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
netwr LIKE vbap-netwr,
knumv LIKE vbak-knumv,
bukrs_vf LIKE vbak-bukrs_vf,
kunnr LIKE vbak-kunnr,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
fkimg TYPE p DECIMALS 2, "Billed Quantity
kwmeng LIKE vbap-kwmeng,
counter TYPE i,
END OF it_out_stock.
DATA: BEGIN OF it_mara_totals_stock OCCURS 0,
matnr LIKE mara-matnr,
matkl LIKE mara-matkl,
spart LIKE mara-spart,
END OF it_mara_totals_stock.
DATA: BEGIN OF it_tspat_totals_stock OCCURS 0,
spart LIKE tspat-spart,
vtext LIKE tspat-vtext,
END OF it_tspat_totals_stock.
DATA: BEGIN OF it_t023t_totals_stock OCCURS 0,
matkl LIKE t023t-matkl,
wgbez LIKE t023t-wgbez,
END OF it_t023t_totals_stock.
DATA: BEGIN OF it_konv_totals_stock OCCURS 0,
knumv LIKE konv-knumv,
kposn LIKE konv-kposn,
kschl LIKE konv-kschl,
kawrt LIKE konv-kawrt,
kwert LIKE konv-kwert,
kbetr LIKE konv-kbetr,
END OF it_konv_totals_stock.
DATA: BEGIN OF it_total_stock_final OCCURS 0,
cnt1 TYPE i,
cnt2 TYPE i, "DPM Category
werks LIKE vbap-werks, "Plant
spart LIKE mara-spart, "Division Description
matkl LIKE mara-matkl, "Material Type
vbeln LIKE vbrk-vbeln, "Billing Doc
aubel LIKE vbrp-aubel, "Sales document
aupos LIKE vbrp-aupos, "Sales document item
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
kunnr LIKE vbak-kunnr, "Customer
matnr LIKE vbrp-matnr, "Material
vtext LIKE tspat-vtext, "Material Group Desc
kbetr1 LIKE konv-kbetr,
kbetr2 LIKE konv-kbetr,
kawrt LIKE konv-kawrt, "Condition Rate
kwert1 LIKE konv-kwert, "Volume Discount
kwert2 LIKE konv-kwert, "Promo Discount
fkimg TYPE p DECIMALS 2, "Billed Quantity
kwmeng LIKE vbap-kwmeng,
counter TYPE i,
END OF it_total_stock_final.
Start of Internal tables for Held
DATA: BEGIN OF it_total_held1 OCCURS 0,
erdat LIKE vbak-erdat,
bukrs_vf LIKE vbak-bukrs_vf,
knumv LIKE vbak-knumv,
kunnr LIKE vbak-kunnr,
werks LIKE vbap-werks, "Plant
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
kwmeng LIKE vbap-kwmeng, "Order Quantity
cmgst LIKE vbuk-cmgst,
END OF it_total_held1.
DATA: BEGIN OF it_total_held2 OCCURS 0,
zcusno LIKE zcust-zcusno,
zregion LIKE zcust-zregion,
END OF it_total_held2.
DATA: BEGIN OF it_mara_totals_held OCCURS 0,
matnr LIKE mara-matnr,
matkl LIKE mara-matkl,
spart LIKE mara-spart,
END OF it_mara_totals_held.
DATA: BEGIN OF it_tspat_totals_held OCCURS 0,
spart LIKE tspat-spart,
vtext LIKE tspat-vtext,
END OF it_tspat_totals_held.
DATA: BEGIN OF it_t023t_totals_held OCCURS 0,
matkl LIKE t023t-matkl,
wgbez LIKE t023t-wgbez,
END OF it_t023t_totals_held.
DATA: BEGIN OF it_konv_totals_held OCCURS 0,
knumv LIKE konv-knumv,
kposn LIKE konv-kposn,
kschl LIKE konv-kschl,
kawrt LIKE konv-kawrt,
kwert LIKE konv-kwert,
END OF it_konv_totals_held.
DATA: BEGIN OF it_total_held_final OCCURS 0,
cnt1 TYPE i,
cnt2 TYPE i, "DPM Category
werks LIKE vbap-werks, "Plant
spart LIKE mara-spart, "Division Description
matkl LIKE mara-matkl, "Material Type
vbeln LIKE vbrk-vbeln, "Billing Doc
aubel LIKE vbrp-aubel, "Sales document
aupos LIKE vbrp-aupos, "Sales document item
erdat LIKE vbak-erdat,
vkbur LIKE vbak-vkbur, "Sales office
vkorg LIKE vbak-vkorg, "Sales organization
vkgrp LIKE vbak-vkgrp, "Sales group
kunnr LIKE vbak-kunnr, "Customer
matnr LIKE vbrp-matnr, "Material
vtext LIKE tspat-vtext, "Material Group Desc
kwmeng LIKE vbap-kwmeng, "Order Quantity
kawrt LIKE konv-kawrt, "Condition Rate
kwert1 LIKE konv-kwert, "Volume Discount
kwert2 LIKE konv-kwert, "Promo Discount
END OF it_total_held_final.
End of Internal tables for Held
DATA: l_quantity LIKE vbap-kwmeng.
DATA: g_div(20), "Division
g_mat(20), "Material Group
g_maktx(40),
g_name1(40),
v_net_value TYPE p DECIMALS 2.
CONSTANTS DECLARATION
Constants are named data objects that you create statically using
a declarative statement. They allow you to store data under a
particular name within the memory area of a program.
The value of a constant cannot be changed during the execution of
the program.
CONSTANTS: header01(10) TYPE c VALUE 'Invoice #',
header02(06) TYPE c VALUE 'Item',
header03(10) TYPE c VALUE 'Sales Doc.',
header04(03) TYPE c VALUE 'Div',
header05(20) TYPE c VALUE 'Division Desc',
header06(10) TYPE c VALUE 'Customer #',
header07(35) TYPE c VALUE 'Customer Name',
header08(18) TYPE c VALUE 'Material No.',
header09(40) TYPE c VALUE 'Material Text',
header10(09) TYPE c VALUE 'MType',
header11(20) TYPE c VALUE 'Material Grp Desc',
header12(20) TYPE c VALUE 'Condition Rate',
header13(20) TYPE c VALUE 'Vol Discount',
header14(20) TYPE c VALUE 'Promo Discount',
header15(12) TYPE c VALUE 'Date Created',
header16(12) TYPE c VALUE 'Invoice Date',
header17(20) TYPE c VALUE 'Net Value',
header18(12) TYPE c VALUE 'Sales office',
header19(10) TYPE c VALUE 'Sales Org',
header20(10) TYPE c VALUE 'Sales Grp',
header21(20) TYPE c VALUE 'Quantity',
header22(04) TYPE c VALUE 'Plnt'.
End of Internal tables for Out of Stock
Start of selection screen criteria
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_zreg FOR zcust-zregion, "Region
s_matkl FOR mara-matkl, "Material Group
s_spart FOR mara-spart, "Division
s_vkorg FOR vbak-vkorg, "Sales Org
s_vkbur FOR vbak-vkbur, "Sales Office
s_class FOR zcust-zaclass. "Account Class
SELECT-OPTIONS: s_curr FOR vbrk-fkdat OBLIGATORY. "Date
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS p0 RADIOBUTTON GROUP radi.
PARAMETERS p1 RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b2.
Start of Selection
START-OF-SELECTION.
IF p0 = 'X'.
****Get the Out of Stock
PERFORM out_stock.
PERFORM write_report.
ELSEIF p1 = 'X'.
PERFORM held_order.
PERFORM write_report1.
ENDIF.
*& Form out_stock
text
--> p1 text
<-- p2 text
FORM out_stock.
DATA: l_cnt1 TYPE i,
l_cnt2 TYPE i,
l_spart LIKE mara-spart,
l_matkl LIKE mara-matkl,
l_text LIKE tspat-vtext,
l_amount TYPE p DECIMALS 2,
l_aupos LIKE vbrp-aupos,
l_aubel LIKE vbrp-aubel.
SELECT vbrk~fkdat
vbrk~bukrs
vbrk~knumv
vbrp~vbeln
vbrp~posnr
vbrp~aubel
vbrp~aupos
vbrp~matnr
vbrp~fkimg
vbap~werks
vbak~auart
vbak~kunnr
vbak~vkbur "Sales office
vbak~vkorg "Sales organization
vbak~vkgrp "Sales group
zcust~zcusno
zcust~zregion
INTO TABLE it_total_out_stock1
FROM vbrk
INNER JOIN vbrp
ON vbrkvbeln = vbrpvbeln
INNER JOIN vbak
ON vbrpaubel = vbakvbeln
INNER JOIN zcust
ON vbakkunnr = zcustzcusno
WHERE vbrk~fkdat IN s_curr
AND vbrp~matkl IN s_matkl
AND vbrp~spart IN s_spart
AND vbak~auart IN ('ZDOA', 'ZDTO', 'ZQOA', 'ZDTA', 'ZQTO')
AND zcust~zregion IN s_zreg
AND zcust~zaclass IN s_class
AND vbak~vkorg IN s_vkorg
AND vbak~vkbur IN s_vkbur
AND vbak~bukrs_vf IN ('5116', '5106')
AND vbak~vkbur <> '5100'.
IF sy-subrc = 0.
IF NOT it_total_out_stock1[] IS INITIAL.
***Check if the Order is Out of Stock compare to billing invoice
SELECT vbap~vbeln
vbap~posnr
vbap~matnr
vbap~netwr
vbap~kwmeng
vbak~bukrs_vf
vbak~knumv
vbak~kunnr
vbap~werks
vbak~vkbur "Sales office
vbak~vkorg "Sales organization
vbak~vkgrp "Sales group
INTO TABLE it_vbap
FROM vbap
INNER JOIN vbak
ON vbapvbeln = vbakvbeln
FOR ALL entries IN it_total_out_stock1
WHERE vbap~vbeln = it_total_out_stock1-aubel
AND vbap~posnr <> it_total_out_stock1-aupos
AND vbak~auart IN ('ZDOA', 'ZDTO', 'ZQOA',
'ZDTA', 'ZQTO')
AND vbak~vkorg IN s_vkorg
AND vbak~vkbur IN s_vkbur
AND vbap~matkl IN s_matkl
AND vbap~spart IN s_spart.
***Check if the Order is Out of Stock by Quantity
SELECT vbap~vbeln
vbap~posnr
vbap~matnr
vbap~netwr
vbap~kwmeng
vbak~bukrs_vf
vbak~knumv
vbak~kunnr
vbap~werks
vbak~vkbur "Sales office
vbak~vkorg "Sales organization
vbak~vkgrp "Sales group
INTO TABLE it_vbap_stock
FROM vbap
INNER JOIN vbak
ON vbapvbeln = vbakvbeln
FOR ALL entries IN it_total_out_stock1
WHERE vbap~posnr = it_total_out_stock1-aupos
AND vbap~vbeln = it_total_out_stock1-aubel
AND vbap~kwmeng NE it_total_out_stock1-fkimg
AND vbak~auart IN ('ZDOA', 'ZDTO', 'ZQOA',
'ZDTA', 'ZQTO')
AND vbak~vkorg IN s_vkorg
AND vbak~vkbur IN s_vkbur
AND vbap~matkl IN s_matkl
AND vbap~spart IN s_spart.
ENDIF.
IF NOT it_vbap[] IS INITIAL.
SORT it_vbap BY vbeln posnr.
SORT it_total_out_stock1 BY aubel aupos.
LOOP AT it_vbap.
READ TABLE it_total_out_stock1
WITH KEY aubel = it_vbap-vbeln
aupos = it_vbap-posnr.
IF sy-subrc NE 0.
it_out_stock-vbeln = it_vbap-vbeln.
it_out_stock-posnr = it_vbap-posnr.
it_out_stock-matnr = it_vbap-matnr.
it_out_stock-netwr = it_vbap-netwr.
it_out_stock-knumv = it_vbap-knumv.
it_out_stock-bukrs_vf = it_vbap-bukrs_vf.
it_out_stock-kunnr = it_vbap-kunnr.
it_out_stock-werks = it_vbap-werks.
it_out_stock-vkbur = it_vbap-vkbur. "Sales office
it_out_stock-vkorg = it_vbap-vkorg. "Sales organization
it_out_stock-vkgrp = it_vbap-vkgrp. "Sales group
it_out_stock-kwmeng = it_vbap-kwmeng.
APPEND it_out_stock.
ENDIF.
ENDLOOP.
ENDIF.
IF NOT it_vbap_stock[] IS INITIAL.
SORT it_vbap_stock BY vbeln posnr.
SORT it_total_out_stock1 BY aubel aupos.
LOOP AT it_vbap_stock.
LOOP AT it_total_out_stock1 WHERE aubel = it_vbap_stock-vbeln
AND aupos = it_vbap_stock-posnr
AND fkimg NE it_vbap_stock-kwmeng.
it_out_stock-vbeln = it_vbap_stock-vbeln.
it_out_stock-posnr = it_vbap_stock-posnr.
it_out_stock-matnr = it_vbap_stock-matnr.
it_out_stock-netwr = it_vbap_stock-netwr.
it_out_stock-knumv = it_vbap_stock-knumv.
it_out_stock-bukrs_vf = it_vbap_stock-bukrs_vf.
it_out_stock-kunnr = it_vbap_stock-kunnr.
it_out_stock-werks = it_vbap_stock-werks.
it_out_stock-vkbur = it_vbap_stock-vkbur. "Sales office
it_out_stock-vkorg = it_vbap_stock-vkorg. "Sales org
it_out_stock-vkgrp = it_vbap_stock-vkgrp. "Sales group
****Begin Insert by Ron
it_out_stock-kwmeng = it_vbap_stock-kwmeng.
it_out_stock-fkimg = it_total_out_stock1-fkimg.
it_out_stock-counter = 1.
****End Insert
APPEND it_out_stock.
ENDLOOP.
ENDLOOP.
ENDIF.
ENDIF. "it_total_out_stock1
IF NOT it_out_stock[] IS INITIAL.
***get the value of material and material group
SELECT matnr
matkl
spart
INTO TABLE it_mara_totals_stock
FROM mara
FOR ALL ENTRIES IN it_out_stock
WHERE matnr = it_out_stock-matnr.
ENDIF.
***Get the Value of Division Description
IF NOT it_mara_totals_stock[] IS INITIAL.
SELECT spart
vtext
INTO TABLE it_tspat_totals_stock
FROM tspat
FOR ALL ENTRIES IN it_mara_totals_stock
WHERE spart = it_mara_totals_stock-spart AND
spras = sy-langu.
ENDIF.
***Get the Material Group Description
IF NOT it_mara_totals_stock[] IS INITIAL.
SELECT matkl
wgbez
INTO TABLE it_t023t_totals_stock
FROM t023t
FOR ALL ENTRIES IN it_mara_totals_stock
WHERE matkl = it_mara_totals_stock-matkl AND
spras = sy-langu.
ENDIF.
***Get the Value of Condition Type
IF NOT it_out_stock[] IS INITIAL.
SELECT knumv
kposn
kschl
kawrt
kwert
kbetr
INTO TABLE it_konv_totals_stock
FROM konv
FOR ALL ENTRIES IN it_out_stock
WHERE knumv = it_out_stock-knumv
AND kposn = it_out_stock-posnr
AND kschl IN ('ZQPR', 'ZQD3', 'ZQP3',
'ZDPR', 'ZDD3', 'ZDP3').
ENDIF.
SORT it_out_stock BY vbeln posnr.
SORT it_mara_totals_stock BY matnr.
SORT it_tspat_totals_stock BY spart.
SORT it_t023t_totals_stock BY matkl.
SORT it_konv_totals_stock BY knumv kposn.
LOOP AT it_out_stock.
CLEAR: it_total_stock_final-kawrt, it_total_stock_final-kwert1,
it_total_stock_final-kwert2, it_total_stock_final-vtext,
it_total_stock_final-matkl, it_total_stock_final-spart,
it_total_stock_final-aubel, it_total_stock_final-aupos,
it_total_stock_final-cnt1, it_total_stock_final-cnt2.
***Begin Insert by RONCR
CLEAR: it_total_stock_final-kwmeng, it_total_stock_final-fkimg,
it_total_stock_final-counter.
***End Insert by RONCR
CLEAR: it_mara_totals_stock, it_tspat_totals_stock,
it_t023t_totals_stock, it_konv_totals_stock,
l_cnt1, l_cnt2.
**Counter for Total Orders Column
l_cnt1 = 4.
READ TABLE it_mara_totals_stock
WITH KEY matnr = it_out_stock-matnr.
IF sy-subrc EQ 0.
it_total_stock_final-matnr = it_mara_totals_stock-matnr.
it_total_stock_final-matkl = it_mara_totals_stock-matkl.
it_total_stock_final-spart = it_mara_totals_stock-spart.
***DPM
IF it_total_stock_final-matkl EQ 'DPM' OR
it_total_stock_final-matkl EQ 'SSN'.
READ TABLE it_tspat_totals_stock
WITH KEY spart = it_mara_totals_stock-spart.
IF sy-subrc EQ 0.
it_total_stock_final-vtext = it_tspat_totals_stock-vtext.
ENDIF.
***Non Dole
ELSE.
READ TABLE it_t023t_totals_stock
WITH KEY matkl = it_mara_totals_stock-matkl.
IF sy-subrc EQ 0.
it_total_stock_final-vtext = it_t023t_totals_stock-wgbez.
ENDIF.
ENDIF.
ENDIF.
IF it_total_stock_final-matkl = 'DPM' OR
it_total_stock_final-matkl = 'SSN'.
l_cnt2 = 1.
ELSE.
l_cnt2 = 2.
ENDIF.
***Condition Value for Comapny Code 5116
IF it_out_stock-bukrs_vf EQ '5116'.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZQPR'.
IF sy-subrc EQ 0.
it_total_stock_final-kawrt = it_konv_totals_stock-kawrt.
ENDIF.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZQD3'.
IF sy-subrc EQ 0.
it_konv_totals_stock-kwert = it_konv_totals_stock-kwert * -1.
it_total_stock_final-kwert1 = it_konv_totals_stock-kwert.
it_total_stock_final-kbetr1 = it_konv_totals_stock-kbetr.
it_total_stock_final-kbetr1 = it_total_stock_final-kbetr1 * -1.
ENDIF.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZQP3'.
IF sy-subrc EQ 0.
it_konv_totals_stock-kwert = it_konv_totals_stock-kwert * -1.
it_total_stock_final-kwert2 = it_konv_totals_stock-kwert.
it_total_stock_final-kbetr2 = it_konv_totals_stock-kbetr.
it_total_stock_final-kbetr2 = it_total_stock_final-kbetr2 * -1.
ENDIF.
ENDIF.
***Condition Value for Company Code 5106
IF it_out_stock-bukrs_vf EQ '5106'.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZDPR'. "Base price
IF sy-subrc EQ 0.
it_total_stock_final-kawrt = it_konv_totals_stock-kawrt.
ENDIF.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZDD3'. "Volume Discount
IF sy-subrc EQ 0.
it_konv_totals_stock-kwert = it_konv_totals_stock-kwert * -1.
it_total_stock_final-kwert1 = it_konv_totals_stock-kwert.
it_total_stock_final-kbetr1 = it_konv_totals_stock-kbetr.
it_total_stock_final-kbetr2 = it_total_stock_final-kbetr2 * -1.
ENDIF.
READ TABLE it_konv_totals_stock
WITH KEY knumv = it_out_stock-knumv
kposn = it_out_stock-posnr
kschl = 'ZDP3'. "Promo Discount
IF sy-subrc EQ 0.
it_konv_totals_stock-kwert = it_konv_totals_stock-kwert * -1.
it_total_stock_final-kwert2 = it_konv_totals_stock-kwert.
it_total_stock_final-kbetr2 = it_konv_totals_stock-kbetr.
it_total_stock_final-kbetr2 = it_total_stock_final-kbetr2 * -1.
ENDIF.
ENDIF.
it_total_stock_final-cnt1 = l_cnt1.
it_total_stock_final-cnt2 = l_cnt2.
it_total_stock_final-aubel = it_out_stock-vbeln.
it_total_stock_final-aupos = it_out_stock-posnr.
it_total_stock_final-kunnr = it_out_stock-kunnr.
it_total_stock_final-werks = it_out_stock-werks.
it_total_stock_final-vkbur = it_out_stock-vkbur. "Sales office
it_total_stock_final-vkorg = it_out_stock-vkorg. "Sales org
it_total_stock_final-vkgrp = it_out_stock-vkgrp. "Sales group
***Begin Insert by RONCR
it_total_stock_final-kwmeng = it_out_stock-kwmeng.
it_total_stock_final-fkimg = it_out_stock-fkimg.
it_total_stock_final-counter = it_out_stock-counter.
**End of Insert by RONCR
APPEND it_total_stock_final.
ENDLOOP.
ENDFORM. " out_stock
*& Form write_report
text
--> p1 text
<-- p2 text
FORM write_report.
ULINE (360).
FORMAT COLOR 1.
WRITE: / sy-vline, header01,
12 sy-vline, header02,
19 sy-vline, header03,
30 sy-vline, header04,
35 sy-vline, header05,
55 sy-vline, header18,
75 sy-vline, header19,
87 sy-vline, header20,
100 sy-vline, header06,
112 sy-vline, header07,
150 sy-vline, header08,
170 sy-vline, header09,
215 sy-vline, header10,
225 sy-vline, header11,
247 sy-vline, header21,
271 sy-vline, header12,
293 sy-vline, header13,
315 sy-vline, header14,
337 sy-vline, header17,
360 sy-vline, header22,
363 sy-vline.
ULINE (360).
FORMAT COLOR 2.
SORT it_total_stock_final BY cnt2 cnt1 spart aubel aupos.
LOOP AT it_total_stock_final.
CLEAR: g_div, g_mat, g_maktx, g_name1, v_net_value.
SELECT SINGLE vtext INTO g_div
FROM tspat
WHERE spart = it_total_stock_final-spart
AND spras = sy-langu.
SELECT SINGLE wgbez INTO g_mat
FROM t023t
WHERE matkl = it_total_stock_final-matkl
AND spras = sy-langu.
SELECT SINGLE maktx INTO g_maktx
FROM makt
WHERE matnr = it_total_stock_final-matnr
AND spras = sy-langu.
SELECT SINGLE name1 INTO g_name1
FROM kna1
WHERE kunnr = it_total_stock_final-kunnr.
IF it_total_stock_final-counter = 1.
CLEAR: l_quantity.
l_quantity = it_total_stock_final-kwmeng -
it_total_stock_final-fkimg.
it_total_stock_final-kawrt = it_total_stock_final-kawrt /
it_total_stock_final-kwmeng.
it_total_stock_final-kawrt = it_total_stock_final-kawrt *
l_quantity.
it_total_stock_final-kbetr1 = it_total_stock_final-kbetr1 /
1000.
it_total_stock_final-kbetr2 = it_total_stock_final-kbetr2 /
1000.
it_total_stock_final-kwert1 = it_total_stock_final-kawrt *
it_total_stock_final-kbetr1.
it_total_stock_final-kwert2 = it_total_stock_final-kawrt *
it_total_stock_final-kbetr2.
clear: it_total_stock_final-kawrt,
it_total_stock_final-kbetr1,
it_total_stock_final-kbetr2,
it_total_stock_final-kwert1,
it_total_stock_final-kwert2.
ENDIF.
v_net_value = it_total_stock_final-kawrt -
it_total_stock_final-kwert1 -
it_total_stock_final-kwert2.
WRITE: / sy-vline, it_total_stock_final-vbeln,
12 sy-vline, it_total_stock_final-aupos,
19 sy-vline, it_total_stock_final-aubel,
30 sy-vline, it_total_stock_final-spart,
35 sy-vline, g_div,
55 sy-vline, it_total_stock_final-vkbur,
75 sy-vline, it_total_stock_final-vkorg,
87 sy-vline, it_total_stock_final-vkgrp,
100 sy-vline, it_total_stock_final-kunnr,
112 sy-vline, g_name1,
150 sy-vline, it_total_stock_final-matnr,
170 sy-vline, g_maktx,
215 sy-vline, it_total_stock_final-matkl,
225 sy-vline, it_total_stock_final-vtext.
IF it_total_stock_final-counter = 1.
WRITE: 247 sy-vline, l_quantity,
271 sy-vline, it_total_stock_final-kawrt,
293 sy-vline, it_total_stock_final-kwert1,
315 sy-vline, it_total_stock_final-kwert2,
337 sy-vline, v_net_value,
360 sy-vline, it_total_stock_final-werks,
363 sy-vline.
ELSE.
WRITE: 247 sy-vline, it_total_stock_final-kwmeng,
271 sy-vline, it_total_stock_final-kawrt,
293 sy-vline, it_total_stock_final-kwert1,
315 sy-vline, it_total_stock_final-kwert2,
337 sy-vline, v_net_value,
360 sy-vline, it_total_stock_final-werks,
363 sy-vline.
ENDIF.
ENDLOOP.
ULINE (360).
ENDFORM. " write_report
*& Form held_order
text
--> p1 text
<-- p2 text
FORM held_order.
DATA: l_cnt1 TYPE i,
l_cnt2 TYPE i,
l_spart LIKE mara-spart,
l_matkl LIKE mara-matkl,
l_text LIKE tspat-vtext,
l_amount TYPE p DECIMALS 2,
l_aupos LIKE vbrp-aupos,
l_aubel LIKE vbrp-aubel.
SELECT vbak~erdat
vbak~bukrs_vf
vbak~knumv
vbak~kunnr
vbap~werks
vbak~vkbur "Sales office
vbak~vkorg "Sales organization
vbak~vkgrp "Sales group
vbap~vbeln
vbap~posnr
vbap~matnr
vbap~kwmeng "Order Quantity
vbuk~cmgst
INTO TABLE it_total_held1
FROM vbak
INNER JOIN vbap
ON vbakvbeln = vbapvbeln
INNER JOIN vbuk
ON vbapvbeln = vbukvbeln
WHERE vbak~erdat IN s_curr
AND vbak~vkorg IN s_vkorg
AND vbak~vkbur IN s_vkbur
AND vbap~matkl IN s_matkl
AND vbak~bukrs_vf IN ('5116', '5106')
AND vbak~vkbur NE '5100'
AND vbak~auart IN ('ZDOA', 'ZDTO', 'ZQOA', 'ZDTA', 'ZQTO')
AND vbak~kkber = '5116'
AND vbuk~cmgst = 'B'
AND vbap~spart IN s_spart.
IF sy-subrc = 0.
SELECT zcusno
zregion
INTO TABLE it_total_held2
FROM zcust
FOR ALL ENTRIES IN it_total_held1
WHERE zcusno = it_total_held1-kunnr
AND zcust~zregion IN s_zreg
AND zcust~zaclass IN s_class.
IF sy-subrc EQ 0.
***get the value of material and material group
SELECT matnr
matkl
spart
INTO TABLE it_mara_totals_held
FROM mara
FOR ALL ENTRIES IN it_total_held1
WHERE matnr = it_total_held1-matnr.
***Get the Value of Division Description
IF NOT it_mara_totals_held[] IS INITIAL.
SELECT spart
vtext
INTO TABLE it_tspat_totals_held
FROM tspat
FOR ALL ENTRIES IN it_mara_totals_held
WHERE spart = it_mara_totals_held-spart AND
spras = sy-langu.
ENDIF.
***Get the Material Group Description
IF NOT it_mara_totals_held[] IS INITIAL.
SELECT matkl
wgbez
INTO TABLE it_t023t_totals_held
FROM t023t
FOR ALL ENTRIES IN it_mara_totals_held
WHERE matkl = it_mara_totals_held-matkl AND
spras = sy-langu.
ENDIF.
***Get the Value of Condition Type
IF NOT it_total_held1[] IS INITIAL.
SELECT knumv
kposn
kschl
kawrt
kwert
INTO TABLE it_konv_totals_held
FROM konv
FOR ALL ENTRIES IN it_total_held1
WHERE knumv = it_total_held1-knumv
AND kposn = it_total_held1-posnr
AND kschl IN ('ZQPR', 'ZQD3', 'ZQP3',
'ZDPR', 'ZDD3', 'ZDP3').
ENDIF.
ENDIF.
ENDIF.
SORT it_total_held1 BY vbeln posnr.
SORT it_total_held2 BY zcusno zregion.
SORT it_mara_totals_held BY matnr.
SORT it_tspat_totals_held BY spart.
SORT it_t023t_totals_held BY matkl.
SORT it_konv_totals_held BY knumv kposn.
LOOP AT it_total_held1.
CLEAR: it_total_held_final-kawrt, it_total_held_final-kwert1,
it_total_held_final-kwert2, it_total_held_final-vtext,
it_total_held_final-matkl, it_total_held_final-spart,
it_total_held_final-aubel, it_total_held_final-aupos,
it_total_held_final-cnt1, it_total_held_final-cnt2.
CLEAR: it_mara_totals_held, it_tspat_totals_held,
it_t023t_totals_held, it_konv_totals_held,
l_cnt1, l_cnt2.
READ TABLE it_total_held2
WITH KEY zcusno = it_total_held1-kunnr.
IF sy-subrc = 0.
**Counter for Total Orders Column
l_cnt1 = 3.
READ TABLE it_mara_totals_held
WITH KEY matnr = it_total_held1-matnr.
IF sy-subrc EQ 0.
it_total_held_final-matnr = it_mara_totals_held-matnr.
it_total_held_final-matkl = it_mara_totals_held-matkl.
it_total_held_final-spart = it_mara_totals_held-spart.
***Dole
IF it_total_held_final-matkl EQ 'DPM' OR
it_total_held_final-matkl EQ 'SSN'.
READ TABLE it_tspat_totals_held
WITH KEY spart = it_mara_totals_held-spart.
IF sy-subrc EQ 0.
it_total_held_final-vtext = it_tspat_totals_held-vtext.
ENDIF.
***Non Dole
ELSE.
READ TABLE it_t023t_totals_held
WITH KEY matkl = it_mara_totals_held-matkl.
IF sy-subrc EQ 0.
it_total_held_final-vtext = it_t023t_totals_held-wgbez.
ENDIF.
ENDIF.
ENDIF.
IF it_total_held_final-matkl = 'DPM' OR
it_total_held_final-matkl = 'SSN'.
l_cnt2 = 1.
ELSE.
l_cnt2 = 2.
ENDIF.
***Condition Value for Comapny Code 5116
IF it_total_held1-bukrs_vf EQ '5116'.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZQPR'.
IF sy-subrc EQ 0.
it_total_held_final-kawrt = it_konv_totals_held-kawrt.
ENDIF.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZQD3'.
IF sy-subrc EQ 0.
it_konv_totals_held-kwert = it_konv_totals_held-kwert * -1.
it_total_held_final-kwert1 = it_konv_totals_held-kwert.
ENDIF.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZQP3'.
IF sy-subrc EQ 0.
it_konv_totals_held-kwert = it_konv_totals_held-kwert * -1.
it_total_held_final-kwert2 = it_konv_totals_held-kwert.
ENDIF.
ENDIF.
***Condition Value for Comapny Code 5106
IF it_total_held1-bukrs_vf EQ '5106'.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZDPR'. "Base price
IF sy-subrc EQ 0.
it_total_held_final-kawrt = it_konv_totals_held-kawrt.
ENDIF.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZDD3'. "Volume Discount
IF sy-subrc EQ 0.
it_konv_totals_held-kwert = it_konv_totals_held-kwert * -1.
it_total_held_final-kwert1 = it_konv_totals_held-kwert.
ENDIF.
READ TABLE it_konv_totals_held
WITH KEY knumv = it_total_held1-knumv
kposn = it_total_held1-posnr
kschl = 'ZDP3'. "Promo Discount
IF sy-subrc EQ 0.
it_konv_totals_held-kwert = it_konv_totals_held-kwert * -1.
it_total_held_final-kwert2 = it_konv_totals_held-kwert.
ENDIF.
ENDIF.
it_total_held_final-cnt1 = l_cnt1.
it_total_held_final-cnt2 = l_cnt2.
it_total_held_final-aubel = it_total_held1-vbeln.
it_total_held_final-aupos = it_total_held1-posnr.
it_total_held_final-kunnr = it_total_held1-kunnr.
it_total_held_final-erdat = it_total_held1-erdat.
it_total_held_final-werks = it_total_held1-werks.
it_total_held_final-vkbur = it_total_held1-vkbur. "Sales office
it_total_held_final-vkorg = it_total_held1-vkorg. "Sales Org
it_total_held_final-vkgrp = it_total_held1-vkgrp. "Sales group
it_total_held_final-kwmeng = it_total_held1-kwmeng. "Order qty
APPEND it_total_held_final.
ENDIF. "it_total_held2
ENDLOOP.
ENDFORM. " held_order
*& Form write_report1
text
--> p1 text
<-- p2 text
FORM write_report1.
ULINE (360).
FORMAT COLOR 1.
WRITE: / sy-vline, header01,
12 sy-vline, header02,
19 sy-vline, header03,
30 sy-vline, header15,
45 sy-vline, header04,
50 sy-vline, header05,
75 sy-vline, header18,
90 sy-vline, header19,
103 sy-vline, header20,
115 sy-vline, header06,
127 sy-vline, header07,
167 sy-vline, header08,
184 sy-vline, header09,
227 sy-vline, header10,
237 sy-vline, header11,
260 sy-vline, header21,
282 sy-vline, header12,
306 sy-vline, header13,
330 sy-vline, header14,
354 sy-vline, header17,
376 sy-vline, header22,
380 sy-vline.
ULINE (376).
FORMAT COLOR 2.
SORT it_total_held_final BY cnt2 cnt1 spart aubel aupos.
LOOP AT it_total_held_final.
CLEAR: g_div, g_mat, g_maktx, g_name1, v_net_value.
SELECT SINGLE vtext INTO g_div
FROM tspat
WHERE spart = it_total_held_final-spart
AND spras = sHi,
790072 wrote:
Hi Gurus,
Need your help in writing an sql to search records which has length of 4000 bytes from an varchar2(4000) column and inserting the same records to another table by truncating the record to 3500 bytes .Something like this:
INSERT INTO new_table (txt_column)
SELECT SUBSTRB (txt_column, 1, 3500)
FROM old_table;SUBSTR returns a string with a specified number of characters , SUBSTR<b>B</b> has a specified number of bytes . -
Available stock in Backorder report
Hi,
How can I have the available qty (In stock - Committed + Ordered) in the Backorder report for viewing purposes? In PLD, what is the field for this specific field?
Appreciate the PLD experts.
Thanks,
HarithThis PLD does not expose the OITW table from where the OnHand, and other quantites can be added. Using the Alt in the table selection to manully add the OITW will not also help as linking fields does not work.
Thats why this will not be possible.
Suda -
If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as belowFirst: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Simulair report for FBL5N and FBL1N for new general ledger on segment level
We are working with segments in new G/L ledger. We want to run a open item report where we can combine customers and vendors by segment. The vendors and customers are linked in the master data. In the "old" reports FBL5N and FBL1N you can do this but not by segment.I found the following report on segment level:
- S_PCO_36000218 - Receivables: Segment
- S_PCO_36000219 - Payables: Segment
What I'm missing is to run 1 report for Customers and vendors. What I'm missing to is that there are only some fields available on line item level. (I like to have invoice number, documentype,.......)
Is there a standard report for this in new genaral leger?
Is it possible to ad additional field to th list viewer.What is this user license type? All financial transactions need professional license.
Thanks,
Gordon -
Excel Download of a Web SAP BW Report asks userid and password.please help
Dear BW folks,
Issue: When I run a specific SAP BW Report from Web and download the same into excel & csv.
When I open the excel file downloaded, it asks me user name and password to enter. csv file downloaded doesn't ask.
The report has 0cust_sales hierarchy and SBU hierarchy.
Is there any thing to do with these hierarchies that the excel download is asking user name and password?
Please help me out!!!!! This report needs to be downloaded into excel sent to my manager.....
Regards
PavanHi Pavan
It is possible,please refer the below link
Report execution without prompting user id
Providing un-secured access to a web report.
Also, for the time being, you can run the query and save a workbook and sent across
These will resolve the issue
Thanks
Pavan Agarwal -
Crystal Report 2008 SP3 and BO XI 3.1 conflict
Hi every body,
We have a BOE system:
BO XI 3.1
Oracle db 10g
All running successful and can create some types of WebI report.
But we also want reports with Crystal Report.
1> So we install Crystal Report 2008 SP3 (without knowing the conflict error between BO XI 3.1 and Crystal Report 2008 SP3 and overwrite some .dll file). After installing, we can not create WebI report any more. And a error message box display: "DBDriver failed to load: C:\Program File\Business Objects\BusinessObjects ENterprise12.0\win32_x86\dataAccess\connectionServer\dbd_oci.dll ".
2> We uninstall Crystal Report SP3. But this is not the solution. Still error because of missing .dll files.
3> We open BO XI 3.1 setup and repair BO XI 3.1. Even we uninstall BO XI 3.1, delete all of its components and delete in regedit key. We install BO XI 3.1 again. Now we have full .dll file, not missing them any more. But when we open universe and click on Table browser, cannot fetching any tables.
We set rights for Oracle DB user again. But still error: cannot fetching.
4> We searched the solution for this problem on the internet. But not worked, no answer.
Can somebody help me bring back the BOE system state again ? pls :"<
T______THi Paul,
I hope I read your question right!
Yes, It is possible to run XIR2 and 3.1 on the same server although it's not recommended by BO. You will need to make sure they are both pointing to different CMS databases and different FRS repositories, like you already mentioned you will need to specify different ports for the CMS db and Tomcat.
Why not uninstall Business Objects XI R2 in your BO development environment or a spare server (if you have one), and do a clean install of XI 3.1 SP3.
Tip: If you were already having performance issues with your XI R2 environment, I would seriously consider upgrading the hardware. XI 3.1 needs a bit more RAM and CPU than XI R2
Regards
Rim Geurts -
Unable to schedule a report to email and print
I have been working on a task to both print and email a report to recipients whose email addresses are obtained at runtime. So far I am able to email the report as a PDF attachment, however, I am not able to get the report to print. I have three thoughts as to why the report is not printing.
1. The printer is in a subdomain under the domain where InfoView and the Enterprise server reside.
2. It is not possible to schedule a report for both an SMTP and print destination simultaneously.
3. The format is causing an issue in printing - the SDK API states "Printer is a report format specific destination and can only be used when the report object is a Crystal Report."
I have looked at the scheduled report in InfoView and can see that the print settings I am passing are correctly set for the scheduled instance. Does anyone know if there is a problem with trying to schedule printing and email at the same time, or if the report format must be .rpt?
Below is my code. Thank you for your time.
String query = "Select SI_ID, SI_NAME, SI_PROCESSINFO, SI_SCHEDULEINFO, SI_SCHEDULE_STATUS From CI_INFOOBJECTS Where SI_ID=" + reportId;
IInfoObjects results = null;
ISchedulingInfo schedulingInfo = null;
try {
results = iStore.query(query);
} catch( SDKException sdke ){
logger.error(sdke);
if( !results.isEmpty() ){
// get the actual report object from collection and set scheduling information
IInfoObject report = (IInfoObject)results.get(0);
schedulingInfo = report.getSchedulingInfo();
schedulingInfo.setType(CeScheduleType.ONCE);
schedulingInfo.setRightNow(true);
schedulingInfo.setRetriesAllowed(3);
try {
Set<String> keys = destinations.keySet();
Iterator i = keys.iterator();
while( i.hasNext() ){
String dest = (String) i.next();
if(dest.equals(CrystalDestinations.EMAIL)){
// get the destination object and set it to SMTP plugin
List emailAddress = destinations.get(CrystalDestinations.EMAIL);
IDestination destinationObject = schedulingInfo.getDestination();
destinationObject.setName("CrystalEnterprise.SMTP");
IDestinationPlugin smtpPlugin = (IDestinationPlugin) iStore.query("SELECT * FROM CI_SYSTEMOBJECTS WHERE SI_PARENTID = 29 AND SI_NAME='CrystalEnterprise.SMTP'").get(0);
ISMTPOptions smtpOptions = (ISMTPOptions) smtpPlugin.getScheduleOptions();
smtpOptions.setDomainName( emailDomain );
smtpOptions.setServerName( smtpHost );
smtpOptions.setSMTPUserName( smtpUser );
smtpOptions.setSMTPPassword( smtpPass );
smtpOptions.setSubject( "Email for report " + report.getTitle() );
smtpOptions.setMessage( "This is the message body" );
smtpOptions.setSenderAddress( smtpUser + "@cdrh.fda.gov" );
smtpOptions.setSMTPAuthenticationType( ISMTPOptions.CeSMTPAuthentication.LOGIN );
for(int j = 0; j < emailAddress.size(); j++ ){
smtpOptions.getToAddresses().add( emailAddress.get(j) );
destinationObject.setFromPlugin( smtpPlugin );
} else if ( dest.equals(CrystalDestinations.PRINT) ){
List printers = destinations.get( CrystalDestinations.PRINT );
IReportPrinterOptions printerOptions = ((IReport)report).getReportPrinterOptions();
printerOptions.setCopies(1);
printerOptions.setEnabled(false);
printerOptions.setPrinterName( (String)printers.get(0) );
printerOptions.setPageLayout(IReportPrinterOptions.CeReportLayout.USE_SPECIFIED_PRINTER_SETTING);
List reportPrompts = ((IReport)report).getReportParameters();
for(int j = 0; j < reportPrompts.size(); j++){
IReportParameter prompt = (IReportParameter) reportPrompts.get(j);
if(prompt.getParameterName().equals(mdrParamName)){
IReportParameterSingleValue v = prompt.getCurrentValues().addSingleValue();
v.setValue(reportParameters.get(mdrParamName));
} else if(prompt.getParameterName().equals(addressParamName)){
IReportParameterSingleValue v = prompt.getCurrentValues().addSingleValue();
v.setValue(reportParameters.get(addressParamName));
IReportFormatOptions format = ( (IReport) report).getReportFormatOptions();
format.setFormat(IReportFormatOptions.CeReportFormat.PDF);
iStore.schedule( results );Hi Jason,
Based on your code, I could not tell if you were scheduling a Crystal Report or a WebI document.
Regardless, what I would suggest is you try scheduling the report/document on InfoView.
Once you schedule it on InfoView, you can retrieve the instance on Query Builder (or through code) and compare the properties that are being set through InfoView and the one you set through your code.
This should indicate if you are missing some properies or have set some properties incorrectly.
Hope this helps.
Regards,
Dan -
Need Report in Training and Event Management
Dear All,
I want a report in Training and Event Management consisting of attendee name and training date and venue details, price for training event and would like to know any standard report available.
Kindly let me know the std report name.
Thanks and Regards
Suresh,VHi!
for all reports try T-code : SAP1 ( Report Selection ) & SAP2 ( Info catalog ) here you will get all the standard reports available for that module .
Regards
Sheetal
Edited by: sheetal Gulati on May 14, 2009 7:51 AM -
App store reports "Pinball HD and 11 other apps cannot be purchased at this time"..... This occurs whenever I log into the app store. I have already purchased this app (and presumably the 11 others as well). I believe this started when it showed up as an app I should update (for free).
My wife and I share this iPad and we have apps purchased under two different store accounts on this machine. I have tried to log off and sign in with her account and then check updates but with either account I am told that all apps are up to date. All of our credit card info is current. Any clues?Already on Automatic..... :(
This is an iPad 1 - I've had it since it first came out (ordered directly from Apple). Lots of apps and purchases over the years. My wife got her own WiFi only iPad shortly after mine as she fell in love with it and I don't share well. ;) This only started about 7-10 days ago. I did not update to iOs 5.1 until last night so this predates that. My concern is that when the iPad 3 arrives next Friday that this will transfer over.
Ever since my wife received her own iPad our purchases are pretty much separate. -
SCCM Report for Applicable and Installed Updates Collection Wise
Hi All, I was looking for a report on Applicable and Installed Updates Collection Wise and got this below query on the Internet and want to create a SCCM report with this below query. How to make this query working in SCCM report?
Do I need to add prompts, if yes please guide me on adding prompts.
SELECT
DISTINCT
SYS.Name0
AS [Server Name], SIS.SMS_Installed_Sites0 AS [Site Code], UCS.Status AS [Patch Status Code],
CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status', UI.BulletinID AS [Bulletin ID],
UI
.ArticleID AS [Article ID], UI.
Title
FROM
v_R_System AS SYS LEFT OUTER
JOIN
v_Update_ComplianceStatusAll
AS UCS ON SYS.ResourceID = UCS.ResourceID INNER
JOIN
v_UpdateInfo
AS UI ON UCS.CI_ID = UI.CI_ID INNER
JOIN
v_RA_System_SMSInstalledSites
AS SIS ON SYS.ResourceID = SIS.
ResourceID
WHERE
(UCS.Status IN ('2', '3')) AND (UI.ArticleID IN ('972270', '974392', '973904', '969947')) AND (SYS.Name0
IN
(SELECT DISTINCT v_FullCollectionMembership.
Name
FROM v_FullCollectionMembership INNER
JOIN
v_R_System
ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
v_FullCollectionMembership
.CollectionID IN ('Collection ID'
ORDER
BY
[Patch Status Code]Yes it can be done and please run the query which i have shared in the thread
I again pasted the query for you below..
SELECT DISTINCT
SYS.Name0 AS [Server Name], CASE WHEN UCS.Status = '2' THEN 'Applicable' WHEN UCS.Status = '3' THEN 'Installed' ELSE '' END AS 'Patch Status',
UI.BulletinID AS [Bulletin ID], UI.ArticleID AS [Article ID], UI.Title
FROM v_R_System AS SYS LEFT OUTER JOIN
v_Update_ComplianceStatusAll
AS UCS ON SYS.ResourceID = UCS.ResourceID INNER JOIN
v_UpdateInfo AS UI ON UCS.CI_ID
= UI.CI_ID
WHERE (UCS.Status IN ('2', '3')) AND (SYS.Name0 IN (SELECT DISTINCT v_FullCollectionMembership.Name
FROM v_FullCollectionMembership INNER JOIN
v_R_System ON v_R_System.ResourceID = v_FullCollectionMembership.ResourceID AND v_R_System.Active0 = 1 AND
v_FullCollectionMembership.CollectionID
IN ('XXX00000')))
Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights -
Custom Report for slow and fast moving items
Dear Xperts,
My client wants to develop a new report for slow and fast moving items, I checked the std report MC46 however as per std SAP design this report does not consider the special stock like project stock (Q)...could you please help me to know how can develop this new report with following input and output fields?
Input fields:
Plant
Material
Material Group
MRP Area
Special Stock Indicator
Special Stock (Type)
Output Fields:
Material
Material type
Material group
MRP Controller
MRP Area
ABC indicator
Material price
Category field – Slow, Fast, Non-moving
Current Stock
Last Issue Date
Thanks in Advance
Regards
RahulDear Rahul,
If you required project stock and consignment stock with valuated stock report in same place you need to generate new info structure as given below link. Or you can go with customized report with abaper.
Info structure validation
Regards
Sanjeet Kumar -
Enhancement request for VAT Report of Customer and Vendor.
Hello SAP Gurus,
Have enhancement request for adding new fields in existing VAT report of Customer and Vendor like user id, GL account etc.
As I am fresher, can you please help me that how I need to approach. Thanks for your support.
Regards,
SaleemHello Saleem,
Almost all fields required for VAT reporting are available in standard tax report
S_ALR_87012357 .
You have to configure the layout from the selection screen as below
regards
pb -
Output same Deski report as PDF and XLS
Hello,
will it be possible to generate (not schedule) a Deski - Report using Java SDK ?
desired workflow:
- generate/refresh the report to hold new data (User specific, Local specific)
- output this report in Formats PDF and XLS
- store the output - reports in Users inbox
The goal is to generate the report only once and output the same twice - as pdf and as xls.
As far as i saw in scheduling a report, it is only possible to produce one output (pdf or xls), if we need both, we have to schedule twice. And therefor we will have to generate the same report twice.
I found somthing like
binaryView = (BinaryView)documentInstance.getView(OutputFormatType.XLS);
binaryView = (BinaryView)documentInstance.getView(OutputFormatType.PDF);
in RBean for Webi - reports.
Looking forward for any idea.
Thanks in advance.
Johannes
Edited by: Johannes Kammerer on Sep 15, 2009 4:55 PMIf you're on XI 3.x, then you can specify multi-format exports using Publications.
Otherwise, you'd need to export to a file using REBean SDK, then Enterprise SDK to create a new InfoObject for that artifact.
Sincerely,
Ted Ueda
Maybe you are looking for
-
Differential of noisy response curve
I am measuring the temperature from an RTD to produce a heating (or cooling) curve. The response is roughly sigmoidal, however it is noisy, and thus differentiating the data in real time does not give me a 'heating rate' of any sensible appearance. D
-
How to render liquid tags in the console?
Hello! I have been trying to render liquid tags in the browser's console using Javascript, but it doesn't work. This is what I have been doing: document.getElementById('globals').innerHTML = '<pre>{{globals | json}}'</pre>; That just seems to write
-
Change Logged in as text to fullname
How can I change the Logged in as: to show user full name instead of his accountId.??? Thanks in advance
-
Down or otherwise inactive web services
I am using Weblogic 8.1 to generate a web services client that accesses a Microsoft .Net based web service. As you can imagine, the .Net webservice goes down all the time(we nicknamed it "Jerry Cooney"). When its down, the client app goes into a long
-
I want to use a pop up that gets it's information from a table. For example I have 6 sheets with the same pop up and I don't want to have to edit all 6 sheets, just one table and all pop up's have the new value from the table below. A list of text wh