Report to display current leave entitlement
Hi,
I am using report RPTQTA10 to display absence quota.
For current year and for a quota type, I expected the report will show projected quota based on current anniversary for an employee. But the report shows past and accrued quotas? It shows quota for e.g.03/10/2007 to 03/09/2008 and 03/10/2008 to 03/09/2009 for an employee (his anniversary date is 03/10).
For employees who's anniversary was in 03/01/2008 to 06/04/2008 (current date), second line is being displayed, which only shows the accrued not projected.
Can you please guide what parameters to use to display the eligibility quota based on his anniversary?
Thanks.
Edited by: Somar on Jun 4, 2008 10:01 AM
Hi,
Ram . we have run a customising report and the leave balance is coming incorrect.
Ram i want to run report RPTQTA10 but i wonder when i run report nothing comes out in output.
i dont know what to select in the DISPLAY field and LAYOUT field
PLease suggest that how can i test that by running report that my balance is right or not.
regards,
shruti
Similar Messages
-
Display current month records only
Hi Experts,
I have the following requirement.
Report should display current month records only.
For example If the report is run on 20090324, It should display records from 20090301 to 20090324.
That means, report may run on any date of that month, It should display from 01 (of that month) to current date.
I have a select statement saying
SELECT * FROM likp
WHERE wadat_ist BETWEEN month_start_date AND sy-datum
AND vkorg IN s_vkorg
AND vkbur IN s_vkbur
AND kunnr IN s_kunnr.
How to calculate date for month_start_date, so that it can display only current month records.
Thanks in advance
RohanHi Kunta, Suhas, Nandi,
Thank you for your quick reply, I really appreciate it.
for this current month records, I need to display a check box saying
Open orders and shipments with the current month.
But where as Selection text is accepting 32 characters only. Is there any possibility to overcome this?
Thanks in advance
Rohan -
Report for deleting Leave Entitlement in Infotype 5
Hi all
I would like to know if there is a Standard Report to delete leave entitlement in Infotype 5: I made a mistake in generating the leave entitlement for 2007, so I would like to delete all the records inserted.
I'm working in SAP 46C, and I used HR_RPILVA00 to create leave entitlement.
TIA
PaoloHello,
I would advise you to use at customizing level which is achievable on your case.
The best way to proceed on your case would be to use IT0041 and on T559L for the relevant rule, you would use the Accrual Period Rel. to date type in which the period is defined in relation to a date type from the Date Specifications infotype (0041). You determine the accrual period using the length fields (for example, the date the employee joined the company, with the period you require, for example one year).
Then, you can accrue via RPTIME00 or RPTQTA00.
This would be much more scalable than doing customizing at code level.
Regards,
Bentow. -
BDC Report to Roll Forward Negative Statutory Leave Entitlement
Hi experts,
Please let me know any standard program is there for this requirement: BDC Report to Roll Forward Negative Statutory Leave Entitlement.
Tel me how to solve this requirement.....
Thanks,
Brahmathanks experts
-
Report that display 'Net Pay' by Empl for current and previous period.
Hi,
We are looking for a SAP report that display 'Net Pay' by Employee for current and previous period in USA payroll module. If you know of any, pl let me know.
Thanks in advance,
NiranjanThanks Archana and Sikindar.
We knew about this report, however, it gives information one below the other if we run, say for 2 periods, but what we are looking for is something as shown in example below
Empl # Empl # Name Prev Pay period Net Pay Current Pay period net pay.
123 XYZ $ 1200.00 $ 1200.00
256 ABC $ 2000.00 $ 3000.00
We want to run for 2 periods at a time and get the results as above. That way, payroll dept can run this report and compare if we are paying too much in current pay, compared to previous pay. This is basically to avoid any typos when they create new pay records in infotype 0008.
Niranjan -
How to Display Current Quarter results in WebI report?
Hi Guys,
I have a requirement where a WebI report should open up on current quarter basis by default. I have checked the refresh on Open in the document properties.What changes or formulae do I need to make/create in order to open the report with current quarter results?
Appreciate any help.
Thanks & Regards,
Anila.Hi Anila,
Do you mean if a user is running a report on the first quarter, the report should display data for the first quarter only?
If yes, here is the solution:
Create a formula:
CurrQtr = If (Quarter(CurrentDate())) = MyQuarterObject THEN "Show"
Then put a ReportFilter CurrQtr=Show
Regards,
Ashvin -
Hi,
i have a dimension table with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20) and a fact table with columns (month_key ,measure_types, Amount)
My requirement is to create a power pivot report in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
, month name should be populated with months till june 2013 only .
i tried creating calculated column"END DATE " in the fact table with dax expression to calculate the 18th monh from the current month as below
month_key END DATE
201201 201306
201202 201307
and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using excel 2010
..hence could not do any calculation on the report side also. please suggest .
Thanks in advanceDo you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
The first is trivial as driezl has suggested.
The second will require a second calendar table.
I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
18 Month Measure:=
CALCULATE( [Measure]
, FILTER( DimDate
, DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
&& DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
Please review this example along with the workbook I have linked above. -
I Need Interactive Report for displaying vendor information. Based on the s
Interactive Report for displaying vendor information. Based on the selection made by the corresponding Vendor Bank Details are listed such that the line selected in the basic list was visible along with the secondary list.
hi
Hi
Use the Table LFA1 and LFB1 in the basic list
and LFBK table details in the secondary list
see the sample code related to customer Sales orders
modify it with the Vendor tables
REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
HEADING.
*TABLES DECLARATION
TABLES : KNA1, VBAK, VBAP.
*SELECT OPTIONS
SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
*INITIALIZATION
INITIALIZATION.
CUST_NO-LOW = '01'.
CUST_NO-HIGH = '5000'.
CUST_NO-SIGN = 'I'.
CUST_NO-OPTION = 'BT'.
APPEND CUST_NO.
*SELECTION SCREEN VALIDATION
AT SELECTION-SCREEN ON CUST_NO.
LOOP AT SCREEN.
IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
MESSAGE E001(ZTJ1).
ENDIF.
ENDLOOP.
*BASIC LIST SELECTION
START-OF-SELECTION.
SELECT KUNNR NAME1 ORT01 LAND1 INTO
(KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
FROM KNA1
WHERE KUNNR IN CUST_NO.
WRITE:/1 SY-VLINE,
KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
KNA1-NAME1 UNDER 'NAME',
61 SY-VLINE,
KNA1-ORT01 UNDER 'CITY',
86 SY-VLINE,
KNA1-LAND1 UNDER 'COUNTRY',
103 SY-VLINE.
HIDE: KNA1-KUNNR.
ENDSELECT.
ULINE.
*SECONDARY LIST ACCESS
AT user-command.
IF SY-UCOMM = 'IONE'.
PERFORM SALES_ORD.
ENDIF.
IF SY-UCOMM = 'ITWO'.
PERFORM ITEM_DET.
ENDIF.
*TOP OF PAGE
TOP-OF-PAGE.
FORMAT COLOR 1.
WRITE : 'CUSTOMER DETAILS'.
FORMAT COLOR 1 OFF.
ULINE.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'NAME',
61 SY-VLINE,
63 'CITY',
86 SY-VLINE,
88 'COUNTRY',
103 SY-VLINE.
ULINE.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR SECONDARY LISTS
TOP-OF-PAGE DURING LINE-SELECTION.
*TOP OF PAGE FOR 1ST SECONDARY LIST
IF SY-UCOMM = 'IONE'.
ULINE.
FORMAT COLOR 1.
WRITE : 'SALES ORDER DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'SALES ORDER NO.',
40 SY-VLINE,
42 'DATE',
60 SY-VLINE,
62 'CREATOR',
85 SY-VLINE,
87 'DOC DATE',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR 2ND SECONDARY LIST
IF SY-UCOMM = 'ITWO'.
ULINE.
FORMAT COLOR 1.
WRITE : 'ITEM DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'SALES ORDER NO.',
40 SY-VLINE,
42 'SALES ITEM NO.',
60 SY-VLINE,
62 'ORDER QUANTITY',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*END OF PAGE
END-OF-PAGE.
ULINE.
WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
SY-PAGNO.
SKIP.
*& Form SALES_ORD
*& FIRST SECONDARY LIST FORM
FORM SALES_ORD .
SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
(VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
FROM VBAK
WHERE KUNNR = KNA1-KUNNR.
WRITE:/1 SY-VLINE,
VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
40 SY-VLINE,
VBAK-ERDAT UNDER 'DATE',
60 SY-VLINE,
VBAK-ERNAM UNDER 'CREATOR',
85 SY-VLINE,
VBAK-AUDAT UNDER 'DOC DATE',
103 SY-VLINE.
HIDE : VBAK-VBELN.
ENDSELECT.
ULINE.
ENDFORM. " SALES_ORD
*& Form ITEM_DET
*& SECOND SECONDARY LIST FORM
FORM ITEM_DET .
SELECT VBELN POSNR KWMENG INTO
(VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
FROM VBAP
WHERE VBELN = VBAK-VBELN.
WRITE : /1 SY-VLINE,
VBAP-VBELN UNDER 'SALES ORDER NO.',
40 SY-VLINE,
VBAP-POSNR UNDER 'SALES ITEM NO.',
60 SY-VLINE,
VBAP-KWMENG UNDER 'ORDER QUANTITY',
103 SY-VLINE.
ENDSELECT.
ULINE.
ENDFORM. " ITEM_DET
REPORT demo_list_at_pf.
START-OF-SELECTION.
WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
AT pf5.
PERFORM out.
AT pf6.
PERFORM out.
AT pf7.
PERFORM out.
AT pf8.
PERFORM out.
FORM out.
WRITE: 'Secondary List by PF-Key Selection',
/ 'SY-LSIND =', sy-lsind,
/ 'SY-UCOMM =', sy-ucomm.
ENDFORM.
After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
Secondary List by PF-Key Selection
SY-LSIND = 14
SY-UCOMM = PF06
Example for AT USER-COMMAND.
REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
<b>Vendor performance report</b>
See this sample code
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
<b>Reward if usefull</b> -
How to display Current Year and Month in Drop Down list
Hi Dear friends,
I am devloping a report. It has got 2 pages--input and output(Report) page.
IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
Now, my problem is:
HOw to display current month and year by default in the dropdown list...........
I hope my question is clear.
Please help.
Regards,
AShNO da,
it is not working.
First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
So, i posted the question.
I tried your code. It is giving following error.
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
first.set(Calendar.YEAR, 2003)
^
An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
^
4 errors
Pls. Help.
Regards,
Ashu -
Sales Report - The report to display the Sale Dist accor to the Ship to.
Hi Gurus,
We have a report where Sales District is placed under the rows with Variable as Authorization processing type.
The current report is displaying the Sales District with Sold-to of the sale. But now the requirement is for the report to display the sales district according to the ship-to of the sale.
But, we need the sales district reported from the ship-to level.
and The format of the report should not change.
Can any one guide me on the above incident. Points will be awarded.
Regards,
Venkat.This can be done by swithching sales district on the navigational attr of ship-to and use
And using the same in the place of current sales district.
regards,
Naveen.A -
ALV Report to display the status of the requests raised through ESS
Hi All,
We have to develop a ALV report to display the status of the requests raised through ESS
for Leave, Travel & Event Management, Travel and Appraisal workflows.
ESS Travel, ESS TEM, ESS Apraisal workflows are associted with SAP Business Objects.
we are using the function module SWI_WORKITEMS_OF_OBJTYPE_GET to get
the top level work item id's by passing the object type like PDRELA_025, BUS2089.
By using SWP_WORKFLOW_LOG_READ function we are getting the workflow log
by passing top level work item id's as imort parameter.
The report output should have the following fields
Initiator, Initiator Personal No, Request Type( Leave, Travel etc.. )
Date of application of the request, Status ( Approved by RM, Rejected etc )
Name of the Approver, Approved / Rejected Date.
The logic should be work for all the above ESS workflows and should be generalized.
Can any one please let me know the procedure to get the required information from the workflow log.
It would be great if any one suggest on the same how to proceed further to get the information as mentioned above.
Thanks & Regards,
Jagadeeswara Rao Balla.Hello,
You can get most of that information from fm SAP_WAPI_GET_HEADER, input is workitem_id.
regards
Rick Bakker
Hanabi Technology -
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 -
VAT REPORT BASED ON CURRENT LOGGED IN USER
Hi Guys,
I am Working for a client and it they are having 9 branches and for each branch there will be divided by different Series and different Tax Codes and they want a TAX Report based on the User Logged in.Each User Will be Assigned a branch and in the tax code an UDF(Location) has been created and for each tax code location has been entered there.
So when User 1 of Branch 1 is running the report then the report should show only the record of that particular Branch 1 and
When User 2 of Branch 2 is running the Report then it should show only branch 2 records .
I Tired using an FMS to record the Current User Logged in but i am unable to include this in the below query.
SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER]
In the Below query , the Report needs to be filtered automatically based on the Current user Logged in(User who is running the report).
There will be different Branches and Each Branch has One O Two Licenses and whenever the User1 Of Branch 1 runs the report then the report should display only the record related to that particular branch within the given date range.
So ,to differentiate the Tax codes for each Branches we have created an UDF(Location) in tax codes and enter the branch name in the UDF and also each branch will have 3 different document series and each series.
Instead of Giving the Location as a Parameter to choose we need to filter the report by the User logged in .
SELECT distinct M.DocNum AS 'AR Inv. #', M.DocDate as 'Date',
l.targettype AS 'TARGET TYPE',
t4.series,T4.SeriesName,
case when T4.SeriesName='LOC/HOF' then 'HEAD OFFICE'
when T4.SeriesName='LOC/CHN' then 'CHENNAI'
when t4.seriesName ='INS/CHN' THEN 'CHENNAI'
WHEN T4.SERIESNAME ='STF/CHN' THEN 'CHENNAI'
WHEN T4.SERIESNAME ='INS/HOF' THEN 'HEAD OFFICE'
end Location,L.TAXCODE,T6.RATE,
case when t.statype ='1' then 'VAT'
WHEN T.STATYPE ='4' THEN 'CST'
END TAXTYPE,T.STATYPE,
M.CARDCODE,M.CardName as 'Customer Name',M.NumAtCard as 'Bill No. & Dt.',M.DiscSum,M.RoundDif,
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',M.VATSUM,
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =1 ) as 'VAT SALES',
(SELECT SUM(TaxSum) FROM INV4 t where t.docentry=m.docentry and statype=1 ) as ' VAT COLLECTED ',
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =4 ) as 'CST SALES',
(SELECT SUM(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry ) as ' CST COLLECTED ',
(Select Sum(LineTotal) FROM INV3 Q Where Q.DocEntry=M.DocEntry) as 'FREIGHT',
M.DocTotal as 'Total (Rs.)'
FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry
LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
INNER JOIN NNM1 T4 ON M.SERIES=T4.SERIES
LEFT JOIN OSTC T6 ON T6.CODE= L.TAXCODE
LEFT JOIN OUBR T7 ON T7.NAME = T6.U_LOC
LEFT JOIN OUSR T8 ON T8.BRANCH = T7.CODE
WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
AND TARGETTYPE !='14' and taxrate !='0' A
ND T6.RATE != '0'
and t6.u_loc ='[%2]'
GROUP BY
M.DocNum,M.DocDate,M.CARDCODE,M.CardName,M.NumAtCard,M.DocEntry,
M.DiscSum,M.WTSum,
M.DocTotal,M.Series,T4.SeriesName,
T4.REMARK,M.RoundDif,M.VATSUM,T.STATYPE,T.TAXRATE,Q.LINETOTAL,t4.series,
l.targettype,t.docentry,L.TAXCODE,T6.RATE
Pls Gimme Some Ideas guys for designing this report .
Thanks And Regards,
P.VHai Gordon,
Thanks for the suggestion but i am sorry to say that after adding the said Condition to the below query it is showing the Below error.
QUERY :
SELECT distinct M.DocNum AS 'AR Inv. #', M.DocDate as 'Date',
l.targettype AS 'TARGET TYPE',
t4.series,T4.SeriesName,
case when T4.SeriesName='LOC/HOF' then 'HEAD OFFICE'
when T4.SeriesName='LOC/CHN' then 'CHENNAI'
when t4.seriesName ='INS/CHN' THEN 'CHENNAI'
WHEN T4.SERIESNAME ='STF/CHN' THEN 'CHENNAI'
WHEN T4.SERIESNAME ='INS/HOF' THEN 'HEAD OFFICE'
end Location,L.TAXCODE,T6.RATE,
case when t.statype ='1' then 'VAT'
WHEN T.STATYPE ='4' THEN 'CST'
END TAXTYPE,T.STATYPE,
M.CARDCODE,M.CardName as 'Customer Name',M.NumAtCard as 'Bill No. & Dt.',M.DiscSum,M.RoundDif,
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',M.VATSUM,
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =1 ) as 'VAT SALES',
(SELECT SUM(TaxSum) FROM INV4 t where t.docentry=m.docentry and statype=1 ) as ' VAT COLLECTED ',
(Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =4 ) as 'CST SALES',
(SELECT SUM(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry ) as ' CST COLLECTED ',
(Select Sum(LineTotal) FROM INV3 Q Where Q.DocEntry=M.DocEntry) as 'FREIGHT',
M.DocTotal as 'Total (Rs.)'
FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry
LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
INNER JOIN NNM1 T4 ON M.SERIES=T4.SERIES
LEFT JOIN OSTC T6 ON T6.CODE= L.TAXCODE
LEFT JOIN OUBR T7 ON T7.NAME = T6.U_LOC
LEFT JOIN OUSR T8 ON T8.BRANCH = T7.CODE
WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
AND TARGETTYPE !='14' and taxrate !='0' AND T6.RATE != '0'
AND $[USER] in (SELECT USERID FROM OUSR WHERE BRANCH = T7.CODE)
GROUP BY
M.DocNum,M.DocDate,M.CARDCODE,M.CardName,M.NumAtCard,M.DocEntry,
M.DiscSum,M.WTSum,
M.DocTotal,M.Series,T4.SeriesName,
T4.REMARK,M.RoundDif,M.VATSUM,T.STATYPE,T.TAXRATE,Q.LINETOTAL,t4.series,
l.targettype,t.docentry,L.TAXCODE,T6.RATE
ERROR
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'USER'.
2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'GROUP'.
3). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'User-Defined Values' (CSHS) (s) could not be prepared.
Regards,
P.V -
Make report for the current form
Hi all
I want to make report for my current form, and i use form 6i
for example i have form which depend on table and i want to make button to make report for current form which show some of field from table
Best regards for all member here
Yasserhi
please create when-button-pressed trigger and use the following code.
declare
v_plist_id paramlist;
pl_name varchar2(50) := 'rep_params';
begin
v_plist_id := get_parameter_list(pl_name);
check_param_list (pl_name); --Check availability of paramlist and
destroy is present
--When the parameter list already exists it needs to be distroyed first
if not id_null(v_plist_id) then
destroy_parameter_list(v_plist_id);
end if;
v_plist_id := create_parameter_list(pl_name);
add_parameter(v_plist_id, 'P_1', text_parameter, :block_name.item);
-- input parameter
add_parameter(v_plist_id, 'PARAMFORM', text_parameter, 'NO'); --
suppress the display of the Reports p-form
add_parameter(v_plist_id, 'DESTYPE', text_parameter,
:control.dest_type); -- set file destination type
add_parameter(v_plist_id, 'DESNAME', text_parameter,
:control.dest_name); -- set file destination name
add_parameter(v_plist_id, 'DESFORMAT', text_parameter,
:control.dest_format); -- set file destination format
-- call reports
run_product(reports, 'reports_file', asynchronous, runtime,
filesystem, v_plist_id, null);
end;sarah -
(Report Painter) Display differnet language in one report.
Hi Experts,
i want to know can (Report Painter) display differnet language in one report depends on different user login.
like user with chinese lang login can display chinese in the report
and
user with english lang login can display english in the report?
if so, please give me so intruction on how to define the description on the text.
thanksmay be my poor english make u guys misunderstand my question.
actually i am talking the first Top row (which is lead column/ descrption column)
and first Left column in a report painter.
==================== <---First top row
= <--- first left column
=
=
=
currently i am using "change text" to type in description(english) by manual(), and the problem comes out when i login with other lang, say chinese lang for example, the column and row didn't display any text on it(all blank) after different lang login.
so just wonder is there any way to have a auto translation when different lang login.
Maybe you are looking for
-
I went to school the other day and the computers there detected a virus on my flash drive. I came home got Norton and scanned the computer. It found about 3 instances of some form of "hacktool." At the same time my computer had been running really sl
-
My I ip4 can't hear the caller or Caller can't hear me
I can't hear hear the caller or caller can't hear me
-
Update a query using two tables
CREATE TABLE T1 FIELD1 VARCHAR2(10), VALUE1 INTEGER, FIELD2 VARCHAR2(10), VALUE2 INTEGER INSERT INTO T1 VALUES('OLD',100,'NEW',1000); INSERT INTO T1 VALUES('OLD',200,'NEW',2000); INSERT INTO T1 VALUES('OLD',300,'NEW',3000); CREATE TABLE T2 FIELD VARC
-
Nano repair has been showing pending for 3 months
Anyone know how to call in to see what is going on? My manager at work sent his device in Dec 27 and got it back promptly mid Jan. Mine got sent early Dec and I still haven't received a peep.
-
CC don't work on the second device (edu)
I am a student from Amsterdam. Since last month I installed Adobe CC on my iMac at home. Today I try the same on my iMac by my parentsat home. Unfortunately Adobe CC asks for serial number or trial versions every time. What should I do? The condition