Modify generated leave approval screen
I need to add a checkbox to the leave approval screen so that the manager can indicate if supporting documention has been sighted.
Task TS20000193 usea BO FORM-HTMLPROCESS to call program SAPMWS2000081H with transaction code WS20000081.
I tried copying the program and includes but there are more includes that are generated from I don't know where.
What is the correct/best way to modify screen 150 in this program?
Is there another way of going about it?
Hi Neil,
I probably shouldn't say this but... here's one exception to the rule about modifying SAP standard. Just change it. Make sure you have a backup available.
a) It's hellishly complex to copy as there are a lot of little objects that interact & it's quite nasty code with individual tasks hardcoded. seen. Some OSS notes even recommend changing bits of code when you change the WF tasks.
b) Any difficulties you may experience due to modding the standard will be less than the difficulties due to copying.
c) That incarnation of leave request has reached the end of it's life. The ECC6 version has been completely rewritten form scratch and shares no common elements with it whatsoever, so upgrade problems are also not a factor.
d) Because it's been around for some time I don't imagine there will be too many patches, which aren't that difficult to resolve anyway.
Cheers,
Mike
Similar Messages
-
3 Steps in Leave Approval screen
Hi,
In EP7/ECC6/webdynpro based ESS, when the approver has to approve the leave, it shows a wizard.
He has to press the approve button, enter comments, press review, then press Approve.
Is there any possibility to reduce the 3 steps to only 1 step, with comments in the same screen.
Also can we change the size of comments box?
Thank you.
Regards,
BoobalanHi Boobalan,
If I understand you right, you are using Webdynpro(GP interface) CO for the approver action. It is possible to perform the action in one step, i.e in the action of the button "Approve" call the complete method from the component controller.
In order to bring the comment in the same step, add the required UI element(Text Edit) to the approver View.
I hope this will help in solving your problem.
Let me know the result.
Regards
Sivaprasath -
Team Calendar in Read-Only Mode in Leave Request Approver Screen
Hi,
After lots of interaction and inputs in my previous thread,
Customization Done for 2 level approval of leave in ESS but Facing Problems
Our Team had decided to make the Team Calendar in Leave Request Approval Screen in Read-Only Mode (more precisely modus=TeamView)
My question is, is it possible to achieve the same, because instead of adding custom validations using Custom RFC, If it is possible to make the Team Calendar as Read-Only than it will help us to achieve our goals. Please do let us know that is it possible? and, if Yes, How to achieve it?
On leave request approval screen, we want Approver to take any action via "Show Worklist" and No User Action allowed on Team Calendar (Disabled but not InVisible).
Thanks,
Regards,
Tushar Shinde.This is the note 1484853 but as i said you cant see it unless you raise a Message for SAP , We have to add yout company to the note.
these are the steps
Symptom
In LeaveRequestApprover application, a higher level manager can
approve/reject a leave though he/she is not the owner of the approval
workitem (TS12300097). It happens when a higher level manager clicks on
the leave in the TeamCalendar launched from the LeaveRequestApprover
application.
Other terms
LeaveRequestApprover, TS12300097, prepare_select, WorkList,
LPT_ARQ_REQUEST_UIAF07
Reason and Prerequisites
Reason:- This is caused because the approve/reject button were not
restricted based on the logged in user.
Prerequisites:- IT105 entries for the backend PERNRs should be correctly
maintained.
You can check here
Object REPS LPT_ARQ_REQUEST_UIAF07
Object Header FUGR PT_ARQ_REQUEST_UIA
FORM PREPARE_SELECT
the note is meant for few customers only -
Problem in changing label in leave request approval screen
Hi All,
I have followed the SAP note 1234273 to change labels in our Leave request iViewin ESS and could do it successfullybut I could not able to know how to change the labels in Leave request approval screen because I have created a custom role and assigned Universal work list to it and assigned it to manager to view the leave requests applied. I navigated to Leave request approval screen via that role but ctrl + right click is not working on that page. Please suggest meCheck your uwl config, normally it is configured to directly call concerned(leave req approval) application hence your iview may not be getting called. You can try changing the uwl config to call PCD page instead of direct wdp application call.
~cheers
avadh -
Leave Approval in MSS Displays Only Header
Hi all,
I have a problem with leave approval in MSS using the MSS Add-On. I checked all the backend configurations and they seem OK. I modified the UWL config file following the SAP note (which by the way said the config file should have been updated when installing MSS Add-On - but that didn't happen!).
When I click on the leave request in UWL, a new screen opened and after a few seconds a blank header appears in the screen and nothing else. When I previewed the leave approval in portal content, it works.
I've searched for notes on this but nothing. Can anyone help?
Thanks in advance.Hi Krishan
solution is simple.
1. Raise an oss message and SAP would ask you to apply patch update from note 1720040.
I am not too sure if this would solve the problem.
Second option is
1. go to your uwl xml and in your default xml paste following code for task 21500003.
<ItemType name="uwl.task.webflow.TS21500003.SAP_ECC_HumanResources" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="defaultAction" executionMode="default">
<ItemTypeCriteria systemId="SAP_ECC_HumanResources" externalType=" TS21500003" connector="WebFlowConnector"/>
<CustomAttributes>
<CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="externalObjectId" objectType="WebflowContainer" cacheValidity="final">
<Attribute name="REQUESTID" type="string" displayName="Request ID"/>
</CustomAttributeSource>
</CustomAttributes>
<Actions>
<Action name="defaultAction" groupAction="" handler="ObjectNavigationLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
<Properties>
<Property name="ObjectValue" value="LRF_REQUEST_ID=${item.REQUESTID}"/>
<Property name="Operation" value="approveleaverequest"/>
<Property name="ObjectName" value="employee"/>
<Property name="openInNewWindow" value="true"/>
<Property name="System" value="SAP_ERP_HumanResources"/>
<Property name="DynamicParameter" value="LRF_REQUEST_ID=${item.REQUESTID}"/>
</Properties>
<Descriptions default="defaultAction"/>
</Action>
</Actions>
</ItemType>
After applying above if you still face same issue then download your mss addon 1.0 zip file from uwl admin page.
extract com.sap.pct.erp.mss.addon.xml from com.sap.pct.erp.mss.addon.zip.
paste above xml code for task 21500003 (please assure there is only one action for this task).
and UPLOAD THE com.sap.pct.erp.mss.addon.xml
Please make sure you upload the xml and not the zip. Please don't upload zip as that causes issues.
Please don't rename the zip to xml etc. upload the changed com.sap.pct.erp.mss.addon.xml.
After above it will work. in case there are issues please respond on this message. -
hi everyone,
I have modified the standard HR Leave approval Workflow WS002000077. In that workflow user decision, Unlock step type, loop steps are available. I am getting user decision workitem in inbox. When i click approve option, i has to go to unlock step type. But it is not going for unlock step.
The same scenario is working good without loop, i can able to unlock it.
So, in this scenario with loop, I am getting following errors;
1. variables of the work item cannot be generated.
2. Error in the evaluation of expression '&EMPLOYEET<???>.NAME&' for item '10'
3. Error when determining attribute 'NAME' of object instance '[BO.EMPLOYEET.]'
4. Agent determination for step '0000000038' failed
5. Source (expression '&EMPLOYEET.ADMINISTRATOR.ADMINISTRATOR&') of binding assignment is not available
6. Source (expression '&EMPLOYEET.ADMINISTRATOR.ADMINISTRATORGROUP&') of binding assignment is not avaible
7. Error in the evaluation of expression '&EMPLOYEET<???>.ADMINISTRATOR.ADMINISTRATORGROUP&' for ite
8. Error in the evaluation of expression '&EMPLOYEET<???>.ADMINISTRATOR.ADMINISTRATOR&' for item '10
here item '10' refers to loop step. I am using custom rule. It is working fine without loop condition.
Thanks in advance!!hi,
That one previous workflow and it solved. But now the same one with loop for Re-submission of Leave Request after change.
Actually the values from Employeet is not flowing in the Unlock step for agent determination. Because of that the agent determination is not possible for me. But it works well without loop scenario. Employeet is not instantiated.
Here i am using loop condition for re-submission of leave request.
Thanks,
Balaji.V
Edited by: Balajisap on Sep 19, 2011 3:56 PM
Edited by: Balajisap on Sep 19, 2011 6:22 PM -
Kludge to make less, vim et al. leave the screen uncluttered enjoy!
I have written a script which leaves the screen uncluttered when finishing less.
This script is written for bash in the "good old terminal", but works well with
iTerm too. I wrote this script because less is opposite of more as less is so
much more as more is so much less.
I hope you will use this script and reap the rewards of using less while reading
textfiles, gaining from less's features, avoiding the cluttering which may have
made you disliking using less. You can make a copy of the script and modify and wrap
the script around any other characterbased program which clutters your terminal screen.
The script works by beeing placed in your ~/bin which I assume is before
/usr/bin in your $PATH where the binary less resides. You must modify the paths
in the script if they are different from that. (both the binary less, the script,
and the kludge.scr)
The script installs an interrupthandler which are triggered by changing the
windowsize. The interupthandler figures out what it must do to preserve
your screen when you exit less, and just does so, except for four characters
to the extreme left on one line. (wich may well be part of your prompt).
The interrupthandler gets its work done, by calling a kludge which are
relatively referenced in the script from your homefolder, -presumes ~/bin
- YOU MUST EDIT THE SCRIPT OTHERWISE. The configuration is like it is because
that is what it takes to make the correct things happen in bash.
I think this could have been accomplished much easier using another shell,
but most people uses bash, especially newcomers, and they deserve to have
it as easy as possible, while reaping the productivity gains laying dormant
in the Unix core, so I hope you will share the script with you liberally,
if you think it is worth the time and the work it takes to "install" it.
I hope you will give this script a try, as to make less work comfortably for you,
I have included an environment variable with all settings I like in less, which
you may modify.
Less was the first program I had that made me think "wow" back in 1986, beeing used
to the "more" command, - which was, and is so much less than less. You can for instance
invoke BBedit with a file you are viewing in less by pressing "v" if you have BBedit
specified in the $EDITOR variable. You can pipe some text to the clipboard.
Or you can pipe some lines out of a document you are viewing in less and into
a file while viewing, you can load it with multiple files, and search them all,
a programemer can make less work with tagfiles; you can have less create a logfile
of what you read and, you can even scroll backwards. All in all less is a very handy
tool which I think everybody would gain from using,in opposite to more.
Especially when it leaves the screen uncluttered.
Great care have been taken in order to make this kludge work properly.
Still I MAKE ABSOLUTELY NO WARRANTIES ABOUT WHATSOEVER AND ANYTHING.
-USE IT AT YOUR OWN RISK.
You may do whatever you wish to do with it, aside from selling it alone, but you
are free to do whatever that you please with it, aside from distributing
malfunctioning copies or incomplete copies or tinker with the Copyright notice
in the scripts.
-------------------------------------------------- here comes the kludge for less - sends with you a tar as well. 8859 - encoded I think.
#! /bin/bash
# Less - lets us keep our screen nice even after resize, having used less or any other
# character based program - like vim, which may leave an unorderly screen.
# The fact that programs do clutter up the screen is because they probably didn't figure
# that we one day would be able to resize our terminals when they specified the standards at
# Ansi back in the 60's.
# Installing : put it together with "kludge.bash" in your $HOME/bin folder ( ~/bin ).
# its intended to work with the bash shell under MacOsX, the binary less is supposed
# to reside in /usr/bin, if it isnt; ("which less" reveals where), adjust the path.
# less - to be placed in the ~/bin folder is the wrap around less to make it behave
# Copyright 2008 Tommy Bollman Public Domain. -No WARRANTIES ABOUT WHAT SO EVER-
# Please do modify it for other programs which need helps with its cleanup as well.
# ~ is an expansion for your home directory aka /Users/John\ Doe
# Please document your version properly if you are posting it, relieving others.
export LESS=" -I -r -f -J -S -g -M -x 4"
# -I ignore case when searching
# -r "raw" do not preparate ctrl-chars,
# -f force open special files (may be binary) BEWARE OF ANSISEQUENCES.
# -J show status column
# -S chop long lines.
# -g highlight on last hit in the search.
# -M Most Verbose status column...
# -x 4 tabspacing = 4
# -------------------------------------- the screen handling starts here.................
ORIGLINES=$LINES
ESC=`printf "\e"`
ScreenRedraw_off=`echo -n "$ESC""[8m"`
ScreenRedraw_on=`echo -n "$ESC""[0m"`
function OkayScreen()
export PS1="" # Turns off the prompt to avoid cluttering..
echo -n ${ScreenRedraw_off}
CURLINES=`bash -i < ~/bin/kludge.bash `
# ^^^^^^^^^^^ NB! the path where kludge.bash should be placed.
if [ $CURLINES -gt $ORIGLINES ] ; then
TO_SKIP="$(expr "$CURLINES" '-' "$ORIGLINES")"
if [ $TO_SKIP -lt 3 ] ; then
TO_SKIP="$(expr "$TO_SKIP" '-' '2')"
else
TO_SKIP="$(expr "$TO_SKIP" '-' '1')"
fi
tput cuu 1 #cursor up one line
echo -n ${ScreenRedraw_on}
echo -n "\$####" #restores an erased '$' making only 3 chars disappear.
# ^ $ = prompt - $PS1. .(I have just a dollar here but if yours is longer,
# you can add the first four if it's static, and you'll loose nothing!!)
echo -n ${ScreenRedraw_off}
tput cud $TO_SKIP # move cursor to where it should be.
echo -n ${ScreenRedraw_on}
echo # activate the cli at correct position.
else
tput cuu 2
echo ${ScreenRedraw_on}
fi
trap OkayScreen SIGWINCH
/usr/bin/less $@
# ^^^^^^^^ NB! The path where the BINARY less is installed.
trap '' SIGWINCH
-------------------------------------------------------------------------------- and here is the kludge wich makes it all work!
#! /bin/bash
# kludge.scr - to be placed in the ~/bin folder is the inner workings of the bash script named less
# Copyright 2008 Tommy Bollman
PS1=""
shopt -s checkwinsize
echo $LINES
----><---------------------- EOF.I have written a script which leaves the screen uncluttered when finishing less.
This script is written for bash in the "good old terminal", but works well with
iTerm too. I wrote this script because less is opposite of more as less is so
much more as more is so much less.
I hope you will use this script and reap the rewards of using less while reading
textfiles, gaining from less's features, avoiding the cluttering which may have
made you disliking using less. You can make a copy of the script and modify and wrap
the script around any other characterbased program which clutters your terminal screen.
The script works by beeing placed in your ~/bin which I assume is before
/usr/bin in your $PATH where the binary less resides. You must modify the paths
in the script if they are different from that. (both the binary less, the script,
and the kludge.scr)
The script installs an interrupthandler which are triggered by changing the
windowsize. The interupthandler figures out what it must do to preserve
your screen when you exit less, and just does so, except for four characters
to the extreme left on one line. (wich may well be part of your prompt).
The interrupthandler gets its work done, by calling a kludge which are
relatively referenced in the script from your homefolder, -presumes ~/bin
- YOU MUST EDIT THE SCRIPT OTHERWISE. The configuration is like it is because
that is what it takes to make the correct things happen in bash.
I think this could have been accomplished much easier using another shell,
but most people uses bash, especially newcomers, and they deserve to have
it as easy as possible, while reaping the productivity gains laying dormant
in the Unix core, so I hope you will share the script with you liberally,
if you think it is worth the time and the work it takes to "install" it.
I hope you will give this script a try, as to make less work comfortably for you,
I have included an environment variable with all settings I like in less, which
you may modify.
Less was the first program I had that made me think "wow" back in 1986, beeing used
to the "more" command, - which was, and is so much less than less. You can for instance
invoke BBedit with a file you are viewing in less by pressing "v" if you have BBedit
specified in the $EDITOR variable. You can pipe some text to the clipboard.
Or you can pipe some lines out of a document you are viewing in less and into
a file while viewing, you can load it with multiple files, and search them all,
a programemer can make less work with tagfiles; you can have less create a logfile
of what you read and, you can even scroll backwards. All in all less is a very handy
tool which I think everybody would gain from using,in opposite to more.
Especially when it leaves the screen uncluttered.
Great care have been taken in order to make this kludge work properly.
Still I MAKE ABSOLUTELY NO WARRANTIES ABOUT WHATSOEVER AND ANYTHING.
-USE IT AT YOUR OWN RISK.
You may do whatever you wish to do with it, aside from selling it alone, but you
are free to do whatever that you please with it, aside from distributing
malfunctioning copies or incomplete copies or tinker with the Copyright notice
in the scripts.
-------------------------------------------------- here comes the kludge for less - sends with you a tar as well. 8859 - encoded I think.
#! /bin/bash
# Less - lets us keep our screen nice even after resize, having used less or any other
# character based program - like vim, which may leave an unorderly screen.
# The fact that programs do clutter up the screen is because they probably didn't figure
# that we one day would be able to resize our terminals when they specified the standards at
# Ansi back in the 60's.
# Installing : put it together with "kludge.bash" in your $HOME/bin folder ( ~/bin ).
# its intended to work with the bash shell under MacOsX, the binary less is supposed
# to reside in /usr/bin, if it isnt; ("which less" reveals where), adjust the path.
# less - to be placed in the ~/bin folder is the wrap around less to make it behave
# Copyright 2008 Tommy Bollman Public Domain. -No WARRANTIES ABOUT WHAT SO EVER-
# Please do modify it for other programs which need helps with its cleanup as well.
# ~ is an expansion for your home directory aka /Users/John\ Doe
# Please document your version properly if you are posting it, relieving others.
export LESS=" -I -r -f -J -S -g -M -x 4"
# -I ignore case when searching
# -r "raw" do not preparate ctrl-chars,
# -f force open special files (may be binary) BEWARE OF ANSISEQUENCES.
# -J show status column
# -S chop long lines.
# -g highlight on last hit in the search.
# -M Most Verbose status column...
# -x 4 tabspacing = 4
# -------------------------------------- the screen handling starts here.................
ORIGLINES=$LINES
ESC=`printf "\e"`
ScreenRedraw_off=`echo -n "$ESC""[8m"`
ScreenRedraw_on=`echo -n "$ESC""[0m"`
function OkayScreen()
export PS1="" # Turns off the prompt to avoid cluttering..
echo -n ${ScreenRedraw_off}
CURLINES=`bash -i < ~/bin/kludge.bash `
# ^^^^^^^^^^^ NB! the path where kludge.bash should be placed.
if [ $CURLINES -gt $ORIGLINES ] ; then
TO_SKIP="$(expr "$CURLINES" '-' "$ORIGLINES")"
if [ $TO_SKIP -lt 3 ] ; then
TO_SKIP="$(expr "$TO_SKIP" '-' '2')"
else
TO_SKIP="$(expr "$TO_SKIP" '-' '1')"
fi
tput cuu 1 #cursor up one line
echo -n ${ScreenRedraw_on}
echo -n "\$####" #restores an erased '$' making only 3 chars disappear.
# ^ $ = prompt - $PS1. .(I have just a dollar here but if yours is longer,
# you can add the first four if it's static, and you'll loose nothing!!)
echo -n ${ScreenRedraw_off}
tput cud $TO_SKIP # move cursor to where it should be.
echo -n ${ScreenRedraw_on}
echo # activate the cli at correct position.
else
tput cuu 2
echo ${ScreenRedraw_on}
fi
trap OkayScreen SIGWINCH
/usr/bin/less $@
# ^^^^^^^^ NB! The path where the BINARY less is installed.
trap '' SIGWINCH
-------------------------------------------------------------------------------- and here is the kludge wich makes it all work!
#! /bin/bash
# kludge.scr - to be placed in the ~/bin folder is the inner workings of the bash script named less
# Copyright 2008 Tommy Bollman
PS1=""
shopt -s checkwinsize
echo $LINES
----><---------------------- EOF. -
Error while opening the leave approval
Dears,
We are getting an error as "Attribute HR_NTF_EMBEDDED_REGION with value JSP:/OA_HTML/OA.jsp?OAFunc=-&HR_EMBEDDED_REGION-&NtfId=-&#NID- refers invalid framework URL" while a user is opening the approval screen for a leave of his sub ordinate. It seems that no one has the issue apart from this person though. Any advice please? It was working fine so far...Version 12.1.3....11g DB....Hi,
I have asked the approver to reject the transaction and informed teh sub ordinate to try again. I will keep you guys posted of how it goes. -
Leave to screen 0 does not branch to initialization event (ALV)
Hi All,
I'm new at this forum thing so be gentle. I have created the standard custom control in a new screen, setup the field catalog and other parameters and when I call the screen and do the :
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'ZTMR_EVAL_GRID'.
CREATE OBJECT g_grid
EXPORTING
i_parent = g_custom_container.
CLEAR wa_disvariant.
wa_disvariant-report = sy-repid.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_variant = wa_disvariant
i_save = 'A'
is_layout = wa_layout
CHANGING
it_outtab = detail_tab[]
it_fieldcatalog = itab_fldcat
it_sort = itab_sort.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_top_of_page FOR g_grid.
ENDIF.
, everything works great. The problem occurs when hit the BACK button in my PAI module, it returns to the line after the CALL SCREEN XXX, ENDFORM, PERFORM output_alv_grid_report and then branches to :
FUNCTION hrpy_process_fire_event in the source code of LHRST1U01 in the main program SAPLHRST1.
It does this instead of branching to the INITIALIZATION event (selection-screen) which is what it's supposed to do?
Any help would be greatly appreciated - Thanks in advance,
Jimhi,
REPORT ZTEST1234_ALV_TOP MESSAGE-ID ZZ .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
V_FLAG,
V_DATA_CHANGE,
V_ROW TYPE LVC_S_ROW,
V_COLUMN TYPE LVC_S_COL,
V_ROW_NUM TYPE LVC_S_ROID.
"The Below Definitions Must.....
DATA:
* Reference to document
DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT,
* Reference to split container
DG_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
* Reference to grid container
DG_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER,
* Reference to html container
DG_HTML_CNTRL TYPE REF TO CL_GUI_HTML_VIEWER,
* Reference to html container
DG_PARENT_HTML TYPE REF TO CL_GUI_CONTAINER.
"up to here
* CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
**Double Click Handler
HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO,
TOP_OF_PAGE FOR EVENT TOP_OF_PAGE "event handler
OF CL_GUI_ALV_GRID
IMPORTING E_DYNDOC_ID.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
METHOD HANDLE_HOTSPOT_CLICK .
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW_ID.
V_COLUMN = E_COLUMN_ID.
V_ROW_NUM = ES_ROW_NO.
MESSAGE I000 WITH V_ROW 'clicked'.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
ENDMETHOD. "handle_double_click
METHOD TOP_OF_PAGE. "implementation
* Top-of-page event
PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
ENDMETHOD. "top_of_page
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
*& Global Definitions
DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM,
G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
GS_LAYOUT TYPE LVC_S_LAYO.
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
X_FIELDCAT TYPE LVC_S_FCAT,
LS_VARI TYPE DISVARIANT.
* START-OF_SELECTION
START-OF-SELECTION.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(10),
END OF ITAB.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
END-OF-SELECTION.
IF NOT ITAB[] IS INITIAL.
<b>CALL SCREEN 100.</b>
ELSE.
MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
ENDIF.
*& Form CREATE_AND_INIT_ALV
* text
FORM CREATE_AND_INIT_ALV .
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
"attention.....from here
"split your container here...into two parts
"create the container
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
"this is for top of page
* Create TOP-Document
CREATE OBJECT DG_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
* Create Splitter for custom_container
CREATE OBJECT DG_SPLITTER
EXPORTING PARENT = G_CUSTOM_CONTAINER
ROWS = 2
COLUMNS = 1.
* Split the custom_container to two containers and move the reference
* to receiving containers g_parent_html and g_parent_grid
"i am allocating the space for grid and top of page
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_HTML.
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_GRID.
"you can set the height of it
* Set height for g_parent_html
CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
EXPORTING
ID = 1
HEIGHT = 5.
"from here as usual..you need to specify parent as splitter part
"which we alloted for grid
CREATE OBJECT G_GRID
EXPORTING I_PARENT = DG_PARENT_GRID.
* Set a titlebar for the grid control
CLEAR GS_LAYOUT.
GS_LAYOUT-GRID_TITLE = TEXT-003.
GS_LAYOUT-ZEBRA = SPACE.
GS_LAYOUT-CWIDTH_OPT = 'X'.
GS_LAYOUT-NO_ROWMARK = 'X'.
GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
CREATE OBJECT G_HANDLER.
SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
DATA: L_INDEX TYPE SY-TABIX.
"Here i am changing the color of line 1,5,10...
"so you can change the color of font conditionally
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
LS_CELLCOLOR-FNAME = 'VBELN'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
LS_CELLCOLOR-FNAME = 'POSNR'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
ENDLOOP.
* setting focus for created grid control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
PERFORM BUILD_FIELDCAT.
PERFORM SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
LS_VARI-REPORT = SY-REPID.
LS_VARI-HANDLE = SPACE.
LS_VARI-LOG_GROUP = SPACE.
LS_VARI-USERNAME = SPACE.
LS_VARI-VARIANT = SPACE.
LS_VARI-TEXT = SPACE.
LS_VARI-DEPENDVARS = SPACE.
**Calling the Method for ALV output
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = LS_VARI
IS_LAYOUT = GS_LAYOUT
I_SAVE = 'A'
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
"do these..{
* Initializing document
CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
* Processing events
CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = DG_DYNDOC_ID.
"end }
* Set editable cells to ready for input initially
CALL METHOD G_GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
* text
* -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA LS_EXCLUDE TYPE UI_FUNC.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_fieldcat
* Fieldcatalog
FORM BUILD_FIELDCAT .
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-HOTSPOT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Item'(025).
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
X_FIELDCAT-FIELDNAME = 'DROP'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-DRDN_HNDL = '1'.
X_FIELDCAT-DRDN_ALIAS = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " build_fieldcat
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
PERFORM CREATE_AND_INIT_ALV.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form SET_DRDN_TABLE
* text
FORM SET_DRDN_TABLE.
DATA:LT_DRAL TYPE LVC_T_DRAL,
LS_DRAL TYPE LVC_S_DRAL.
LOOP AT ITAB .
* First listbox (handle '1').
IF SY-INDEX = 1.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ' '.
LS_DRAL-INT_VALUE = ' '.
ELSE.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ITAB-POSNR.
LS_DRAL-INT_VALUE = ITAB-POSNR.
ENDIF.
APPEND LS_DRAL TO LT_DRAL.
ENDLOOP.
**Setting the Drop down table for Reason Code
CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM. " set_drdn_table
*& Form EVENT_TOP_OF_PAGE
* text
* -->DG_DYNDOC_ID text
FORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
"this is more clear.....check it
"first add text, then pass it to comentry write fm
DATA : DL_TEXT(255) TYPE C. "Text
* Populating header to top-of-page
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Test Report'
SAP_STYLE = CL_DD_AREA=>HEADING.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move program ID
CONCATENATE 'Program Name :' SY-REPID
INTO DL_TEXT SEPARATED BY SPACE.
* Add Program Name to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move User ID
CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
* Add User ID to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move Client
CONCATENATE 'Client :' SY-MANDT INTO DL_TEXT SEPARATED BY SPACE.
* Add Client to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move date
WRITE SY-DATUM TO DL_TEXT.
CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Date to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move time
WRITE SY-UZEIT TO DL_TEXT.
CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Time to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
* Populating data to html control
PERFORM HTML.
ENDFORM. " EVENT_TOP_OF_PAGE
*& Form ADD_TEXT
* To add Text
FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
* Adding text
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = P_TEXT
SAP_EMPHASIS = CL_DD_AREA=>HEADING.
ENDFORM. " ADD_TEXT
*& Form HTML
* text
FORM HTML.
DATA : DL_LENGTH TYPE I, " Length
DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
* Creating html control
IF DG_HTML_CNTRL IS INITIAL.
CREATE OBJECT DG_HTML_CNTRL
EXPORTING
PARENT = DG_PARENT_HTML.
ENDIF.
* Reuse_alv_grid_commentary_set
CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
EXPORTING
DOCUMENT = DG_DYNDOC_ID
BOTTOM = SPACE
IMPORTING
LENGTH = DL_LENGTH.
* Get TOP->HTML_TABLE ready
CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
* Set wallpaper
CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
EXPORTING
PICTURE_ID = DL_BACKGROUND_ID.
* Connect TOP document to HTML-Control
DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
* Display TOP document
CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
EXPORTING
REUSE_CONTROL = 'X'
PARENT = DG_PARENT_HTML
EXCEPTIONS
HTML_DISPLAY_ERROR = 1.
IF SY-SUBRC NE 0.
MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
ENDIF.
ENDFORM. " HTML
Regards
Vijay -
CATS: BAPI to read submitted leaves/ approved leaves/rejected leaves?
i am using Bapi BAPI_CATIMESHEETMGR_INSERT to create records, is there a way to read data of all submitted leaves/ approved leaves/rejected leaves?
if i want to achieve above how can i do it, with out custom abap.. any RFCs/BAPIS for the same?
BAPI_CATIMESHEETRECORD_GETLIST gives back only the released data records.
But i am looking for a Bapi using which i can read rejected records that go for approval to manager and gets rejected and same with approved ones.
also is there a way to read Saved records but not released? kinda like looking at drafts?
also is there a Bapi using which i can do CATS Transfer (similar to tcode CATA)?
wanna do transfer to Hr.
Pls advice.
Edited by: Hruser on Jun 26, 2008 4:40 PMAs far as i know there is no standard bapi available as you indicate but you could always modify one ;).
For Transfer you need to use rptextpt or cat6 there are standard
reports available -
Leave Approval: Another superior in case present superior absent
Hi all,
I have a requirement with the Leave request ( WS2000081) . In the standard scenario, the leave request goes to Approver and he approves it.
My business requirement is that in case the Leave approver is absent it should go to the superior's superior(that will be decided) . Any idea how to go about it ? How should one go about modifying the workflow?
any help is appreciated.
Regards
PNSubstitution is a good option which was implemented.
-
Hello SRM Experts,
I appreciate all the information that this forum has provided . It has been a great help.
We have an issue with which we need some help .We have approvers who have to approve multiple shopping carts. So they logon to SRM and open the Approval screen. Now they might be on that screen for a few minutes and they have to leave the SRM screen and look at some other stuff like email or some meetings.. They are bought back to the SRM approval screen every few minutes.In certain cases we have had approvers who are in the middle of writing emails or doing some important stuff and all of sudden they are taken to the SRM approval screen. It seems that the SRM approval screen refreshes every few minutes and the system takes them from the screen that they are working on to the SRM approval screen . Is it possible to change this? Let me know if you need any other information from me.
regards,
Yoginder Kaura.Hi
Which SRM version are you using ?
As Pierre told, This is standard functionality. MEanwhile, you can try out the following SAP OSS Notes, which will help ->
Note 969828 - BBPSC01: Continual Refresh on Change of Cost Assignment
Note 636910 - Shopping cart in approval although already authorized
When this refresh takes place ?
Also Try increasing the refersh counter values for Internet service BBPSTART, BBPAPPROVAL, BBPSC01 etc using SICF Transaction ...
Do let me know.
Regards
- Atul -
Substitute - Leave Approval in POWL
Hi
How can i activate "Substitute" button in POWL screen for Leave Approval query ?
Thankscheck here further http://scn.sap.com/thread/3535795 http://scn.sap.com/community/erp/hcm/employee-self-service/blog/2013/02/07/all-that-is-needed-for-configuring-substitution-in-mss
-
Error in generating a sel-screen.
friends,
am getting an error while activating a report saying that error in generating the sel. screen 1000 in line 0....also, am not able to select the selection-texts (in the goto->text elements), which says there aer serious syntax errors...pl help..thanks all..
here is my selection-screen declaration code
SELECTION-SCREEN BEGIN OF BLOCK APPLICATION WITH FRAME TITLE TEXT-002.
PARAMETERS:
PM_WERKS LIKE MSEG-WERKS OBLIGATORY DEFAULT '1000',
PM_MJAHR LIKE MKPF-MJAHR OBLIGATORY DEFAULT SY-DATLO.
SELECT-OPTIONS:
PM_MBLNR FOR MSEG-MBLNR NO-EXTENSION MEMORY ID MBN.
PARAMETERS :
PM_LGORT LIKE MSEG-LGORT OBLIGATORY DEFAULT '1001',
PM_BUDAT LIKE MKPF-BUDAT.
SELECTION-SCREEN END OF BLOCK APPLICATION.Hi Satish,
i am not facing any kind of problem with your code. can you check it once.
TABLES: mseg.
SELECTION-SCREEN BEGIN OF BLOCK application WITH FRAME TITLE text-002.
PARAMETERS:
pm_werks LIKE mseg-werks OBLIGATORY DEFAULT '1000',
pm_mjahr LIKE mkpf-mjahr OBLIGATORY DEFAULT sy-datlo.
SELECT-OPTIONS:
pm_mblnr FOR mseg-mblnr NO-EXTENSION MEMORY ID mbn.
PARAMETERS :
pm_lgort LIKE mseg-lgort OBLIGATORY DEFAULT '1001',
pm_budat LIKE mkpf-budat.
SELECTION-SCREEN END OF BLOCK application.
Regards
Vijay -
What is the diffrence of 'call screen 100' and 'leave to screen 100'
Thank u
hi,
You can insert a screen sequence. This adds another layer to a stack.
You insert a screen sequence using the CALL SCREEN <nnnn> statement.
Note: Layers created in this way must be removed afterwards. You can do this by setting the next screen
statically or dynamically to the initial value (0) an the end of the inserted screen sequence.
To interrupt processing of the current screen and branch to a new screen (or sequence of screens), use
the CALL SCREEN <nnnn> statement. The screen <nnnn> must belong to the same program.
In the program, the system constructs a stack. The stack has to be destroyed before the end of the
program.
To return to the statement following the CALL SCREEN statement, you can use either SET SCREEN 0.
LEAVE SCREEN. or LEAVE TO SCREEN 0. The screen that called the other screen is then processed
further.
If you use the above statements outside a call chain, the program terminates, and control returns to the
point from which it was called. You can also terminate a program using the ABAP statement LEAVE
PROGRAM.
To interrupt processing of the current screen and branch to a new screen (or sequence of screens), use
the CALL SCREEN <nnnn> statement. The screen <nnnn> must belong to the same program.
In the program, the system constructs a stack. The stack has to be destroyed before the end of the program.
To return to the statement following the CALL SCREEN statement, you can use either SET SCREEN 0.
LEAVE SCREEN. or LEAVE TO SCREEN 0. The screen that called the other screen is then processed
further.
To specify the next screen and leave the current screen in a single step, use the LEAVE TO SCREEN <nnnn> statement.
Hope this helps, DO reward.
Edited by: Runal Singh on Apr 3, 2008 3:11 PM
Maybe you are looking for
-
Error on ASA5505: "IKE Receiver: Error reading from socket."
Hi, I'm expecting a problem with the network of a customer. He has one ASA5505 connected to 2 RV082 using VPN IPSec (1 top office and 2 remote sites). Each sites have 2 internet ADSL providers: "Provider A" and "Provider B" for backup purpose. The re
-
When I go to compose a new iMessage to someone, it always shows up green and sends as a text message. Once they respond with an iMessage then my phone realizes to send iMessages instead of texts. Only does it when composing a new message. HELP!
-
Doubt about ERP 6.0 and NW 7.0 SP-Stack
Hello, I have doubt regarding SP-Stack of ERP 6.0 and NW 7.0, while i am checking SP-Stack for ERP 6.0 it is showing latest SP is 15 and while checking NW 7.0 Stack it is showing latest SP 17. Is there any diffrance between SP Stacks. As we have have
-
Flash CS4 forcibly limits useable screen area when working with a tablet
How do I fix it? I've tried re-installing flash, re-installing my wacom driver, restarting my computer, and changing my settings. Nothing seems to work, and it's only when I open up a file, when I have the file selection menu open I have free reig
-
Revision: 13636 Revision: 13636 Author: [email protected] Date: 2010-01-19 14:48:24 -0800 (Tue, 19 Jan 2010) Log Message: Adding the SMILPlugin to the DynamicStreamingSample. Modified Paths: osmf/trunk/apps/samples/framework/DynamicStreamin