Display report date in sapscript
I am using
/: SET DATE MASK = 'Update on: DD MMM YYYY'.
/: &DATE&
to display the date with format 09 Oct 2007.
But the outcome is display 09 chinese data 2007. How can i solve the problem. Thanks!
Hi,
Read the internal table.if internal table have 4 lines split each line in to each and every line..pass to each variable to script.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = SY-LANGU
name = V_OBJECT
object = 'DOC_ITEM'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = I_LINESP
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.
READ TABLE I_LINESP INDEX 1.
I_BSEG-LTEXT1 = I_LINESP-TDLINE.
READ TABLE I_LINESP INDEX 2.
I_BSEG-LTEXT2 = I_LINESP-TDLINE.
READ TABLE I_LINESP INDEX 3.
I_BSEG-LTEXT3 = I_LINESP-TDLINE.
READ TABLE I_LINESP INDEX 4.
I_BSEG-LTEXT4 = I_LINESP-TDLINE.
MODIFY I_BSEG.
ENDLOOP.
Regards,
padmaja.
Similar Messages
-
How to display "No data for yesterday" in a scheduled report on Webi
Hi All,
In Webi, I am working on scheduling reports and was asked by a user if the scheduled report on Webi can display "No data for yesterday/no orders for yesterday" when the report returns no data due to No Orders submitted or a business holiday. This sounded a good idea to me as this report only looks for previous days orders/sales and there are many instances when the report will return blank page due to no activity the day before.
Can anyone please guide me on the possibility of achieving something like this on Webi using Bex query.
Any help will be appreciated .
Thanks
GauravHi,
You can format the blocks in the report as "Hide When Empty" or "Hide When [some formula]" and have a blank cell added behind these blocks with a text "No Data for Yesterday"
Need to set the relative position and ordering for this accordingly. -
How to display the data monthwise in the following report
see the following report. i will give u the code
if we go to fd10n then we see the monthwise debit,credit and the outstanding amount . i want to display the data monthwise in my report. means if i select the first month then it will dislpay only month of april debit, credit, and the outstanding amount.
if anyone know the answer then please help me.
Thanks.
Dinesh
*& Report ZCUSTOMER_GROUP
REPORT ZCUSTOMER_GROUP NO STANDARD PAGE HEADING.
TABLES: KNA1,KNVV,KNB1,T151T,T685T,KNVI,TSKDT,BSID,T001,KNC1,KNC3.
TYPE-POOLS: SLIS.
TYPES: BEGIN OF IT_FINAL,
BZIRK LIKE KNVV-BZIRK,
VKBUR LIKE KNVV-VKBUR,
KDGRP LIKE KNVV-KDGRP,
KUNNR LIKE KNVV-KUNNR,
VKORG LIKE KNVV-VKORG,
VTWEG LIKE KNVV-VTWEG,
SPART LIKE KNVV-SPART,
KTGRD LIKE KNVV-KTGRD,
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
STCEG LIKE KNA1-STCEG,
REGIO LIKE KNA1-REGIO,
STRAS LIKE KNA1-STRAS,
TELF1 LIKE KNA1-TELF1,
WERKS LIKE KNA1-WERKS,
SPRAS TYPE SPRAS,
GFORM LIKE KNA1-GFORM,
LAND1 LIKE KNA1-LAND1,
ALTKN LIKE KNB1-ALTKN,
AKONT LIKE KNB1-AKONT,
VZSKZ TYPE KNB1-VZSKZ,
VTEXT LIKE T685T-VTEXT,
KTEXT LIKE T151T-KTEXT,
TATYP TYPE KNVI-TATYP,
TAXKD TYPE KNVI-TAXKD,
taxkd type tskdt-taxkd,
tatyp type tskdt-tatyp,
VTEXT TYPE TSKDT-VTEXT,
UMSKZ LIKE BSID-UMSKZ,
DMBTR TYPE BSID-DMBTR,
coll LIKE bsid-dmbtr,
coll1 LIKE bsid-dmbtr,
coll2 LIKE bsid-dmbtr,
coll3 LIKE bsid-dmbtr,
advance LIKE bsid-dmbtr,
deposit LIKE bsid-dmbtr,
amount type bsid-dmbtr,
shkzg type bsid-shkzg,
blart type bsid-blart,
BUDAT TYPE BSID-BUDAT,
BLDAT TYPE BSID-BLDAT,
GJAHR LIKE BSID-GJAHR,
outstand LIKE bsid-dmbtr,
debit like bsid-dmbtr,
UM01S LIKE KNC1-UM01S,
UM02S LIKE KNC1-UM02S,
UM03S LIKE KNC1-UM03S,
UM04S LIKE KNC1-UM04S,
UM05S LIKE KNC1-UM05S,
UM06S LIKE KNC1-UM06S,
UM07S LIKE KNC1-UM07S,
UM08S LIKE KNC1-UM08S,
UM09S LIKE KNC1-UM09S,
UM10S LIKE KNC1-UM10S,
UM11S LIKE KNC1-UM11S,
UM12S LIKE KNC1-UM12S,
UM13S LIKE KNC1-UM13S,
UM14S LIKE KNC1-UM14S,
UM15S LIKE KNC1-UM15S,
UM16S LIKE KNC1-UM16S,
DEBIT LIKE KNC1-UM01S,
GJAHR LIKE KNC1-GJAHR,
DEBIT TYPE STRING,
UM01H LIKE KNC1-UM01H,
UM02H LIKE KNC1-UM02H,
UM03H LIKE KNC1-UM03H,
UM04H LIKE KNC1-UM04H,
UM05H LIKE KNC1-UM05H,
UM06H LIKE KNC1-UM06H,
UM07H LIKE KNC1-UM07H,
UM08H LIKE KNC1-UM08H,
UM09H LIKE KNC1-UM09H,
UM10H LIKE KNC1-UM10H,
UM11H LIKE KNC1-UM11H,
UM12H LIKE KNC1-UM12H,
UM13H LIKE KNC1-UM13H,
UM14H LIKE KNC1-UM14H,
UM15H LIKE KNC1-UM15H,
UM16H LIKE KNC1-UM16H,
CREDIT TYPE STRING,
UMSAV LIKE KNC1-UMSAV,
GJAHR LIKE KNC1-GJAHR,
SHBKZ LIKE KNC3-SHBKZ,
SALDV LIKE KNC3-SALDV,
SOLLL LIKE KNC3-SOLLL,
HABNL LIKE KNC3-HABNL,
DOWN TYPE STRING,
DEPOSIT TYPE STRING,
COLL TYPE STRING,
END OF IT_FINAL.
TYPES : BEGIN OF IT_KNVV ,
BZIRK LIKE KNVV-BZIRK,
VKBUR LIKE KNVV-VKBUR,
KDGRP LIKE KNVV-KDGRP,
KUNNR LIKE KNVV-KUNNR,
VKORG LIKE KNVV-VKORG,
VTWEG LIKE KNVV-VTWEG,
SPART LIKE KNVV-SPART,
KTGRD LIKE KNVV-KTGRD,
END OF IT_KNVV.
TYPES: BEGIN OF IT_KNA1 ,
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
STCEG LIKE KNA1-STCEG,
REGIO LIKE KNA1-REGIO,
STRAS LIKE KNA1-STRAS,
TELF1 LIKE KNA1-TELF1,
WERKS LIKE KNA1-WERKS,
KUNNR LIKE KNA1-KUNNR,
GFORM LIKE KNA1-GFORM,
SPRAS TYPE SPRAS,
LAND1 LIKE KNA1-LAND1,
END OF IT_KNA1.
TYPES: BEGIN OF IT_KNB1 ,
ALTKN LIKE KNB1-ALTKN,
AKONT LIKE KNB1-AKONT,
VZSKZ TYPE KNB1-VZSKZ,
KUNNR LIKE KNB1-KUNNR,
END OF IT_KNB1.
TYPES: BEGIN OF IT_T151T ,
KTEXT LIKE T151T-KTEXT,
KDGRP LIKE T151T-KDGRP,
SPRAS TYPE SPRAS,
END OF IT_T151T.
DATA: BEGIN OF IT_T685T OCCURS 0,
VTEXT LIKE T685T-VTEXT,
spras type spras,
END OF IT_T685T.
TYPES: BEGIN OF IT_KNVI ,
TAXKD TYPE KNVI-TAXKD,
TATYP TYPE KNVI-TATYP,
KUNNR TYPE KNVI-KUNNR,
END OF IT_KNVI.
TYPES: BEGIN OF IT_TSKDT ,
TAXKD TYPE TSKDT-TAXKD,
TATYP TYPE tskdt-TATYP,
VTEXT TYPE TSKDT-TATYP,
SPRAS TYPE SPRAS,
END OF IT_TSKDT.
TYPES: BEGIN OF IT_BSID ,
UMSKZ TYPE BSID-UMSKZ,
DMBTR TYPE BSID-DMBTR,
COLL LIKE BSID-DMBTR,
COLL1 LIKE BSID-DMBTR,
COLL2 LIKE BSID-DMBTR,
COLL3 LIKE BSID-DMBTR,
ADVANCE LIKE BSID-DMBTR,
DEPOSIT LIKE BSID-DMBTR,
SHKZG TYPE BSID-SHKZG,
KUNNR TYPE BSID-KUNNR,
BUDAT TYPE BSID-BUDAT,
BLART TYPE BSID-BLART,
OUTSTAND LIKE BSID-DMBTR,
GJAHR LIKE BSID-GJAHR,
END OF IT_BSID.
TYPES : BEGIN OF IT_KNC1,
UM01S LIKE KNC1-UM01S,
UM02S LIKE KNC1-UM02S,
UM03S LIKE KNC1-UM03S,
UM04S LIKE KNC1-UM04S,
UM05S LIKE KNC1-UM05S,
UM06S LIKE KNC1-UM06S,
UM07S LIKE KNC1-UM07S,
UM08S LIKE KNC1-UM08S,
UM09S LIKE KNC1-UM09S,
UM10S LIKE KNC1-UM10S,
UM11S LIKE KNC1-UM11S,
UM12S LIKE KNC1-UM12S,
UM13S LIKE KNC1-UM13S,
UM14S LIKE KNC1-UM14S,
UM15S LIKE KNC1-UM15S,
UM16S LIKE KNC1-UM16S,
DEBIT LIKE KNC1-UM01S,
DEBIT TYPE STRING,
UM01H LIKE KNC1-UM01H,
UM02H LIKE KNC1-UM02H,
UM03H LIKE KNC1-UM03H,
UM04H LIKE KNC1-UM04H,
UM05H LIKE KNC1-UM05H,
UM06H LIKE KNC1-UM06H,
UM07H LIKE KNC1-UM07H,
UM08H LIKE KNC1-UM08H,
UM09H LIKE KNC1-UM09H,
UM10H LIKE KNC1-UM10H,
UM11H LIKE KNC1-UM11H,
UM12H LIKE KNC1-UM12H,
UM13H LIKE KNC1-UM13H,
UM14H LIKE KNC1-UM14H,
UM15H LIKE KNC1-UM15H,
UM16H LIKE KNC1-UM16H,
CREDIT TYPE STRING,
UMSAV LIKE KNC1-UMSAV,
KUNNR LIKE KNC1-KUNNR,
GJAHR LIKE KNC1-GJAHR,
END OF IT_KNC1.
TYPES : BEGIN OF IT_KNC3,
SHBKZ LIKE KNC3-SHBKZ,
SALDV LIKE KNC3-SALDV,
SOLLL LIKE KNC3-SOLLL,
HABNL LIKE KNC3-HABNL,
KUNNR LIKE KNC3-KUNNR,
GJAHR LIKE KNC3-GJAHR,
DOWN TYPE STRING,
DEPOSIT TYPE STRING,
END OF IT_KNC3.
*INTERNAL TABLE DECLARATION
DATA: I_FINAL TYPE STANDARD TABLE OF IT_FINAL,
I_KNVV TYPE STANDARD TABLE OF IT_KNVV,
I_KNA1 TYPE STANDARD TABLE OF IT_KNA1,
I_KNB1 TYPE STANDARD TABLE OF IT_KNB1,
I_T151T TYPE STANDARD TABLE OF IT_T151T,
I_KNVI TYPE STANDARD TABLE OF IT_KNVI,
I_TSKDT TYPE STANDARD TABLE OF IT_TSKDT,
I_BSID TYPE STANDARD TABLE OF IT_BSID,
I_KNC1 TYPE STANDARD TABLE OF IT_KNC1,
I_KNC3 TYPE STANDARD TABLE OF IT_KNC3.
*DECLARATION FOR THE WORK AREA
DATA: WA_FINAL TYPE IT_FINAL,
WA_KNVV TYPE IT_KNVV,
WA_KNA1 TYPE IT_KNA1,
WA_KNB1 TYPE IT_KNB1,
WA_T151T TYPE IT_T151T,
WA_KNVI TYPE IT_KNVI,
WA_TSKDT TYPE IT_TSKDT,
WA_BSID TYPE IT_BSID,
WA_KNC1 TYPE IT_KNC1,
WA_KNC3 TYPE IT_KNC3.
DECLARATION FOR THE FIELD CATALOG.
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
WA_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA GD_REPID LIKE SY-REPID.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
BREAK-POINT.
SELECT-OPTIONS: CUST_GRP FOR KNVV-KDGRP.
SELECT-OPTIONS: SALES_OF FOR KNVV-VKBUR.
SELECT-OPTIONS: REGION FOR KNA1-REGIO.
SELECT-OPTIONS: DATE FOR BSID-BLDAT.
SELECT-OPTIONS: YEAR FOR KNC1-GJAHR.
SELECT-OPTIONS: CUST_NO FOR KNVV-KUNNR.
SELECTION-SCREEN :END OF BLOCK B1.
* DECLARATION FOR THE SUBROUTIN FOR BASIC LIST.
PERFORM data_retrival.
PERFORM F_GET_I_KNVV_DATA.
PERFORM F_GET_I_KNA1_DATA.
PERFORM F_GET_I_KNB1_DATA.
PERFORM F_GET_I_T151T_DATA.
*PERFORM F_GET_IT_T685T_DATA.
PERFORM F_GET_I_KNVI_DATA.
PERFORM F_GET_I_TSKDT_DATA.
PERFORM F_GET_I_BSID_DATA.
PERFORM F_GET_I_KNC1_DATA.
PERFORM F_GET_I_KNC3_DATA.
PERFORM F_GET_I_FINAL_DATA.
PERFORM DATA_BUILD.
PERFORM DATA_CALL.
FORM F_GET_I_KNVV_DATA.
SELECT BZIRK KDGRP KTGRD KUNNR SPART VKBUR VKORG VTWEG
FROM KNVV
INTO CORRESPONDING FIELDS OF TABLE I_KNVV
WHERE KDGRP IN CUST_GRP AND VKBUR IN SALES_OF AND KUNNR IN CUST_NO.
ENDFORM.
FORM F_GET_I_KNA1_DATA.
SELECT KUNNR NAME1 ORT01 REGIO STCEG STRAS TELF1 WERKS GFORM SPRAS LAND1
FROM KNA1
INTO CORRESPONDING FIELDS OF TABLE I_KNA1 FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND REGIO IN REGION AND LAND1 = 'IN' .
ENDFORM.
FORM F_GET_I_KNB1_DATA.
SELECT ALTKN AKONT VZSKZ KUNNR
FROM KNB1
INTO CORRESPONDING FIELDS OF TABLE I_KNB1 FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR.
ENDFORM.
FORM F_GET_I_T151T_DATA.
SELECT KTEXT KDGRP SPRAS
FROM T151T
INTO CORRESPONDING FIELDS OF TABLE I_T151T FOR ALL ENTRIES IN I_KNVV
WHERE KDGRP = I_KNVV-KDGRP AND SPRAS = 'E' .
ENDFORM.
*FORM F_GET_IT_T685T_DATA.
*select vtext spras
*from t685t
*into CORRESPONDING FIELDS OF TABLE it_t685t for all entries in it_kna1
where spras = it_kna1-spras and spras = 'E'.
*endform.
FORM F_GET_I_KNVI_DATA.
SELECT TAXKD TATYP KUNNR
FROM KNVI
INTO CORRESPONDING FIELDS OF TABLE I_KNVI FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR
AND TAXKD = '8' OR TAXKD = '3' OR TAXKD = '0'
AND TATYP = 'Z1AU' OR TATYP = 'ZCST'.
*and ( taxkd = '8' or taxkd = '0' or taxkd = '3')
and ( tatyp = 'Z1AU' OR TATYP = 'ZCST' ).
ENDFORM.
FORM F_GET_I_TSKDT_DATA.
SELECT VTEXT TAXKD SPRAS FROM
TSKDT
INTO CORRESPONDING FIELDS OF TABLE I_TSKDT FOR ALL ENTRIES IN I_KNVI
WHERE TAXKD = I_KNVI-TAXKD AND SPRAS = 'E'.
ENDFORM.
FORM F_GET_I_BSID_DATA.
*DATA: DMBTR TYPE BSID-DMBTR,
OUTSTAND LIKE BSID-DMBTR.
SELECT UMSKZ DMBTR SHKZG KUNNR BLART GJAHR BUDAT BLDAT
FROM BSID
INTO CORRESPONDING FIELDS OF TABLE I_BSID
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND BLDAT IN DATE.
*AND ( BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1' )
*and umskz = 'A' or umskz = 'L' OR UMSKZ = ''
*AND SHKZG = 'S' OR SHKZG = 'H'.
ENDFORM.
FORM F_GET_I_KNC1_DATA.
SELECT UM01S UM02S UM03S UM04S UM05S UM06S UM07S UM08S UM09S UM10S UM11S UM12S UM13S UM14S UM15S UM16S
UM01H UM02H UM03H UM04H UM05H UM06H UM07H UM08H UM09H UM10H UM11H UM12H UM13H UM14H UM15H UM16H
UMSAV KUNNR GJAHR
FROM KNC1
INTO CORRESPONDING FIELDS OF TABLE I_KNC1
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND GJAHR IN YEAR .
ENDFORM.
FORM F_GET_I_KNC3_DATA.
SELECT KUNNR GJAHR SHBKZ SALDV SOLLL HABNL
FROM KNC3
INTO CORRESPONDING FIELDS OF TABLE I_KNC3
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR
AND SHBKZ = 'A' OR SHBKZ = 'L'.
ENDFORM.
FORM F_GET_I_FINAL_DATA.
*BREAK-POINT.
LOOP AT I_KNVV INTO WA_KNVV.
CLEAR WA_FINAL.
WA_FINAL-BZIRK = WA_KNVV-BZIRK.
WA_FINAL-VKBUR = WA_KNVV-VKBUR.
WA_FINAL-KDGRP = WA_KNVV-KDGRP.
WA_FINAL-KUNNR = WA_KNVV-KUNNR.
WA_FINAL-VKORG = WA_KNVV-VKORG.
WA_FINAL-VTWEG = WA_KNVV-VTWEG.
WA_FINAL-SPART = WA_KNVV-SPART.
WA_FINAL-KTGRD = WA_KNVV-KTGRD.
READ TABLE I_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNVV-KUNNR.
WA_FINAL-NAME1 = WA_KNA1-NAME1.
WA_FINAL-ORT01 = WA_KNA1-ORT01.
WA_FINAL-STCEG = WA_KNA1-STCEG.
WA_FINAL-REGIO = WA_KNA1-REGIO.
WA_FINAL-STRAS = WA_KNA1-STRAS.
WA_FINAL-TELF1 = WA_KNA1-TELF1.
WA_FINAL-WERKS = WA_KNA1-WERKS.
WA_FINAL-GFORM = WA_KNA1-GFORM.
WA_FINAL-LAND1 = WA_KNA1-LAND1.
IF SY-SUBRC = 0.
ENDIF.
READ TABLE I_KNB1 INTO WA_KNB1 WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-ALTKN = WA_KNB1-ALTKN.
WA_FINAL-AKONT = WA_KNB1-AKONT.
WA_FINAL-VZSKZ = WA_KNB1-VZSKZ.
ENDIF.
READ TABLE I_T151T INTO WA_T151T WITH KEY KDGRP = WA_KNVV-KDGRP .
IF SY-SUBRC = 0.
WA_FINAL-KTEXT = WA_T151T-KTEXT.
ENDIF.
READ TABLE I_KNVI INTO WA_KNVI WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-TAXKD = WA_KNVI-TAXKD.
WA_FINAL-TATYP = WA_KNVI-TATYP.
ENDIF.
READ TABLE I_TSKDT INTO WA_TSKDT WITH KEY TAXKD = WA_KNVI-TAXKD
WA_FINAL-VTEXT = WA_TSKDT-VTEXT.
*UP TO THIS POINT REPORT IS OK
*read table I_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'A' .
*if sy-subrc = 0.
*WA_final-DOWN = WA_bsid-dmbtr * -1.
**modify i_final.
**clear it_bsid.
*endif.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'L' .
*if sy-subrc = 0.
*WA_final-deposit = WA_bsid-dmbtr * -1.
*endif.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'DZ' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll1 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'HR' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll2 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'P1' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll3 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr.
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll = ( WA_final-coll1 + WA_final-coll2 + WA_final-coll3 ) - ( wa_final-deposit ) * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'L' .
*if sy-subrc = 0.
*WA_final-deposit = WA_bsid-dmbtr * -1.
*endif.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM01S = WA_KNC1-UM01S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM02S = WA_KNC1-UM02S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM03S = WA_KNC1-UM03S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM04S = WA_KNC1-UM04S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM05S = WA_KNC1-UM05S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM06S = WA_KNC1-UM06S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM07S = WA_KNC1-UM07S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM08S = WA_KNC1-UM08S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM09S = WA_KNC1-UM09S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM10S = WA_KNC1-UM10S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM11S = WA_KNC1-UM11S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM12S = WA_KNC1-UM12S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM13S = WA_KNC1-UM13S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM14S = WA_KNC1-UM14S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM15S = WA_KNC1-UM15S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM16S = WA_KNC1-UM16S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR .
IF SY-SUBRC = 0.
WA_FINAL-DEBIT = WA_KNC1-UM01S + WA_KNC1-UM02S + WA_KNC1-UM03S + WA_KNC1-UM04S + WA_KNC1-UM05S + WA_KNC1-UM06S + WA_KNC1-UM07S +
WA_KNC1-UM08S + WA_KNC1-UM09S + WA_KNC1-UM10S + WA_KNC1-UM11S + WA_KNC1-UM12S + WA_KNC1-UM13S + WA_KNC1-UM14S +
WA_KNC1-UM15S + WA_KNC1-UM16S .
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-UM01H = WA_KNC1-UM01H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM02H = WA_KNC1-UM02H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM03H = WA_KNC1-UM03H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM04H = WA_KNC1-UM04H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM05H = WA_KNC1-UM05H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM06H = WA_KNC1-UM06H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM07H = WA_KNC1-UM07H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM08H = WA_KNC1-UM08H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM09H = WA_KNC1-UM09H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM10H = WA_KNC1-UM10H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM11H = WA_KNC1-UM11H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM12H = WA_KNC1-UM12H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM13H = WA_KNC1-UM13H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM14H = WA_KNC1-UM14H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM15H = WA_KNC1-UM15H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM16H = WA_KNC1-UM16H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-CREDIT = WA_KNC1-UM01H + WA_KNC1-UM02H + WA_KNC1-UM03H + WA_KNC1-UM04H + WA_KNC1-UM05H + WA_KNC1-UM06H + WA_KNC1-UM07H +
WA_KNC1-UM08H + WA_KNC1-UM09H + WA_KNC1-UM10H + WA_KNC1-UM11H + WA_KNC1-UM12H + WA_KNC1-UM13H + WA_KNC1-UM14H +
WA_KNC1-UM15H + WA_KNC1-UM16H .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-SALDV = WA_KNC3-SALDV .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-SOLLL = WA_KNC3-SOLLL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-HABNL = WA_KNC3-HABNL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-DOWN = WA_KNC3-SALDV + WA_KNC3-SOLLL + WA_KNC3-HABNL * -1.
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-SALDV = WA_KNC3-SALDV .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-SOLLL = WA_KNC3-SOLLL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-HABNL = WA_KNC3-HABNL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-DEPOSIT = WA_KNC3-SALDV + WA_KNC3-SOLLL + WA_KNC3-HABNL * -1.
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR.
IF SY-SUBRC = 0.
WA_FINAL-COLL = WA_FINAL-DOWN - WA_FINAL-DEPOSIT.
ENDIF.
APPEND WA_FINAL TO I_FINAL.
ENDLOOP.
ENDFORM.
FORM DATA_BUILD.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'NAME1'.
WA_FIELDCATALOG-SELTEXT_M = 'NAME'.
fieldcatalog-col_pos = 1.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'ORT01'.
WA_FIELDCATALOG-SELTEXT_M = 'CITY'.
fieldcatalog-col_pos = 2.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'STCEG'.
WA_FIELDCATALOG-SELTEXT_M = 'VAT. REG. NO.'.
fieldcatalog-col_pos = 3.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'REGIO'.
WA_FIELDCATALOG-SELTEXT_M = 'REGION'.
fieldcatalog-col_pos = 4.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'STRAS'.
WA_FIELDCATALOG-SELTEXT_M = 'STREET'.
fieldcatalog-col_pos = 5.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'TELF1'.
WA_FIELDCATALOG-SELTEXT_M = 'TELEPHONE'.
fieldcatalog-col_pos = 6.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'WERKS'.
WA_FIELDCATALOG-SELTEXT_M = 'PLANT'.
fieldcatalog-col_pos = 7.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'BZIRK'.
WA_FIELDCATALOG-SELTEXT_M = 'SALES DISTRICT'.
fieldcatalog-col_pos = 8.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'VKBUR'.
WA_FIELDCATALOG-SELTEXT_M = 'SALES OFFICE'.hi dinesh......
please use 'INTO TABLE' instead of ' INTO CORRESPONDING FIELDS OF TABLE '. and use ' FOR ALL ENTRIES '............based on relavence ....coz when I set break point over the select queries it took me long time to execute .......
becoz u didnt used the for all entries in select query ............ u r read statement
READ TABLE I_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNVV-KUNNR. .....
it is reading wrong kunnr value .............even it took long time to execute ......
use sort where ever required...
use for all entries .......and check weather the table initial or not......
use sy-subrc check where ever reqired .............. -
How to display the data of a structure in a report
i want to display the data of a structure resbd.
i know it does not have data.
but it contains data at runtime
plz help
thanxHi,
For displaying the data of a structure you can use the write statement.
WRITE : structurename - fieldname.
eg : write : resbd-rsnum.
Before that you need to declare the structure name inside the report.
Please refer the following code for your querry
REPORT ZSTRUCTDATA .
Table Declaration
tables : resbd.
Assigning Values to Structure Fields
resbd-rsnum = 1234.
resbd-rspos = 12.
Displaying Values
write : / resbd-rsnum.
write : / resbd-rspos.
This report will give the output like this.
0000001234
0012
Regards,
LIJO JOHN. -
Report to display (actuals data from one cube and plan from another)
Hi Gurus,
I have a requirement in reporting to display actual data from one cube and plan data from a different one.
The example below might give a clear picture of the requirement.
rows has key figures and columns = months
Jan | Feb | Mar | Apr | May | Jun ... ....
GrossSales
Net Sales
Now if I run the report for Current month (Apr), then for the months of (Jan, Feb and Mar) i need to get the data from CUBE1 and for the remaining months (Apr thru Dec) from CUBE2.
Similarly when i run the report next month(may),
then (data for Jan, Feb, Mar, Apr from CUBE1)
and ( May thru Dec from CUBE2)
Any suggestions.
Thanks in Advance
KumarHi Henry,
We alreadey have a multi provider which includes
FinDat Cube(CUBE1) for actuals and Comm.Goals cube (CUBE2) for plan.
So you suggest that we have two versions of key figure for actual and plan.
ie. each KF will have two versions.
actuals = (version 10, FiscPer<curr.mnth, key figure, acutals cube)
Plan = (version 20, FiscPer>=curr.mnth, key figure, comm.goals cube)
eg:
Jan | Feb | Mar | Apr | May | Jun ...
GrossSales(Act)
GrossSlaes(Plan)
Net Sales(Acutal)
Net Sales(Plan)
Correct me if I am wrong.
the report has a lot of key figures, having two versions for each kf will be confusing.
the user would like to see
Jan.....| ...Feb |..Mar |..Apr.....| May |
GrossSales Act Value|Act.V |Act.V| PlanVal|PlanVal|
Net Sales
where Act.Value is from CUBE1
Plan Value is from CUBE2
Thanks
Kumar -
Use report to display html data
Hi
I have multiple rows of text in a clob field that contains html tags. I want to display this data in html format in my htmldb application. Can I use an htmldb report to do this or am I better off using an item?
Thanksbump...
has anyone a solution to this?
I have a form that allows users to add raw HTML code. Now I want to display the formatted version in a report but the tags show in the report instead...any suggestions?
regards
Paul P -
OBIEE11g - Report Multi Currency Display (Static Data)
Hi All,
I have a requirement where i need to display amount data in multi currency format in OBIEE 11g like LCY and OCY format.User have to select the currency type like USD,YEN,EURO and resulting amount data in report should display in that currency format.
Pls suggest me is it required to do ETL Changes i.e we need to load data in Database in multi currency format
can we do this at Report level i.e can convert the amount in required currency format.
Note: Spot rate is currency data it's loading by monthly its a static data.
please refer my expected output screen short:
http://imageshare.web.id/images/0dnlgxlvmhl7u5tdbac1.jpg
(currently we are displaying one currency now we need to show multicurrency)
Just FYI...
joins:
"GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."OCY" =
"GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."ORIG_CURRNBR"
AND
"GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."PPN_DT" = "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Business_Date"
here ocy & ORIG_CURRNBR is the foreign currency (i.e: USD,YEN,EURO etc)
Calculation part:
CASE WHEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Product_Type" IN ('Bond', 'Bonds', 'Callable Bonds')
THEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Nominal_AMT" * "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."NON_DISC_SPOT"
WHEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Product_Type" ='Equities' THEN
("GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."MKT_VALUE" - "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."CAPITAL_GAIN" ) * "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."NON_DISC_SPOT"
END
in the above calc amount * spot_rate
I already refer the below one but it wont suite for my case:
http://www.rittmanmead.com/2010/06/oracle-bi-ee-10-1-3-4-1-currency-conversions-fx-translations-part-1/
http://gerardnico.com/wiki/dat/obiee/currency
Thanks in advance
Regards,
Deva
Edited by: Devarasu on Nov 16, 2011 3:13 PMHi Deepak,
our table will like below one,how we can calculate on fly calculation for this,
in my dashboard MX_spot.ocy prompt column --> set request variable.
how i can use this request variable in RPD-->BMM --> logical expression?.
Table 1: Postion (Fact)
PRODUCT_ID ORIG_CURRNBR (Nom+Capital+PREM_DISC_AMORTISE) Business_Date
========================================================================
HKD T-NOTE 1312 CN1 48407.555 31/10/2011
HKD T-N 07Y1402 HKD -45000.23 31/10/2011
Table 2: Mx_Spot (all currency with static rate)
OCY NON_DISC_SPOT PPN_DT
SGD 0.1962748 31/10/2011
HKD 0.1605621 31/10/2011
CN1 1 31/10/2011 -
To display Last Date of the Month in Financial Reporting studio 9
Hi
I want to display last date of the month in header in Financial Reporting studio 9 . Is there any function which displays the last date of the month as per user selection .
for example
If user select month of Jan it should display Jan 31st, 2009
If user select month of Feb it should display Feb 28th 2009
ThanksUnless you name your Months like that you cannot do it. A large team from a major consulting firm told me for a year that it was not possible and convinced management that financial statements don't need dates.
Management decided that we do need dates (because all financials need dates, look at any text book). I figured out a pretty sweet solution that is simple and easy to use and maintain. The users love it. Management loves it.
I'm not giving it away though. -
Display tooltip on oops alv report data.
hi friends,
I have a requirement to display tooltip information on OOPS ALV Report data.
I done tooltip for the header but i also want to do for it displaying data.
Eg.
10 material no. display in the list while i took cursor on 1st material no. then it will display me 1 st material description as tooltip.
similarly, for 2, 3 and so on.
Regards,
Narendrahi,
i think that´s not possible....
but you can try to work with Drop Down fields....
add to output table a table LVC_T_DROP (like colours of a cell )
Values could be your material descriptions...
maybe its also possible to click on a field ( GET_CURRENT_CELL )
after react with same ucomm like Drop Down.....
bestreg
Robert -
How display a DATE IN BOXS IN SAPSCRIPT
how display a DATE IN BOXS IN SAPSCRIPT
use cal = Calendar.getInstance() to get the current date/time
use cal.get(Calendar.DAY_OF_WEEK) to get what today is
calculate n = days to next Thursday
advance the calendar with cal.add(Calendar.DATE, n). -
View the .rtf file not display the data in BI Publisher Enterprise.
Hi,
Platform: OBIEE 10g in NT XPsp2
View the .rtf file not display the data in BI Publisher Enterprise.
Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
It is showing only the .rtf file without data. Why there is no data?
Please guide me to solve this issue.
Thanks,
JoThanks for you reply,
Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
We dint face this kind of issue while developing other reports.
So please let us know if you have any idea on why we are facing this issue.
Regards,
Maneesh -
Display of data in a single row
Hi
Here is my query:
SELECT
--Element Classification Details:
pec.CLASSIFICATION_ID,
pec.classification_name,
pec1.classification_id "Sub Classification Id",
DECODE(pec1.classification_name,'Other Deductions', 'Other Deductions',
'Others Voluntary Deductions', 'Other Deductions',
'Personal Deductions', 'Personal Deductions',
'Personal Voluntary Deductions', 'Personal Deductions',
'Car Loan Deductions') "Sub Classification",
pec1.parent_classification_id,
scr.sub_classification_rule_id,
--Element Details:
pet.element_name, pet.element_type_id, pet.reporting_name,
DECODE(pet.processing_type, 'R', 'Recurring', 'Nonrecurring') "Processing Type",
pet.EFFECTIVE_START_DATE, pet.EFFECTIVE_END_DATE,
--Run Result Details:
prr.run_result_id,
TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)) "Amount",
piv.NAME "Input Value",
--Assignment Details:
paa.assignment_id,
--Time Period
ptp.START_DATE, ptp.end_date,
ptp.period_name "Payroll Period"
FROM hr.pay_element_classifications pec,
hr.pay_element_classifications pec1,
hr.pay_sub_classification_rules_f scr,
hr.pay_element_types_f pet,
hr.pay_run_results prr,
hr.pay_run_result_values prrv,
hr.pay_input_values_f piv,
hr.pay_assignment_actions assact,
hr.per_all_assignments_f paa,
hr.pay_payroll_actions payroll,
hr.per_time_periods ptp
WHERE
pec.classification_id = pec1.parent_classification_id (+)
AND scr.classification_id = pec1.classification_id
AND pet.classification_id = pec.classification_id
AND scr.element_type_id = pet.element_type_id
AND pet.ELEMENT_TYPE_ID = prr.ELEMENT_TYPE_ID
AND prr.run_result_id = prrv.run_result_id
AND piv.input_value_id = prrv.input_value_id
AND assact.ASSIGNMENT_ACTION_ID = prr.ASSIGNMENT_ACTION_ID
AND paa.ASSIGNMENT_ID = assact.ASSIGNMENT_ID
AND payroll.payroll_action_id = assact.PAYROLL_ACTION_ID
AND ptp.TIME_PERIOD_ID = payroll.time_period_id
AND ptp.end_date BETWEEN scr.EFFECTIVE_START_DATE AND scr.EFFECTIVE_END_DATE
AND ptp.end_date BETWEEN pet.effective_start_date AND pet.effective_end_date
AND ptp.end_date BETWEEN paa.EFFECTIVE_START_DATE AND paa.EFFECTIVE_END_DATE
AND pec.CLASSIFICATION_NAME IN ('Voluntary Deductions', 'Pre-Tax Deductions')
AND pec1.classification_name LIKE '%Deduction%'
AND piv.name = 'Pay Value'
AND paa.payroll_id != 0
AND paa.pay_basis_id != 0
AND paa.ASSIGNMENT_ID = '560'
I needed to display the amounts as separate columns pertaining to different elements or rather different sub classification of the elements
This is the final expected result for the report:
Employee Personal Deductions PD Amount Other Deductions OD Amt
XYZ Element1 00000.00 Element3 0000.00
Element 2
Car Loan Deductions CLD Amt Total Deductions (Total of all three)
Element4 00000.00 00000000.00
Here Personal Deductions, Other, Car Loan etc. are grouping of elements (sub classifications)
I have used MAX function to display the results as separate columns like this:
SELECT
--Run Result Details:
prr.run_result_id,
MAX(DECODE(pec1.classification_name, 'Personal Deductions', TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) "Personal Deductions",
MAX(DECODE(pec1.classification_name, 'Personal Voluntary Deductions', TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) "Personal V Deductions",
MAX(DECODE(pec1.classification_name, 'Other Deductions', TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) "Other Deductions",
MAX(DECODE(pec1.classification_name, 'Others Voluntary Deductions', TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) "Others V Deductions",
MAX(DECODE(pec1.classification_name, 'Car Loan Deductions', TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) "Car Loan Deductions"
/*--Assignment Details:
paa.assignment_id,
--Time Period
ptp.START_DATE, ptp.end_date,
ptp.period_name "Payroll Period"*/
FROM hr.pay_element_classifications pec,
hr.pay_element_classifications pec1,
hr.pay_sub_classification_rules_f scr,
hr.pay_element_types_f pet,
hr.pay_run_results prr,
hr.pay_run_result_values prrv,
hr.pay_input_values_f piv
/*hr.pay_assignment_actions assact,
hr.per_all_assignments_f paa,
hr.pay_payroll_actions payroll,
hr.per_time_periods ptp*/
WHERE
pec.classification_id = pec1.parent_classification_id (+)
AND scr.classification_id = pec1.classification_id
AND pet.classification_id = pec.classification_id
AND scr.element_type_id = pet.element_type_id
AND pet.ELEMENT_TYPE_ID = prr.ELEMENT_TYPE_ID
AND prr.run_result_id = prrv.run_result_id
AND piv.input_value_id = prrv.input_value_id
/*AND assact.ASSIGNMENT_ACTION_ID = prr.ASSIGNMENT_ACTION_ID
AND paa.ASSIGNMENT_ID = assact.ASSIGNMENT_ID
AND payroll.payroll_action_id = assact.PAYROLL_ACTION_ID
AND ptp.TIME_PERIOD_ID = payroll.time_period_id
--and pet.element_NAME like 'IVTB%'
AND ptp.end_date BETWEEN scr.EFFECTIVE_START_DATE AND scr.EFFECTIVE_END_DATE
AND ptp.end_date BETWEEN pet.effective_start_date AND pet.effective_end_date
AND ptp.end_date BETWEEN paa.EFFECTIVE_START_DATE AND paa.EFFECTIVE_END_DATE*/
AND pec.CLASSIFICATION_NAME IN ('Voluntary Deductions', 'Pre-Tax Deductions')
AND pec1.classification_name LIKE '%Deduction%'
AND piv.name = 'Pay Value'
--and paa.PRIMARY_FLAG like 'Y%'
/*AND paa.payroll_id != 0
AND paa.pay_basis_id != 0*/
GROUP BY
prr.run_result_id
However, the fact is that my each element_type_id has each run_result_id, which means 1 element has 1 run result id. Thus, I cannot display the data in a single row.
Can someone guide me on this? How can I display the data for an employee as a single row?
Thanks and regards,
AparnaSELECT EMP_ID,
Sum(Decode(DECODE(pec1.classification_name,'Other Deductions', 'Other Deductions','Others Voluntary Deductions', 'Other Deductions'),'Other Deductions',TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) 'Other deduction',
sum(Decode(DECODE(pec1.classification_name,'Personal Deductions', 'Personal Deductions', 'Personal Voluntary Deductions', 'Personal Deductions'),'Personal Deductions'),TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) 'Personal deduction',
sum(DECODE(pec1.classification_name,'Car Loan Deductions',TO_NUMBER(NVL(prrv.RESULT_VALUE, 0)))) 'Car deduction'
FROM hr.pay_element_classifications pec,
hr.pay_element_classifications pec1,
hr.pay_sub_classification_rules_f scr,
hr.pay_element_types_f pet,
hr.pay_run_results prr,
hr.pay_run_result_values prrv,
hr.pay_input_values_f piv,
hr.pay_assignment_actions assact,
hr.per_all_assignments_f paa,
hr.pay_payroll_actions payroll,
hr.per_time_periods ptp
WHERE
pec.classification_id = pec1.parent_classification_id (+)
AND scr.classification_id = pec1.classification_id
AND pet.classification_id = pec.classification_id
AND scr.element_type_id = pet.element_type_id
AND pet.ELEMENT_TYPE_ID = prr.ELEMENT_TYPE_ID
AND prr.run_result_id = prrv.run_result_id
AND piv.input_value_id = prrv.input_value_id
AND assact.ASSIGNMENT_ACTION_ID = prr.ASSIGNMENT_ACTION_ID
AND paa.ASSIGNMENT_ID = assact.ASSIGNMENT_ID
AND payroll.payroll_action_id = assact.PAYROLL_ACTION_ID
AND ptp.TIME_PERIOD_ID = payroll.time_period_id
AND ptp.end_date BETWEEN scr.EFFECTIVE_START_DATE AND scr.EFFECTIVE_END_DATE
AND ptp.end_date BETWEEN pet.effective_start_date AND pet.effective_end_date
AND ptp.end_date BETWEEN paa.EFFECTIVE_START_DATE AND paa.EFFECTIVE_END_DATE
AND pec.CLASSIFICATION_NAME IN ('Voluntary Deductions', 'Pre-Tax Deductions')
AND pec1.classification_name LIKE '%Deduction%'
AND piv.name = 'Pay Value'
AND paa.payroll_id != 0
AND paa.pay_basis_id != 0
I hope this may help!
Brijesh -
Calculating the total in alv and displaying the date
Hi,
I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report......here is my coding:
REPORT Z_DAILY_STOCK_NEW.
TYPE-POOLS: SLIS.
TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
ALV FIELDS
DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
total ref to data.
t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
DEFINITION OF AN INTERNAL TABLE
DATA: begin of i_stocktab occurs 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
end of i_stocktab.
START OF SELECTION
SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
vbrpfkimg vbrknetwr
FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
inner join vbak on kna1kunnr EQ vbakkunnr
inner join vbrp on vbrkvbeln EQ vbrpvbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'INC01'.
it_fieldcat-seltext_m = 'Incoterms'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
*it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
if sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
endif.
ENDFORM.
*FORM calc_total.
LOOP AT it_fieldcat into wa_fieldcat
WHERE fieldname EQ 'FKIMG' OR
fieldname EQ 'NETWR'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'QUAT'.
modify it_fieldcat from wa_fieldcat.
ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
FORM calc_total.
DATA: total type ref to data,
subtotal1 type ref to data.
field-symbols <fkimg> like sflight.
field-symbols <netwr> like sflight.
call method grid1-> get_subtotals
importing
ep_collect00 = subtotal
ep_collect01 = total.
assign total to <fkimg>.
assign total to <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = gr_repid
I_CALLBACK_USER_COMMAND = slis_ev_user_command
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE' " see FORM
IS_LAYOUT = gr_layout
IT_FIELDCAT = it_fieldcat[]
IT_SPECIAL_GROUPS = gr_tab_group
I_SAVE = 'X'
IT_EVENTS = gr_events
IS_PRINT = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM.Try This
REPORT z_daily_stock_new.
TYPE-POOLS: slis.
* TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
* ALV FIELDS
DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
* total ref to data.
* t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
* SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
* DEFINITION OF AN INTERNAL TABLE
DATA: BEGIN OF i_stocktab OCCURS 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
END OF i_stocktab.
* START OF SELECTION
SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
vbrp~fkimg vbrk~netwr
FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
* FORM build_fieldcatalog *
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
* w_cnt = w_cnt + 1.
* it_fieldcat-fieldname = 'INC01'.
* it_fieldcat-seltext_m = 'Incoterms'.
* it_fieldcat-emphasize = 'X'.
* APPEND it_fieldcat TO it_fieldcat.
* CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'FKIMG' .
it_fieldcat-do_sum = 'X' .
* *it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
clear it_fieldcat .
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'NETWR' .
it_fieldcat-do_sum = 'X' .
* it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
* FORM build_layout *
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
* FORM build_event *
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
IF sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
ENDIF.
ENDFORM.
*FORM calc_total.
* LOOP AT it_fieldcat into wa_fieldcat
* WHERE fieldname EQ 'FKIMG' OR
* fieldname EQ 'NETWR'.
* wa_fieldcat-do_sum = 'X'.
* wa_fieldcat-datatype = 'QUAT'.
* modify it_fieldcat from wa_fieldcat.
* ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
* FORM calc_total *
FORM calc_total.
DATA: total TYPE REF TO data,
subtotal1 TYPE REF TO data.
* FIELD-SYMBOLS <fkimg> LIKE sflight.
* FIELD-SYMBOLS <netwr> LIKE sflight.
* CALL METHOD grid1-> get_subtotals
* IMPORTING
* ep_collect00 = subtotal
* ep_collect01 = total.
* ASSIGN total TO <fkimg>.
* ASSIGN total TO <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gr_repid
i_callback_user_command = slis_ev_user_command
i_callback_top_of_page = 'TOP-OF-PAGE' " see FORM
is_layout = gr_layout
it_fieldcat = it_fieldcat[]
it_special_groups = gr_tab_group
i_save = 'X'
it_events = gr_events
is_print = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
* FORM top-of-page *
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. -
Changing layout of ALV to excel and displaying the data there
Dear All,
My requirement is that I have to develop an ALV report, and also plot the graphs for the same.
I need different types of graphs, so I have searched on SDN, and I found out a blg:-
"Report with a Graph.. An Approach!"
Here is what the person has done:-
I developed a simple ABAP report using ALV and just dumped all my data on it.
After this I downloaded the Standard Excel template available in the ALV.
Defined my own worksheets in this template, wrote some macros to pick up the data from the RawHeader sheet, which is available by default and will contain the ALV data.
I inserted 1 chart in this Excel template. In this chart I used the same chart type as was being used by the user for his graph. Just right clicked on the Graph area and made the changes in the source data and made it point to the sheet containing the final data.
Thats it my job is almost done.
After this uploaded this template back into the report output through
the layout settings->Change Layout Tab.
Save it as a variant and made it a default. (Do not default it if you have more than 1 user and more than 1 template . Select the appropriate variant for the appropriate user and then display)
Well, this also was not that easy as I had thought. I landed up into 1 trouble.
In my report the number of columns displayed was not constant and kept changing based on the input. This fact was taken care by designing a variable field catalogue. But now I had gone past the simple ALV display and was giving the output in an Excel sheet using a pre-defined template. Well, I immediately found a solution to this with the set_frontend_fieldcatalogue method of CL_GUI_ALV_GRID class and fixed the field catalogue every time after calling the set_table_for_first_display method. This solved most of my problems, which were not many though.
Now here are my issues:-
I have developed the ALV report, and I have also changed the layout to excel.
But, I am unable to get the ALV Report data in the RawHeader Sheet, which is available by default.
Could anyone please guide me through this method??
It is urgent.
Points are assured for helpful answers.
Thanks and regards,
PrernaHi Satya Priya,
Do I have to create my own template, or the Standard ones available will do?
HEre is what I do:-
Once I get my ALV output, I goto Change LAyout->View tab.->Prefered view->Microsoft Excel.
Here I get a list of available excel templates There are 2:-
sap_mm.xls, and sap_om.xls
I select one of these, and the excel spreadsheet is displayed on the ALV screen.
But the re is another button, "Upload Document to BDS".
Do I have to upload one of the above templated to BDS?
And please tell me in detail, what is BDS???
Thanks for your help, and waiting for reply,
Prerna -
Xcelsius - Crystal Report Data Consumer connection Issues
Sorry for the long post but i hope with the full explaination, i can get a quick answer & solution.
Using Crystal Reports 2008 and Xcelsius 2008 Engage, SQL 2008 stored procedure.
I have tested the Crystal Reports Data Consumer connection within the Xcelsius program, using the following steps :
1. Create a stored procedure that returns the Continent Name and the Count of Projects within each Continent.
2. Create a Crystal Report using the stored procedure, 2 columns in the Details section, column names in the Page Header section.
3. Save and export this as an Excel spreadsheet.
4. Open the Xcelsius program, new file and import spreadsheet. Column A is the Continent Name, Column B is the Count.
5. Without altering the spreadsheet, I created a graph using the data imbedded. i.Bar Graph, series and row selections. Ii. Pie chart with row data selection. Iii.Column data as series and row selections.
6. Created a Crystal Report Data Consumer connection using the data imbedded within then spreadsheet. The column A as the u201CRow Headersu201D & column B as the u201CDatau201D. Took quite a while to get the right combination of selected components so that the preview actually showed the data and the corresponding data labels. The Legend still hasnu2019t shown up.
7. Save and Export as Flash (swf) file.
8. Close Xcelsius and open Crystal Reports.
9. Open the same report used to create the spreadsheet and Insert -> Flash, choosing the newly created swf file.
10. Link the data displayed On the Crystal Report to the Flash file now embedded, using the Flash Expert. Have tried both with the data listed on the Report, and the data listed as the result of the stored procedure.
11. Previewed and the Data shown on the Graph does match the data listed within the Details section of the Report.
12. I then altered the stored procedure to add u201C1u201D to all counts, and refreshed the Crystal Report. (I cannot add new data to the underlying database/tables, due to various other folks & projects using that same database.)
13. The listed data does change to match the changes within the procedure.
14. The Data labels on the Graph do change to match the changes within the procedure.
15. The Actual Displayed Data within the Graph Does Not change to match the changes within the procedure.
I have attempted this with a pie chart, a bar and column charts with the same affect.
I have searched the web, printed out 4 different examples on how to make this work and still it is hit or miss. I still can not get the legend to show up, either in the preview or the within the Crystal Reports. When I preview the graph before adding the Crystal Report Data Consumer connections, it does work.
Please someone tell me, What am I missing here ?
Thanks in advance for your help.http://www.****************/Tutorials/BI/Xcelsius/Index.htm
http://www.resultdata.com/Company/News/Newsletter/2008/aug/Articles/Xcelsius/Using%20the%20Xcelsius%20Crystal%20Report%20Data%20Consumer.htm
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10161e25-c158-2c10-3086-ad502098b36b?QuickLink=index&overridelayout=true
http://codesforprogrammers.blogspot.com/search/label/How%20to%20suppress%20blank%20row(s)%20in%20detail%20section%20of%20the%20report%3F
http://www.businessobjects.com/pdf/product/catalog/crystalreports/cr_xc_integration.pdf
Maybe you are looking for
-
I can't play certain videos from the internet on my macbook
I can't play certain videos from the internet on my macbook. When using Sarfari or Google Chome, I am unable to play some videos on the internet. News clips, posted videos on blogs, and tv episodes from their own network websites. Youtube videos are
-
Apple tv works in Srilanka pls advice
Please advice will apple tv work in Srilanka ,what sort of streaming will I be able to stream.Thank you
-
Need help on DATA_REMAP procedure.
Hi All, I am using data pump APIs to perform export and import. But “data_remap” procedure is throwing exceptions. SQL*Plus: Release 11.1.0.7.0 - Production on Wed Apr 10 04:29:09 2013 Copyright (c) 1982, 2008, Oracle. All rights reserved.+ Connecte
-
Oracle Services for MTS on multiple servers - does not work
I am having problems with running transactional component (COM+) using Oracle Services for MTS. I've been through pretty much all the messages in this forum, and I believe that I have configured things correctly. Here are the details. Sorry for the l
-
PDFs do not open after iOS 7.1 update
I've got several employees that now report not being able to view PDFs on the iPad 4 now that they have updated the iOS to 7.1. The PDFs will open fine on their laptops and PCs, so they are not corrupt files. We've tried using the default Quick Look,