WAD Report Heading display
Deall All,
is it possible to display variable value in WAD report result header!!!!!!!!!!!!!!!!!!!!!!!.
For example: I have variable on FISCPER on report, if i give 001.2009 as input, i should get result header as Result for perod
" period input value "
In above case i should get result header as.... Result for perod 001.2009
Thanks in advance
Regards,
J B
Hi,
For new customer defined image follow the following path.
Tcode : SE80
MIME Repository -> BW -> Customer -> Image ->
Create new mime object here that will available in WAD .
Regards,
Ganesh.
Similar Messages
-
Hi All,
Im using WAD 7.0 and in process of designing a Sales Dashboard. I need to insert the company logo on top of the Dashboard, The images located in the MIME repository contains standard images which SAP supports, i try adding the relevant image which i need to insert but it doesnt appear or available for selection.
Default host is already active and i tested it as well.
Urgently need your valuable input to solve this issue.
Thanks!Hi,
For new customer defined image follow the following path.
Tcode : SE80
MIME Repository -> BW -> Customer -> Image ->
Create new mime object here that will available in WAD .
Regards,
Ganesh. -
Report header to display dimensions
All,
I am trying to make the text box in my report header display member names of our C2 dimension, which is departments. This dimension is in a column which has a prompt for values. When the report is ran, I would like users to be able to select departments and have the header display the chosen departments. The following syntax displays only the first member selected in the prompt, and not every member selected:
<<GetHeading("Grid1",1,A,3)>>
Any suggestions to pull in the missing members?
JimI have often had to experiment with the location criteria in text functions depending on the info and the location of the formula. Try different combinations of the col, row and page info being included.
-
Bex Variable Value as Text in the report heading
Hi
We have fiscal year as a Bex variable and the user is prompted to enter a value when running the report.
I have found that it is possible to add a filter to a report text box (Cell) by creating a formula and adding this to the cell contents.
However, is it possible to add a Bex variable to display as text in a report header. For example the user enters Fiscal Year = 2012 and the report header displays "Headcount for 2012".
Any comments would be appreciated.
Thanks
IanHai
Yes Possible u can use the formula
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/80e0bf7d-f374-2b10-f2b5-df8065a545af
Thank u
Naveen -
In order to dynamically display data in the Report Header based in the current record of the Dataset, we started using Shared Variables, we initially used ReportItems!SomeTextbox.Value, but we noticed that when SomeTextbox was not rendered in the body
(usually because a comment section grow to occupy most of the page if not more than one page), then the ReportItem printed a blank/null value.
So, a method was defined in the Code section of the report that would set the value to the shared variable:
public shared Params as String
public shared Function SetValues(Param as String ) as String
Params = Param
Return Params
End Function
Which would be called in the detail section of the tablix, then in the header a textbox would hold the following expression:
=Code.Params
This worked beautifully since, it now didn't mattered that the body section didn't had the SetValues call, the variable persited and the Header displayed the correct value. Our problem now is that when the report is being called in different threads with
different data, the variable being shared/static gets modified by all the reports being run at the same time.
So far I've tried several things:
- The variables need to be shared, otherwise the value set in the Body can't be seen by the header.
- Using Hashtables behaves exactly like the ReportItem option.
- Using a C# DLL with non static variables to take care of this, didn't work because apparently when the DLL is being called by the Body generates a different instance of the DLL than when it's called from the header.
So is there a way to deal with this issue in a multi thread safe way?
Thanks in advance!
Hi Angel,
Per my understanding that you want to dynamic display the group data in the report header, you have set page break based on the group, so when click to the next page, the report hearder will change according to the value in the group, when you are using
the shared variables you got the multiple thread safe problem, right?
I have tested on my local environment and can reproduce the issue, according to the multiple safe problem the better way is to use the harshtable behaves in the custom code, you have mentioned that you have tryied touse the harshtable but finally got
the same result as using the ReportItem!TextBox.Value, the problem can be cuased by the logic of the code that not works fine.
Please reference to the custom code below which works fine and can get all the expect value display on every page:
Shared ht As System.Collections.Hashtable = New System.Collections.Hashtable
Public Function SetGroupHeader( ByVal group As Object _
,ByRef groupName As String _
,ByRef userID As String) As String
Dim key As String = groupName & userID
If Not group Is Nothing Then
Dim g As String = CType(group, String)
If Not (ht.ContainsKey(key)) Then
' must be the first pass so set the current group to group
ht.Add(key, g)
Else
If Not (ht(key).Equals(g)) Then
ht(key) = g
End If
End If
End If
Return ht(key)
End Function
Using this exprssion in the textbox of the reportheader:
=Code.SetGroupHeader(ReportItems!Language.Value,"GroupName", User!UserID)
Links belowe about the hashtable and the mutiple threads safe problem for your reference:
http://stackoverflow.com/questions/2067537/ssrs-code-shared-variables-and-simultaneous-report-execution
http://sqlserverbiblog.wordpress.com/2011/10/10/using-custom-code-functions-in-reporting-services-reports/
If you still have any problem, please feel free to ask.
Regards
Vicky Liu -
Display multiple parameters in report header
i am attempting to display a multiple parameter selection in my report header
i user
join({?parameter},",")
in the stored proc it is a varchar
in the formula editor i receive this error
a string array is required here
what do i need to do to display the selected parameter values
i have used this function before with varchars and have had no problemsi used the following syntax in my sp which produced the correct results. i just placed the parameter in the header without using the join function and it works like a charm.
ALTER PROCEDURE [dbo].[Pr_orn_whse_rcpts]
(@From_Crt_Dte datetime ,
@To_Crt_Dte datetime,
@whse varchar(90))
AS
CREATE TABLE #T_Localwhs
warehouse varchar(6) null
DECLARE
@var varchar(6),
@i numeric,
@whs varchar(6),
@chk numeric
SET @i = 1
SET @var = (charindex(',',@whse))
IF @var <> 0
BEGIN
WHILE (@i < @var)
BEGIN
--SET @var = (CHARINDEX(',',@whse))
SET @whs = LTRIM(LEFT(@whse, (@var-1)))
INSERT #T_Localwhs (warehouse) VALUES (@whs)
SET @whse = RIGHT(@whse, (LEN(@whse)-@var))
SET @var = (CHARINDEX(',',@whse))
END
INSERT #T_Localwhs (warehouse) VALUES (LTRIM(@whse))
END
ELSE
BEGIN
INSERT #T_Localwhs (warehouse) VALUES (LTRIM(@whse))
END
then you add a nested query to join it to the sp. as below. above your where statement.
JOIN
SELECT DISTINCT
Warehouse
FROM #T_Localwhs
) TW
ON in_wthdr_tbl.in_wthdr_frwhs = TW.warehouse
WHERE -
To display the selection screen variant name in WAD report output.
Hello experts,
I have a requirement which is to display the selection screen variant description in the output of the WAD report.
I managed halfway, by using the object "Information field", which displays all the values which are selected by the variant.
Example:I have created a cost center report created using WAD, since I need some graphical displays..
In the selection screen, I have the characteristic "cost center" as input field. I have created a variant " GM - IT" which will include few cost centers managed by GM. In the output, I want the dispaly to be "Cost center - GM IT". Currently it displays "Cost Center - a,b,c,d" as the values a,b,c,d are the values from the variant name "GM-IT"
Please let me know if this required any java script. I am not familiar with java / html codes and any help would be much appreciated (and rewarded)
Thanks in advance
KSHi,
Try this.
If you want to include your variables in your WAD means you have to choose "Force Variable Screen" option to be in enabled condition.
TO enable this,in WAD select your Template(New Template1) click the WEBITEM , it'll shows all generic properties , here you can enable this "Force variable screen"
Save and execute your WAD now you can get your variable screen.
Thanks,
JituK -
Report to display Mat Cost Planned Labour Cost and Over head cost
Hi Abapers,
Greetings of the day..
I need a Report that Display Material Cost , Planned Labour Cost,Actual Labour Cost and Over head value
where do i start from and what are the tables involving in this report..
if already done this A code snippet is more helpful...
Thanks In Advance...
Thanks & Regards
SathishAssuming you are talking about Maintenance Order.
Use table: PMCO.
Here the line with field VORGA having value KPPS gives the Planned Costs of the Order in the field WRT01.
Similarly, the line with field VORGA having value RKL gives the Actual Costs of the Order in the field WRT01.
Also have a look at Tcode KKBC_ORD.
Jogeswara Rao K -
Displaying Date Parameters in Report Heading
Post Author: Jim-1003
CA Forum: Formula
Hello,
I am new to Crystal Reports, and I am trying to improve an existing report definition so that the beginning and end dates selected by the user are displayed as part of the report heading. I saw something similar in the report samples, but the sample uses custom functions that apply only to that report -- cdFormatDateRange and cdSpecialDateRange. I have not found any documentation on how those functions were created or how to use them. Any help you can give me would be greatly appreciated!
Thanks,
JimPost Author: Jim-1003
CA Forum: Formula
After some digging, I did find out more. First of all, in the options for my Parameter, the option to allow multiple entries was set to true, so I didn't really have a range, but an array of ranges, which confused the editor.
Second, I finally did find the source code for cdFormatDateRange, which allowed me to reuse it by copying it into the clipboard and pasting it into my report. -
Displaying report header in spool
Hi
I need to find a way to display the my report header in the spool. Currently, the spool is only displaying the ALV grid of my report. In my report, I generate the header using the I_CALLBACK_HTML_TOP_OF_PAGE parameter of the REUSE_ALV_GRID_DISPLAY. Guess that's the problem of why the report header is not displaying in the spool. Is there any other way to create the report header and to enable it to be displayed in the spool?
By the way, is the spool max length only 255? My report has a lot of columns and most of the columns are the back are not displayed in the spool. Any workarounds for this?
Appreciate any help provided.Hi,
The contents displayed using I_CALLBACK_HTML_TOP_OF_PAGE is generally not shown in the spool. You need to code the TOP_OF_LIST as well as you do it in REUSE_ALV_LIST_DISPLAY for getting the header contents in the spool.
For the second part of the question you can think of saving different variants in ALV and print them one by one. Another thing you can do is to try to optimize column width to see if it fits within 255 chars.
Thanks and regards,
S. Chandra Mouli. -
Requirement to display repeated texts in the wad report
Dear experts,
we are having a requirement to display repeated
texts in the WAD report .As we had unchecked the checkbox
hide repeated key values in BEX query properties and we
are achieving this in BEX report.
Is there any possibility to achieve the repeated key values
in WAD report?
Is there any global t-code or any functional module to do the
wad settings to get the Repeated key values?
Please do the needful.
Thanks,
Chiramana.Hi,
Check in the following document.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58fd9183-0e01-0010-f183-fdc9019f77ab
Thanks
Reddy -
WAD Report delaying to display output
Hello,
WAD report taking 6 min time to display the output but the same report displaying output
in 1 min 50 sec when I executed in BEx Analyzer
The Same BEx report I incorporated in WAD but it's delaying to display the output.
What might be the cause in delaying the output display.
SrujayHi,
Please to use the new cache mode as note:
1026944 - New cache mode for BI 7.0 without directory
As per the note:
To activate the new cache mode, run the report SAP_RSADMIN_MAINTAIN with
the following parameters and the option "INSERT":
OBJECT: RSR_CACHE_ACTIVATE_NEW
VALUE: X
After this procedure you can benefit from the new cache mode by
activating it for your query or queries. Go to RSRT -> enter query -> properties ->
cache mode: 5 Cluster Enhanced should be selected.
Or via mass maintenance to all queries (transaction RSRT -> menu "Environment" -> "Mass Maintenance").
It should resolved your issue.
Thanks,
Venkat -
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> -
Report header is missng while printing or spooling
Hi All,
I have a problem in print a report.its
After getting selection screen of the report ,If i click a print button (it's for execute and print)
the header details are missing in spool ( does not print selection fields of the report are missing in spool).
If i execute the report and got the output ,then i click the print button it's execute properly means in spool i am getting all the output properly ,header details also printed. means selection screen fields means what i entered in selection screen is printing.Its a AVL report.While debugging i am not getting solution.i have investigated in menu painter also.
but i am not getting proper idea to fix the bug.
i am sending the code also.please let me know ASAP
code:
REPORT ZMXXR048 LINE-SIZE 1023 "255 deleted AW2150 GLDK9AAYU9
LINE-COUNT 65
MESSAGE-ID zm
NO STANDARD PAGE HEADING.
*eject
TABLES declaration.
TABLES:ekko, "Purchasing Document: Header
ekpo, "Purchasing Document: Item
a016, "Contract Item AMT25JAN05
a019, "Contract Header AMT25JAN05
t024, "Purchasing Groups
t024e, "Purchasing Organizations
t161, "Purchasing Document Types
t001w, "Plants/branches
lfa1, "Vendor Master (General Section) AMT25JAN05
eket, "Scheduling Agreement Schedule Lines
ekbe, "Purchasing Document: History AMT25JAN05
ekab, "Release Documentation AMT25JAN05
zbsart_doc."Purchasing documents custom structure "GA01
ekkn. "Account Assignment in Purchasing Document "GA19062003
Comment AMT25JAN05
*eject
TYPE-POOLS definition.
TYPE-POOLS slis. "KAK01
*eject
CONSTANTS declaration.
CONSTANTS:
c_t(1) TYPE c VALUE 'T', "AMT25JAN05
c_l(1) TYPE c VALUE 'L',
c_m(1) TYPE c VALUE '4', "AMT25JAN05
c_y(1) TYPE c VALUE 'Y', "AMT25JAN05
c_i(1) TYPE c VALUE 'I',
c_ne(2) TYPE c VALUE 'NE',
c_eq(2) TYPE c VALUE 'EQ', "AMT25JAN05
c_lp(2) TYPE c VALUE 'LP',
c_nb(2) TYPE c VALUE 'NB',
c_ec(2) TYPE c VALUE 'EC',
c_lpa(3) TYPE c VALUE 'LPA',
c_zlp(3) TYPE c VALUE 'ZLP',
c_znba(4) TYPE c VALUE 'ZNBA',
c_mk(2) TYPE c VALUE 'MK', "AMT25JAN05
c_wk(2) TYPE c VALUE 'WK', "AMT25JAN05
c_doqot(1) TYPE c VALUE '"', "AMT25JAN05
c_totals(6) TYPE c VALUE 'TOTALS',
c_x(1) TYPE c VALUE 'X',
c_k(1) TYPE c VALUE 'K', "AMT25JAN05
c_a(1) TYPE c VALUE 'A',
C_S(1) TYPE C VALUE 'S',"insert AW2150 GLDK9AAYU9
c_55(2) TYPE c VALUE '55',
c_56(2) TYPE c VALUE '56',
c_44(2) TYPE c VALUE '44', "AMT25JAN05
c_45(2) TYPE c VALUE '45',
c_1(1) TYPE c VALUE '1',
c_2(1) TYPE c VALUE '2',
c_h(1) TYPE c VALUE 'H',
c_(1) TYPE c VALUE '', "GA18062003.
c_n(1) TYPE c VALUE 'N', "SRI24062003
c_o(1) TYPE c VALUE 'O', "SRI24062003
c_maxdays TYPE p VALUE '93', "GA29072003
c_wk1(10) type c VALUE 'WK1'. "NAR10NOV06
*Begin of Addition by AMT25JAN05
CONSTANTS :
c_3 TYPE i VALUE 3 ,
c_4 TYPE i VALUE 4 ,
c_5 TYPE i VALUE 5 ,
c_8 TYPE i VALUE 8 ,
c_10 TYPE i VALUE 10 ,
c_11 TYPE i VALUE 11 ,
c_12 TYPE i VALUE 12 ,
c_15 TYPE i VALUE 15 ,
c_18 TYPE i VALUE 18 ,
c_20 TYPE i VALUE 20 ,
c_23 TYPE i VALUE 23 , "TUL02022005 "KVI04Feb05
c_40 TYPE i VALUE 40 ,
c_all(4) TYPE c VALUE '&ALL' ,
c_sa(3) TYPE c VALUE '&SA' ,
c_bs(3) TYPE c VALUE '&BS' ,
c_sum(4) TYPE c VALUE '&SUM' ,
c_eb3(4) TYPE c VALUE '&EB3' ,
c_xpa(4) TYPE c VALUE '&XPA' ,
c_omp(4) TYPE c VALUE '&OMP' ,
c_crb(4) TYPE c VALUE '&CRB' ,
c_cre(4) TYPE c VALUE '&CRE' ,
c_ave(4) TYPE c VALUE '&AVE' ,
c_pc10(4) TYPE c VALUE 'PC10' ,
c_coltab(6) TYPE c VALUE 'COLTAB' ,
c_excel(5) TYPE c VALUE 'EXCEL' ,
c_ic1(4) TYPE c VALUE '&IC1' ,
c_dload(5) TYPE c VALUE 'DLOAD' ,
c_refrs(5) TYPE c VALUE 'REFRS' ,
c_waers(5) TYPE c VALUE 'WAERS' ,
c_bprme(5) TYPE c VALUE 'BPRME' ,
c_ekbe(4) TYPE c VALUE 'EKBE' ,
c_meins2(6) TYPE c VALUE 'MEINS2' ,
c_meins3(6) TYPE c VALUE 'MEINS3' ,
c_ekkn(4) TYPE c VALUE 'EKKN' ,
c_ekpo(4) TYPE c VALUE 'EKPO' ,
c_ekko(4) TYPE c VALUE 'EKKO' ,
c_lfa1(4) TYPE c VALUE 'LFA1' ,
c_meins(5) TYPE c VALUE 'MEINS' ,
c_eket(4) TYPE c VALUE 'EKET' ,
c_me33l(5) TYPE c VALUE 'ME33L' ,
c_me23(4) TYPE c VALUE 'ME23' ,
c_bes(3) TYPE c VALUE 'BES' ,
c_bedat(11) TYPE c VALUE 'S_BEDAT-LOW',
c_pur(15) TYPE c VALUE 'PURCHASING DOC.',
c_item(4) TYPE c VALUE 'ITEM' ,
c_doc(8) TYPE c VALUE 'DOC.DATE' ,
c_vendor(6) TYPE c VALUE 'VENDOR' ,
c_vname(11) TYPE c VALUE 'VENDOR NAME' ,
c_plant(5) TYPE c VALUE 'PLANT' ,
c_pdesc(17) TYPE c VALUE 'PLANT DESCRIPTION',
c_sloc(4) TYPE c VALUE 'SLOC' ,
c_pgr(3) TYPE c VALUE 'PGR' ,
c_porg(4) TYPE c VALUE 'PORG' ,
c_mat(8) TYPE c VALUE 'MATERIAL' ,
c_standard(8) TYPE c VALUE 'STANDARD' ,
c_matdesc(20) TYPE c VALUE 'MATERIAL DESCRIPTION',
c_deldate(13) TYPE c VALUE 'DELIVERY DATE' ,
c_qty(13) TYPE c VALUE 'SCHEDULED QTY' ,
c_quom(4) TYPE c VALUE 'OUOM' ,
c_net(9) TYPE c VALUE 'NET PRICE' ,
c_curr(4) TYPE c VALUE 'CURR' ,
c_per(3) TYPE c VALUE 'PER' ,
c_opuom(5) TYPE c VALUE 'OPUOM' ,
c_grqty(6) TYPE c VALUE 'GR QTY' ,
c_gruom(6) TYPE c VALUE 'GR UOM' ,
c_irqty(6) TYPE c VALUE 'IR QTY' ,
c_iruom(6) TYPE c VALUE 'IR UOM' ,
c_trnum(15) TYPE c VALUE 'TRACKING NUMBER' ,
c_rec(12) TYPE c VALUE 'RECEIVER-BBP' ,
c_tcont(18) TYPE c VALUE 'T_CONDITIONS-EBELN' .
*End of Addition by AMT25JAN05
*BEGIN INSERT BB1097 - add a constant for the vendor mat field
CONSTANTS C_VENDMAT(15) TYPE C VALUE 'VENDOR MATERIAL'.
*END INSERT BB1097
*eject
DATA Work fields definition.
DATA : w_repid LIKE sy-repid,
w_color TYPE i,
w_info LIKE sy-lisel, "AMT25JAN05
w_lifnr LIKE eina-lifnr, "AMT25JAN05
w_matnr LIKE eina-matnr, "AMT25JAN05
w_werks LIKE marc-werks, "AMT25JAN05
w_tabkey LIKE cdpos-tabkey, "AMT25JAN05
w_objectid LIKE konp-knumh, "AMT25JAN05
w_len TYPE i , "AMT25JAN05
w_field LIKE konp-kopos, "AMT25JAN05
w_eindt LIKE eket-eindt, "AMT25JAN05
w_ebeln LIKE ekko-ebeln, "ujo1jul
zsort(6) TYPE c, "KAK01
w_fldname(20) TYPE c, "GA16062003.
w_titel LIKE spop-titel, "GA25062003.
w_text1 LIKE spop-textline1, "GA25062003.
w_text2 LIKE spop-textline2, "GA25062003.
W_FLAG(1) TYPE C, "KVI04Feb05
Start of GLDK9A8WWS (AS3848)
Defined variable for line size.
w_linsz LIKE sy-linsz.
End of GLDK9A8WWS (AS3848)
DATA: date_diff LIKE ekko-aedat.
*BEGIN OF SRI26062003
*DATA: w_s1 LIKE ekbe-menge, AMT25JAN05
w_s2 LIKE ekbe-bamng, AMT25JAN05
w_s3 LIKE ekbe-bpmng, AMT25JAN05
w_s4 LIKE ekpo-netpr. AMT25JAN05
w_s5 LIKE ekkn-wempf. AMT25JAN05
w_s6 LIKE ekpo-webaz, AMT25JAN05
*END OF SRI26062003
*eject
DATA Structure definition.
DATA: e_coltab TYPE slis_specialcol_alv.
*eject
DATA Internal table definition with INCLUDE STRUCTURE
*Begin of comment by AMT25JAN05
*DATA: BEGIN OF ibdcdata OCCURS 0.
INCLUDE STRUCTURE bdcdata.
*DATA: END OF ibdcdata.
*End of comment by AMT25JAN05
*eject
DATA Other internal table definition.
DATA: BEGIN OF t_documents OCCURS 0, "Main initial internal table
ekgrp LIKE ekko-ekgrp,
ekorg LIKE ekko-ekorg,
eknam LIKE t024-eknam,
ebeln LIKE ekko-ebeln,
ebelp LIKE ekpo-ebelp,
lgort LIKE ekpo-lgort,
kschl LIKE a016-kschl,
datbi LIKE a016-datbi,
datab LIKE a016-datab,
LOEKZ LIKE EKPO-LOEKZ, "insert AW2150 GLDK9AAYU9
infnr LIKE ekpo-infnr,
pstyp LIKE ekpo-pstyp,
konnr LIKE ekpo-konnr,
ematn LIKE ekpo-ematn,
txz01 LIKE ekpo-txz01,
werks LIKE ekpo-werks,
aedat LIKE ekpo-aedat,
epstp LIKE rm06e-epstp,
lifnr LIKE ekko-lifnr,
waers LIKE ekko-waers, "SRI26062003
name1 LIKE lfa1-name1,
name2 LIKE t001w-name1,
ktmng LIKE ekpo-ktmng,
meins LIKE ekpo-meins,
meins2 LIKE ekpo-meins, "GA23062003
meins3 LIKE ekpo-meins, "GA23062003
bednr LIKE ekpo-bednr,
loevm_ko LIKE konp-loevm_ko,
bsart LIKE ekko-bsart,
eindt LIKE eket-eindt, "SBH01
netpr LIKE ekpo-netpr, "SBh01
peinh LIKE ekpo-peinh, "GA01
bprme LIKE ekpo-bprme, "GA01
menge LIKE ekpo-menge,
menge2 like ekbe-menge, "GA23062003.
bamng LIKE ekbe-bamng, "GA23062003.
bpmng LIKE ekbe-bpmng,
vgabe LIKE ekbe-vgabe, "GA01
webaz LIKE ekpo-webaz,
wempf LIKE ekkn-wempf, "GA19062003.
flgdel(1) TYPE c, "ujo9jul
Start of GLDK9A8WWS (AS3848)
Added fields WEPOS (GR indicator), REPOS (IR indicator) and WEBRE (GR-
based IV indicator).
wepos LIKE ekpo-wepos, "GR indicator
repos LIKE ekpo-repos, "IR indicator
webre LIKE ekpo-webre, "GR-based IV indicator
End of GLDK9A8WWS (AS3848)
ELIKZ LIKE ekpo-ELIKZ, "Delivery "TUL02022005
EREKZ LIKE EKPO-EREKZ, "Invoice AW2150 GLDK9AAYU9
*BEGIN INSERT BB1097 - add column for the vendor mat field. this field
will hold the value of the vendor material #
IDNLF LIKE EKPO-IDNLF,
*END INSERT BB1097
END OF t_documents.
Added begin ujo9jul
*DATA: t_documents_tmp LIKE t_documents OCCURS 0 WITH HEADER LINE.
*Comment by AMT25JAN05
*eject
DATA Other internal table definition.
*Begin of Comment by AMT25JAN05
*DATA: BEGIN OF t_ekko OCCURS 0,
ebeln LIKE ekko-ebeln,
bsart LIKE ekko-bsart,
loekz LIKE ekko-loekz,
aedat LIKE ekko-aedat,
lifnr LIKE ekko-lifnr,
ekorg LIKE ekko-ekorg,
ekgrp LIKE ekko-ekgrp,
waers LIKE ekko-waers,
name1 LIKE lfa1-name1,
END OF t_ekko.
*End of Comment by AMT25JAN05
Added end ujo9jul
*Begin of SRI26062003
DATA:BEGIN OF t_t024 OCCURS 0 ,
ekgrp LIKE t024-ekgrp,
eknam LIKE t024-eknam,
END OF t_t024.
DATA:BEGIN OF t_t001w OCCURS 0 ,
werks LIKE t001w-werks,
name1 LIKE t001w-name1,
END OF t_t001w.
*End of SRI26062003
DATA: BEGIN OF t_conditions OCCURS 0, "Main final internal table
ebeln LIKE ekpo-ebeln,
ekgrp LIKE ekko-ekgrp,
ekorg LIKE ekko-ekorg,
waers LIKE ekko-waers, "SRI26062003
eknam LIKE t024-eknam,
ebelp LIKE ekpo-ebelp,
lgort LIKE ekpo-lgort,
kschl LIKE a016-kschl,
datbi LIKE a016-datbi,
datab LIKE a016-datab,
infnr LIKE ekpo-infnr,
pstyp LIKE ekpo-pstyp,
konnr LIKE ekpo-konnr,
ematn LIKE ekpo-ematn,
txz01 LIKE ekpo-txz01,
werks LIKE ekpo-werks,
aedat LIKE ekpo-aedat,
epstp LIKE rm06e-epstp,
lifnr LIKE ekko-lifnr,
name1 LIKE lfa1-name1,
name2 LIKE t001w-name1,
ktmng LIKE ekpo-ktmng,
meins LIKE ekpo-meins,
meins2 LIKE ekpo-meins, "GA23062003.
meins3 LIKE ekpo-meins, "GA23062003.
bednr LIKE ekpo-bednr,
loevm_ko LIKE konp-loevm_ko,
bsart LIKE ekko-bsart,
eindt LIKE eket-eindt,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh,
bprme LIKE ekpo-bprme,
menge LIKE ekpo-menge,
menge2 like ekbe-menge, "GA23062003.
bamng LIKE ekbe-bamng, "GA23062003.
bpmng LIKE ekbe-bpmng,
vgabe LIKE ekbe-vgabe, "GA01
webaz LIKE ekpo-webaz,
wempf LIKE ekkn-wempf, "GA19062003.
AGING TYPE I, "insert AW2150 GLDK9AAYU9
ELIKZ LIKE ekpo-ELIKZ, "TUL02022005
EREKZ LIKE EKPO-EREKZ, "insert AW2150 GLDK9AAYU9
coltab TYPE slis_t_specialcol_alv, "SRI24062003
*BEGIN INSERT BB1097 - add column for the vendor mat field. this field
will hold the value of the vendor material #
IDNLF LIKE EKPO-IDNLF,
*END INSERT BB1097
END OF t_conditions.
Internal Table for the Purchasing Group name
*Begin of Comment by AMT25JAN05
*DATA: BEGIN OF t_purchgr OCCURS 0,
name2 LIKE t024-eknam,
END OF t_purchgr.
*End of Comment by AMT25JAN05
internal table for the plant name
*Begin of Comment by AMT25JAN05
*DATA: BEGIN OF t_plant OCCURS 0,
name1 LIKE t001w-name1,
END OF t_plant.
*End of Comment by AMT25JAN05
*Begin of Comment by AW2150
Internal Table for the Vendor Number and Vendor Name
*DATA: BEGIN OF t_lfa1 OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
END OF t_lfa1.
*End of Comment by AW2150
*Start of GA19062003
Internal table for the Good Recipient in case of BBP
DATA: BEGIN OF t_ekkn OCCURS 0,
ebeln LIKE ekkn-ebeln, "SRI26062003
ebelp LIKE ekkn-ebelp, "SRI26062003
wempf LIKE ekkn-wempf,
END OF t_ekkn.
*End of GA19062003
Internal Table for EXCEL DOWNLOADING
DATA: BEGIN OF t_conditions_exe OCCURS 0,
ebeln(15) TYPE c,
ebelp(11) TYPE c,
aedat(11) TYPE c,
lifnr(16) TYPE c,
name1(35) TYPE c,
werks(5) TYPE c,
name2(30) TYPE c, "GA16062003.
lgort(4) TYPE c,
ekgrp(3) TYPE c,
ekorg(4) TYPE c,
" eknam(30) type c, "GA16062003.
ematn(20) TYPE c,
txz01(40) TYPE c,
*BEGIN INSERT BB1097 - this field will hold the value of the vendor
material #
IDNLF(35) TYPE C,
*END INSERT BB1097
eindt(13) TYPE c,
menge(13) TYPE c,
meins(4) TYPE c,
netpr(11) TYPE c,
waers(5) TYPE c, "ujo7jul
peinh(4) TYPE c,
bprme(4) TYPE c,
menge2(11) type c,
bamng(11) TYPE c,
meins2(6) TYPE c,
bpmng(11) TYPE c,
meins3(6) TYPE c,
bednr(21) TYPE c,
wempf(12) TYPE c, "GA19062003.
AGING(7) TYPE C, "insert AW2150 GLDK9AAYU9
ELIKZ(23) TYPE c, "TUL02022005
EREKZ(23) TYPE C, "insert AW2150 GLDK9AAYU9
END OF t_conditions_exe.
*eject
*INTERNAL TABLE TO FIND THE RECEIVED AND INVOICED QUANTITY
DATA: BEGIN OF t_ekbe OCCURS 0,
ebelp LIKE ekbe-ebelp,
ebeln LIKE ekbe-ebeln,
vgabe LIKE ekbe-vgabe,
BELNR LIKE EKBE-BELNR,
*Begin Of Change BH9511 20-Aug-07
menge LIKE ekbe-menge,
menge(16) TYPE P DECIMALS 3,
*End Of Change BH9511 20-Aug-07
shkzg LIKE ekbe-shkzg,
END OF t_ekbe.
*INTERNAL TABLE TO FIND THE RECEIVED AND INVOICED UoM
DATA: BEGIN OF t_ekbe_temp OCCURS 0,
ebelp LIKE ekbe-ebelp,
ebeln LIKE ekbe-ebeln,
vgabe LIKE ekbe-vgabe,
menge LIKE ekbe-menge,
END OF t_ekbe_temp.
Added begin ujo7jul
DATA: BEGIN OF t_totals OCCURS 0,
menge LIKE ekpo-menge,
meins LIKE ekpo-meins,
bamng LIKE ekbe-bamng,
meins2 LIKE ekpo-meins,
bpmng LIKE ekbe-bpmng,
meins3 LIKE ekpo-meins,
END OF t_totals.
DATA: BEGIN OF t_tot_netpr OCCURS 0,
netpr LIKE ekpo-netpr,
waers LIKE ekko-waers,
END OF t_tot_netpr.
DATA: BEGIN OF t_tot_peinh OCCURS 0,
peinh LIKE ekpo-peinh,
bprme LIKE ekpo-bprme,
END OF t_tot_peinh.
*Begin of Comment by AW2150
*DATA: BEGIN OF t_eket OCCURS 0,
ebeln LIKE eket-ebeln,
ebelp LIKE eket-ebelp,
eindt LIKE eket-eindt,
END OF t_eket.
Added end ujo7jul
*End of Comment by AW2150
BEGIN OF KAK01
FOR ALV Related Details.
DATA: alv_fieldcat TYPE slis_t_fieldcat_alv,
alv_layout TYPE slis_layout_alv,
alv_exclude TYPE slis_t_extab,
alv_sort TYPE slis_t_sortinfo_alv,
g_variant LIKE disvariant,
gx_variant LIKE disvariant,
gt_event_exit TYPE slis_t_event_exit, "GA23062003.
g_save(1) TYPE c, "GA23062003.
g_exit(1) TYPE c, "AMT25JAN05
lt_dynpread LIKE dynpread OCCURS 1 WITH HEADER LINE,"AMT25JAN05
g_repid LIKE d020s-prog,
END OF KAK01
Start of GLDK9A8WWS (AS3848)
Added the definition of structure for the events that will be used
in the logic for generating the standard report header for the report.
v_events TYPE slis_t_event.
End of GLDK9A8WWS (AS3848)
*eject
PARAMETERS and SELECT-OPTIONS definition
Start of GLDK9A8WWS (AS3848)
Changed the text-100 in the list of text elements. It was changed
from OPEN PURCHASE DOCUMENTS LIST DISPLAY to Open Purchaser Order
Report.
SELECTION-SCREEN: BEGIN OF BLOCK three WITH FRAME TITLE text-100.
End of GLDK9A8WWS (AS3848)
SELECTION-SCREEN: BEGIN OF BLOCK one WITH FRAME TITLE text-060.
SELECT-OPTIONS : s_ekorg FOR ekko-ekorg OBLIGATORY MEMORY ID eko
NO INTERVALS,
s_lifnr FOR ekko-lifnr,
s_werks FOR ekpo-werks MEMORY ID wrk,
s_ekgrp FOR ekko-ekgrp MEMORY ID ekg
NO INTERVALS,
s_ebeln FOR ekko-ebeln MEMORY ID bes,
s_ebelp FOR ekpo-ebelp MEMORY ID bsp,
s_bsart FOR zbsart_doc-bsart MEMORY ID bsa,"GA01
s_pstyp FOR ekpo-pstyp,
s_loekz FOR ekko-loekz,
s_knttp FOR ekpo-knttp MEMORY ID knt,
s_matnr FOR ekpo-matnr MEMORY ID mat,
s_matkl FOR ekpo-matkl MEMORY ID mkl,
start of modifications AW2150 GLDK9AAYU9
s_bedat FOR ekko-bedat OBLIGATORY, "GA29072003
S_BEDAT FOR EKKO-BEDAT,
end of modifications AW2150 GLDK9AAYU9
S_EINDT FOR EKET-EINDT.
PARAMETERS: p_sum AS CHECKBOX, "SRI26062003
start of modification AW2150 GLDK9ABI53
deleted checkbox for manually closed PO
p_pod AS CHECKBOX DEFAULT 'X'."insert AW2150 GLDK9AAYU9
added checkbox for DCI and FI.
P_DCI AS CHECKBOX DEFAULT 'X', "insert AW2150 GLDK9ABI53
P_FI AS CHECKBOX. "insert AW2150 GLDK9ABI53
end of modification AW2150 GLDK9ABI53
SELECTION-SCREEN: END OF BLOCK one .
SELECTION-SCREEN: BEGIN OF BLOCK two WITH FRAME TITLE text-070.
start of insert AW2150 GLDK9ABSZ8
PARAMETERS: P_ALLPO AS CHECKBOX DEFAULT 'X'.
end of insert AW2150 GLDK9ABSZ8
start of insert AW2150 GLDK9AAYU9
this was just moved from the block below. this is not a new
requirement.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT NO-DISPLAY. " ALV Variant
SELECTION-SCREEN COMMENT 47(40) VARNAME FOR FIELD P_VARI.
end of insert AW2150 GLDK9AAYU9
*Start of GA16062003
PARAMETERS: p_qty RADIOBUTTON GROUP qtvl,
p_date RADIOBUTTON GROUP qtvl,
p_date1 RADIOBUTTON GROUP qtvl.
*End of GA16062003
SELECTION-SCREEN: END OF BLOCK two .
start of modification AW2150 GLDK9AAYU9
Start of GLDK9A8WWS (AS3848)
Commented out the following portion of the source code to remove the
field VARIANT under Settings on the report selection screen.
*SELECTION-SCREEN: BEGIN OF BLOCK four WITH FRAME
TITLE text-073. "TUL0202200
*selection-screen: begin of block four with frame title text-1
*Start of GA23062003
*PARAMETERS: p_vari LIKE disvariant-variant NO-DISPLAY. " ALV Variant
*SELECTION-SCREEN COMMENT 47(40) varname FOR FIELD p_vari.
*Select-Options : S_ELIKZ FOR ekpo-ELIKZ . "TUL0202200
End of modification AW2150 GLDK9AAYU9
Ext. check warning ignored for the comment. AMT25JAN05
*SELECTION-SCREEN: END OF BLOCK four.
End of GLDK9A8WWT (AS3848)
*selection-screen: end of block three.
PARAMETERS p_loggrp(4) TYPE c NO-DISPLAY DEFAULT 'PC10'.
SELECTION-SCREEN: END OF BLOCK three.
*End of GA23062003
*eject
*eject
INITIALIZATION
INITIALIZATION.
*Deletion Indicator
s_loekz-low = c_l.
s_loekz-sign = c_i.
s_loekz-option = c_ne.
APPEND s_loekz.
*start of insert AW2150 GLDK9ABSZ8
IF P_ALLPO EQ C_X.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_QTY'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-NAME EQ 'P_DATE'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-NAME EQ 'P_DATE1'.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF P_ALLPO NE C_X.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_QTY'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-NAME EQ 'P_DATE'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-NAME EQ 'P_DATE1'.
SCREEN-ACTIVE = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
*end of insert AW2150 GLDK9ABSZ8
*Start of GA23062003
Settings for display variants
*INITIALIZATION. "GA03122003.
g_repid = sy-repid.
g_save = c_a(1).
CLEAR g_variant.
g_variant-report = g_repid.
g_variant-log_group = p_loggrp.
g_variant-username = sy-uname.
Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc EQ 0.
p_vari = gx_variant-variant.
ENDIF.
varname = gx_variant-text.
VALIDATE INITIAL DATA ENTERED BY THE USERS ***************
*Start of GA29072003.
IF NOT s_bedat IS INITIAL.
Start of GLDK9A8WWS (AS3848)
Changed sequence in subroutine name to comply with coding standards
based on the review tool ZZCHK.
PERFORM f0100_check_s_bedat.
End of GLDK9A8WWS (AS3848)
ENDIF.
*End of GA29072003.
*eject
*start of insert AW2150 GLDK9ABSZ8
AT SELECTION-SCREEN OUTPUT.
IF P_ALLPO EQ C_X.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_QTY'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-NAME EQ 'P_DATE'.
SCREEN-ACTIVE = 0.
ELSEIF SCREEN-NAME EQ 'P_DATE1'.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF P_ALLPO NE C_X.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'P_QTY'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-NAME EQ 'P_DATE'.
SCREEN-ACTIVE = 1.
ELSEIF SCREEN-NAME EQ 'P_DATE1'.
SCREEN-ACTIVE = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
*end of insert AW2150 GLDK9ABSZ8
*eject
*start of insert by AW2150 GLDK9AAYU9
AT SELECTION SCREEN ON S_EINDT.
AT SELECTION-SCREEN ON S_EINDT.
IF NOT S_EINDT IS INITIAL.
PERFORM F17200_CHECK_S_EINDT.
ENDIF.
*end of insert by AW2150 GLDK9AAYU9
*eject
AT SELECTION SCREEN ON S_EKORG
AT SELECTION-SCREEN ON s_ekorg.
Validate value of purchasing org(s) entered on the selection *
screen by executing subroutine 0100_VALIDATE_PURC_ORG. *
IF NOT s_ekorg IS INITIAL.
PERFORM f0200_validate_purc_org.
ENDIF.
*eject
AT SELECTION SCREEN ON S_EKGRP
AT SELECTION-SCREEN ON s_ekgrp.
Validate value of purchasing group(s) entered on the selection *
screen by executing subroutine 0200_VALIDATE_PURC_GROUP. *
IF NOT s_ekgrp IS INITIAL.
PERFORM f0300_validate_purc_group.
ENDIF.
*eject
AT SELECTION SCREEN ON S_EBELN
AT SELECTION-SCREEN ON s_ebeln.
Validate value of purchase order(s) entered on the selection *
screen by executing subroutine F0310_VALIDATE_PURC_ORDER.
IF NOT s_ebeln IS INITIAL.
PERFORM f0310_validate_purc_order.
ENDIF.
*eject
AT SELECTION SCREEN ON S_WERKS
AT SELECTION-SCREEN ON s_werks.
Validate value of plant(s) entered on the selection *
screen by executing subroutine F0400_VALIDATE_PLANT.
IF NOT s_werks IS INITIAL.
PERFORM f0400_validate_plant.
ENDIF.
*eject
AT SELECTION SCREEN ON S_BSART
AT SELECTION-SCREEN ON s_bsart.
Validate value of Document type(s) entered on the selection *
screen by executing subroutine F0500_VALIDATE_DOC_TYPE.
IF NOT s_bsart IS INITIAL.
PERFORM f0500_validate_doc_type.
ENDIF.
*eject
AT SELECTION SCREEN ON S_PSTYP
AT SELECTION-SCREEN ON s_pstyp.
Validate value of Item Category entered on the selection *
screen by executing subroutine F0600_VALIDATE_ITEM_CATEGORY.
IF NOT s_pstyp IS INITIAL.
PERFORM f0600_validate_item_category.
ENDIF.
*eject
AT SELECTION SCREEN ON S_MATNR
AT SELECTION-SCREEN ON s_matnr.
Validate value of Material Number entered on the selection *
screen by executing subroutine F0700_validate_mat_number
IF NOT s_matnr IS INITIAL.
PERFORM f0700_validate_mat_number.
ENDIF.
*eject
AT SELECTION SCREEN ON S_LIFNR
AT SELECTION-SCREEN ON s_lifnr.
Validate value of Vendor entered on the selection by executing *
subroutine F0800_VALIDATE_VENDOR_NUMBER
IF NOT s_lifnr IS INITIAL.
PERFORM f0800_validate_vendor_number.
ENDIF.
*eject
AT SELECTION SCREEN ON S_MATKL
AT SELECTION-SCREEN ON s_matkl.
Validate value of material group entered on the selection screen *
by executing subroutine F0900_validate_mat_group.
IF NOT s_matkl IS INITIAL.
PERFORM f0900_validate_mat_group.
ENDIF.
*eject
AT SELECTION SCREEN ON S_KNTTP
AT SELECTION-SCREEN ON s_knttp.
Validate the value of account assignment category entered on the *
selection screen by executing subroutine 1000_validate_mat_group. *
IF NOT s_knttp IS INITIAL.
PERFORM f1000_validate_***_category.
ENDIF.
*eject
AT SELECTION SCREEN ON S_EBELP
AT SELECTION-SCREEN ON s_ebelp.
Validate the value of PO line item entered on the *
selection screen by executing subroutine F1100_VALIDATE_PO_ITEM.
IF NOT s_ebelp IS INITIAL.
PERFORM f1100_validate_po_item.
ENDIF.
*eject
AT SELECTION SCREEN ON S_LOEKZ
AT SELECTION-SCREEN ON s_loekz.
Validate the value of deletion indicator enterd on the selection *
selection screen by executing subroutine F1200_VALIDATE_DEL_IND.
IF NOT s_loekz IS INITIAL.
PERFORM f1200_validate_del_ind.
ENDIF.
Start of GLDK9A8WWS (AS3848)
Commented out the following block of code as a result of the removal
of the field VARIANT from the selection screen.
*at selection-screen on value-request for p_vari.
perform 14000_f4_for_variant.
End of GLDK9A8WWS (AS3848)
*Start of deletion AW2150
*eject
Block Added From Here TUL02022005
AT SELECTION SCREEN ON S_ELIKZ
*AT SELECTION-SCREEN ON s_ELIKZ.
Validate the value of Delivery Completed Indicator entered.
IF NOT s_ELIKZ IS INITIAL.
Check the Valid Values.
IF not SPACE in S_ELIKZ
AND not C_X in S_ELIKZ .
MESSAGE e999 WITH
'Invalid Delivery Completed Flag entered'(006).
ENDIF.
ENDIF.
Block Added Till Here TUL02022005
*End of deletion AW2150
*eject
AT SELECTION SCREEN
AT SELECTION-SCREEN.
PERFORM f15000_pai_of_selection_screen.
*End of GA23062003
start of insert AW2150 GLDK9AAYU9
IF S_BEDAT IS INITIAL
AND S_EINDT IS INITIAL.
MESSAGE E999 WITH TEXT-E01.
ENDIF.
end of insert AW2150 GLDK9AAYU9
MAIN PROCESSING **
*eject
START-OF-SELECTION.
START-OF-SELECTION.
Store report name and report size into temp. varaibles for later use.
w_repid = sy-repid.
Select OAs and Info Records to be displayed into internal table
PERFORM f2000_get_pos.
Store data into final reporting internal table
PERFORM f3000_store_data.
Begin of KAK01
Start of GLDK9A8WWS (AS3848)
Calls the subroutine for building the event catalog for ALV. This
event catalog will be used in the function module that will generate
the ALV report. Logic will eventually be used for the generation of
the standard report header on top of each page.
CLEAR v_events.
w_linsz = sy-linsz.
PERFORM f17100_build_events USING v_events.
End of GLDK9A8WWS (AS3848)
Use ALV instead of normal list.
Write data to the screen.
Populate ALV Field Category Structure.
PERFORM f8000_field_cat.
Populate ALV Exclude Structure.
PERFORM f9000_alv_exclude.
*eject
END-OF-SELECTION.
END-OF-SELECTION.
Begin of KVI04Feb05
IF W_FLAG EQ C_X.
CLEAR W_FLAG.
STOP.
ENDIF.
End of "KVI04Feb05
Display Report.
PERFORM f10000_call_disp.
*eject
AT USER-COMMAND .
*AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXEL'.
PERFORM F5000_DOWNLOAD_TO_EXCEL.
WHEN 'CLIK'.
IF SY-LISEL+1(2) EQ '45'.
PERFORM F6000_see_po_details.
ELSE.
PERFORM F7000_see_oa_details.
ENDIF.
ENDCASE.
End of KAK01
*eject
Form(s)/Subroutine(s) ************************
*Start of GA29072003.
*& FORM F0100_CHECK_S_BEDAT
Check if user entered appropriate date values as selection criteria *
----Hi!
After you click on the printer icon, a popup will apeear. Depends on the SAP system version, you are using, somewhere on the popup, you can find a filed, which is called SAP COVER PAGE.
Here you can choose, coverpage, without cover page, or standard cover page.
Regards
Tamá -
Hi experts,
actually in my ALV report i want to display the name of the report on top centre of the page. for this i used FM
ALV_REUSE_COMMENTARY_WRITE.
AT PRESENT I AM GETTING THE REPORT HEADING ON TOP LEFT.
COULD U PLZ HELP HOW TO GET THE REPORT HEADING ON TOP CENTRE .
REGARDS,
SIRI.Hi Sireesha,
Just try like this and see
WRITE 'Centered Text'(120) TO LS_LINE-KEY centered.
APPEND LS_LINE TO IT_TOP.
CONCATENATE v_date v_time INTO LS_LINE-INFO
SEPARATED BY ' '.
APPEND LS_LINE TO IT_TOP.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_TOP
I_LOGO = I_LOGO
I_END_OF_LIST_GRID = I_END_OF_LIST_GRID
I_ALV_FORM = I_ALV_FORM
Regards,
Vidya
Maybe you are looking for
-
ITunes 10.0 interface issue: Not displaying media
So I downloaded iTunes 10.0 when the update was available and hadn't experienced any problems, however I had an independent problem that required me to reinstall my OS and since then when I open iTunes my library won't show up even though when I pres
-
Transfer of itunes to lower software release = no itunes
I have an older G3 laptop that I take on business trips. Before I left I did a bulk transfer of my music and never thought of the version differences. My intel mac duo was the host and my G3 was the target. Now when I open itunes the error message sa
-
Periods moving around in hebrew text
Hello, I am trying to create a tutorial in Hebrew and am experiencing difficulty. When pasting text from Word into Authorware, I am having trouble with the period moving from its correct placement at the end of a sentence to the right side of the las
-
I have a new aluminum Macbook with 10.5.6. I just started noticing when I select "Sleep" from the Apple menu the screen will go blank, the indicator light is still on solid. It stays this way for about 20 seconds then finally it goes to sleep. The ha
-
after putting some money aside, I finally made the move to invest in a 4K Display by EIZO. starting up Boot Camp, the resolution was 800x600ish although in the display settings it showed 3840x2160?! lowering the settings resulted in even smaller reso