Salary display
Dear All,
Want to display the Employee name and the salary amount in astericks.
Each asterick signifies a thousand dollars.
e.g.
Name Salary
Karl Higgins***********************
Try this:
create table test (name varchar2(30), salary number(10,2))
insert into test values ('Karl Higgins', 12600);
select name||lpad(' ',round(salary/1000,0)+1,'*') from test;
You can replace round() function with ceil() or floor depending your requirements. "+1" is to offset single space used in lpad().
Similar Messages
-
CFGRID date sort is not working in Coldfusion 9
<!--- using cfgridcolum type="date" --->
<cfset emps = querynew("firstname,department, salary,startdate")>
<cfset queryaddrow(emps,3)>
<cfset querysetcell(emps,"firstname","Debra",1)>
<cfset querysetcell(emps,"department","Accounting",1)>
<cfset querysetcell(emps,"salary","100000",1)>
<cfset querysetcell(emps,"startdate","2009/11/09",1)>
<cfset querysetcell(emps,"firstname","Doherty",2)>
<cfset querysetcell(emps,"department","Finance",2)>
<cfset querysetcell(emps,"salary","120000",2)>
<cfset querysetcell(emps,"startdate","2005/09/02",2)>
<cfset querysetcell(emps,"firstname","Ben",3)>
<cfset querysetcell(emps,"department","Law",3)>
<cfset querysetcell(emps,"salary","200000",3)>
<cfset querysetcell(emps,"startdate","2010/08/09",3)>
<cfform name="form01">
<cfgrid format="html" insert="yes" insertButton="Add Row"
name="grid01"
selectmode="edit"
width=600
collapsible="true"
title="Employees"
autowidth="yes"
query="emps"
sort="yes"
>
<cfgridcolumn name="FirstName" header="FirstName"/>
<cfgridcolumn name="Department" header="Department" />
<cfgridcolumn name="Salary" display=true header="Salary" type="numeric" values="1000000,1200000" valuesdisplay="1000000,1200000"/>
<cfgridcolumn name="StartDate" display=true header="StartDate" type="date" mask="d/m/Y"/>
</cfgrid>
</cfform>
when i sort the grid column StartDate , it is doing to text sort instead of date sort, did anybody else face the same issue?I'm still getting the same effect. I added a mask and the data still
sorts as if it is a string. Both date columns are Oracle date types.
<cfgridcolumn name="TASKNAME" header="Type" width="200">
<cfgridcolumn name="ORIG_StartDate" mask="Y/m/d" type="date" header="Start Date" width="200">
<cfgridcolumn name="ORIG_ENDDATE" mask="Y/m/d" type="date" header="End Date" width="200">
Mark <>< -
Oracle 10g forms query!!!!
Hi All,
I am working on oracle Dev 10g forms, I have a table Employee with a poplist with different positions, like Operation Manager, Operation Exe, Department Exe, Sales Exe,etc..etc..
here i need help!!!!
when i select any position from the poplist, atomatically a fixed basic salaries have to be displayed in the salary display list.
how can i do this...?
need your help,
Thank you,
Regards.
Nissar.
Edited by: user12956566 on Apr 26, 2010 5:08 AMHi,
You can populate those values using post trigger...
Balaji
Edited by: balaji.palakayala on Apr 26, 2010 9:06 AM -
Add the Rental Item in (Total Compensation Form) HR_CMP_TCS
Hi,
I would like to use the total compensation form (HR_CMP_TCS) to display the rental element which is stored in the payroll cluster. The wage type of the rental is 1RRA. The existing form displays the salary only now.
I have already copied a new one to modify it. Any suggestion to add this item to the form.
Regards,
TonyHi,
HOw did you manage to get the salary displayed in the statment, Me and my ABAPer are struggling witht he same, can you please guide us on how did you go about modifying the statement to include the salary details? -
Hi All,
Rquirement is give budget estimate for all positions.
We are planning to use IT 1005 for storing the planned compensation. For each position we are maintaining data for IT 1005 under tab Pay Grade. As per the salary data defined in SPRO, values are getting defaulted once i select the grade and level.
But when I am cheking the data from HRP1005 i am not able to see the data for Currency, Pay Grade Min, Max and the refernce salary.
If i maintain the data under "Direct" tab the data for above fields are captured, but the grade is not captured.
Any input, from where i can fetch this data? or is there any alternate approach?
Thanks!
Regards,
ChetanHi Chetan,
Currently these fields are filled in via the following process:
The Reference salary displayed in IT1005 (Planned Compensation) PayGrade tab is retrieved from table T710A (cluster V_T710CL_B (SM34)).
Min grade level and Max grade level are from table T710.
Hope this help
Sarah -
Salary Statement in ESS is not getting displayed
Hi ALL,
When i am trying to get the salary statement from R/3 to portal this error is getting displayed.
Where as from the R/3 side we have a customaised HRFORM called ZOBT, it is generating report in R/3 where as it is not refelecting in PORTAL, its displaying error message as:
A critical error has occured. Processing of the service had to be terminated. Unsaved data has been lost.
Please contact your system administrator.
Form ZOBT does not exist
com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Form ZOBT does not exist
at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:121)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.reportBapiRet2Error(FcRepFramework.java:525)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcGetForm(FcRepFramework.java:394)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.processFollowingActions(FcRepFramework.java:484)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcExecAction(FcRepFramework.java:378)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.initModel(FcRepFramework.java:292)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFramework.initModel(InternalFcRepFramework.java:256)
at com.sap.xss.hr.rep.fcrfw.FcRepFrameworkInterface.initModel(FcRepFrameworkInterface.java:136)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface.initModel(InternalFcRepFrameworkInterface.java:198)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface$External.initModel(InternalFcRepFrameworkInterface.java:258)
at com.sap.xss.hr.rem2.selection.VcRem2Selection.onInit(VcRem2Selection.java:245)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2Selection.onInit(InternalVcRem2Selection.java:249)
at com.sap.xss.hr.rem2.selection.VcRem2SelectionInterface.onInit(VcRem2SelectionInterface.java:161)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface.onInit(InternalVcRem2SelectionInterface.java:144)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface$External.onInit(InternalVcRem2SelectionInterface.java:220)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:563)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:437)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:195)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:779)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:714)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1244)
at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:354)
at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:547)
at com.sap.portal.pb.PageBuilder.wdDoRefresh(PageBuilder.java:591)
at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:822)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:730)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:261)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Help me.
Regards,
KishoreHi Subhash,
Go to the transaction : PC00_M40_CLSTR
here 40 stands for India. Assign the Molga number as per the country code of your payroll.
Check if the pay roll has been run till the current period or not.
Hope this resolves your issue.
Regards,
Sandeep Tudumu -
Report that display salary for employee from this year and prvious year
Hi
How to do a report that display salary for employee from this year an previous year, my table has from period and two perid?
ThanksYou could try something like this but you MUST learn how to post questions! Very few members will help you if you word your question poorly or forget to mention vital imformation!
select distinct ty.id, ty.emp, ty.sal, ly.sal
from (select distinct id, userid, sal
from salary_table
where id = 123456
and from_period = '01-JAN-2010'
and to_period = '31-DEC-2010') LY,
salary_table TY
where ty.id = 123456
and ty.from_period = '01-JAN-2011'
and ty.to_period = '31-DEC-2011' -
ABAP Query to display top 5 employees who are having highest salary
How will you write a query in abap to display top 5 emplyeee records who are having Highest Salary Among all the employees.
Please Reply...Hi Kush,
Before writing any Database Query, always keep 2 important thumb rules in your mind :
1. Keep the number of data base access small
2. Keep the amount of data transfer small.
As you mentioned the Database Table has only 100 records, you can locally buffer the Table. So, make a local buffering and then you can sort the table based on the salary.
Select *
from Table_name
into table gt_itab.
Sort gt_itab by salary descending.
Now you can read the entries one after the another based on the index.
Have a look at the following code for an efficient performance feature. Goto SE38 and have a look at the ABAP Examples.
demo_select_some_columns. Package : SABAPDEMOS
Hope this will help.
Thanks,
Samantak. -
Bank acc. no is not displaying in salary slip
Bank account number is not displaying in salary slip for some payroll areas.
Pls replyHi,
You can always use it using PE51 add single feilds use PA0009-acc no. give proper lenght to the feild
You need to check the employees should have IT0009 record present with the House bank and account no maintined
Regards
Hemant V. Mahale -
Display mgrno, and salary exlude groups where sal 1000 sort in desc.
Since we are all on a roll and you guys rock I have 3 more left. If I didn't have this help I would fail this college course becuase i had 55 problems to do and these were the end of the class problems that I had no idea how to do them. I really appricate the help.
From what I already know:
ORDER BY MIN(SAL) DESC
I need to display the manager number and the salary of the lowest paid employee for that manager. Exclude anyone whose manager is not know-n. Exclude any groups where the minimum salary is less than $1000. Sort the output in descending order of salary.
MGR MIN (SAL)
7566 3000
7839 2450
7782 1300
7788 1100You should treat every one for doing your homework
Right Eric :-)
Here we go
SQL> SELECT a.mgr,min(a.sal)
2 from emp a,emp b
3 where a.mgr=b.empno
4 GROUP BY A.MGR
5 ORDER BY 2 DESC
6
SQL>
SQL> /
MGR MIN(A.SAL)
7566 3000
7839 2450
7782 1300
7788 1100
7698 1045
7902 880 -
In the af:table selected row need to display in the next page?
Hi,
I am using jdev 11.1.2.3.0.
I tried one sample application, in that jspx page, I am having the af:table and button in my view activity. In that table select one row and click on the button that time, the navigation page always show the first row. Suppose I select the 5th ro and navigate the page also displaying the first row only. So I don't know how to proceed this? Kindly suggest me.
Regards,
RaguHi Timo,
I used the selectionListener tag also.
Anyway Here I posted my jspx page.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document title="EmployeesView.jspx" id="d1">
<af:messages id="m1"/>
<af:form id="f1">
<af:panelCollection id="pc1">
<f:facet name="menus"/>
<f:facet name="toolbar">
<af:toolbar id="t2">
<af:commandButton text="Edit Employee" id="cb1" action="Edit" />
</af:toolbar>
</f:facet>
<f:facet name="statusbar"/>
<af:table value="#{bindings.EmployeesVO.collectionModel}" var="row" rows="#{bindings.EmployeesVO.rangeSize}"
emptyText="#{bindings.EmployeesVO.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.EmployeesVO.rangeSize}" rowBandingInterval="0"
filterModel="#{bindings.EmployeesVOQuery.queryDescriptor}"
queryListener="#{bindings.EmployeesVOQuery.processQuery}" filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.EmployeesVO.collectionModel.selectedRow}"
selectionListener="#{bindings.EmployeesVO.collectionModel.makeCurrent}" rowSelection="single"
id="t1">
<af:column sortProperty="#{bindings.EmployeesVO.hints.EmployeeId.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.EmployeeId.label}" id="c1">
<af:outputText value="#{row.EmployeeId}" id="ot1">
<af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.EmployeeId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.FirstName.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.FirstName.label}" id="c2">
<af:outputText value="#{row.FirstName}" id="ot2"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.LastName.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.LastName.label}" id="c3">
<af:outputText value="#{row.LastName}" id="ot3"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.Email.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.Email.label}" id="c4">
<af:outputText value="#{row.Email}" id="ot4"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.PhoneNumber.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.PhoneNumber.label}" id="c5">
<af:outputText value="#{row.PhoneNumber}" id="ot5"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.HireDate.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.HireDate.label}" id="c6">
<f:facet name="filter">
<af:inputDate value="#{vs.filterCriteria.HireDate}" id="id1">
<af:convertDateTime pattern="#{bindings.EmployeesVO.hints.HireDate.format}"/>
</af:inputDate>
</f:facet>
<af:outputText value="#{row.HireDate}" id="ot6">
<af:convertDateTime pattern="#{bindings.EmployeesVO.hints.HireDate.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.JobId.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.JobId.label}" id="c7">
<af:outputText value="#{row.JobId}" id="ot7"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.Salary.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.Salary.label}" id="c8">
<af:outputText value="#{row.Salary}" id="ot8"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.CommissionPct.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.CommissionPct.label}" id="c9">
<af:outputText value="#{row.CommissionPct}" id="ot9"/>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.ManagerId.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.ManagerId.label}" id="c10">
<af:outputText value="#{row.ManagerId}" id="ot10">
<af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.ManagerId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="#{bindings.EmployeesVO.hints.DepartmentId.name}" filterable="true" sortable="true"
headerText="#{bindings.EmployeesVO.hints.DepartmentId.label}" id="c11">
<af:outputText value="#{row.DepartmentId}" id="ot11">
<af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.DepartmentId.format}"/>
</af:outputText>
</af:column>
</af:table>
</af:panelCollection>
</af:form>
</af:document>
</f:view>
</jsp:root>
After click the Edit Employee button it should navigate the another page and which record I choose. -
Validation error message is not displayed for an attribute as an Input List Of Value
Hi everyone,
I use jdev 11.1.1.7.0
In my application I've created an Entity Obj and a View Obj base Employees table.
for the JobId attribute I've taken actions as listed below:
1. in Employees EO I've created a validation for this attribute and in some cases an error message returns (the error message is "the salary is not high"):
* Validation method for JobId.
public boolean validateJobId(String jobid) {
if (...) {
return false;
if (...) {
return false;
if (...) {
return false;
return true;
2. in Employees VO I've created a LOV for this attribute (the view accessor is JobsViewObj ) and I display the attribute as an Input Text with List Of Values.
in jspx page I drag& drop this attribute as below:
<af:inputListOfValues id="jobIdId"
popupTitle="Search and Select: #{bindings.JobId.hints.label}"
value="#{bindings.JobId.inputValue}"
label="#{bindings.JobId.hints.label}"
model="#{bindings.JobId.listOfValuesModel}"
required="#{bindings.JobId.hints.mandatory}"
columns="#{bindings.JobId.hints.displayWidth}"
shortDesc="#{bindings.JobId.hints.tooltip}"
autoSubmit="true">
<f:validator binding="#{bindings.JobId.validator}"/>
</af:inputListOfValues>
I open the Popup and I select a row from the Popup list and then I click Ok. After that if the validation method(validateJobId) returns false, the error message("the salary is not high") must be show to the user. but the error message doesn't display. I don't understand why this happens.
Can anybody guide me about this problem?
Regards
Habibyes, you're right, I've tested it in 12.1.3 and error message was displayed.
it seems it's a bug(bad bug ) in both 11.1.1.7 and 12.1.2. and now what can I do? is there any way to display the the error message?
Regards
Habib -
Problem displaying drill down STANDARD ALV for a particular record after pressing back button
I have a simple interactive ALV grid report. NOT 'OO'. It display correctly on initial execution. AT the moment, 6 records. I want it to work such that if i click record '1', a drill-down version of that ALV with only that one record clicked is displayed. This currently occurs correctly. The problem arises when i click the back button and want to click on a new record, say in the 2nd row..this new 2nd row record is not displayed. The first one is displayed again. I tried clearing and fiddling around but then the last record is displayed. I have used the 'ID' field as a 'hotspot' getting picked up by sy-tabindex. Maybe it could be that i shouldn't loop and use a work area e.g in my select statement. i'm not so sure i've looked around, and tried a few things. I can't get it right yet. My code is below:
*& Report ZALV
REPORT ZALV.
TABLES: ZCONTACT.
TYPE-POOLS: slis. "slis contains all of the ALV data types.
TYPES: BEGIN OF ty_zcontact.
INCLUDE STRUCTURE zcontact.
TYPES: icon TYPE char4, "field holding traffic light value- adding a column to internal table to hold the traffic light
END OF ty_zcontact.
DATA: "fieldcatALOG TYPE slis_t_fieldcat_alv WITH HEADER LINE,
it_zcontact TYPE TABLE OF ty_zcontact,"declares an internal table of type ZCONTACT
wa_zcontact TYPE ty_zcontact,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
g_variant TYPE disvariant,
gx_variant TYPE disvariant,
g_save TYPE c VALUE 'X',
it_fieldcat TYPE slis_t_fieldcat_alv,"declares field catalog table of line type alv
wa_fieldcat TYPE slis_fieldcat_alv, "declares the work area of the field catalog
it_list_top_of_page TYPE slis_t_listheader.
DATA: it_fieldcat1 TYPE slis_t_fieldcat_alv,
wa_fieldcat1 TYPE slis_fieldcat_alv.
DATA: V_FIELD(30) TYPE C,
V_VALUE(10) TYPE C.
"izontact TYPE TABLE OF zcontact.
"i_logo TYPE OT.
"ls_layout TYPE slis_layout_alv.
**Selection Screen details
*SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
*PARAMETERS: variant like disvariant-variant.
*SELECTION-SCREEN END OF BLOCK B1.
SELECT-OPTIONS:
age FOR wa_zcontact-age,
lastnme FOR wa_zcontact-lastname.
**Getting default variant
* AT SELECTION-SCREEN ON age.
* SELECT SINGLE age FROM zcontact INTO wa_zcontact-age WHERE age = age.
* IF sy-subrc NE 0.
* MESSAGE:'That age does not exist mate, Please enter another age' TYPE 'E'.
* ENDIF.
INITIALIZATION.
*gx_variant-report = sy-repid.
*CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
*EXPORTING
* I_SAVE = G_SAVE
* CHANGING
* CS_VARIANT = GX_VARIANT
* EXCEPTIONS
* NOT_FOUND = 2.
*IF SY-SUBRC = 0.
* VARIANT = GX_VARIANT-VARIANT.
* ENDIF.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_FIELDCATALOG.
PERFORM DISPLAY_ALV_REPORT.
PERFORM top_of_page.
"g_repid = sy-repid.
*Fetch data from the database
FORM DATA_RETRIEVAL.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE age IN age AND lastname IN lastnme.
"assigning traffic light colour to each row based on a condition
* IF wa_zcontact-age GE 65.
* wa_zcontact-icon = 1. "Red Traffic Light
* ELSEIF wa_zcontact-age BETWEEN 40 AND 64.
* wa_zcontact-icon = 2. "Yellow traffic light
* ELSE.
* wa_zcontact-icon = 3." Green traffic light
* ENDIF.
* MODIFY it_zcontact FROM wa_zcontact TRANSPORTING icon.
* CLEAR wa_zcontact.
ENDFORM.
FORM BUILD_FIELDCATALOG.
*Build field catalog
wa_fieldcat-fieldname = 'ID'.
"wa_fieldcat-seltext_m = 'The Contact ID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LASTNAME'.
"wa_fieldcat-seltext_m = 'Contact Lastname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'FIRSTNAME'.
"wa_fieldcat-seltext_m = 'Contact Firstname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'DOB'.
"wa_fieldcat-seltext_m = 'Date Of Birth'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'TEL'.
"wa_fieldcat-seltext_m = 'Telephone Number'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ADDRESS'.
"wa_fieldcat-seltext_m = 'The Address'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'OCCUPATION'.
"wa_fieldcat-seltext_m = 'The Occupation'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'WEIGHT'.
"wa_fieldcat-seltext_m = 'WEIGHT'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AGE'.
"wa_fieldcat-seltext_m = 'AGE OF THE CONTACT'.
wa_fieldcat-do_sum = 'X'. "Display column total
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'SALARY'.
"wa_fieldcat-seltext_m = 'SALARY'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
gd_layout-lights_fieldname = 'ICON'.
ENDFORM.
FORM DISPLAY_ALV_REPORT.
gd_repid = sy-repid.
*Pass data and field catalog to ALV function module to display ALV list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = it_fieldcat
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'ZCONTACT'
i_save = 'X'
is_variant = g_variant
is_layout = gd_layout
TABLES
t_outtab = it_zcontact
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
FORM top_of_page.
*ALV Header declarations
DATA: it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader,
t_line like wa_listheader-info,
ld_lines TYPE I,
ld_linesc(10) TYPE C.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Contact Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-repid.
wa_listheader-key = 'Program Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-uname.
wa_listheader-key = 'User Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Run Date :'.
CONCATENATE sy-datum+6(2)
sy-datum+4(2)
sy-datum(4)
INTO wa_listheader-info
SEPARATED BY '/'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Time :'.
CONCATENATE sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2)
INTO wa_listheader-info
SEPARATED BY ':'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'KLOGO'.
ENDFORM. "top_of_page
*& Form sub_user_command
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELTAB TYPE SLIS_SELFIELD.
CASE P_UCOMM.
WHEN '&IC1'.
CASE p_seltab-fieldname.
WHEN 'ID'.
READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
PERFORM DATA_RETRIEVAL1.
PERFORM BUILD_FIELDCATALOG1.
PERFORM SECOND_GRID.
ENDCASE.
ENDCASE.
ENDFORM. "
FORM DATA_RETRIEVAL1.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
ENDFORM.
FORM BUILD_FIELDCATALOG1.
*Build field catalog
CLEAR: wa_fieldcat, it_fieldcat.
wa_fieldcat-fieldname = 'ID'.
"wa_fieldcat-seltext_m = 'The Contact ID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LASTNAME'.
"wa_fieldcat-seltext_m = 'Contact Lastname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'FIRSTNAME'.
"wa_fieldcat-seltext_m = 'Contact Firstname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM.
FORM SECOND_GRID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = IT_FIELDCAT
i_structure_name = 'ZCONTACT'
i_callback_user_command = 'USER_COMMAND'
TABLES
T_OUTTAB = IT_ZCONTACT.
ENDFORM.Hi Ten Mariga,
I wonder why the second select Query is needed at all instead you can use
---> Not Needed
FORM DATA_RETRIEVAL1.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
ENDFORM.
----> Instead you can do
READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
Append wa_zcontact to Second_table.
And you can use the Second_table to display the second ALV. The second Select Query will affect the performance too.
Cheers,
Krishnakumar B. -
ESS Salary statemenr: Form Does not exist error
Hi Experts,
As mentioned in may threads, I have changed the form name for salary statement to the custom form name in SPRO- --> HRFOR
But the portal displays "Form does not exist" error. Could not find a solution in any existing post on sdn.
Urgent help needed.
Thanks,
ShobhitHi,
If your payslip form is desinged in PE51, then follow these steps.
Employee Self-Service-> Service-Specific Settings-> Benefits and Payment-> Salary Statement-> Form Using HR Forms Editor (PE51)
a. Edit Feature HRFOR: Maintain the constant $CEDT$ for MOLGA 40 RCLAS +01(03).
b. Enter Payslip variant in EDTIN feature
c. Maintain smartform name in EDPDF
If your payslip form is designed in HRFORMS, then enter the form name in HRFOR feature and enter the variant in EDTIN.
Cheers!!
Ashutosh -
Displaying multiple roles related to a single key value in a single view MVC 4
Dear Team,
My name is Ajay Sutar. I am newly learning MVC 4, as we are about to initiate a new project in ASP .NET MVC 4. I am using a details scaffolding to display a single
record. but now my single employee have multiple roles. As example,
Emp_no | Role | Salary
E1 | Software Engineer | 10000
E1 | Tester | 10000
as i have used Details scaffold and FirstOrDefault method of linq for this view, I am unable to display the second role "Tester" in the output. only first role is geeting displayed.
What i want is :
Emp_no : E1 Role: Software Engineer Salary:10000
TesterHello,
Welcome to MSDN forum.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Because you are working with ASP.NET Web Application, I suggest that you can consult your issue on ASP.NET forum:
http://forums.asp.net/
for better solution and support.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
C#: Building a SOFTWARE SOLUTION from scratch to finish
Hello good people of MSDN. I have a VERY SIMPLE REQUEST... (Here goes) I'm trying to build an Application (from scratch, custom specs) that allows the user to manage, organize and keep track of books that are available in a library. This system is to
-
External Multi Way Merge Sort in Java!
Hi guys, some month ago I've sent [this post|http://forums.sun.com/thread.jspa?forumID=31&threadID=5310310] to the Java Programming Forum to notify the availability of an External Multi Way Merge Sort written in Java, tuned and tested over GB of text
-
Move user files and preferences to new open directory log in
I have a machine that I have been using for a few months. I log in to the machine as an admin user. We just put in a new MAC OS X server and are going to be using Open Directory and probably Mobility on the users. Is it possible to move or duplicate
-
Bt Yahoo toolbar/Bookmarks
I am aware that Bookmarks has been undergoing an upgrade. When cliciking "Go to Bookmarks" a message saying this was displayed at the top of the page. Originally it said that work should be finished by 20th October 2011. Recently, it was changed to 3
-
When I try to transport content (iViews, pages, worksets, roles) from development server to Production server it fails and it give me the following message: The unit does not exist in the Pcd. It may have been deleted or renamed. Restart the editor.