Custom Buttons In Template Issue - Arrgh!
Hi,
I created a custom button in Photoshop, using the layer method specified in grayscale. I then created a custom template with six of these buttons. Then I imported a movie with embedded chapter indexes. When I drag this movie to an empty menu window and select my custom template for chapter index creation, the individual chapter video frames do not appear in the buttons, even though the text of these chapters do. The mask for the asset is set to white. If I drag an asset to the buttons, everything looks ok. What gives?.
I found a solution. I picked an Apple (heh) motion button and created a menu template with that button. Then I dragged my custom shape over each motion button and selected Set Shape. That created the motion buttons with my desired shape. I had to adjust the size and position of the new buttons, but at least it worked. I might also have changed the buttons to drop zones without all this work, but that's for another time.
Similar Messages
-
Custom Alert Email Templates Issue - List Alerts emails not using customized XML alert template
I have recently customized the XML alerts template (AlertTemplates.xml) for our site collection in SharePoint 2010 to exclude specific fields in the email when users who have subscribed to a list using the "Alert Me" feature. I
have renamed the custom alerts XML file and loaded the custom template in the following directory (%ProgramFiles%\Common Files\Microsoft Shared\Web server extensions\14\TEMPLATE\XML) and
restarted IIS. Once users subscribe to the alerts using the list using the "alert me" function they received the customized email as intended.
We needed to auto-subscribe users to the email alerts so what I did was used a powershell script to add users to the alert subscriptions using the script shown in below:
Import-Csv D:\Temp\filename.csv | ForEach-Object{
$webUrl=$_.WebUrl
$listTitle=$_.List
$alertTitle=$_.AlertTitle
$subscribedUser=$_.SubscribedUser
$alertType=$_.AlertType
$deliveryChannel=$_.DeliveryChannel
$eventType=$_.EventType
$frequency=$_.Frequency
$oldAlertID=$_.ID
$web=Get-SPWeb $webUrl
$testAlert = $web.Alerts | WHERE { $_.ID -eq $oldAlertID }
IF ($testAlert) {
$web.Alerts.Delete([GUID]$oldAlertID)
Write-Host Old alert $oldAlertID deleted. -Foregroundcolor Cyan
$list=$web.Lists.TryGetList($listTitle)
$user = $web.EnsureUser($subscribedUser)
$newAlert = $user.Alerts.Add()
$newAlert.Title = $alertTitle
$newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::$alertType
$newAlert.List = $list
$newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::$deliveryChannel
$newAlert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
$newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::$frequency
if($frequency -ne "Immediate"){
$AlertTime=$_.AlertTime
$newAlert.AlertTime=$AlertTime
$newAlert.Update()
Write-Host Created $newAlert.Title for $subscribedUser . -Foregroundcolor Cyan
} ELSE {
Write-Host Alert $alertTitle for $subscribedUser already done. Moving on. -Foregroundcolor Magenta
When I ran the script and added the users and restarted the service, all users who were auto-subscribed via this method would get the email without the customizations that were done in the custom template. All users who manually subscribed to the list
using the "Alert Me" function would get the customized email.
Does anyone know why users who manually subscribe would get the custom email alert and why users who were auto-subscribed using the powershell script do not get the custom email alert?Hi ,
According to your description, my understanding is that users who were auto-subscribed using the PowerShell script do not get the custom email alert.
For your issue, it can be caused by the auto-subscribed alert email which is generated by PowerShell script is using OOTB alert template. You can add the following script into your script for setting
the alerts’ alert email template:
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$AlertsTemplateCollection =new-object Microsoft.SharePoint.SPAlertTemplateCollection($contentService)
$newAlert.AlertTemplate = $AlertsTemplateCollection["YOUR_UNIQUE_TEMPLATE_NAME_VALUE"]
Reference:
http://sadomovalex.blogspot.com/2012/03/one-problem-with-updating-alert.html
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
contact [email protected]
Eric Tao
TechNet Community Support -
Custom Email Alert Template Issue - Users not getting customized emails
I have recently customized the XML alerts template (AlertTemplates.xml) for our site collection in SharePoint 2010 to exclude specific fields in the email when users who have subscribed to a list using the "Alert Me" feature. I have renamed
the custom alerts XML file and loaded the custom template in the following directory (%ProgramFiles%\Common Files\Microsoft Shared\Web server extensions\14\TEMPLATE\XML) and restarted IIS. Once users subscribe to the alerts using the list using the "alert
me" function they received the customized email as intended.
We needed to auto-subscribe users to the email alerts so what I did was used a powershell script to add users to the alert subscriptions using the script shown in below:
Import-Csv D:\Temp\filename.csv | ForEach-Object{
$webUrl=$_.WebUrl
$listTitle=$_.List
$alertTitle=$_.AlertTitle
$subscribedUser=$_.SubscribedUser
$alertType=$_.AlertType
$deliveryChannel=$_.DeliveryChannel
$eventType=$_.EventType
$frequency=$_.Frequency
$oldAlertID=$_.ID
$web=Get-SPWeb $webUrl
$testAlert = $web.Alerts | WHERE { $_.ID -eq $oldAlertID }
IF ($testAlert) {
$web.Alerts.Delete([GUID]$oldAlertID)
Write-Host Old alert $oldAlertID deleted. -Foregroundcolor Cyan
$list=$web.Lists.TryGetList($listTitle)
$user = $web.EnsureUser($subscribedUser)
$newAlert = $user.Alerts.Add()
$newAlert.Title = $alertTitle
$newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::$alertType
$newAlert.List = $list
$newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::$deliveryChannel
$newAlert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
$newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::$frequency
if($frequency -ne "Immediate"){
$AlertTime=$_.AlertTime
$newAlert.AlertTime=$AlertTime
$newAlert.Update()
Write-Host Created $newAlert.Title for $subscribedUser . -Foregroundcolor Cyan
} ELSE {
Write-Host Alert $alertTitle for $subscribedUser already done. Moving on. -Foregroundcolor Magenta
When I ran the script and added the users and restarted the service, all users who were auto-subscribed via this method would get the email without the customizations that were done in the custom template.
All users who manually subscribed to the list using the "Alert Me" function would get the customized email.
Does anyone know why users who manually subscribe would get the custom email alert and why users who were auto-subscribed using the powershell script do not get the custom email alert?Hi,
To deploy custom alert template file, we would load changes into SharePoint and restart SharePoint 2010 Timer Service from Windows Service. If you create your own AlertTemplate in the custom_alerttemplates.xml, you will need to set the set the SPList.AlertTemplate
property of the list. Then delete and re-subscribe to the alerts for the list.
Please refer to:
http://blog.zebsadiq.com/post/SharePoint-2010-custom-alert-template.aspx
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
We have recently customized the XML alerts template (AlertTemplates.xml) for our site collection in SharePoint 2010 to exclude specific fields in the email when users who have subscribed using the "Alert Me" feature. We have renamed the
custom alerts XML file and loaded the custom template in the following directory (%ProgramFiles%\Common Files\Microsoft Shared\Web server extensions\14\TEMPLATE\XML) and restarted IIS. Once users subscribe to the alerts using the list "alert me"
function they received the customized email as intended.
We needed to auto-subscribe users to the email alerts so what we did was use a powershell script to add users to the alert subscriptions using the script shown below:
Import-Csv D:\Temp\filename.csv | ForEach-Object{
$webUrl=$_.WebUrl
$listTitle=$_.List
$alertTitle=$_.AlertTitle
$subscribedUser=$_.SubscribedUser
$alertType=$_.AlertType
$deliveryChannel=$_.DeliveryChannel
$eventType=$_.EventType
$frequency=$_.Frequency
$oldAlertID=$_.ID
$web=Get-SPWeb $webUrl
$testAlert = $web.Alerts | WHERE { $_.ID -eq $oldAlertID }
IF ($testAlert) {
$web.Alerts.Delete([GUID]$oldAlertID)
Write-Host Old alert $oldAlertID deleted. -Foregroundcolor Cyan
$list=$web.Lists.TryGetList($listTitle)
$user = $web.EnsureUser($subscribedUser)
$newAlert = $user.Alerts.Add()
$newAlert.Title = $alertTitle
$newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::$alertType
$newAlert.List = $list
$newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::$deliveryChannel
$newAlert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
$newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::$frequency
if($frequency -ne "Immediate"){
$AlertTime=$_.AlertTime
$newAlert.AlertTime=$AlertTime
$newAlert.Update()
Write-Host Created $newAlert.Title for $subscribedUser . -Foregroundcolor Cyan
} ELSE {
Write-Host Alert $alertTitle for $subscribedUser already done. Moving on. -Foregroundcolor Magenta
When we ran the script and added the users and restarted the service, all users who were auto-subscribed via this method get the email without the customizations that were done in teh custom alert template. All users who manually subscribed on their
own to the list using the "Alert Me" function would get the customized email.
Does anyone know why users who manually subscribe to the alerts get the customized email, and users who were auto-subscribed using the powershell script do not get the customized email and get the standard generic email template?Hi ,
According to your code, it create a new alert using SPUser.Alerts.Add() method. For this method, it will create a new alert based on the predefined alert template by default.
If you only assigned the custom alert template to the list, users who manually subscribe to the alerts get the customized email, but users who were auto-subscribed using the PowerShell script get the standard
generic email template.
For your issue, you can set the new alert ‘s alert template:
http://social.technet.microsoft.com/Forums/en-US/1b19c12f-fc37-48cf-8b59-6c09f095dc23/custom-alert-email-templates-issue-list-alerts-emails-not-using-customized-xml-alert-template?forum=sharepointgeneralprevious
Here is a good blog you can have a look:
http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
contact [email protected]
Eric Tao
TechNet Community Support -
Custom Button Rendering/Disabling with Velocity Templates [SOLVED]
I have a custom button in my application that I only want to show up on specific pages and I can't seem to figure out a EL expression that will let me disable or not render the button on the following criteria,
- The velocity template will be installed on tableForm configured groups.
- I only want the button to be activated/visable when in the 'Details' view for a specific row
- When the group has insertions permitted.
I have tried to steal some code from the *.vm files for other buttons and items used by JHeadstart, but none of the expressions seem to be solving my problem. I have always found the Data Binding through EL Expressions with the ADF very confusing to work with so any guidance would be greatly appreciated. (Is there a way to 'debug' EL expressions to see the actual data that is available to me at any given time?)
Thanks.
Message was edited by:
M.Ruston
Message was edited by:
M.RustonMy Case is :
The code of my button in Custom Template :
<af:commandButton text="Zone Charge Group Details"
rendered="true" disabled="false" immediate="true" >
<f:actionListener type="oracle.jheadstart.controller.jsf.listener.DoRollbackActionListener"/>
<af:resetActionListener/>
</af:commandButton>
my Custom Template is running successfully and button appear in runtime
But I want re-write this code so that this button is binded with a method in Managed Bean
Scenario is :
when click the button in a page, it calls a method in that Bean and pass a parameter to it.
And the ouptut of this method is displayed in another page.
There is no Error message....
Please, If you don't understand anything, Ask me .
My Question is :
How to bind Button to a Method in a custom Template?
Please,Reply me ASAP.
Thank you very much.
Rabab Youssef,
J2EE Developer -
How to create custom button by amending template in sc and change po screen
Hi,
Can anybody tell the steps that How to create custom button by amending the template in shopping cart or change purchase order screen.
Full points for the answer.
Edited by: shraman saha on Aug 17, 2008 6:44 PMHi,
I dont have any idea what you mean by Template for "Change Purchase Order" functionality. As far as i know there is a change button on the screen using which we go to the change mode and edit the PO.
About your other query: you do not require to download any HTML pages. To see the templates for PO go through the following path:
Transaction SE80 --> Internet options --> in the drop-down enter BBP_POC (for PO) --> Topic 99 --> HTML templates.
Then look for the following templates :
SAPLBBP_PO_UI_ITS 3000 --> for header basic data
SAPLBBP_PO_UI_ITS 4000 --> for item overview
SAPLBBP_PO_UI_ITS 4100 --> for item basic data
SAPLBBP_PO_UI_ITS 2200 --> for buttons.
Make appropriate changes to the screen and then publish it before using it. It is just like activating objects.
Hope this helps.
Thanks,
Pradeep -
ALV issue - capturing user changes in editable fields using custom button?
Hi,
I created a custom button in ALV tool bar. And also in my ALV grid I have couple of fields Editable option. User can change values for these 2 fields.
My question is -
After changing values for these editable fields(more than 1 record) , user will click on custom button and then I have to update all the user changed values in to my internal table(lt_tab) and then I have to process logic.
Problem is when user click on Custom button in ALV tool bar it is not having the changed values in lt_tab table.
Only when user clicks some thing on ALV grid records or fields then it is getting all the changed values in to lt_tab.
Can any one tell me how I can get changed values when user clicks on custom button?
1. Can we place custom button in ALV Grid? instead of ALV tool bar?
or
How I can capture user changes when they click on custom button?
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
TABLES
T_OUTTAB = lt_tab
Please check this logic-
CASE r_ucomm.
WHEN '&IC1'.
- It_tab having all changed field values
WHEN 'custom button'.
lt_tab - not having any changed values - showing all initial lt_tab values.
I highly appreciate your answers on this.
Thanks.
Rajesh.Hi,
Use this code, its working:-
*& Form ALV_DISPLAY
* SUB-ROUTINE ALV_DISPLAY IS USED TO SET THE PARAMETERS
* FOR THE FUNCTION MODULE REUSE_ALV_GRID_DISPLAY
* AND PASS THE INTERNAL TABLE EXISTING THE RECORDS TO BE
* DISPLAYED IN THE GRID FORMAT
FORM alv_display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = v_rep_id " report id
i_callback_pf_status_set = 'PF' " for PF-STATUS
i_callback_user_command = 'USER_COMMAND' " for User-Command
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
is_layout = wa_layout " for layout
it_fieldcat = it_field " field catalog
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
it_sort = it_sort " sort info
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
is_variant = wa_variant " variant name
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_final " internal table
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. " ALV_DISPLAY
*& Form USER_COMMAND
* SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
* AND EXECUTE THE APPROPIATE CODE
* -->LV_OKCODE used to capture the function code
* of the user-defined push-buttons
* -->L_SELFIELD text
FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
* assign the function code to variable v_okcode
lv_okcode = sy-ucomm.
* handle the code execution based on the function code encountered
CASE lv_okcode.
* when the function code is EXECUTE then process the selected records
WHEN 'EXECUTE'. "user-defined button
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
* refresh the ALV Grid output from internal table
l_selfield-refresh = c_check.
ENDCASE.
ENDFORM.
This will reflect all the changes in the internal table. Now you can include your logic as per your requirement.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
Hi Expert,
I need help.
I created a custom button to download data to an excel sheet. after clicking the button I am getting message
"An error occurred; please try again. If the error persists, please contact technical support.".
I tried debugging WCEM, but it is not even reaching that point.
Your help will be highly appreciated.
here is the code.
BitContentview.XHTML
<wec:commandButton id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
UI-repository.xml
<ViewComponent name="BITContentView" componentHandlerClassName="com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl.BITDetailViewVCHandler"/>
BITDetailViewVCHnadler.java
package com.cpr.cprwec.app.comm.module.ebpp.ui.handler.impl;
import com.cpr.cprwec.app.comm.module.ebpp.backendobject.interf.EbppBackend;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.impl.EbppModuleAccessImpl;
import com.cpr.cprwec.app.comm.module.ebpp.modulemgmt.interf.EbppModuleAccess;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.DisputeDataDTOImpl;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.OpenItemDTOImpl;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.DisputeDataDTO;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.OpenItemDTO;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDataDTOImpl;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDataDTO;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.impl.BITDetailDTOImpl;
import com.cpr.cprwec.app.comm.module.ebpp.ui.dto.interf.BITDetailDTO;
import com.sap.wec.app.common.module.common.attachment.businessobject.interf.Attachment;
import com.sap.wec.tc.core.backend.sp.jco.JCoConnection;
import com.sap.wec.tc.core.businessobject.BusinessObjectException;
import com.sap.wec.tc.core.common.exceptions.ApplicationBaseRuntimeException;
import com.sap.wec.tc.core.common.logging.WCFLocation;
import com.sap.wec.tc.core.common.searching.businessobject.impl.GenericSearch;
import com.sap.wec.tc.core.common.searching.businessobject.interf.GenericSearchReturnResultData;
import com.sap.wec.tc.core.common.util.GenericFactory;
import com.sap.wec.tc.core.common.util.Message;
import com.sap.wec.tc.core.common.util.MessageList;
import com.sap.wec.tc.core.common.util.table.Table;
import com.sap.wec.tc.core.common.util.table.TableRow;
import com.sap.wec.tc.core.modulemgmt.ForeignModuleAccess;
import com.sap.wec.tc.core.modulemgmt.ModuleAccess;
import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleInactiveException;
import com.sap.wec.tc.core.modulemgmt.exceptions.ModuleLifecycleException;
import com.sap.wec.tc.core.runtime.WecFrameworkRuntime;
import com.sap.wec.tc.core.runtime.WecSession;
import com.sap.wec.tc.core.runtime.jsf.WecFrameworkRuntimeJSF;
import com.sap.wec.tc.core.runtime.jsf.composition.PageManagerBean;
import com.sap.wec.tc.core.runtime.navigation.NavigationCondition;
import com.sap.wec.tc.core.ui.composition.menu.MenuManager;
import com.sap.wec.tc.core.ui.composition.menu.MenuMetadataException;
import com.sap.wec.tc.core.ui.vc.BuildTime;
import com.sap.wec.tc.core.ui.vc.NavigationParameterBinding;
import com.sap.wec.tc.core.ui.vc.RequestParameterBinding;
import com.sap.wec.tc.core.ui.vc.impl.ViewComponentHandlerBaseImpl;
import com.cpr.cprwec.app.comm.module.ebpp.businessobject.interf.BIT;
import com.cpr.cprwec.app.comm.module.ebpp.businessobject.impl.BITImpl;
public class BITDetailViewVCHandler extends
ViewComponentHandlerBaseImpl<EbppModuleAccess> {
protected static final WCFLocation LOCATION = WCFLocation
.getInstance(BITDetailViewVCHandler.class.getName());
public BITDataDTO bitDataDTO;
public BITDetailDTO bitDetailDTO;
public List<BITDataDTO> BITDataDTOList;
public List<BITDetailDTO> BITDetailDTOList;
public boolean noBITData;
public boolean noBITDetail;
public boolean renderPanel = true;
public boolean isDownloadBITData;
public boolean isDownloadBITDetail;
public boolean downloadStarted=false;
public boolean BITFound =false;
public boolean isBITFound() {
return BITFound;
public void setDownloadStarted( boolean downloadStarted ){
this.downloadStarted = downloadStarted;
public boolean getDownloadStarted(){
return this.downloadStarted;
public void setBITFound(boolean BITFound) {
this.BITFound = BITFound;
public String getObjectID() {
return objectID;
public void setObjectID(String objectID) {
this.objectID = objectID;
public List<BITDataDTO> getBITDataDTOList() {
return BITDataDTOList;
public List<BITDetailDTO> getBITDetailDTOList() {
return BITDetailDTOList;
public Boolean getNoBITData() {
return noBITData;
public Boolean getNoBITDetail() {
return noBITDetail;
public Boolean getRenderPanel() {
return renderPanel;
private static final int DEFAULT_BUFFER_SIZE = 1024000;
public Attachment attachmentData;
public Attachment getAttachmentData() {
return attachmentData;
@RequestParameterBinding(maxLength = 1024)
protected String objectID;
@BuildTime
public String processBuildTime() throws BusinessObjectException {
BIT BIT = null;
noBITData = noBITDetail = false;
renderPanel = true;
if (isLoggedIn()) {
if ( isDownloadBITData == true ){
this.downloadBITDataExcel();
else {
this.getModuleAccess().getBITBO().clearMessages();
BIT = this.moduleAccess.getBITBO().getBITFromBackend(objectID);
BITDataDTOList = BIT.getBITDataDTOList();
BITDetailDTOList = BIT.getBITDetailDTOList();
MessageList objectData = this.getModuleAccess().getBITBO()
.getMessageList();
if (objectData.size() > 0) {
noBITData = noBITDetail = true;
renderPanel = false;
this.addMessageList(objectData);
return checkLoginCondition();
private boolean isLoggedIn() {
return checkLoginCondition() == null;
private String checkLoginCondition() {
NavigationCondition navCondition = getNavigationCondition("login");
if (!navCondition.isFullfiled()) {
navCondition.addToNavigationStack();
return navCondition.getOutcome();
return null;
public String downloadBITData(){
downloadStarted = true;
isDownloadBITData = true;
downloadBITDataExcel();
return checkLoginCondition();
public void downloadBITDataExcel() {
// dummyDebug("downloadBITDataExcel", BITDataDTOList.size(), "", "" );
if (BITDataDTOList.size() > 0) {
try {
attachmentData = this.getModuleAccess().getDownloadBO()
.getBITDataExcel(BITDataDTOList);
if (attachmentData != null) {
FacesContext faces = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse) faces
.getExternalContext().getResponse();
response.reset();
response.setContentType(attachmentData
.getAttachmentMimeType());
response.setContentLength(attachmentData
.getAttachmentContent().length);
response.setHeader("Content-disposition",
"attachment;filename="
+ attachmentData.getAttachmentName());
response.setBufferSize(DEFAULT_BUFFER_SIZE);
ServletOutputStream out;
try {
out = response.getOutputStream();
out.write(attachmentData.getAttachmentContent());
out.flush();
faces.responseComplete();
} catch (IOException e) {
throw new ApplicationBaseRuntimeException(
"Problem opening file", e);
} finally {
attachmentData = null;
} catch (BusinessObjectException e) {
e.printStackTrace();
isDownloadBITData = false;Thanks Hamendra for checking the issue.
I am setting up breakpoints in WCEM, tab JAVA EE then from menu RUN->Toggle brekpoints and then debug configuration.
the breakpoints are in several places in handler class BITDetailviewVCHandler class including method downloadBITData.
this method I am calling from BitContentview.XHTML
<wec:commandButton id="bdtexcel" immediate="true" actionListener="#{cc.vch.DownloadBITData}" type="submit" value="#{i18n['invoices.ui.openitems.printSelected']}"/>
When the BIT page is loading the control stops at the breakpoint.
but it is not stopping there when i click the 'Excel Download' button.
How do I get the log file. I am very new to WCEM, please guide me.
I tried to debug the UI using Google chrome. it is giving me the following error.
POST https://<>/<>/<>/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US 500 (Internal Server Error)
when I expand the node
c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:54
c.event.trigger:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66
(anonymous function):<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:30
c.extend.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:24 c.fn.c.each:<>/<>/javax.faces.resource/sap/comp.theme/templates/jquery/lib/jquery-1.4.2.min.js.jsf:66 c.fn.extend.trigger:<>/<>/javax.faces.resource/<>dev/comp.theme/templates/jquery/js/commandButton.js.jsf:31
com.sap.wec.commandButton.submitForm:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&objectID=500000233&page=D61CFFF8E75D48A1B348F315D209EFF9&wec-locale=en_US:48 onclick
Navigated to https://wsapdjd803.<>.ca:<>/<>/main/<>HomePage.jsf?wec-appid=<>MAINAPP6&wec-locale=en_US
Seems to be it is failing somewhere commandButton-related JavaScript functions
Thanks
Subassish -
Custom button on a editable alv grid
Hi experts,
I'm using an editable alv like this:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
* I_STRUCTURE_NAME = 'ZPEDAUTOMTAB'
is_layout_lvc = gd_layout
it_fieldcat_lvc = it_fieldcat
i_save = 'X'
TABLES
t_outtab = gt_zpedautomtab
EXCEPTIONS
program_error = 1
OTHERS = 2.
Does anybody know if i can add a custom button to the header or anywhere else to program a custom action?
If it is not; i can use another type of editable alv that lets me do that; if that exists.
Tank-you.Hi
Check the following template code and adjust accordingly:
Call the ALV
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'LINE_CLICK'
i_callback_top_of_page = 'TOP_ROUTINE'
i_callback_html_end_of_list = 'EOL_LOG'
i_grid_title = text-ttl
is_layout = my_layout
it_fieldcat = it_fieldcatalog
it_sort = it_sort
i_save = g_save
i_grid_settings = lc_glay
is_variant = w_variant
is_print = my_print
TABLES
t_outtab = i_out
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.
*& Form top_routine
FORM top_routine.
{ Local
DATA:
w_page(5) TYPE c,
l_line TYPE slis_entry,
lh_top TYPE slis_listheader,
lt_top TYPE slis_t_listheader.
DEFINE top_line.
clear lh_top.
lh_top-typ = &1.
lh_top-key = &2.
lh_top-info = &3.
append lh_top to lt_top.
END-OF-DEFINITION.
WRITE sy-datum TO l_line.
top_line 'S' text-t01 l_line.
WRITE sy-uname TO l_line.
top_line 'S' text-t02 l_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_top.
ENDFORM. "top_routine
*& Form pf_status_set
FORM pf_status_set USING extab TYPE slis_t_extab.
data: wa_extab like LINE OF extab.
wa_extab-fcode = '&REFRESH'.
append wa_extab to extab.
wa_extab-fcode = 'MODE'.
append wa_extab to extab.
SET PF-STATUS 'ZSD_DA01' EXCLUDING extab.
ENDFORM. "pf_status_set
*& Form line_click
FORM line_click USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
DATA: wl_ucomm LIKE sy-ucomm.
DATA: es_l TYPE slis_layout_alv,
es_fld TYPE slis_t_fieldcat_alv,
es_sort TYPE slis_t_sortinfo_alv,
es_mark TYPE slis_t_fieldcat_alv.
wl_ucomm = sy-ucomm.
CLEAR sy-ucomm.
CASE wl_ucomm.
Set printing mode
WHEN 'MODE'.
IF w_mode = 'O'.
w_mode = 'T'.
w_mode_txt = text-018.
ELSE.
w_mode = 'O'.
w_mode_txt = text-019.
ENDIF.
SET PF-STATUS 'ZSD_DA01'.
Exit Functions
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
Show Log
WHEN 'LOG'.
selfield-refresh = 'X'.
PERFORM log_show.
Issue output
WHEN 'ISSUE'.
selfield-refresh = 'X'.
PERFORM print_deliveries.
Select all
WHEN 'SALL'.
selfield-refresh = 'X'.
LOOP AT i_out.
i_out-box = 'X'.
MODIFY i_out.
ENDLOOP.
Deselect all
WHEN 'DSAL'.
selfield-refresh = 'X'.
LOOP AT i_out.
i_out-box = ' '.
MODIFY i_out.
ENDLOOP.
ENDCASE.
Handle User clicks
CASE selfield-fieldname.
Display Vendor Master
WHEN 'KUNNR' OR 'KUNAG'.
IF NOT selfield-value IS INITIAL.
READ TABLE i_out INDEX selfield-tabindex.
IF selfield-fieldname = 'KUNAG'.
SET PARAMETER ID 'KUN' FIELD i_out-kunag.
ELSEIF selfield-fieldname = 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD i_out-kunnr.
ENDIF.
SET PARAMETER ID 'BUK' FIELD i_out-bukrs_vf.
SET PARAMETER ID 'VKO' FIELD i_out-vkorg.
SET PARAMETER ID 'VTW' FIELD i_out-vtweg.
SET PARAMETER ID 'SPA' FIELD i_out-spart.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDIF.
Go To VL03N
WHEN 'VBELN'.
READ TABLE i_out INDEX selfield-tabindex.
IF NOT i_out-vbeln IS INITIAL.
SET PARAMETER ID 'VL' FIELD i_out-vbeln.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
ENDIF.
Go To VA03
WHEN 'VGBEL'.
READ TABLE i_out INDEX selfield-tabindex.
IF NOT i_out-vgbel IS INITIAL.
SET PARAMETER ID 'AUN' FIELD i_out-vgbel.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "line_click
Please, reward if helpful
Regards,
George -
Custom button on ALV report for Tcode FL10G ?
Hi All,
I want to add custom button in the AVL report for FL10G transaction. And then need to implement logic for that button (calling BAPI to create shipment for the selected records).
For VL10G alv program GUI Status - STANDARD001 I think I can add button in this gui by using access key.
But how to implement logic for this custom button? Where I can put the code for this button logic?
Please let me know if any one has any ideas on this issue.
I appreciate your help and time on this.
Thanks.
MHi Murali,
The standard program it will not allow to copy the GUI Status. Because source and target program should not same.
It will definitely debug will work. Yo can create the GUI Status through SE41. In SE41 Just give Program name :SAPLV50R_VIEW click the button status. here you should not give any gui status. just blindy say create the then it will popup screen appears in the screen. Here you can mention your Z GUI Status. It is not required to create all the menus manually instead of the there is button which is located in the screen next to blue i button. here you can click and select the standard interface. You can get all the menus as similar to standard. Like that you should create Menu Bar, Application Toolbar and Function Keys Menus. Then you can add your custom button in the Application tool bar button.
When you execute the Transaction VL10G and check your cusom menu button will appears. Once you click custom button only exit will trigger. Find the below code for your reference.
CODE
loop at ct_postab assigning <fs>
where selkz = 'X'.
*To Fill the BAPI Header Parameters
str_ordhdr-ship_cond = w_sval-value.
*To Fill the BAPI HeaderX Parameters
str_ordhdrx-updateflag = 'U'.
str_ordhdrx-ship_cond = 'X'.
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = <fs>-vbelv
order_header_in = str_ordhdr
order_header_inx = str_ordhdrx
tables
return = str_return.
endloop.
read table str_return into w_return index 1.
if sy-subrc eq 0.
if not w_return-type = 'S'.
message w_return-message type 'E'.
leave to current transaction.
endif.
endif.
*Do the BAPI Commit
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
endif.
endif.
endif.
Let me know if you have anything to discuss on the same. -
How to add a custom button in WD screen to call a workflow in siebel?
Hi All,
We have a requirement to have a custom button at the summary screen(after the rule execution) "Create Opportunity", on clicking on it a new opportunity record should be created in Siebel. As we know the "Save" link calls "PolicyAutomationSaveSession" inbound web service method and saves the information in session table and we can modify the PreSession and PostSession workflows. But we are not sure how it calls the service method and where is the mapping defined.
Can you please help me on how to add a custom button and how to invoke a workflow in siebel side to implement this requirement?
Also is there any document which can help me to add a custom button in screen and to add the code behind the button?
Thanks in advance!!
Regards,
SubhradeepSubhradeep,
Closing a Web Determinations window is essentially the same as closing any HTML window. It involves javascript, which you would have to add to the Web Determinations templates.
Essentially the javascript command to close a window is {{window.close}} or {{top.close}}
For timing, you might be able to use the setTimeout function of Javascript (see: http://www.w3schools.com/jsref/met_win_settimeout.asp)
At the risk of exposing exactly how bad my javascript skills are, I have attached a super-simple html fragment, a page that closes itself after 3 seconds. It may help you get started in the right direction. In general closing a window is a fairly dubious activity and is often not permitted by certain browsers. This html page at least works in Internet Explorer.
<html>
<head>
<script language="JavaScript">
setTimeout(closeMe, 3000);
function closeMe() {
alert("This window will close");
top.close();
</script>
</head>
<body><B>This window will close in three seconds</B></body>
</html>
{code} -
Custom File Renaming Template Keeps Changing
I'm having issues when creating a custom file naming template in Tiger with LR 1.3.1.
When importing files, I created a custom template to rename the files with YYMMDD_{original file suffix}{Master}.tif to get this: 071217_12056Master.tif. The first import goes fine. But when I import another batch of files and choose the template all I get is 071217_Master.tif.
I tried creating the template by hitting F2 to rename the photo and get the same results. The really odd thing is that some of the other templates have their characteristics jumbled around so that what I thought was the "orig file-name" template might actually produce something like 071217_.tif.
The original file suffix suffers the worst in terms of disappearing without cause. This behavior was occurring in the 1.2 ver. as well. I've deleted every single template thru the editor, recreated them again and still get the errors.
Hopefully someone here can provide some clues?
Thank you!It sounds as though your import preset either isn't working or wasn't setup correctly.
Using the full screen import panel, make sure Copy or Move is selected and then select your Import Preset....what does the File Renaming panel look like? "Rename Files" should be ticked, Template should read "Custom Settings" (or the specific rename preset if you've saved it) and the sample should show the correct rename format, like so:
So does yours look like this, or different? -
Add customer button on header level for BUS2201(PO) - SRM 7.0
Hi,
I want to define a customer button (with action) within PO on header level.
Web Dynpro FPM_OIF_COMPONENT
Configuration /SAPSRM/WDCC_FPM_OIF_PO_PURCH
Task:
Add a customer button besides standard Export button.
I assume-afterwards I have to enhance the method onactionbutton_pressed to create my event when customer button is pressed, right?
Could anyone please guide me how to solve this issue?
Thanks and best reagrds
AndreasHi,
Here are the steps to add the button, I wrote it in other thread. In my case for PO is not displayed, try to follow the steps and if you are able to show the button tell me how please.
Add custom button in PO
And yes ,you need to create an enhancement point in the view CNR_VIEW of the component FPM_OIF_COMPONENT, you need to create a post-exit in the method BUTTON_PRESSED, here you have a sample code:
DATA: lv_id TYPE string,
lv_event_id TYPE fpm_event_id.
DATA: lo_nd_oif_application TYPE REF TO if_wd_context_node,
lo_nd_variant TYPE REF TO if_wd_context_node,
lo_nd_toolbar TYPE REF TO if_wd_context_node,
lo_nd_button TYPE REF TO if_wd_context_node,
lo_el_button TYPE REF TO if_wd_context_element,
lo_nd_other_functions TYPE REF TO if_wd_context_node.
DATA: lv_substring TYPE string,
lv_substring_i TYPE i,
lv_node_name TYPE string,
lv_position TYPE string,
lv_length TYPE i,
lv_seq TYPE i.
DATA:lt_keys TYPE STANDARD TABLE OF string,
lv_key LIKE LINE OF lt_keys.
TYPES:BEGIN OF y_parameters,
name TYPE string,
value TYPE string,
END OF y_parameters.
DATA: lt_parameters TYPE STANDARD TABLE OF y_parameters,
ls_parameter LIKE LINE OF lt_parameters.
DATA: lv_boid TYPE bbp_guid,
lv_botype TYPE string,
lv_objkey TYPE swo_typeid,
lv_objtype TYPE swo_objtyp,
lv_object_id TYPE crmt_object_id_db,
lv_process_type TYPE crmt_process_type_db,
lv_object_type TYPE crmt_subobject_category_db,
lv_rfc TYPE zgrs_co_logsys-rfc,
DATA: lo_fpm TYPE REF TO if_fpm.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event_by_id( lv_event_id ).
lt_keys = lo_fpm->mo_app_parameter->get_keys( ).
LOOP AT lt_keys INTO lv_key.
ls_parameter-name = lv_key.
lo_fpm->mo_app_parameter->get_value(
EXPORTING iv_key = lv_key
IMPORTING ev_value = ls_parameter-value ).
INSERT ls_parameter INTO TABLE lt_parameters.
ENDLOOP.
lv_id = wdevent->get_string( 'ID' ).
lo_nd_oif_application = wd_context->get_child_node( name = wd_this->wdctx_oif_application ).
lo_nd_variant = lo_nd_oif_application->get_child_node( name = wd_this->wdctx_variant ).
lo_nd_toolbar = lo_nd_variant->get_child_node( name = wd_this->wdctx_toolbar ).
lo_nd_other_functions = lo_nd_toolbar->get_child_node( name = wd_this->wdctx_other_functions ).
lv_substring = lv_id.
lv_length = STRLEN( lv_id ).
lv_seq = lv_length - 3.
IF lv_id+lv_seq = '_CP'.
lv_substring = lv_substring(lv_seq).
lv_id = lv_substring.
ENDIF.
WHILE lv_substring CS '_'.
lv_position = sy-fdpos + 1.
lv_substring = lv_substring+lv_position.
ENDWHILE.
IF lv_substring CO '1234567890'.
lv_substring_i = lv_substring.
ENDIF.
* Item level action;
IF lv_id CS '_item'.
* Or header level action;
ELSE.
IF lv_id CA '0123456789'.
lv_position = sy-fdpos - 1.
lv_node_name = lv_id(lv_position).
IF lv_id CS 'OTHER_FUNCTIONS'.
lo_nd_button = lo_nd_other_functions->get_child_node( name = wd_this->wdctx_button ).
lo_nd_button->set_lead_selection_index( index = lv_substring_i ).
lo_el_button = lo_nd_button->get_element( ).
TRY.
lo_el_button->get_attribute(
EXPORTING
name = `EVENT_ID`
IMPORTING
value = lv_event_id ).
CATCH cx_wd_context.
ENDTRY.
READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOTYPE'.
lv_botype = ls_parameter-value.
READ TABLE lt_parameters INTO ls_parameter WITH KEY name = 'SAPSRM_BOID'.
lv_boid = ls_parameter-value.
* Obtain the object_id;
SELECT SINGLE object_id INTO lv_object_id
FROM crmd_orderadm_h
WHERE guid EQ lv_boid.
* If not Z button, exits;
IF lv_event_id(1) NE 'Z'. EXIT. ENDIF.
* Actions;
CASE lv_event_id.
WHEN 'ZBUTTON'.
WHEN 'ZBUTTON2'.
ENDCASE.
ENDIF.
ENDIF.
ENDIF. -
Is it possible to create custom buttons in CRM Ondemand?
Hi,
Is it possible to create custom buttons in CRM Ondemand in any detail page like the inbuilt buttons like 'New', 'Delete' etc? If possible then how?
Thanks
ArpitaYou can add a button using custom javascript. but this could potentially have performance issues. please test the performance and functionality if you implement a lot javascript
see this link : http://helponmyproject.com/TTOCOD/
Regards,
Royston -
How to add a custom button?
Hello Gurus,
I'm very new to FPM and I got a question regarding to adding a custom button in portal.
I have read some documents but couldnt figure it out.
Can somebody please clarify the issue?
Thanks in advance.
Ferhat
Edited by: iltern on Feb 29, 2012 7:48 PMHi Ferhat
First you need to identify in which area you want to add the buttom.
Then expand the webdynpro application for that webdynpro component.
Under that you will see application configuration. Dobule click on the configuration name .
Then on right hand side you will get the option Open configuration.
This will take you to the application configuration screen .
Click on Component Configuration.
Then click on the edit button .
After pressing the edit button on the screen there will be option for Adding the toolbar button.
Maybe you are looking for
-
When I send photos from my Samsung D900 to my Mac (via bluetooth) the date info does not seem to come with it. Instead the file is dated as per the date of import onto my computer. When I then put this into iphoto the date changes again to 01/01/06.
-
Iphone water damaged and needs reset
I need to restore old iPhone before i send back to assurion. It says i need to access the icloud to turn off "find my phone app." i can't access old phone through screen as it is water damaged. is there a work around? i can plug into my mac and i h
-
Hi guys. We're having a problem with an application set this morning. A new application set was created last night and so far, 2 new applications have been added to it. This morning though, when we try to create another application (of ANY type), we
-
Yellow WP Lines in sm50 -- Why?
<b>Yellow WP Lines in sm50</b> Hi together, does someone knows for want logical event are yellow lines in sm50. So, I know red markers at the error column, but I can't find a description for what are yellow lines? The whole line in yellow in the back
-
After Effects rendering issues.
I am currently trying to render a composition from After Effects, but every time I run into the same problem. Rendering starts then suddenly finishes, leaving me with a 68kb .mov file. The composition is rather large, about 5 secs. long and contains