First or Initial Function
I saw this somewhere...but the brain is drying up!
When you create a form with LCD and someone opens that form with the Acrobat Reader, a function is automatically executed. What is the name of that function and how do I get access to it?
Conversely, is there a function that run when the user closes a file.
I'm trying to set a few variable values when the form opens and closes.
Thank you for the feedback....
I am not 100% sure if I am right, but do you reder to the "events" that can contain functions on initialize post... and closedoc.
In these events people might add scripts that will execute when opening etc. the document. (Like you said with your variables.)
(Other events are exit, calculate, mouseup, mousedown etc. The events can be found on the upper left of the "scripting-field".)
Similar Messages
-
AddEventListener is not working first time(initial request).
Hi All,
It is behaving strangely; I’m having below code in ActionScript and .MXML file.
Very first request it is not displaying inquiry_id in confirmation page but it is displaying this value in later requests. In first request also it is displaying value correctly in getNewInquiryResultHandler in controller but when it comes to newReportSucEventHandler it is displaying null value in BroadModel.inquiryConsumer.inquiry_id
-------------------- NewReportEvent.as(Begin) ---------------------------
package com.broad.events
import flash.events.Event;
import com.broad.beans.Inquiry;
import com.broad.beans.InquiryConsumer;
// This custom event should be dispatched if the user
// successfully logs into the application.
public class NewReportEvent extends Event{
public static const REPORT:String = "report";
public function NewReportEvent(){
super(NewReportEvent.REPORT,true,true); //bubble by default
override public function clone():Event{
return new NewReportEvent(); // bubbling support inside
-------------------- NewReportEvent.as(End) ---------------------------
In my controller(action script) I added below code for dispatching this event
public function NewReportEvent():void
ro = new RemoteObject();
setUpAmfChannel();
ro.destination = "manageInquiryService";
ro.addEventListener("fault", faultHandler);
ro.createInquiry.addEventListener("result", getNewInquiryResultHandler);
Alert.show("Before addNewInquiry");
ro.createInquiry(BroadModel.inquiryConsumer);
}//End of NewReportEvent
public function getNewInquiryResultHandler(event:ResultEvent):void
BroadModel.inquiryConsumer.inquiry_id = event.result as String;
Alert.show("getNewInquiryResultHandler:"+BroadModel.inquiryConsumer.inquiry_id);
}//End of getNewInquiryResultHandler
In Report.mxml file is having following code
---------------Report.mxml (Begin) ---------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import com.broad.controller.BroadController;
import com.broad.model.BroadModel;
import com.broad.events.*;
[Bindable]
public var mainLableText:String="NEW REPORT";
[Bindable]
public var titleText:String="Create A New Report";
public function init():void{
Alert.show("Inside newreport init mxml");
myViewStack.selectedChild = newReport;
Confirmation.visible=false;
broad.selectedItem.label = "Yes";
// Reset the value too.
first_name.text = "";
last_name.text = "";
street_address.text = "";
street_address2.text = "";
city.text = "";
state.text = "";
zip.text = "";
private function initHandler():void
Alert.show("Inside initHandler");
addEventListener(NewReportEvent.REPORT,newReportSucEventHandler);
private function newReportSucEventHandler(event:NewReportEvent):void{
Alert.show("Inside newReportEventHandler mxml");
myViewStack.selectedChild = Confirmation;
newReport.visible=false;
Alert.show("Inside newReportEventHandler inquiryId:"+BroadModel.inquiryConsumer.inquiry_id);
inquiryIdVal.text = BroadModel.inquiryConsumer.inquiry_id;
public function submitInquiry(evt:Event):void{
BroadModel.inquiryConsumer.first_name = first_name.text;
BroadModel.inquiryConsumer.last_name = last_name.text;
BroadModel.inquiryConsumer.street_address = street_address.text;
BroadModel.inquiryConsumer.street_address2 = street_address2.text;
BroadModel.inquiryConsumer.city = city.text;
BroadModel.inquiryConsumer.state = state.text;
BroadModel.inquiryConsumer.zip = zip.text;
Alert.show("Inside submitInquiry state:",currentStateVal);
this.dispatchEvent(new NewReportEvent());
]]>
</mx:Script>
<mx:ViewStack id="myViewStack" width="100%" height="100%" creationPolicy="all" >
<mx:Canvas id="newReport" height="100%" width="100%" visible="true">
<mx:Label x="10" y="10" text="{mainLableText}" fontSize="18" fontWeight="bold" color="#F07012"/>
<mx:LinkButton id="viewEditLink" right="10" styleName="htmlLink" label="{pageMode}" click="setPageMode(event);"
visible="{pageMode != null}" includeInLayout="{pageMode != null}" />
<mx:TitleWindow width="100%" height="100%" layout="absolute" title="{titleText}" fontWeight="normal" fontSize="13" y="38" x="0">
<mx:Canvas height="100%" width="100%">
<mx:VBox width="100%" height="100%">
<mx:HBox>
<mx:Label text="Consumer Information: " fontSize="12" fontWeight="bold" color="#34B05D"/>
</mx:HBox>
<mx:HBox>
<mx:Label text="Report Type: " fontWeight="normal"/>
<mx:Label text="Phone" fontWeight="bold"/>
</mx:HBox>
<mx:HBox width="100%">
<mx:Label width="25%" text="First Name:" fontWeight="normal"/>
<mx:TextInput width="25%" id="first_name" editable="{pageModeStat}" />
<mx:Label width="25%Previously, when I'm calling below line in Report.mxml file
this.dispatchEvent(new NewReportEvent());
In Controller, I'm having following line in init() method
private function init( event:Event ):void{
systemManager.addEventListener(LoginEvent.LOGIN, login, true);
systemManager.addEventListener(LoginSuccessEvent.LOGIN_SUCCESS, handleLogin, true);
systemManager.addEventListener(LoginFailureEvent.LOGIN_FAILURE, handleLogin, true);
systemManager.addEventListener(ValidateLoginEvent.LOGIN_VALIDATE, checkLogin, true);
systemManager.addEventListener(HomeEvent.HOME, home, true);
systemManager.addEventListener(SearchEvent.SEARCH, search, true);
systemManager.addEventListener(NewReportEvent.REPORT, newInquiry, true);
login(new LoginEvent(LoginEvent.LOGIN));
public function newInquiry(evt:NewReportEvent):void{
Alert.show("Inside newInquiry", evt.type);
addNewInquiry();
}//End of newInquiry
public function addNewInquiry():void
ro = new RemoteObject();
setUpAmfChannel();
ro.destination = "manageInquiryService";
ro.addEventListener("fault", faultHandler);
ro.createInquiry.addEventListener("result", getNewInquiryResultHandler);
Alert.show("Before addNewInquiry");
ro.createInquiry(BroadModel.inquiryConsumer);
}//End of addNewInquiry
public function getNewInquiryResultHandler(event:ResultEvent):void
BroadModel.inquiryConsumer.inquiry_id = event.result as String;
Alert.show("getNewInquiryResultHandler:"+BroadModel.inquiryConsumer.inquiry_id);
}//End of getNewInquiryResultHandler
Did following changes
In Controller:
// systemManager.addEventListener(NewReportEvent.REPORT, newInquiry, true); COMMENTED
Report.mxml:
public function submitInquiry(evt:Event):void{
var controller:BroadController = new BroadController();
controller.addNewInquiry();
this.dispatchEvent(new NewReportEvent(NewReportEvent.REPORT));
Still I'm having same issue, it is calling this.addEventListener(NewReportEvent.REPORT,newReportSucEventHandler); before dispathEvent and it is showing null value in confirmation page.
Can you please check this code and let me know what I'm doing wrong. Why addEventListerner is firing before dispatchEvent?
Thanks,
Sharath. -
My first real analytic function... any unexpected results?
Hello all. I have a table that contains transactions from bank accounts. The columns I am concerned with (I think) are the account number and the status date.
The status date has the date that the transaction cleared through the bank. I would like a query that returns all rows for an account that have cleared since the last reconciliation of that account. (the reconciliation will occur monthly)
This will produce some test data that replicates what we'll have in this table.
DROP TABLE dave_test;
DROP TABLE dave_test succeeded.
CREATE TABLE dave_test AS
SELECT level id, ROUND(TO_NUMBER(level), -1) account, TO_DATE('2007-08-01','YYYY-MM-DD') test_date
FROM DUAL
CONNECT BY LEVEL < 20 UNION ALL
SELECT 21, 10, TO_DATE('2007-07-01','YYYY-MM-DD') FROM DUAL UNION ALL
SELECT 22, 10, TO_DATE('2007-06-01','YYYY-MM-DD') FROM DUAL UNION ALL
SELECT 23, 0, TO_DATE('2007-09-01', 'YYYY-MM-DD') FROM DUAL;
CREATE TABLE succeeded.
SELECT * FROM dave_test ORDER BY id;
ID ACCOUNT TEST_DATE
1 0 01-AUG-07
2 0 01-AUG-07
3 0 01-AUG-07
4 0 01-AUG-07
5 10 01-AUG-07
6 10 01-AUG-07
7 10 01-AUG-07
8 10 01-AUG-07
9 10 01-AUG-07
10 10 01-AUG-07
11 10 01-AUG-07
12 10 01-AUG-07
13 10 01-AUG-07
14 10 01-AUG-07
15 20 01-AUG-07
16 20 01-AUG-07
17 20 01-AUG-07
18 20 01-AUG-07
19 20 01-AUG-07
21 10 01-JUL-07
22 10 01-JUN-07
23 0 01-SEP-07
22 rows selected
I have developed a query that returns accurate results for my test data. My request is this:
Will you look over this query and see if there is a better way of doing things? This is my first real attempt with an analytic function, so I would appreciate some input on anything that looks like it could be improved. Also, perhaps some test cases that might produce results I haven't thought of.
Thank you for your time.
SELECT
id
,account
,test_date
,max(date_sort)
FROM
SELECT
id id
,account account
,test_date test_date
,CASE DENSE_RANK() OVER(PARTITION BY account ORDER BY TRUNC(test_date, 'DD') DESC)
WHEN 1 THEN TO_DATE('1', 'J')
WHEN 2 THEN test_date
ELSE NULL
END date_sort
FROM
dave_test
WHERE
account = &account_number
HAVING
test_date > MAX(date_sort)
GROUP BY
id
,account
,test_date
ORDER BY
idRun with 0 as account number:
ID ACCOUNT TEST_DATE MAX(DATE_SORT)
23 0 01-SEP-07 01-JAN-13
1 rows selectedRun with 10 as account number
ID ACCOUNT TEST_DATE MAX(DATE_SORT)
5 10 01-AUG-07 01-JAN-13
6 10 01-AUG-07 01-JAN-13
7 10 01-AUG-07 01-JAN-13
8 10 01-AUG-07 01-JAN-13
9 10 01-AUG-07 01-JAN-13
10 10 01-AUG-07 01-JAN-13
11 10 01-AUG-07 01-JAN-13
12 10 01-AUG-07 01-JAN-13
13 10 01-AUG-07 01-JAN-13
14 10 01-AUG-07 01-JAN-13
10 rows selectedRun with 20 as account_number
ID ACCOUNT TEST_DATE MAX(DATE_SORT)
15 20 01-AUG-07 01-JAN-13
16 20 01-AUG-07 01-JAN-13
17 20 01-AUG-07 01-JAN-13
18 20 01-AUG-07 01-JAN-13
19 20 01-AUG-07 01-JAN-13
5 rows selectedLet me know if I need to clarify anything.Sorry, Volder, for being unclear.
Here is the table the query is based on.
desc bank_account_transactions
Name Null Type
ID NOT NULL NUMBER(28)
BKA_ID NOT NULL NUMBER(28)
BKATC_ID NOT NULL NUMBER(28)
ST_TABLE_SHORT_NAME VARCHAR2(10)
KEY_VALUE NUMBER(28)
EDF_ID NUMBER(28)
GLFS_ID NOT NULL NUMBER(28)
GLTT_ID NUMBER(28)
AMOUNT NOT NULL NUMBER(11,2)
PAYMENT_NUMBER NUMBER(9)
BANK_SERIAL_NUMBER NUMBER(15)
PAYEE_NAME VARCHAR2(60)
STATUS NOT NULL VARCHAR2(1)
STATUS_DATE DATE
EFFECTIVE_DATE NOT NULL DATE
POSITIVE_PAY_DATE DATE
DATA_SOURCE NOT NULL VARCHAR2(1)
REPORTED_TO_ACCOUNT_OWNER NOT NULL VARCHAR2(1)
PAYEE_BANK_ACCOUNT_NUMBER NUMBER(30)
PAYEE_BANK_ABA_NUMBER NUMBER(9)
DESCRIPTION VARCHAR2(4000)
DATE_CREATED NOT NULL DATE
CREATED_BY NOT NULL VARCHAR2(30)
DATE_MODIFIED DATE
MODIFIED_BY VARCHAR2(30)
25 rows selectedThe bka_id is the account number, status is 'C' for cleared checks and the status_date is the date the check cleared.
When I reconcile, I set the status to 'C' and set the status_date to SYSDATE. So the "last reconciliation date" is stored in status_date.
Like so
ID Account_No status_date
1 10 05-04-07
2 10 05-04-07
3 10 05-04-07
4 20 05-04-07
5 20 05-04-07
6 10 06-03-07
7 10 06-03-07
8 20 06-03-07
9 10 07-05-07
10 10 07-05-07In this example, account 10 was reconciled on May 5, June 3, and July 5. So the previous reconciliation date would be 06-03-07, and my report would return the transactions from 07-05-07.
For account 20, it was reconciled on May 5 and June 3. The previous reconciliation date would be 05-04-07, and the transactions from 06-03-07 would be reported.
Does this help?
I appreciate your time. -
Last & First SQL aggregate functions
I'm trying to migrate an app. from Access to SQL Server, and find that Transact-SQL does not support LAST/FIRST functions. Is there any alternative to these?
Below is the Access SQL statement:
SELECT Last(tblZoneNameString.Val) AS strZoneName, tblZoneNameString.TagIndex
FROM tblZoneNameString
GROUP BY tblZoneNameString.TagIndex
HAVING (((tblZoneNameString.TagIndex)>0));In SQL Server 2005, you can do something like this:
select
tblZoneNameString.Val as strZoneName,
tblZoneNameString.TagIndex
from (
select
tblZoneNameString.Val as strZoneName,
tblZoneNameString.TagIndex,
rank() over (partition by tblZoneNameString.TagIndex order by ??????) as rk
from tblZoneNameString
) as T
where rk = 1
Where I've written ?????? you will need to put whatever column
or columns answer the question "last in order of what?". Perhaps
this is something like someDateTime DESC.
Steve Kass
Drew University
[email protected] wrote:
> I'm trying to migrate an app. from Access to SQL Server, and find that
> Transact-SQL does not support LAST/FIRST functions. Is there any
> alternative to these?
>
> Below is the Access SQL statement:
>
> SELECT Last(tblZoneNameString.Val) AS strZoneName,
> tblZoneNameString.TagIndex
> FROM tblZoneNameString
> GROUP BY tblZoneNameString.TagIndex
> HAVING (((tblZoneNameString.TagIndex)>0));
>
> -
How to get ArrayCollection length in initial function?
Hi,
I am working for conver Application form Flex 2 to Flex 3.
I have the following code,I can see in the dataGrid and
ArrayCollection length in the label "loopNumber",but why I can not
get ArrayCollection length in initPage() for Flex 3 and the loop
doesn't work.
But I can get ArrayCollection length in initPage() in Flex 2.
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
... creationComplete="initPage()">
>
<mx:Script>
<![CDATA[
import ....;
import ....;
[Bindable]
private var modelLocator:AdminModel =
AdminModel.getInstance();
private function initPage():void{
Alert.show(modelLocator.acProcess.length.toString());
for ( var j : int =0; j <modelLocator.acProcess.length ;
j++)
]]>
</mx:Script>
<mx:DataGrid x="42" y="64" id="proceeList"
dataProvider="{modelLocator.acProcess}" width="300"
updateComplete="initPage()">
<mx:columns>
<mx:DataGridColumn headerText="Bursary Online"
dataField="processName"/>
</mx:columns>
</mx:DataGrid>
<mx:Label id="loopNumber" x="32" y="428"
text="{modelLocator.acProcess.length}"/>
</Application>What error do you get with Flex 3?
Thanks,
Gaurav Jain
Flex SDK Team -
Initializing Function Module used in Planning function in BPS0
Hi Everybody,
I have been assigned to create a function module which will be used for initialization purpose in BPS planning function. Whenever the user will change values of variable, even if user sets a data for a particular variable whose record does not exist in Cube, default values for keyfigyures should be shown after executing the planning function. How to achieve it? Eagerly waiting for your precious reply.
Warm Regards
PulokeshHi Everbody,
For a long time i have waited for somebody to answer my query. But after having all sorts of RNDs I came up with a sample code given below, and its also working properly....
FUNCTION ZKEYFIGURE_VALUE_DEFLT
""Local Interface:
*" IMPORTING
*" REFERENCE(I_AREA) TYPE UPC_Y_AREA
*" REFERENCE(I_PLEVEL) TYPE UPC_Y_PLEVEL
*" REFERENCE(I_METHOD) TYPE UPC_Y_METHOD
*" REFERENCE(I_PACKAGE) TYPE UPC_Y_PACKAGE
*" REFERENCE(I_LAYOUT) LIKE UPP_PARAM-PARAM DEFAULT 'INPUT'
*" REFERENCE(IT_EXITP) TYPE UPF_YT_EXITP
*" REFERENCE(ITO_CHASEL) TYPE UPC_YTO_CHASEL
*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA
*" REFERENCE(ITO_KYF) TYPE UPC_YTO_KYF
*" EXPORTING
*" REFERENCE(ET_MESG) TYPE UPC_YT_MESG
*" REFERENCE(ETO_CHAS) TYPE ANY TABLE
DATA: LR_WA TYPE REF TO DATA.
DATA: T_SUBRC TYPE SY-SUBRC,
LS_MESG TYPE UPC_YS_MESG,
WA_COMDTY LIKE /BIC/PZCOMDTY.
DATA: L_COMDTY TYPE CHAR4, "Comodity value
LS_CHASEL TYPE UPC_YS_CHASEL, "Line of characteristic selection table
LT_CHARNG TYPE UPC_YT_CHARNG, "Selection table for char value
LS_CHARNG TYPE UPC_YS_CHARNG, "line of selection table for char value
L_VENDOR TYPE CHAR10, "VENDOR value
LA_CHASEL TYPE UPC_YS_CHASEL, "Line of characteristic selection table
LV_CHARNG TYPE UPC_YT_CHARNG, "Selection table for char value
LA_CHARNG TYPE UPC_YS_CHARNG. "line of selection table for char value
FIELD-SYMBOLS: <LS_DATA> TYPE ANY,
<CL_VEND> TYPE ANY,
<CL_COMDTY> TYPE ANY,
<KY_DATA> TYPE ANY,
<S_CHAS> TYPE ANY,
<FS_VEND> TYPE ANY,
<FS_COMM> TYPE ANY.
IF T_SUBRC = 0.
*Get the comodity of the data begin processed
READ TABLE ITO_CHASEL WITH KEY CHANM = 'ZCOMDTY3' INTO LS_CHASEL.
*Get the selection criteria comodity to be processed
READ TABLE LS_CHASEL-T_CHARNG INDEX 1 INTO LS_CHARNG.
*Read the comodity from the selection criteria
L_COMDTY = LS_CHARNG-LOW.
*Get the VENDOR of the data begin processed
READ TABLE ITO_CHASEL WITH KEY CHANM = 'ZSS_VEND3' INTO LA_CHASEL.
*Get the selection criteria VENDOR to be processed
READ TABLE LA_CHASEL-T_CHARNG INDEX 1 INTO LA_CHARNG.
*Read the VENDOR from the selection criteria
L_VENDOR = LA_CHARNG-LOW.
create structure for the selection criteria
CREATE DATA LR_WA LIKE LINE OF ETO_CHAS.
ASSIGN LR_WA->* TO <S_CHAS>.
ASSIGN COMPONENT 'ZSS_VEND3' OF STRUCTURE <S_CHAS> TO <FS_VEND>.
IF SY-SUBRC EQ 0.
MOVE L_VENDOR TO <FS_VEND>.
ENDIF.
ASSIGN COMPONENT 'ZCOMDTY3' OF STRUCTURE <S_CHAS> TO <FS_COMM>.
IF SY-SUBRC EQ 0.
MOVE L_COMDTY TO <FS_COMM>.
ENDIF.
COLLECT <S_CHAS> INTO ETO_CHAS.
ELSE.
LS_MESG-MSGTY = 'W'.
LS_MESG-MSGID = 'upf'.
LS_MESG-MSGNO = '001'.
LS_MESG-MSGV1 = 'Failed to get data from Layout'.
APPEND LS_MESG TO ET_MESG.
ENDIF.
ENDFUNCTION. -
Oracle 11g Table function returns no records on first call
Hello,
On a Oracle 11g R2 I've a table function ( PIPELINED ) returning rows selected from a table.
The first time the function is selected, in a session ( I've tried to disconnect and log in again ), it returns no rows.
I've tried to log the call using DBMS_OUTPUT and from what I see the select on the table function returns no rows and no output is printed. So I presume Oracle is not calling the function.
The same function on a similar environment ( same db versions, patches and database structure ) works fine. The second environment is a production environment so it has more memory and some other settings enabled.
Does anyone know of settings that can relate to this behaviour ?
Thanks in advance for the help.
Regards,
Stefano MuretThank you for answering so fast.
Here's the function code:
FUNCTION template_parameters (iTemplate IN TEMPLATE_RAW_DATA.TMPL_ID%TYPE := NULL)
RETURN table_type_tmpl_parameters PIPELINED
IS
li_exception INTEGER DEFAULT -20025;
POUT_PARM TABLE_TYPE_TMPL_PARAMETERS;
lt_parms table_type_tmpl_parms_raw;
sParmCheck VARCHAR2(4000);
iOccurrence INTEGER;
BEGIN
pOut_Parm := table_type_tmpl_parameters();
pOut_Parm.EXTEND;
select
tmpl_id
*,tmpl_name*
*,replace(upper(trim(sql_out)),'[SCHEMA].')*
*,UPPER(TRIM(out_tmpl_parms))*
bulk collect into lt_parms
from ref_templates
where tmpl_id = NVL(iTemplate,tmpl_id)
order by tmpl_id;
FOR k IN 1..lt_parms.COUNT
LOOP
pOut_Parm(1).tmpl_id := lt_parms(k).tmpl_id;
pOut_Parm(1).tmpl_name := lt_parms(k).tmpl_name;
FOR i IN 1..2
LOOP
IF i = 1 THEN
sParmCheck := lt_parms(k).sql_out;
ELSE
sParmCheck := lt_parms(k).sql_parms;
END IF;
iOccurrence := 1;
*pOut_Parm(1).parameter_name := regexp_substr(sParmCheck,'\[[^\[]+\]',1,iOccurrence);*
WHILE pOut_Parm(1).parameter_name IS NOT NULL
LOOP
PIPE ROW (pOut_Parm(1));
iOccurrence := iOccurrence + 1;
*pOut_Parm(1).parameter_name := regexp_substr(sParmCheck,'\[[^\[]+\]',1,iOccurrence);*
END LOOP;
END LOOP;
END LOOP;
RETURN;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(li_exception,SUBSTR(SQLERRM,1,1000));
RETURN;
END template_parameters;
This function is part of a package.
The data on both environments is the same. -
First and last analtic functions
Hi
I am trying to understand the functioning of first and last function. but getting not idea how they work.
doc says
FIRST and LAST are very similar functions. Both are aggregate and analytic functions that operate on a set of values from a set of rows that rank as the FIRST or LAST with respect to a given sorting specification. If only one row ranks as FIRST or LAST, then the aggregate operates on the set with only one element.
Can anyone help me to understand this by an example as small simple one
thanks
NickSQL> select max(sal) keep (dense_rank first order by empno) sal_max_first
2 , min(sal) keep (dense_rank first order by empno) sal_min_first
3 , max(sal) keep (dense_rank last order by empno) sal_max_last
4 , min(sal) keep (dense_rank last order by empno) sal_min_last
5 from emp
6 /
SAL_MAX_FIRST SAL_MIN_FIRST SAL_MAX_LAST SAL_MIN_LAST
800 800 1300 1300
1 rij is geselecteerd.The order by clause orders the fourteen employees such that the first one is 7369 - SMITH and the last one is 7934 - MILLER. The expression returns the salary of SMITH (800) or the salary of MILLER (1300). The min and max are dummy since there are no ties when ordering by the primary key (empno).
Regards,
Rob. -
Hi,
Call Function 'FM' starting new task task-name
Exporting
What does this statement does.Hi
chk this out
CALL FUNCTION STARTING NEW TASK
Variant 2
CALL FUNCTION func ...STARTING NEW TASK task name.
Extras:
1. ... DESTINATION dest
2. ... DESTINATION IN GROUP group name
3. ... DESTINATION IN GROUP DEFAULT
4. ... PERFORMING form ON END OF TASK
5. ... EXPORTING p1 = f1 ... pn = fn
6. ... TABLES p1 = itab1 ... pn = itabn
7. ... EXCEPTIONS syst_except = rc MESSAGE mess
Effect
Starts the function module func asynchronously in a new session. In contrast to normal function module calls, the calling program resumes processing as soon as the function module is started in the target system. It does not wait until the function module has finished. Using CALL SCREEN, the called function module can, for example, display a screen and thus interact with the user. Note that taskname must be a valid string of at least 2 characters, preferably fewer than 8 characters. You cannot use either ' ' or SPACE as tasknames.
Notes
Note that under certain circumstances, an RFC may cause a database commit. For this reason, do not insert an RFC between two OpenSQL statements that open and close a database cursor (such as SELECT...ENDSELECT).
This variant applies only from R/3 Release 3.0, so both the client system and the server system must have Release 3.0 at least.
With this variant, the called function module must also be flagged in the Function Builder as externally callable, even if it is executed locally (without the addition Destination).
There can be no function call to the destination 'BACK' in the called function module (for more information about the destination 'BACK', see CALL FUNCTION func DESTINATION dest).
This variant does not allow you to execute external programs that you access from a TCP/IP-type detination asynchronously. (See the Transaction Tools -> Administration, Administration -> Network -> RFC destinations for maintaining destinations).
Neither does this variant allow you to display images such as lists or screens in a separate window during RFC communication using a SAProuter.
From Release 4.0 onwards, you can carry out a new, stricter system load check on RFC destinations. (In RFC destination maintenance of an R/3 connection, choose Destination -> ARFC-Optionen). Before the function module is executed, the system checks that the destination has sufficient resources available. If not, the system delays execution of the function module for a given period of time. The algorithm used to determine the system load on the target machine is the same as that used for an asynchronous RFC with the DESTINATION IN GROUP addition. Note that this option is only available for target systems from Release 3.1H onwards. This procedure is active as default.
In principle, parallel processing makes sense whenever application servers have the necessary resources. In this case, the application servers must be configured with at least 3 dialog work processes.
A program that is run in the background and uses RFC parallel processing requires at least 1 dialog work process per application server (because parallel processing takes place in a dialog work process).
If the instance profile parameter 'auth/rfc_authority_check' is set to 1, the system automatically performs an RFC authorization check. The authorization check refers to the relevant function group for the function module to be called. If no authorization is found, a runtime error occurs. You can check the authorization in advance with the function module AUTHORITY_CHECK_RFC. If the RFC communication takes places in one system and in the same user context (that is, the same client and User ID) the system does not perform an RFC authority check. For more information, see: RFC Authorization Concept.
When you are using asynchronous RFC to implement parallel windows, all these windows are closed if the caller session is the only session and terminates.
Note that asynchronous tasks that have been started are not necessarily closed when the calling program ends.
See also RFC Logons to the Target System (Remote Logon).
Addition 1
... DESTINATION dest
Effect
Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable. The R/3 System where the function module is executed depends on the specified destination. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
Note
If the destination is not explicitly specified, the system uses the default destination 'NONE'.
Note
If, during a Remote Function Call, an error occurs in the target system, details of the error message are passed back to the calling system in the following system fields: SY-MSGNO, SY-MSGID, SY-MSGTY, SY-MSGV1, SY-MSGV2, SY-MSGV3, and SY-MSGV4. These fields are initialized before every RFC. If a short dump or a type X message occurs, the short text of the dump is transferred to the caller, and the contents of SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 assigned by the system.
In RFC-enabled function modules, no ABAP statements are allowed that would end the RFC connection (for example, either LEAVE or SUBMIT without the AND RETURN addition).
Note
Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you cannot use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
Addition 2
... DESTINATION IN GROUP group name
Addition 3
... DESTINATION IN GROUP DEFAULT
Effect
You use this addition to perform parallel execution of function modules (asynchronous calls) on a predefined group of R/3 System application servers.
You use addition 2 (DESTINATION IN GROUP group name) to perform parallel execution of function modules on a predefined group of application servers. To maintain the RFC groups, choose Tools -> Administration -> Administration ->Network -> RFC destinations -> RFC -> RFC groups. The application programmer is responsible for the availability of RFC groups in the production system. In this case the group name variable must be of the type RZLLITAB-CLASSNAME
You use addition 3 (DESTINATION IN GROUP DEFAULT) to perform parallel execution of function modules (asynchronous calls) on all currently available R/3 System application servers. However, instead of this variant, you are recommended to use an RFC group with appropriate resources for parallel processing of asynchronous calls (at least for performance reasons). Please note that the addition DESTINATION IN GROUP ' ' has the same effect as the addition DESTINATION IN GROUP DEFAULT.
When you first call a function module with these additions, the system initializes the specified RFC group (unless the group has already been explicitly identified).
To obtain current information about resources (that is, the resources available to process function modules), you can also initialize the RFC group explicitly in the program using the function module SPBT_INITIALIZE. You must perform this action before the first function module call.
In both cases, the system first ascertains the currently available resources (work processes) on the available application servers (either a group of servers or all servers). By checking the current system load of each application server, the system determines how many work processes are available to execute asynchronous calls.
After ascertaining the available resources, the asynchronous call is executed to one of the
destinations. If no resources are available at that particular time, the system executes the
exception routine RESOURCE_FAILURE (see the addition EXCEPTIONS). In the case of
an asynchronous function module call, this exception must be handled by the application
program (see example).
No resources are made available by the system if resource availability limits are exceeded:
Notes
To be taken into consideration for RFC parallel processing, an application server must have at least 3 free dialog processes.
The system triggers the exception RESOURCE_FAILURE only for asynchronous RFCs with the additions DESTINATION IN GROUP group name and DESTINATION IN GROUP DEFAULT.
At present, only one RFC group per program environment is supported for parallel execution of asynchronous calls. Using both the additions DESTINATION IN GROUP group name and DESTINATION IN GROUP DEFAULT in a program is thus not allowed.
To find out which destination was automatically selected, call the function module SPBT_GET_PP_DESTINATION immediately after the function module call with the two additions. This returns the selected RFC destination.
If you want to delete an application server from the list of the configured RFC group at runtime (for example, when the application server is not accessible for technical reasons), use the function module SPBT_DO_NOT_USE_SERVER.
Addition 4
... PERFORMING form ON END OF TASK
While the parameters for receiving results (that is IMPORTING and TABLES parameters) are specified directly as additions in the case of "conventional" function modules (see variant 2), these are logged in the FORM routine form when making an asynchronous call (see RECEIVE).
Notes
If a function module returns no result, and you are not interested in error messages that arise when executing the function module, this addition (... PERFORMING form ON END OF TASK) can be omitted.
If you want to handle the error messages that arise when executing the asynchronous function module call, you must use this addition. Also, when receiving the results in the FORM routine (see RECEIVE), you must react accordingly to the system exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE.
With asynchronous RFC, the task name uniquely identifies the asynchronous connection and thus the context called.
If several asynchronous function modules are executed consecutively to the same destination, you must assign a different task name to each.
A calling program that starts an asynchronous RFC with the PERFORMING form ON END OF TASK addition cannot switch roll areas or change to an internal mode. This is because the asynchronous function module call reply cannot be passed on to the relevant program. You can perform a roll area switch with SUBMIT or CALL TRANSACTION.
If a calling program makes asynchronous calls, finishes, and then expects responses, it cannot receive these responses.
To wait for the reply to a started asynchronous function module, use the WAIT command with the addition PERFORMING form ON END OF TASK. Here, WAIT must be in the same program context (mode).
Note that executing asynchronous calls is subject to a roll area change.That is, subroutines performed to receive asynchronous calls can take place while other asynchronous calls are being made. Thus as a developer you must ensure that subroutines can be executed at any time. You must not make assumptions about the implicit processing sequence.
Addition 5
... EXPORTING p1 = f1 ... pn = fn
Effect
Passes values of fields and field strings from the calling program to the function module. In the function module, the formal parameters are defined as import parameters.
Addition 6
... TABLES p1 = itab1 ... pn = itabn
Effect
Passes references to internal tables.
Addition 7
... EXCEPTIONS syst_except = rc MESSAGE mess
Effect
While any exceptions arising in the called function module are handled by the second
addition (see the FORM subroutine RETURN_INFO), this addition can handle two special
system exceptions, (as with function module calls with the DESTINATION addition):
SYSTEM_FAILURE
is triggered, if a system crash occurs on the receiving side.
COMMUNICATION_FAILURE
is triggered if there is a connection or communication problem.
In both cases, you can get a description of the error with the optional ... MESSAGE messaddition
Note
In principle, you should always react to these two system exceptions, whether you are making an asynchronous function module call or receiving results.
Examples
Calling a transaction in a seperate session.
DATA: MSG_TEXT(80) TYPE C. "Message text
Asynchronous call to Transaction SM59 -->
Create a new session
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'TEST'
DESTINATION 'NONE'
EXPORTING
TCODE = 'SM59'
EXCEPTIONS
COMMUNICATION_FAILURE = 1 MESSAGE MSG_TEXT
SYSTEM_FAILURE = 2 MESSAGE MSG_TEXT.
IF SY-SUBRC NE 0.
WRITE: MSG_TEXT.
ELSE.
WRITE: 'O.K.'.
ENDIF.
Using RFC groups to parallelize function module calls(RFC parallel processing)
TYPES: BEGIN OF TASKLIST_TYPE,
TASKNAME(4) TYPE C, "Verwaltung der Tasks
RFCDEST LIKE RFCSI-RFCDEST,
END OF TASKLIST_TYPE.
DATA: INFO LIKE RFCSI, C, "Message text
JOBS TYPE I VALUE 10, "Number of parallel jobs
SND_JOBS TYPE I VALUE 1, "Sent jobs
RCV_JOBS TYPE I VALUE 1, "Received replies
EXCP_FLAG(1) TYPE C, "Number of RESOURCE_FAILUREs
TASKNAME(4) TYPE N VALUE '0001', "Task name administration
TASKLIST TYPE TABLE OF TASKLIST_TYPE,
WA_TASKLIST TYPE TASKLIST_TYPE.
DO.
CALL FUNCTION 'RFC_SYSTEM_INFO'
STARTING NEW TASK TASKNAME DESTINATION IN GROUP DEFAULT
PERFORMING RETURN_INFO ON END OF TASK
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2
RESOURCE_FAILURE = 3.
CASE SY-SUBRC.
WHEN 0.
Administration of asynchronous tasks
WA_TASKLIST-TASKNAME = TASKNAME.
CLEAR WA_TASKLIST-RFCDEST.
APPEND WA_TASKLIST TO TASKLIST.
WRITE: / 'Started Task: ', WA_TASKLIST-TASKNAME COLOR 2.
TASKNAME = TASKNAME + 1.
SND_JOBS = SND_JOBS + 1.
JOBS = JOBS - 1. "Number of existing jobs
IF JOBS = 0.
EXIT. "Job processing finished
ENDIF.
WHEN 1 OR 2.
Handling of communication and system failure
WHEN 3. "No resources available at present
Receive reply to asynchronous RFC calls
IF EXCP_FLAG = SPACE.
EXCP_FLAG = 'X'.
First attempt for RESOURCE_FAILURE handling
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.01' SECONDS.
ELSE.
Second attempt for RESOURCE_FAILURE handling
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '0.1' SECONDS.
ENDIF.
IF SY-SUBRC = 0.
CLEAR EXCP_FLAG. "Reset flag
ELSE. "No replies
"Endless loop handling
ENDIF.
ENDCASE.
ENDDO.
Receive remaining asynchronous replies
WAIT UNTIL RCV_JOBS >= SND_JOBS.
LOOP AT TASKLIST INTO WA_TASKLIST.
WRITE:/ 'Received Task:', WA_TASKLIST-TASKNAME COLOR 1,
30 'Destination: ', WA_TASKLIST-RFCDEST COLOR 1.
ENDLOOP.
FORM RETURN_INFO USING TASKNAME.
RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'
IMPORTING RFCSI_EXPORT = INFO
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
RCV_JOBS = RCV_JOBS + 1. "Receiving data
IF SY-SUBRC NE 0.
Handling communication and system failure
ELSE.
READ TABLE TASKLIST WITH KEY TASKNAME = TASKNAME
INTO WA_TASKLIST.
IF SY-SUBRC = 0. "Daten registrieren
WA_TASKLIST-RFCDEST = INFO-RFCDEST.
MODIFY TASKLIST INDEX SY-TABIX FROM WA_TASKLIST.
ENDIF.
ENDIF.
ENDFORM.
plz reward if useful -
Multiple calls of same function module do NOT initialize variables ?
Hi all,
..so its my fist post here, this is a bit strange problem for me and maybe someone knows whats happening.
So I have in SAP Solution Manager a function module 'Z', which calls a standard SAP class CL_SPROJECT_SOLAR_BASE_REPORT, which in turn calls the standard function module 'SPROJECT_GET_ADMIMP_SCREEN_BP'.
During development, things worked fine, but now I run my Z-Program for more than one instance and even I do all FREE for the Class, apperently the function module SPROJECT_GET_ADMIMP_SCREEN_BP, which is called by the class CL_SPROJECT_SOLAR_BASE_REPORT, does not get it's variables from the global data of the function pool re-initialized, when it is called for the second, 3rd, ... time.
This is a bit strane behavior for me, I would have expected that variables in a function module (or even in the global data of that function pool) get re-initialized each time that function module is called ?
Actually, this is the only function in that function pool.
Well, if not, does anyone has an idea how I can get the variables of this module pool re-initialized between the calls ? More concrete, the global data of function pool SAPLSPROJECT_SOLAR_ADMEVAL_BP define:
DATA: g_v_with_var TYPE char1.
In the function module line 36 (no reference to g_v_with_var, no module call, no changes to g_v_with_var before the IF-statement at all) it is querying:
IF g_v_with_var IS INITIAL.
So this is my problem, the second time I am calling the class (which is 'free'ed and re-created between the calls) which calls this function module the 'g_v_with_var' is not initial and there seems to be no way to have it set to initial again ?
So even thought this is in SolMan, I think the question & problem is a ABAP technical one ?
Any thoughts, help or support would be very much appreciated,
thank so much,
FrankHi Mae,
..thanks a lot for your fast reply, unfortunately there is only one function and no functions or forms at all for initializing. The variable I am fighting with is g_v_with_var and that is referenced only 4 times in the whole function pool:
Global Data: 101 DATA: g_v_with_var TYPE char1.
Function Module SPROJECT_GET_ADMIMP_SCREEN_BP (which is the only function module):
36 IF g_v_with_var IS INITIAL.
127 g_v_with_var = airep_true.
193 CLEAR g_v_with_var.
If in line 36 g_v_with_var is 'X', which it is always after the first call, the function will exit with an exception, so line 193 to clear it will actually never be executed...and it is not cleared the next time the function module is called, so you never get back to have the function run...
All the best,
Frank -
Security Level Medium is not working for PO initial version
Hi ,
We have maintained security level as Medium in Purchaser user personalization. In order to restart the PO SAVED event workflow only there is a value changed while the PO is awaiting for approval.. Here is the scenario and how the start condition maintained for PO - WS 14000145 - SAVED event.
Start condition maintained for event SAVED for WF template WS14000145 as below
&_EVT_OBJECT.POTotalValue& GE 0.00
Security level(BBP_WFL_SECURITY) maintained as Medium in personalization of SU01.
my requirement is when the PO create first time ( Initial Version ) and route for approval. Three level approval is determined for the PO and first approval approved. while the PO is awainiting for second level of approval the purchaser changed the quantity. based on above start condition my expectation is , the PO has to restart and route from beginning. but that is not happening. when i see the approval preview the approval path shows the workitem is waiting in second level of approval.
I tried the below start conditions also
&_EVT_OBJECT.SimpleListOfChanges&CE TOTAL_VAL, but no result..
What is the Medium functionality?
here is the help i found from help.sap.com, but i am not clear about this..
MEDIUM It is possible to change the document The system evaluates the workflow start conditions and starts the approval workflow again if the change necessitates a new approval If this is not the case, the approval workflow continues.
Regards,
JohnHi John,
The security level works differently for PO's.
In the function 'BBP_PDH_WFL_CHECK_RESTART is a desription how the
system should work:
The workflow will be RESTARTED in the following cases:
a) One has a standard workflow with the usual type of approval (not a
'back&forth' one). It will always be restarted independent on the
authorization levels of the user and whether the user is a PO
creator or not;
b) One has the 'back&forth' type of approval but the user reordering
the PO is not the PO creator (this could be another purchaser from
the same purchasing group);
c) It is the 'back&forth' type of approval and the user reordering the
PO is the PO creator but he has the authorization levels that are
less then 2, i.e '0'(not defined') or '1' (no changes allowed);
That means the security level must be below '2' to force a restart.
I hope that this clarifies how the system is working.
Kind regards,
Siobhan -
Pushing data in packets from Function Module to BW
Hi All,
I have been struggling with a problem for about a week and a half and I find myself at an in-pass. I firstly created a function module to pull data from SAP and join multiple tables so I could use it to report in Crystal. The problem was that it was so much data that I received errors due to processing time.
Thus to solve this problem I now use the function module to push data into a datasource so that it executes in the background.
The main problem I am experiencing is how to code a function module so that it will retrieve the data in segments then commit then retrieve next segment. At the moment the program works but if the data increases like it should I will run into the no more space in the internal table error.
Example of my code below. (much simplified to just demonstrate functionality). Sorry that it is still long but didn't want to leave out parts that might be important.
So how would one get the data to retrieve from the SAP tables and commit to BW in segments instead of like I do to retrieve all the data then pump into BW in segments.
FUNCTION ZBOBJ_COMMISSION.
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZDGB_COMMISION_REPORT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
STATICS : counter type i.
** Example: DataSource for table SFLIGHT
TABLES: ZDGB_COMMISION_REPORT.
** Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
** Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
** counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
** cursor
S_CURSOR TYPE CURSOR.
** Initialization mode (first call by SAPI) or data transfer mode
** (following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
** Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZBOBJ_COMMISSION'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
** this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
* Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
STATICS: st_itab TYPE ZDGB_COMMISION_REPORT OCCURS 0 WITH HEADER LINE.
IF S_COUNTER_DATAPAKID = 0.
ORIGINAL - DIRECT CUSTOMER**********************************************************
Select
VBPA~KUNNR
VBRK~VBTYP
INTO CORRESPONDING FIELDS OF TABLE itab1
FROM
VBRK
INNER JOIN VBRP ON VBRK~VBELN = VBRP~VBELN
INNER JOIN MARA ON VBRP~MATNR = MARA~MATNR
INNER JOIN ZCUWE ON ZCUWE~BOT_MAN = MARA~ZZBOTTMANU
INNER JOIN VBPA ON VBPA~VBELN = VBRP~AUBEL
WHERE VBPA~PARVW in s_parvw.
SORT ITAB1 BY KUNNR.
LOOP AT itab2.
st_itab-BUKRS = itab2-BUKRS.
ENDLOOP.
endif.
INSERT LINES OF st_itab TO S_S_IF-MAXSIZE INTO TABLE e_t_data.
DELETE st_itab TO S_S_IF-MAXSIZE.
IF lines( st_itab ) IS INITIAL.
counter = counter + 1.
if counter = 2.
RAISE NO_MORE_DATA.
endif.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
ENDFUNCTION.I'm not sure, but I think there's something wrong with your select instruction
Select
VBPA~KUNNR
VBRK~VBTYP
INTO CORRESPONDING FIELDS OF TABLE itab1
FROM
VBRK
INNER JOIN VBRP ON VBRKVBELN = VBRPVBELN
INNER JOIN MARA ON VBRPMATNR = MARAMATNR
INNER JOIN ZCUWE ON ZCUWEBOT_MAN = MARAZZBOTTMANU
INNER JOIN VBPA ON VBPAVBELN = VBRPAUBEL
WHERE VBPA~PARVW in s_parvw.
You're making a join within vbrk vbrp mara zcuwe and vbpa using a non-key field such vbpa-parvw. Are you sure we're talking about an over-size problem?
You should separate INNER JOIN, using FOR ALL ENTRIES instruction, with range datas. -
Installed Lion on Monday.
1. Install went as advertised ... no hiccups.
2. First few hours, system seemed slower than SL. Noted that Spotlight was indexing and TC was backing up (big backup due to new OS).
3. Next day, system started acting faster than SL! (2G RAM, with 1G more coming. My Late '06 iMac only supports 3G). TC backups returned to normal times; Spotlight fine. Smoother scrolling.
4. Not sure, but possibly changes in display resolution options. Initial resolution seemed a bit lower than last one in SL. Kicked it up a notch to 1680x1050 and it seems better (smaller print, however).
5. New Mail design (like iOS) not as comfortable as with touch screen (iPad & iPhone). It's an ergonomics thing ... works fine.
6. Haven't exploited Mission Control or Launchpad yet. I think I like SuperDocker.
7. Downloaded Pages to check compatibility with Word files. OK. Will probably dump MS Office.
Also:
1. Got Magic TrackPad.
2. Easy install.
3. So far, scrolling/dragging gestures are winners! Smooth, responsive, intuitive. Haven't explored many others yet. Kinda like it better than MBP TrackPad(?).
4. Major question revolves around use with Boot Camp. Windows Vista Home Basic wouldn't pair. Apple Tech Support provided "0000" Passkey, which worked. Initial functions limited to cursor control and clicking. Tech Support working with me to upgrade BC Version. At 3.1 now - want 3.2, but need Vista SP 2; which will require a bigger Windows BC partition. Still need to do that ... but still not sure it will work. The BIGGEST issue is that the TrackPad does not seem to be able to retain pairing with both Windows and Lion. Switching back and forth requires re-pairing in both directions, and THAT can be donme only after removing TP batteries! Methinks BC and wireless accessories are not friendly to each other. Thoughts?
Overall: Lion Very Good (but not as much initial "wow!" as SL) - probably due to prior comfort with iOS. Magic TrackPad: Very Good with Lion. Jury still out with Windows/Boot Camp.
Interested in any thoughts/comments/suggestions.
TIA,
picmanNice to see some positive input.
Don't forget there's a 10.7.1 update out there you can install too. No issues here, so far, with the update. -
Mass functions in Life cycle Planning
Hi Experts,
Does anybody know if there is method using which we can create mass like profiles, or atleast carrying out a mass assignment of Phase out profiles, or Like profiles, Phase in Profiles in the Assingments table in Life cycle Planning?
We ahve the following requirements:
1. Assign 1 Phase out profile to some 5000 products, how can we achieve this other than manually assinging in the assignments table.
2. Is there a way to create 100's of Like profiles at one time?
I am looking for first SAP stadard functionality t handle this or other wise develop some custom programs to do it. But I am not sure how much feassible this is.
I really want to know how companies handle these requirements of mass discontinuation using Phase out profiles in DP.
If nothing works out, I think copying products from an excel and pasting it in the assingments table and then assigning one Phase Out profile to these products and repeating this step for 5000 products will be my only option.
Please help.
RoopaThat select block functionality is the stupidest thing I have seen. I initially thought it was similar to 'select all' but it is not. Let's say you have 10 records & you want to select all. Then you select the 1st row and 10th row and if you use 'select block' then all records inbetween will be selected. You can then delete or copy them depending on your need.
The closest thing that I see here in assigning Like & PI/PO profiles is the 'Copy line' functionality. May prove helpful if you want to assign same like or PI/PO profile to many products. Ofcourse, you need to enter the products/characteristics but atleast the task of picking/choosing profiles can be minimized. Try & see how best you can use it in your mass assignment.
Hope this helps.
Cheers,
Srinidhi -
Sap.m.Table generating first two blank rows after adding more rows.
Hi everyone,
I am stucked in a very bad condition the problem is with the table rows and columns. I am generating dynamic table columns and rows based on searched unit so whenever i am searching i created a function for initializing the table rows and columns i am looping the array for whatever the size of rows and columns it will display up to 5. My issue is with the request going is adding more times then the required one. So if anyone can check for the solution. Only problem is my data is generated correct but next time i call this method again it is hiding the first 2 rows.
function initializeGrid() {
if (SHOPFLOOR_DCS_UNIT_KEY != null) {
var dcsComboBox = sap.ui.getCore().byId("selectDCSName");
var dcsName = dcsComboBox.getValue();
var viewData = {};
viewData.EntityName = "DataCollectionSetAttribute";
viewData.Condition = [{ColumnName : "DcsName",Value :dcsName}];
viewData.Projection = {AttributeName:true,AttributeType:true,Length:true,Precision:true,LowerLimit:true,
UpperLimit:true,DefaultValue:true };
$
.ajax({
type : "POST",
url : "/demo/xsds/designer/SelectByQueryService.xsjs",
contentType : "application/json",
data : JSON.stringify(viewData),
dataType : "json",
success : function(data) {
/*dcDataTable.unbindItems();
dcDataTable.removeAllItems();
dcDataTable.removeAllColumns();*/
var dcsCols = data;
if (data != null
&& data.length > 0) {
var firstColumn = [{
"AttributeName": "SerialNumber",
"ModifiedAttributeName": "SerialNumber"
for (var index = 0; dcsCols.length > index; index++) {
var currentRow = dcsCols[index];
if (currentRow.AttributeName != null
&& currentRow.LowerLimit != null
&& currentRow.UpperLimit != null) {
dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
+ "["
+ currentRow.LowerLimit
+ " - "
+ currentRow.UpperLimit
+ ","
+ "Def:"
+ currentRow.DefaultValue
+ "]";
firstColumn
.push(dcsCols[index]);
} else if (currentRow.AttributeName != null) {
dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
+ "["
+ "Def:"
+ currentRow.DefaultValue
+ "]";
firstColumn
.push(dcsCols[index]);
if (currentRow.AttributeType != null
&& currentRow.AttributeType == "LocalDate")
dateAttributes[dateAttributes.length] = currentRow.AttributeName;
dcsCols = firstColumn;
runtimeDCS = dcsCols;
console.log("dcsCols", dcsCols);
var viewData = {};
viewData.EntityName = dcsName;
viewData.Cmd="GET";
viewData.UnitKey=SHOPFLOOR_DCS_UNIT_KEY;
$.ajax({
type : "POST",
url : "/demo/xsds/designer/AddOrRemoveDCSDataService.xsjs",
contentType : "application/json",
data : JSON.stringify(viewData),
dataType : "json",
success : function(data) {
console.log("dcsVals"+
JSON.stringify(data)+data.length);
dcDataTable.removeAllColumns();
for (var i = 0; i < data.length; i++) {
for (key in data[i]) {
var textValue = data[i][key];
if (typeof textValue !== "object"
&& typeof textValue === "string"
&& textValue
.indexOf("/Date(") > -1) {
var startIndex = textValue
.indexOf("(");
var endIndex = textValue.indexOf(")");
var tempValue = textValue.substring(startIndex + 1,endIndex);
var tempDate = new Date(parseInt(tempValue));
data[i][key] = tempDate.toDateString();
dcsModel.setData({dcsRows : data});
sap.ui.getCore().setModel(dcsModel);
var columnList = new sap.m.ColumnListItem();
dcDataTable.bindItems({
path: "/dcsRows/",
template: columnList,
for (var i = 0; i < dcsCols.length && i<5; i++) {
dcDataTable.addColumn(new sap.m.Column({
header : new sap.m.Label({
text : dcsCols[i].ModifiedAttributeName
columnList.addCell(new sap.m.Text({
text : {
path : dcsCols[i].AttributeName
clearItems();
},error : function(response) {
console.log("Request Failed==>",response);
if (response.responseText.indexOf('<html>') == -1)
console.log(JSON.stringify(response.responseText));
else
console.log("Invalid Service Name");
},error : function(response) {
console.log("Request Failed==>",response);
if (response.responseText.indexOf('<html>') == -1)
console.log(JSON.stringify(response.responseText));
else
console.log("Invalid Service Name");
else {
console.log("Data not found!!!");No, even with the select box gone the table still doesn't show the last two rows, so this seems indeed be irrelevant to the question.
Best Regards,
S.
***update***
I tried to create a simple case in which the same strange behavior occurs but I can't seem to reproduce it. The table that produces the two blank rows is part of a complex application and I tried to extract enough of it for a simple test case that behaves the same way but I can't manage to do that. I guess that once I have the behavior I will also know what causes it.
It seems that the iterator is set to rangesize 10 but the table rests on rangesize 12, when I looked at other tables in the application it seems that if I want to set the rangesize from 57 to 50, it remains on 57.
Can anyone help me with either this limited info or otherwise instruct me to get more info ?
Best Regards,
S.
Edited by: matdoya on Dec 1, 2008 5:51 AM
Maybe you are looking for
-
How to get the maximum bandwidth/MaxSpeed/Capacity of a Hyper-V virtual-switch?
We are trying to monitor Hyper-V environment (Windows 2008 R2 and Windows 2012) using WMI, and have a very specific question Hyper-V virtual-switch. We have referred the below mentioned classes and their properties. 1. Win32_NetworkAdapter (namespace
-
Reading in a txt file, appending numbers to it.
So I'm a student at Georgia Tech working on a relatively simple Java program for a research internship, but it's been awhile since I've had my Java course and I'd really like some help on this. Basically, what I'm looking to do is to take in a text f
-
How can i get no. of records in a block?
How can i get no. of records in a block? please advise me................
-
How system calculate the required qty. after MRP RUN
Hi, I want to know if we are using MRP Type as PD and also we are calculating automatic saftey stock and re order point qty. after MRP RUN according to which rule formula system calculate the safty stock, reorder point qty. and the required qty. as a
-
I have a Nikon Coolpix P510 and with Picasa I am not able to view videos or continous photos. Before I purchase Adobe Lightroom I want to know if I am able to view those features?