Hi Experts, need an example for abap unit test(ABAP OO)?
Hi Experts,
I want to do abap unit test for the developed programs, could anyone please give me an example program of development(a simple is ok, just use it to test)? and an abap unit test example for the program, what I want is to use object oriented abap, thanks in advance!
Merry Christmas to you all.
Kind regards
Dawson
Hi
Below documents will give you more information,
http://help.sap.com/saphelp_nw04/helpdata/en/a2/8a1b602e858645b8aac1559b638ea4/content.htm
ABAP Testing and Troubleshooting [original link is broken]
http://bi.offis.de/publicProject/g16cglafhqva.htm
regards
Nagaraju
Similar Messages
-
Need an example for work flow based on multistep activity
hi,
i need an example for work flow based on multistep activity for practicing.please do the need.
thanksHi,
Workflow document information:
Check these links.
http://www.sapgenie.com/workflow/index.htm
/people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
&**********Reward points if helpful**************& -
I need simple example for alv grid
hi
i need code for simple example for alv grid.
thanks.hi bharat,
this is report with most of the functionality.
report zus_alv_demo_grid .
tables: ekko.
type-pools: slis.
types: begin of t_ekko,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
statu type ekpo-statu,
aedat type ekpo-aedat,
matnr type ekpo-matnr,
menge type ekpo-menge,
meins type ekpo-meins,
netpr type ekpo-netpr,
peinh type ekpo-peinh,
line_color(4) type c, "Used to store row color
end of t_ekko.
data: it_ekko type standard table of t_ekko initial size 0,
wa_ekko type t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
Data declaration for EVENT and PRINT PARAMETER.
data: gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
data declaration for sorting.
data : it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
data : i_list_comments type slis_t_listheader.
start-of-selection.
perform data_retrieval.
perform user_command.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform build_sortcat.
perform display_alv_report.
end-of-selection.
*TOP-OF-PAGE.
PERFORM top-of-page.
end-of-page.
*& Form build_fieldcatalog
text
--> p1 text
<-- p2 text
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
fieldcatalog-do_sum = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " build_fieldcatalog
*& Form build_layout
text
--> p1 text
<-- p2 text
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for
*when double
"click(press f2)*
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " build_layout
*& Form data_retrieval
text
--> p1 text
<-- p2 text
form data_retrieval.
data: ld_color(1) type c.
select ebeln ebelp statu aedat matnr menge meins netpr
peinh from ekpo into table it_ekko.
*Populate field with color attributes
loop at it_ekko into wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
if ld_color = 8.
ld_color = 1.
endif.
concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
modify it_ekko from wa_ekko.
endloop.
endform. " data_retrieval
*& Form display_alv_report
text
--> p1 text
<-- p2 text
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_event = gt_events
is_print = gd_prntparams
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form user_command
text
--> p1 text
<-- p2 text
*& Form top-of-page
text
--> p1 text
<-- p2 text
form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
concatenate sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) into wa_header-info."todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header
i_logo = 'GANESH_LOGO'.
endform. " top-of-page
FORM user_command *
--> R_UCOMM *
--> RS_SELFIELD *
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&IC1'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
when 'ULHAS'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
endcase.
endform.
FORM set_pf_status *
--> RT_EXTAB *
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ZNEWSTATUS'.
endform.
*& Form build_events
text
--> p1 text
<-- p2 text
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[]
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " build_events
*& Form build_print_params
text
--> p1 text
<-- p2 text
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " build_print_params
FORM END_OF_PAGE *
form end_of_page.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip. write:/40 'Page:', sy-pagno .
endform.
FORM END_OF_LIST *
form end_of_list.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip. write:/40 'Page:', sy-pagno .
endform.
*& Form build_sortcat
text
--> p1 text
<-- p2 text
form build_sortcat.
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
append wa_sort to it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
append wa_sort to it_sortcat.
endform. " build_sortcat
Rewards if helpfull
regards
vijay dwivedi -
Detailed example for ABAP mapping in XI7.0 with code in class builder
hi experts,
will any one one send me the detailed example(including navigation steps) for ABAP mapping in XI7.0 with code in class builder.
Thankin u,Hi,
Just go through the below link.It will guide you how to do abap mapping:
The guide is on XI 3.0 but the same can be used in 7.0 also.
The How-to-guide
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
This link will provide more information regarding program point of view.
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/content.htm
Thanks,
Kishore.
Edited by: Kishore on Mar 14, 2008 4:35 AM -
Need JNDI example for THIN CLIENT
I ned a JNDI example for a thin client (as opposed to a java program connecting on the same machine as the server).
1> Specifically, I need an example of a JNDI Provider URL
Would it be <b>corbaloc.iiop:<host>:5004 ???</b>
2> Also, how do I create a Queue Connection factory from within the GUI (Visual Administrator), so I can find out what to use on the THIN CLIENT Program?
ThanksHi,
Please find the answers below.
> I ned a JNDI example for a thin client (as opposed to
> a java program connecting on the same machine as the
> server).
>
> 1> Specifically, I need an example of a JNDI Provider
> URL
>
> Would it be <b>corbaloc.iiop:<host>:5004 ???</b>
Have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/08/8f633e0084e946e10000000a114084/frameset.htm">this</a> link.
> 2> Also, how do I create a Queue Connection factory
> from within the GUI (Visual Administrator), so I can
> find out what to use on the THIN CLIENT Program?
Have a look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/26/9b569f525445b0b3d66474b7569d39/frameset.htm">this</a> link.
> Thanks
Hope that helps,
Vladimir -
Need some examples for smartforms and scripts
hi
now i am working in scripts and smartforms. so i need some examples and some information for scripts and smartforms. where i can find that information.hi jyothsna,
i have given below a simple example
this is the report program,
*& Report ZSCRIPT1 *
REPORT ZSCRIPT1 .
TABLES : EKKO,
EKPO,
KNA1,
USR01,
MARA,
MAKT.
DATA : BEGIN OF ZOPTION.
INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.
PARAMETERS: P_EBELN LIKE EKKO-EBELN,
P_EBELP LIKE EKPO-EBELP.
CLEAR EKPO.
SELECT SINGLE * FROM EKPO
WHERE EBELN = P_EBELN AND
EBELP = P_EBELP.
CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
INTO KNA1-NAME1
WHERE KUNNR = EKPO-KUNNR.
CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
INTO MAKT-MAKTX
WHERE MATNR = EKPO-MATNR AND
SPRAS = SY-LANGU.
CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
ZOPTION-TDDEST = USR01-SPLD. "Output device (printer)
ZOPTION-TDIMMED = 'X'. "Print immediately
ZOPTION-TDDELETE = 'X'. "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'. "Program Name
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'PRINTER'
DIALOG = ' '
FORM = 'ZFORM1'
LANGUAGE = SY-LANGU
OPTIONS = ZOPTION
IMPORTING
LANGUAGE = SY-LANGU
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'HEADER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'FOOTER'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'FOOTER'
EXCEPTIONS
ELEMENT = 1.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.
This is the layout Set
Layout set Z_TESTSCRIPT
Description Test SAP script
Standard attributes
First page FIRST
Default paragraph P1
Tab-stop 1.00 CH
Page format DINA4
Orientation Landscape
Lines/inch 6.00
Characters/inch 10.00
Font attributes
Font family COURIER
Font size 12.0 Point
Bold No
Italic No
Underlined No
Characters Attributes
B Character String Bold
Standard attributes
Marker No
Font attributes
Bold Yes
Paragraphs Attributes
P1 Default Paragraph
Standard attributes
Line spacing 1.00 LN
Left margin 1.00 CM
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 12.0 Point
P2 Header Paragraph
Standard attributes
Line spacing 1.00 LN
Left margin 4.50 CM
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 18.0 Point
Bold Yes
P3 Undelined paragraph
Standard attributes
Line spacing 1.00 LN
Alignment Left-aligned
Font attributes
Font family TIMES
Font size 12.0 Point
Underlined Yes
Windows Attributes
MAIN Main window
Window type MAIN
HEADER Main window
Window type CONSTANT
FOOTER Main window
Window type CONSTANT
Pages Attributes
FIRST First Page
Standard attributes
Next page FIRST
Page counter
Mode START
Numbering type Arabic numerals
Page window
HEADER Left margin 00.00 CM
Upper margin 00.00 CM
Window width 20.00 CM
Window height 04.00 CM
MAIN Left margin 00.00 CM
Upper margin 05.00 CM
Window width 20.00 CM
Window height 20.00 CM
FOOTER Left margin 00.00 CM
Upper margin 25.00 CM
Window width 20.00 CM
Window height 04.00 CM
Text elements for following windows:
HEADER
Element HEADER
/: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
/: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
P2 ,,<B>TEST PURCHASE ORDER</>
MAIN
Element MAIN
P1 <B>Customer/Supplier:</>,,&KNA1-NAME1&
P1 <B>PO No:</>,,&EKPO-EBELN&
P1 <B>Part No:</>,,&MAKT-MATNR&
P1 <B>Description:</>,,&MAKT-MAKTX&
P1 <B>Quantity:,,</>&EKPO-MENGE&
P1 <B>Sign:</>&uline(81)&
P1 <B>Date:</>&EKKO-AEDAT&
FOOTER
Element FOOTER
/: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
/: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
P2 ,,<B>PLEASE SIGN THE PO BEFORE DISPATCH</>
<b>reward if useful :)</b> -
I need code example for server act as client and vice versa
Hi all,
I want code example for performing both server and clients using RMI. I mean Server will act as client and client will act as server. So a single program will act as both client and server .
Please give example, it will helpful to complete my project. I am struggling in this stage. Its like peer to peer action.
Thanks & Regards
R.Ragupathi1. The tutorial shows you how to do cleint/server.
2. Search on the topic "callback" to see how cleint and server roles can be reversed. -
I need an example for stacking waveforms in onboard memory using MS Visual c for PCI-6115
I would like an example of stacking multiple acquisitions in onboard memory for the PCI-6115 card. This is sometimes referred to as "Multiple Record". It is called "Sequence Waveforms" on Lecroy Scopes. I have done this on other cards before, but not on an NI card.
The example should include a way to accept a trigger, gather x number of samples, and rearm rapidly without transferring any of the just-acquired data. This way I won't miss any trigger events. The onboard memory is sufficient to store all of the waveforms that I need. One the card has acquired n waveforms, I want to DMA them into RAM.
Thanks to anyone that can help!
If you need any more specifics, just le
t me know and I'll post them.I would like an example of stacking multiple acquisitions in onboard memory for the PCI-6115 card. This is sometimes referred to as "Multiple Record". It is called "Sequence Waveforms" on Lecroy Scopes. I have done this on other cards before, but not on an NI card.
The example should include a way to accept a trigger, gather x number of samples, and rearm rapidly without transferring any of the just-acquired data. This way I won't miss any trigger events. The onboard memory is sufficient to store all of the waveforms that I need. One the card has acquired n waveforms, I want to DMA them into RAM.
Thanks to anyone that can help!
If you need any more specifics, just le
t me know and I'll post them. -
Need an example for spry please...
I'm hoping someone can point me in the right direction
here.....
here is what i am trying to do:
I have a xml file of store location. like so:
<?xml version="1.0" encoding="utf-8"?>
<locations>
<store>
<loc>Deltona</loc>
<add1>2041 Jefferson Ave.</add1>
<add2></add2>
<city>Deltona</city>
<state>FL</state>
<zip>32738</zip>
<phone>407.375.7237</phone>
</store>
<store>
<loc>Debary</loc>
<add1>240 Springview Commerce Dr.</add1>
<add2></add2>
<city>Debary</city>
<state>FL</state>
<zip>32713</zip>
<phone>386.668.8081</phone>
</store>
<store>
<loc>Ft. Worth</loc>
<add1>132 test lane</add1>
<add2>Bldg. 2</add2>
<city>Ft. Worth</city>
<state>TX</state>
<zip>11111</zip>
<phone>224.111.1111</phone>
</store>
</locations>
this is static information that will never change. What I
would like to do is when the page first loads the information will
be hidden and there is a dropdown menu with the states. when the
user selects a state I want the all of the location information to
show by that state.
any suggestions or examples on how i can do this?Hi
Regarding how we are issuing the material in manufacturing process:
a) Push
Push components can be manually issued directly to discrete jobs and repetitive schedule as per requirements.
b) Operation Pull:
Operation pull components are automatically backflushed (pulled) from inventory and issued to discrete jobs and repetitive schedules when assemblies are moved and completed at that operation.The Components are pulled from the supply subinventory assigned to the component.
c) Assembly pull:
Assembly Pull components are issued (backflushed) to discrete jobs and repetitive schedules when you complete all operations on assemblies in Work in Process. They are pulled from the supply subinventory assigned to the component requirement.
d) Bulk:
Bulk components are not backflushed nor do they default when issuing all components for an assembly. You can, however, manually issue specific bulk components to a discrete job or repetitive schedule.
e) Supplier:
Supplier component requirements can be viewed and are displayed on reports. They provide information on the component materials that your suppliers provide but need not be transacted. Supplier components are not backflushed nor do they default when issuing all components for an assembly. You can, however, manually issue specific supplier components to discrete jobs and repetitive schedules/job.
Hope this helps you...!
NOTE: Please mark the post as Helpful or correct if the update has really helped you. This would also bring the thread to logical conclusion and will be helpful for the viewers.
Regards
Ganesh Zope -
Urgent need of code for abap hr program
Hi,
Can any one provide with coding to calculate the leave balance for employee
for a given period. Its very urgent.
Thanks in advance,
SubhaHi
See this sample code for calculation of absence quota
using 2001 and 2006 infotypes
make changes as per your requirement
REPORT zh_absence_quota
NO STANDARD PAGE HEADING
MESSAGE-ID zh_msg
LINE-SIZE 169
LINE-COUNT 60(1).
T A B L E S D E C L A R A T I O N S
TABLES: pernr, " Logical PNP
t001p, " Personnel Subarea
t529u, " Employment Status
t500p, " Personnel Area
t501, " Employee Group
t503k, " Employee Subgroup
t549a, " Payroll Area
t554s, " Absence Type
t554t, " Absence Type Texts
t556a, " Quota Type
t527x, " Orgn. Unit
t556b, " Quota Type Text
pa0003. " Payroll Status
INFOTYPES:
0000, " Actions
0001, " Organizational Assignment
2006, " Absence Quota
2001. " Absences
T Y P E S D E C L A R A T I O N S
Employee Absence Structure
TYPES: BEGIN OF s_2001,
pernr TYPE persno, " Personal Number
awart TYPE awart, " Absence Type
subty TYPE subty, " Sub Type
endda TYPE endda, " End date
begda TYPE begda, " Begin date
abrtg TYPE abrtg, " Absence days
ename TYPE emnam, " employee Name
atext TYPE abwtxt, " Absence Type Text
END OF s_2001.
Employee Absence Quota Structure
TYPES: BEGIN OF s_2006,
pernr TYPE persno, " Personal Number
ktart TYPE abwko, " Absence Quota Type
year(4) TYPE n, " Year
subty TYPE subty, " Sub Type
endda TYPE endda, " End date
begda TYPE begda, " Begin date
anzhl TYPE ptm_quonum, " Absence Entitlement days
ename TYPE emnam, " employee Name
ktext TYPE kotxt, " Absence Type Text
kverb TYPE kverb, " Deduction Quota days
anzhb TYPE ptm_quonum, " Balance days
END OF s_2006.
Combined Employee Absence and Quota Structure
TYPES: BEGIN OF s_rep,
pernr TYPE persno, " Personal Number
ktart TYPE abwko, " Absence Quota Type
year(4) TYPE n, " Year
anzhl TYPE ptm_quonum, " Absence Entitlement days
kverb TYPE kverb, " Deduction Quota days
anzhb TYPE ptm_quonum, " Balance days
ktext TYPE kotxt, " Quota Type Text
awart TYPE awart, " Absence Type
abrtg TYPE abrtg, " Absence days
ename TYPE emnam, " employee Name
atext TYPE abwtxt, " Absence Type Text
endda TYPE endda, " End date
begda TYPE begda, " Begin date
END OF s_rep.
Declaration of Variables
DATA : gv_atext TYPE abwtxt, " Absence Type Text
gv_ktext TYPE kotxt, " Absence Type Text
gv_title1 TYPE sylisel, " Report title
gv_year(4) TYPE c, " Year
gv_mon(2) TYPE c, " Month
gv_hrs TYPE abwtg, " Hours
gv_date TYPE sydatum, " Date
gv_date1 TYPE sydatum, " Date
gv_dial. " Color flag
Declaration of Constants
CONSTANTS :
c_x TYPE c VALUE 'X', " Sign
c_1 TYPE persg VALUE '1', " Emp Group
c_pernr(8) TYPE n VALUE '00000000', " Pernr
c_moabw TYPE moabw VALUE '01', " Per SA Grouping
c_mozko TYPE mozko VALUE '01', " Per SA Grouping
c_mopgk TYPE mopgk VALUE '1', " Emp SGrp Grouping
c_endda TYPE sydatum VALUE '99991231', " End Date
c_val1(2) TYPE c VALUE '31', " Date Type
c_val2(2) TYPE c VALUE '12', " Date Type
c_val LIKE p0041-dar01 VALUE '01', " Date Type
c_date1 LIKE sy-datum VALUE '18000101'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_2001 TYPE STANDARD TABLE OF s_2001 WITH HEADER LINE,
i_2006 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
i_rep1 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_ktart FOR t556a-ktart, " Absence Quota Type
s_awart FOR t554s-subty. " Absence Type
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-003. " Quota & Absence
PARAMETERS: p_qa RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-004. " Quota
PARAMETERS: p_q RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-005. " Absence
PARAMETERS: p_a RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN END OF BLOCK b2.
I N I T I A L I Z A T I O N *
INITIALIZATION.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_screen.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Selection of Period
PERFORM get_period.
Get PERNR from LDB
GET pernr.
IF p0000-stat2 <> '0'.
Get the data from PA0001,PA2001, PA2006
PERFORM get_pers_data.
ENDIF.
T O P - O F - P A G E *
TOP-OF-PAGE.
Header of the List
PERFORM header.
E N D - O F - P A G E *
Footer
END-OF-PAGE.
IF p_qa = c_x.
Display both Absence and Quota Data
WRITE /1(188) sy-uline.
ELSEIF p_q = c_x.
Display only Quota Data
WRITE /1(114) sy-uline.
ELSEIF p_a = c_x.
Display only Absence Data
WRITE /1(125) sy-uline.
ENDIF.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
Combine the Absence and Quota Data
PERFORM append_data.
IF p_qa = c_x.
Display both Absence and Quota Data
PERFORM display_qa_data.
ELSEIF p_q = c_x.
Display only Quota Data
PERFORM display_q_data.
ELSEIF p_a = c_x.
Display only Absence Data
PERFORM display_a_data.
ENDIF.
*& Form validate_screen
Validation of Selection Screen fields
FORM validate_screen .
Validation of Personnel Number
CLEAR pa0003.
IF NOT pnppernr[] IS INITIAL.
SELECT pernr
FROM pa0003 UP TO 1 ROWS
INTO pa0003-pernr
WHERE pernr IN pnppernr.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Number'(006).
ENDIF.
ENDIF.
Validation of Employee Status
CLEAR t529u.
IF NOT pnpstat2[] IS INITIAL.
SELECT SINGLE statv
INTO t529u-statv
FROM t529u
WHERE statv IN pnpstat2 AND
statn = '2' AND
sprsl = sy-langu.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Invalid Employee Status'(007).
ENDIF.
ENDIF.
Validation of Personnel Area
CLEAR t500p.
IF NOT pnpwerks[] IS INITIAL.
SELECT persa
FROM t500p UP TO 1 ROWS
INTO t500p-persa
WHERE persa IN pnpwerks.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Area'(008).
ENDIF.
ENDIF.
Validation of Personnel Sub Area
CLEAR t001p.
IF NOT pnpbtrtl[] IS INITIAL.
SELECT btrtl
FROM t001p UP TO 1 ROWS
INTO t001p-btrtl
WHERE btrtl IN pnpbtrtl.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Sub Area'(009).
ENDIF.
ENDIF.
Validation of Employee Group
CLEAR t501.
IF NOT pnppersg[] IS INITIAL.
SELECT persg
FROM t501 UP TO 1 ROWS
INTO t501-persg
WHERE persg IN pnppersg.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Group'(010).
ENDIF.
ENDIF.
Validation of Employee Sub Group
CLEAR t503k.
IF NOT pnppersk[] IS INITIAL.
SELECT persk
FROM t503k UP TO 1 ROWS
INTO t503k-persk
WHERE persk IN pnppersk.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Sub Group'(011).
ENDIF.
ENDIF.
Validation of Payroll Area
CLEAR t549a.
IF NOT pnpabkrs[] IS INITIAL.
SELECT abkrs
FROM t549a UP TO 1 ROWS
INTO t549a-abkrs
WHERE abkrs IN pnpabkrs.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Payroll Area'(026).
ENDIF.
ENDIF.
Validation of Absence Type
CLEAR t554s.
IF NOT s_awart[] IS INITIAL.
SELECT subty
FROM t554s UP TO 1 ROWS
INTO t554s-subty
WHERE subty IN s_awart AND
moabw EQ c_moabw AND
endda EQ c_endda.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Absence Type'(012).
ENDIF.
ENDIF.
Validation of Absence Quota Type
CLEAR t556a.
IF NOT s_ktart[] IS INITIAL.
SELECT ktart
FROM t556a UP TO 1 ROWS
INTO t556a-ktart
WHERE ktart IN s_ktart AND
mopgk EQ c_mopgk AND
mozko EQ c_mozko AND
endda EQ c_endda.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Quota Type'(013).
ENDIF.
ENDIF.
ENDFORM. "validate_screen
*& Form get_period
Get the Correct Period based on Selection screen selection
FORM get_period.
CLEAR: gv_year,gv_mon, gv_date, gv_date1.
gv_year = sy-datum+0(4).
gv_mon = sy-datum+4(2).
IF pnptimr1 = c_x. " Current Date
pnpbegda = sy-datum.
pnpendda = sy-datum.
ELSEIF pnptimr2 = c_x. " Current Month
CONCATENATE gv_year gv_mon c_val INTO gv_date.
CONCATENATE gv_year gv_mon c_val1 INTO gv_date1.
pnpbegda = gv_date.
pnpendda = gv_date1.
ELSEIF pnptimr3 = c_x. " Current Year
CONCATENATE gv_year c_val c_val INTO gv_date.
CONCATENATE gv_year c_val2 c_val1 INTO gv_date1.
pnpbegda = gv_date.
pnpendda = gv_date1.
ELSEIF pnptimr4 = c_x. " Upto Today
pnpbegda = c_date1.
pnpendda = sy-datum.
ELSEIF pnptimr5 = c_x. " From Today
pnpbegda = sy-datum.
pnpendda = c_endda.
ELSE.
IF ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
pnpbegda = c_date1.
pnpendda = c_endda.
ELSEIF pnpbegda IS INITIAL AND NOT pnpendda IS INITIAL.
pnpbegda = c_date1.
pnpendda = pnpendda.
ELSEIF NOT ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
pnpbegda = pnpbegda.
pnpendda = pnpendda.
ENDIF.
ENDIF.
ENDFORM. "get_period
*& Form get_pers_data
Get the Absence and Quota Data from PA0001,PA2001,PA2006
FORM get_pers_data.
DATA: lv_year1(4) TYPE n,
lv_year2(4) TYPE n,
lv_date1 TYPE sydatum,
lv_date2 TYPE sydatum,
lv_anzhb TYPE ptm_quonum. " Last Year Balance days
Get data from Respective Infotypes
rp_provide_from_last p0001 space pnpbegda pnpendda.
Absence Data
LOOP AT p2001 WHERE pernr = pernr-pernr AND
begda GE pnpbegda AND
endda LE pnpendda.
IF p2001-awart IN s_awart.
i_2001-pernr = pernr-pernr.
i_2001-subty = p2001-subty.
i_2001-awart = p2001-awart.
i_2001-abrtg = p2001-abrtg.
i_2001-begda = p2001-begda.
i_2001-endda = p2001-endda.
READ TABLE p0001 WITH KEY pernr = p2001-pernr.
i_2001-ename = p0001-ename.
Get the Absence Type Text
CLEAR gv_atext.
SELECT SINGLE atext INTO gv_atext FROM t554t
WHERE sprsl = sy-langu AND
moabw = c_moabw AND
awart = p2001-awart.
IF sy-subrc = 0.
i_2001-atext = gv_atext.
ENDIF.
APPEND i_2001.
CLEAR i_2001.
ENDIF.
ENDLOOP.
Quota Data
LOOP AT p2006 WHERE pernr = pernr-pernr AND
begda GE pnpbegda AND
endda LE pnpendda.
IF p2006-ktart IN s_ktart.
i_2006-pernr = pernr-pernr.
i_2006-subty = p2006-subty.
i_2006-begda = p2006-begda.
i_2006-endda = p2006-endda.
i_2006-year = p2006-endda+0(4).
i_2006-ktart = p2006-ktart.
i_2006-anzhl = p2006-anzhl.
i_2006-kverb = p2006-kverb.
i_2006-anzhb = p2006-anzhl - p2006-kverb.
READ TABLE p0001 WITH KEY pernr = p2001-pernr.
i_2006-ename = p0001-ename.
Get the Quota Type Text
CLEAR gv_ktext.
SELECT SINGLE ktext INTO gv_ktext FROM t556b
WHERE sprsl = sy-langu AND
mopgk = c_mopgk AND
mozko = c_mozko AND
ktart = p2006-ktart.
IF sy-subrc = 0.
i_2006-ktext = gv_ktext.
ENDIF.
APPEND i_2006.
CLEAR i_2006.
ENDIF.
ENDLOOP.
For Vacation Quota (80) get the Balance of the Last Year and
add to the Current Year Quota
LOOP AT i_2006.
IF i_2006-ktart = '80'.
lv_year1 = i_2006-endda+0(4).
lv_year2 = lv_year1 - 1.
CONCATENATE lv_year2 '01' '01' INTO lv_date1.
CONCATENATE lv_year2 '12' '31' INTO lv_date2.
LOOP AT p2006 WHERE pernr = i_2006-pernr AND
begda GE lv_date1 AND
endda LE lv_date2 AND
ktart = '80'.
lv_anzhb = p2006-anzhl - p2006-kverb.
i_rep1-pernr = i_2006-pernr.
i_rep1-ktext = i_2006-ktext.
i_rep1-anzhl = p2006-anzhl.
i_rep1-kverb = p2006-kverb.
i_rep1-ename = i_2006-ename.
i_rep1-begda = p2006-begda.
i_rep1-endda = p2006-endda.
i_rep1-anzhb = lv_anzhb.
i_rep1-ktart = '80'.
i_rep1-year = lv_year2.
APPEND i_rep1.
CLEAR: i_rep1.
ENDLOOP.
ENDIF.
CLEAR: lv_year1, lv_year2,
lv_date1, lv_date2,lv_anzhb.
ENDLOOP.
SORT i_rep1 BY pernr ktart.
ENDFORM. "get_pers_data
*& Form append_data
Put the Absence and Quota Data into one Report Int Table
FORM append_data.
CLEAR: i_rep.
REFRESH: i_rep.
SORT i_2001 BY pernr awart.
SORT i_2006 BY pernr ktart year.
Move I_REP1 data into i_2006
LOOP AT i_rep1.
MOVE-CORRESPONDING i_rep1 TO i_2006.
APPEND i_2006.
CLEAR i_2006.
ENDLOOP.
Move the Absence and Quota Data into a final Int Table
LOOP AT i_2006.
i_rep-pernr = i_2006-pernr.
i_rep-ename = i_2006-ename.
i_rep-ktart = i_2006-ktart.
i_rep-anzhl = i_2006-anzhl.
i_rep-kverb = i_2006-kverb.
i_rep-ktext = i_2006-ktext.
i_rep-anzhb = i_2006-anzhb.
i_rep-year = i_2006-year.
CLEAR i_2001.
CASE i_2006-ktart.
WHEN '81'.
PERFORM get_2001 USING i_2006-pernr '1000' i_2006-year.
WHEN '50'.
PERFORM get_2001 USING i_2006-pernr '1002' i_2006-year.
WHEN '80'.
PERFORM get_2001 USING i_2006-pernr '1001' i_2006-year.
WHEN '56'.
PERFORM get_2001 USING i_2006-pernr '1003' i_2006-year.
WHEN '51'.
PERFORM get_2001 USING i_2006-pernr '1004' i_2006-year.
WHEN '52'.
PERFORM get_2001 USING i_2006-pernr '1005' i_2006-year.
WHEN '54'.
PERFORM get_2001 USING i_2006-pernr '1006' i_2006-year.
WHEN '53'.
PERFORM get_2001 USING i_2006-pernr '1007' i_2006-year.
WHEN '55'.
PERFORM get_2001 USING i_2006-pernr '1008' i_2006-year.
WHEN '57'.
PERFORM get_2001 USING i_2006-pernr '1009' i_2006-year.
WHEN '90'.
PERFORM get_2001 USING i_2006-pernr '2000' i_2006-year.
WHEN '58'.
PERFORM get_2001 USING i_2006-pernr '2001' i_2006-year.
WHEN '59'.
PERFORM get_2001 USING i_2006-pernr '2002' i_2006-year.
WHEN '91'.
PERFORM get_2001 USING i_2006-pernr '2003' i_2006-year.
ENDCASE.
IF sy-subrc <> 0.
APPEND i_rep.
ENDIF.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY pernr ktart year.
DELETE i_rep WHERE pernr = ' '.
ENDFORM. " append_data
*& Form display_qa_data
Display the Absence and Quota Data
FORM display_qa_data.
DATA: lv_flag, " New Flag
lv_tot2 TYPE ptm_quonum. " Absence Balance days
IF i_rep[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_rep.
toggle color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_rep INDEX sy-tabix.
WRITE:/1 sy-vline,2(8) i_rep-pernr,
10 sy-vline,11(40) i_rep-ename.
ENDAT.
AT NEW ktart.
READ TABLE i_rep INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,52(25) i_rep-ktext.
ENDAT.
AT NEW year.
READ TABLE i_rep INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline, 78(4) i_rep-year,
82 sy-vline, 83(11) i_rep-anzhl,
94 sy-vline, 95(25) i_rep-atext,
120 sy-vline,133 sy-vline,
144 sy-vline,
155 sy-vline,156(13) i_rep-anzhb,
169 sy-vline.
lv_tot2 = lv_tot2 + i_rep-anzhb.
ENDAT.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline, 77 sy-vline,
82 sy-vline, 94 sy-vline,
120 sy-vline,121(12) i_rep-abrtg NO-ZERO,
133 sy-vline,134(10) i_rep-begda NO-ZERO,
144 sy-vline,145(10) i_rep-endda NO-ZERO,
155 sy-vline,169 sy-vline.
NEW-LINE.
AT END OF pernr.
WRITE : /1(169) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE:/1 sy-vline, 10 sy-vline,
51 sy-vline, 77 sy-vline,
82 sy-vline, 94 sy-vline,
120 sy-vline,121(12) i_rep-abrtg,
133 sy-vline,144 sy-vline,
155 sy-vline, 156(13) lv_tot2,
169 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(169) sy-uline.
CLEAR lv_tot2.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_qa_data
*& Form display_q_data
Display only the Quota Data
FORM display_q_data.
DATA: lv_flag. " New Flag
SORT i_2006 BY pernr ktart year.
IF i_2006[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_2006.
Toggle Color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: /1 sy-vline, 2(8) i_2006-pernr,
10 sy-vline,11(40) i_2006-ename.
ENDAT.
AT NEW ktart.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: 1 sy-vline,10 sy-vline,
51 sy-vline,52(25) i_2006-ktext.
ENDAT.
AT NEW year.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline,78(4) i_2006-year,
82 sy-vline,83(11) i_2006-anzhl,
94 sy-vline,95(13) i_2006-anzhb,
108 sy-vline.
NEW-LINE.
ENDAT.
AT END OF pernr.
WRITE : /1(108) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE: /1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline, 82 sy-vline,
94 sy-vline, 95(13) i_2006-anzhb,
108 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(108) sy-uline.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_q_data
*& Form display_a_data
Display Only the Absence Quota
FORM display_a_data.
DATA: lv_flag. " New Flag
SORT i_2001 BY pernr awart.
IF i_2001[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_2001.
Toggle Color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_2001 INDEX sy-tabix.
WRITE: /1 sy-vline, 2(10) i_2001-pernr,
10 sy-vline,11(40) i_2001-ename.
ENDAT.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,52(25) i_2001-atext,
77 sy-vline,78(12) i_2001-abrtg,
90 sy-vline,91(10) i_2001-begda,
101 sy-vline,102(10) i_2001-endda,
112 sy-vline.
NEW-LINE.
AT END OF pernr.
WRITE : /1(112) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE: /1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline,78(12) i_2001-abrtg,
90 sy-vline,101 sy-vline,
112 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(112) sy-uline.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_a_data
*& Form header
Write the Report Header
FORM header .
data : lv_pers type pbtxt,
lv_orgn type orgtx.
gv_title1 = sy-title. " Set List Header
IF p_qa = c_x.
NEW-PAGE LINE-SIZE 193.
ELSEIF p_a = c_x.
NEW-PAGE LINE-SIZE 125.
ELSEIF p_q = c_x.
NEW-PAGE LINE-SIZE 119.
ENDIF.
Standard header
FORMAT RESET.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = gv_title1.
Get the Personal Area and Org.Unit Texts
clear : lv_pers,lv_orgn.
select single name1 into lv_pers
from t500p where persa = pnpwerks-low.
select single orgtx into lv_orgn
from t527x where sprsl = sy-langu and
orgeh = pnporgeh-low and
endda = c_endda.
if not lv_pers is initial.
write : /2 'Personal Area:'(017), 17(25) lv_pers color 7.
endif.
if not lv_orgn is initial.
write : /2 'Organization Unit:'(021), 20(25) lv_orgn color 3.
endif.
IF p_qa = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(169) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Quota Description'(018) CENTERED,
77 sy-vline,78(4) 'Year'(027),
82 sy-vline,83(11) 'Entitlement'(019),
94 sy-vline,95(25) 'Absence Description'(022) CENTERED,
120 sy-vline,121(12) 'Absence days'(023),
133 sy-vline,134(10) 'From Date'(024),
144 sy-vline,145(10) 'To Date'(025),
155 sy-vline,156(13) 'Quota Balance'(020),
169 sy-vline.
WRITE : /1(169) sy-uline.
ELSEIF p_q = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(108) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Quota Description'(018) CENTERED,
77 sy-vline,78(4) 'Year'(027),
82 sy-vline,83(11) 'Entitlement'(019),
94 sy-vline,95(13) 'Quota Balance'(020),
108 sy-vline.
WRITE : /1(108) sy-uline.
ELSEIF p_a = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(112) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Absence Description'(022) CENTERED,
77 sy-vline,78(12) 'Absence days'(023),
90 sy-vline,91(10) 'From Date'(024),
101 sy-vline,102(10) 'To Date'(025),
112 sy-vline.
WRITE : /1(112) sy-uline.
ENDIF.
ENDFORM. " header
*& Form toggle_color
This routine alters the color of the records in the list
FORM toggle_color.
IF gv_dial = space.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
gv_dial = c_x.
ELSE.
FORMAT COLOR 1 INTENSIFIED OFF.
CLEAR gv_dial.
ENDIF.
ENDFORM. " toggle_color
*& Form get_2001
Get the ABsence type for each Quota type
FORM get_2001 USING p_pernr TYPE persno
p_value TYPE awart
p_year.
LOOP AT i_2001 WHERE pernr = p_pernr AND
awart = p_value AND
endda+0(4) = p_year.
i_rep-awart = i_2001-awart.
i_rep-abrtg = i_2001-abrtg.
i_rep-atext = i_2001-atext.
i_rep-begda = i_2001-begda.
i_rep-endda = i_2001-endda.
APPEND i_rep.
ENDLOOP.
ENDFORM. " get_2001
<b>
Reward points for useful Answers</b>
Regards
Anji -
Need some guidance for ABAP Routine in BI/BW
hi
this is ramireddy please send me ABAP Routine in BI/BW. please send me routines docoumentes in my mail.
my mail is: [email protected]What do you need the routine to do? There are numerous places to write routines. Routines can be really complex to simplistic. Object Routines, Start routines(if in 7.0 end routines) function modules, programs, includes
-
Need code example for dynamicly changing UI Propertey
Hello,
Can someone show me a simple code example that does the following:
A view which contains a button and a label.
Each press on the button changes the color (or other visible property) of the label.
But note: Don't bind the property to the Context for that, I want to do it through the doModifyView method.hi Roy Cohen,
I think u r not looking for the visibility property they have mentioned.
I think u r looking for a procedure to change the way the element looks..is it..
The problem is if u want any change to be visible when the button is pressed u can only change the length or the width.There is no option to change the semantic color or whatever.
To change the size u can try this code
IWDInputField in = (IWDInputField)view.getElement("<element name>");
in.setWidth(some value which is set when the button is pressed);
Is this wat u r looking for?
Jus mention it if there is something else.
Regards
Bharathwaj -
Need code example for StringTokenizer to hashmap...
I am creating a rolodex with name, phone, address, city, state. The data will be saved to a delimited file. When the app begins I have to read the file to get the records into memory. My GUI will list the names. The user should be able to click on one of the names to open a dialog box in which all the fields will appear and wil be editable.
I need some assistance with design...
I think I should use BufferedReader and StringTokenizer for reading the file in. Then perhaps store the records in a hashmap(need help with that - Is hashmap the thing to use? Maybe arraylist instead? How do i do it?) The records should be stored sorted by name in memory and in the file. Next, I figure I can show the names using a table and hide the other columns, when a cell is clicked I can pop up the dialog box with all the goodies in it. When I save it should be to memory, how do I do that? Then when the app closes I will write out using PrintWriter.
There are other things going on, buttons, listeners, etc. but the basic design is what I need advice on. Any ideas are welcome and appreciated!From the name to get the record, clearly you need a effecient lookup mechnism.
HashMap does hash lookup, that is right, but HashMap does NOT do ordering.
TreeMap does binary lookup, TreeMap also does ordering.
There you go the basic design.
--lichu -
Need an Example for How to call a Stored Procedure using DBAdapter
Hi
I am trying to invoke a stored procedure in Oracle Database using DB Adapter. I have successfully invoked and when i try to run it i got the following error.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'ExecuteScript' failed due to:
Stored procedure invocation error.
Error while trying to prepare and execute the RESONANCEDEMO.SP_QUERY API.
An error occurred while preparing and executing the RESONANCEDEMO.SP_QUERY API. Cause: java.sql.SQLSyntaxErrorException: ORA-00917: missing comma
ORA-06512: at "RESONANCEDEMO.SP_QUERY", line 7
ORA-06512: at line 1
Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
This exception is considered not retriable, likely due to a modelling mistake.
To classify it as retriable instead add property nonRetriableErrorCodes with value "-917" to your deployment descriptor (i.e. weblogic-ra.xml).
To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.
All properties are integers.
I am trying to have a Out Parameter in my Procedure. Please provide me an example on how to invoke a Stored Procedure using Out Paramter using DB Adapter.Hi,
It looks more like an Oracle error and not within the DbAdapter.
Try to test first your procedure from PL/SQL or other developer you are using.
Arik -
Use of link, alink, and vlink - need "good" example for my APEX app
Hi anyone,
I have a report with values in the "Last Name" column that links to another page (page 4) that opens when any last name in the said column is clicked on. However, before the last name link is clicked on its color is blue; but I want the link color to change to green after it is clicked on and the linked page opens; and I want the link to change to purple after the linked page is closed (visited link). Can someone provide a simple step by step example of how I can implement this in my app.
I tried looking at some posts that are similar but I am somewhat confused.
Thanks in anticipation for any assistance.
RicHi Ric,
This can be done by using CSS styles. There are several ways of accomplishing this.
If you want ALL links on your page to use the same colors put something like this in the HTML header of your page:
<style>
a:link { color:blue; }
a:visited { color:purple;}
a:active { color:blue;}
a:hover { color:blue; }
</style>This allows you to define the colors for the four different states of a link.
If you want specific links to use this coloring and not affect other links on your pages, you'll have to add a class to the styles (you can choose your own classname of course):
<style>
.custom_link a:link { color:blue; }
.custom_link a:visited { color:purple;}
.custom_link a:active { color:blue;}
.custom_link a:hover { color:blue; }
</style>Next, add the classname to the link attributes in your report.
class="custom_link"Hope this helps...
Rob
Maybe you are looking for
-
Empty strings morphed to NULL ???
Hi all, I am executing the following SQL-statement (short version): statement = (OraclePreparedStatement) connection.prepareStatement( "INSERT INTO TEST VALUES (?)"); statement.defineColumnType(1, OracleTypes.VARCHAR); statement.setString (1,""); sta
-
I'm having a problem generating an Excel file using CF and looping over a bunch of queries to get a table of data to display to the user. This is slow but works fine except for an instance recently where the page seems to be loading but after a few m
-
Lenovo Laptops Won't Install any Drivers
I have primarily Lenovo T and X series laptops at my work. I'm trying to setup SCCM 2012 to be able to image directly from a Windows 7 source folder (just took an ISO from MSDN and extracted the contents to a folder, pointed SCCM to it). I am hoping
-
XML Reports Conditional Formatting
Hi.... Am having an issue on XML Conditional formatting, that i want to set formatting for number field for 4 conditional... is it possible to achive ? this will be really great if i get can any assistance on this?. Thanks in Advance!!! -Suresh.S Edi
-
Use of application and country in BTE implementation
Hi all I am trying to implement a BTE 2040 in my system. The issue is it is already been implemented with application as FI-FI in fibf. But because of that it never gets executed i refered a note which says to implement BTE 2040 country and applicati