Time Variable from .... to
Hi Gurus;
I am using BI 7.0. My client wants a customized variable for 0CALMONTH with 2 dialog boxes stating "From Month" and "To Month", i.e intervals (like we used to have in 3.x). They don't like the interval option provided in BI 7.0. Is there a way to fulfil his requirement. Please provide me a step - by - step guide if possible.
Thanking you;
Sumanta
Hi;
My Client actually wants 2 dialog boxes in the selection screen saying "From month" and "To Month". When you input months, say; 06.2008 in "From Month" and 08.2008 in "To Month", the output which will come is data from all the months between 06.2008 and 08.2008. The 2 dialog boxes are important in this screen. I know. it can be done through interval option in BI 7.0, but the dialog boxes doesn't appear in the the first screen of the Selection Screen (Like in 3.x). Can it be done?
Sumanta
Similar Messages
-
UCCX changing time variables from AM to PM and vice-versa
Hi all.
I have an extremely irritating issue that I'm hoping someone can shed some light on.
I'm currently making improvements to one of our contact centre scripts. We require to activate redirection on the fly quite often, and in the past I used a modified script with different time of day tests.Going forward I wanted to provide the ability for this to be activated and times set through the GUI.
So I made some variables as parameters, of note these are RedirectOperation (boolean), RedirectFrom (Time) and RedirectUntil(Time).
The flow is that if RedirectOperation is true, a time test is performed to dictate when we redirect - this is in the form of:
(T[now] >= RedirectFrom) && (T[now] <= RedirectUntil)
Now I know I can use T[now].before(xxx) etc but the operation itself isn't the issue, it does work perfectly fine this way, but the times change from AM <<>> PM under certain conditions.
To explain:
I set the default (on the script itself) RedirectFrom to "T[6:00:00 PM]" and RedirectUntil to "T[11:59:59 PM]".
When debugging the script, I can see that the system changes the times from PM to AM (under the variable list on CCX editor during a reactive debug) ! That's if I've not selected these parameters on the GUI. If however, I do select the parameters and still use the default values, when debugging, they stay as PM!!
This is surely a bug??
To try something else, I changed my time format to 24 hour clock - so 18:00:00 and 23:59:59 respectively. I can set these on the script itself, and if the parameters are unchecked and left at default, it works fine. However when I select the parameter and try to change the times to (for example) 19:00:00 and 22:59:59, the GUI spits an error saying:"* Please enter a valid date for the Date configurable variable." I can only assume there is a mismatch between what you're allowed to put into the script and what the GUI thinks you're allowed to.
But certainly the script surely should not be changing between AM and PM when a variable is left to default??
Any ideas would be greatly appreciated!
Thanks in advance.
ScottyAfter choosing your start time you should be able to click to the right to change from AM to PM or vice versa by using the up/down button. I just did it.
If your DVR is not cooperating, try rebooting it. -
Currency Translation not working with "Time Reference from Variable"
We have created several Currency Translations using RSCUR with a fixed "Key Date". All have been working fine until we got the request to allow a variable date for the exchange rate date. I have built a variable on 0DATE which I am putting a default date value into using user exit. This default date is the SAME date as the fixed "Key Date" which we have been using. Unfortunately when we use the "Time Reference from Variable" option and use this new variable, no currency conversion is taking place, instead it only shows the original currency values. I am 100% sure that my variable is getting a value and it is the same date we are using for the fixed "Key Date" value so both methods should be using the exact same exchange rates. The documentation that I can find states:
● Time reference: The time reference for the currency translation can be either fixed or variable.
If the time reference is fixed, the time at which the exchange rate is determined is independent of the data. You have the following options:
○ You can establish that the time reference be determined upon translation.
○ You can select the current date.
○ You can specify a fixed date as the key date.
○ You can specify any variable that exists for InfoObject 0DATE.
○ You can establish that the query key date be used. This is determined in the query settings.
In my case I am only switching from option "You can specify a fixed date as the key date"=(Key Date) to "You can specify any variable that exists for InfoObject 0DATE"=(Time Reference from Variable).
What am I missing? Any help is appreciated.I neglected to mention that we are calling this currency translation through a WAD button using the SET_CURRENCY_TRANSLATION command. I did do a test by applying the currency conversion within query key figure. This seems to work. So it appears the issue is with how the WAD is processing the variable, not the query. When I display the variable in a drop down item within the WAD it does have the default value that I have assigned in user exit.
-
Time reference from variable in crcy transl. type
Hi guys,
does anybody know, where to create the variables displayed in RSCUR, when I want to create a crcy. transl. type with time reference from variable?
Thanks in advance, ClemensHi,
With step by step :
http://www.sapdb.info/wp-content/uploads/2008/11/bw-howtousevariablestimereferencesincurrencyconversion.pdf
with steps and Definitions :
http://www.scribd.com/doc/7061035/How-to-Use-Variables-for-Currency-Conversion
The time reference for the currency translation can be either fixed or variable.
If the time reference is fixed, the time at which the exchange rate is determined is independent of the data. You have the following options:
○ You can establish that the time reference be determined upon translation.
○ You can select the current date.
○ You can specify a fixed date as the key date.
○ You can specify any variable that exists for InfoObject 0DATE.
○ You can establish that the query key date be used. This is determined in the query settings.
If the time reference is variable, the time at which the exchange rate is determined is decided by a time characteristic value.
○ A variable time reference can, for example, be determined using the end or start of a fiscal year or calendar year, a period and a month u2013 or even to the exact day. The following standard time characteristics are available: 0FISCYEAR, 0FISCPER, 0CALYEAR, 0CALQUARTER, 0CALMONTH, 0CALWEEK and 0CALDAY.
○ The time reference can also be determined using a customer-specific InfoObject of type date (for example, trading day). Note that this InfoObject has to have the same properties as the standard InfoObject selected in the variable time reference or must reference it.
○ You can specify an InfoSet: This is only necessary if you are determining the target currency using an InfoObject that exists in the InfoSet more than once. You enter the field alias so that the InfoObject can be specified uniquely.
In the Business Explorer, you can only set time variable currency translations in query definition, and not for an executed query. See also Setting Variable Target Currency in the Query Designer.
○ In the Time Adjustment field of type INT4, you can specify whole numbers with a +/- sign.
○ In the Time Adjustment from Variable field, you can specify formula variables (1FORMULA). As these values of the variables may have to be whole numbers, they are rounded to whole numbers (integers) where necessary.
The time adjustment (regardless of whether it is fixed or variable) is always related to the InfoObject specified under Variable Time Reference.
Example of a time adjustment of -3:
The variable time reference is To the exact day and the InfoObject under Variable Time Reference is 0CALDAY. Instead of 07.11.2006, after the time adjustment, 04.11.2006 is used for the translation.
The variable time reference is End of Week and the InfoObject under Variable Time Reference is 0CALWEEK. Instead of 52.2004, the week 49.2004 is calculated and the end date is calculated from this.
For more info pls refer this link:
http://help.sap.com/saphelp_nw2004s/helpdata/EN/80/1a6806e07211d2acb80000e829fbfe/content.htm
I hope these will helps you.
Thanks .
Hema -
Dynamically Setting a Variable from a Connection String that has been set by a Config File
Hi Guys
I'm setting up a Master / Slave (Parent / Child) dtsx environment but I'm unable to work out how to dynamically set a variable in the Master dtsx from a connection string that has had its value set by a config file. I'm sure it's possible.
Below is the what I'm hoping to achieve. I've set up everything apart from the highlighted section.
Any ideas?First, what version of SQL Server are you using?
You could switch the problem around. You could set the value of a variable from the config file, then it is easy to use that variable as the connection string source for your connection manager. At the same time you can use a parent variable
configuration to map that variable to variables in your child package.
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
Importing variables from another page in jsp
Hey.
I want to make two pages. I want the first page to include the variables from another page or POJO.
I did this but i cant use the variables in index.jsp without initializing them first. But when I initialize them i get an error when trying to initialize them two times.
if i use the variable in index without saving i get an error in eclipse.. but it works if i save and deploy.
Is there any way to make eclipse see that i have imported the variable?
The pages look something like this:
index.jsp
<%@ include file="extra.jsp" %>
Print the number from the extra page
<%= number %>extra.jsp
int number = 32;I plan using this in a much greater system so I would appreciate any help.I'm having the same problem.
Would be nice if somebody could help us. -
How to load variables from a .txt file
Hi.
I usually make a flash aplication in colaboration with a php
programmer. But i want to test my swfs without having to wait for
him. So i want to do that through a text file. I know that flash
can load variables from text files. The problem is i don't know how
to format the text file ( example.txt).
Thank youHere's a couple of ideas.
First you probably want to change what you have...and put
your 'if (pVar==1' etc inside a separate function and call it from
the onLoad handler after you have assigned the value to pVar...
because the onLoad will run at some unknown point in time after
loading has finished (actually in the test environment this might
work... but that wouldn't be the same as what happens in a
production setting).
To create test files for loadvars... simply create a new as2
file and put this code on the first frame and test movie: -
Variables from an Outside Database
Hey guys,
I'm trying to write a SQL report that can return the tracking number of a given sales order that is being stored in another database. I have no problem accessing the outside database if I have the correct document number in the query.
However, when I try to use SAP's '[%0]' notation to have a run-time variable as the document number, sometimes I get the following error message: File Not Found "Service Contracts" (ODBC-2004)
But then sometimes, I get this error message instead: File Not Found 'CSHS'
SELECT t0.docnum, rbeacon.dbo.SPSS_DETAIL.packslip as 'Sales Order #',CARRIER, SERVICE_DESC,TRACKNUM1,TRACKNUM2, TRACKNUM3, TRACKNUM4, TRACKNUM5,
TRACKNUM6, TRACKNUM7, TRACKNUM8, TRACKNUM9, TRACKNUM10
FROM ordr T0, rbeacon.dbo.SPSS_HEADER INNER JOIN rbeacon.dbo.SPSS_DETAIL ON rbeacon.dbo.SPSS_HEADER.PACKSLIP=rbeacon.dbo.SPSS_DETAIL.PACKSLIP
where T0.DocNum = rbeacon.dbo.SPSS_DETAIL.PACKSLIP AND t0.docnum = '[%0]'Hi Kevin,
I have received this error numerous times and with a lot of headache I have come to some conclusions.
1. Sometimes it helps to always add the [dbo]. in front of all fields to be selected.
2. Sometimes it helps to declare a sql variable and then assign a value to the variable rather than using the variable in different places, like:
DECLARE @Vendor VarChar(20)
SELECT @Vendor = T0.CardCode FROM OPOR T0 WHERE T0.CardCode = '[%0]'
SELECT * FROM OINV WHERE CardCode = @Vendor
I know this seems strange, but sometimes it works and sometimes not... still trying to figure out exactly why.
Hope it helps,
Adele -
Example on extracting time data from clusters
Hi Experts,
Please send me a sample code for time data extraction from clusters. or steps to extract time data from clusters.
Thank you.
Regards,
Admir.
Points will be rewarded.Hi
see the sample report for time data fetching
But ime data is not fetched from Clusters, only payroll data is fetched from clusters
Time related infotypes are 2000 to 2999.
REPORT zh_absence_quota
NO STANDARD PAGE HEADING
MESSAGE-ID zh_msg
LINE-SIZE 169
LINE-COUNT 60(1).
T A B L E S D E C L A R A T I O N S
TABLES: pernr, " Logical PNP
t001p, " Personnel Subarea
t529u, " Employment Status
t500p, " Personnel Area
t501, " Employee Group
t503k, " Employee Subgroup
t549a, " Payroll Area
t554s, " Absence Type
t554t, " Absence Type Texts
t556a, " Quota Type
t527x, " Orgn. Unit
t556b, " Quota Type Text
pa0003. " Payroll Status
INFOTYPES:
0000, " Actions
0001, " Organizational Assignment
2006, " Absence Quota
2001. " Absences
T Y P E S D E C L A R A T I O N S
Employee Absence Structure
TYPES: BEGIN OF s_2001,
pernr TYPE persno, " Personal Number
awart TYPE awart, " Absence Type
subty TYPE subty, " Sub Type
endda TYPE endda, " End date
begda TYPE begda, " Begin date
abrtg TYPE abrtg, " Absence days
ename TYPE emnam, " employee Name
atext TYPE abwtxt, " Absence Type Text
END OF s_2001.
Employee Absence Quota Structure
TYPES: BEGIN OF s_2006,
pernr TYPE persno, " Personal Number
ktart TYPE abwko, " Absence Quota Type
year(4) TYPE n, " Year
subty TYPE subty, " Sub Type
endda TYPE endda, " End date
begda TYPE begda, " Begin date
anzhl TYPE ptm_quonum, " Absence Entitlement days
ename TYPE emnam, " employee Name
ktext TYPE kotxt, " Absence Type Text
kverb TYPE kverb, " Deduction Quota days
anzhb TYPE ptm_quonum, " Balance days
END OF s_2006.
Combined Employee Absence and Quota Structure
TYPES: BEGIN OF s_rep,
pernr TYPE persno, " Personal Number
ktart TYPE abwko, " Absence Quota Type
year(4) TYPE n, " Year
anzhl TYPE ptm_quonum, " Absence Entitlement days
kverb TYPE kverb, " Deduction Quota days
anzhb TYPE ptm_quonum, " Balance days
ktext TYPE kotxt, " Quota Type Text
awart TYPE awart, " Absence Type
abrtg TYPE abrtg, " Absence days
ename TYPE emnam, " employee Name
atext TYPE abwtxt, " Absence Type Text
endda TYPE endda, " End date
begda TYPE begda, " Begin date
END OF s_rep.
Declaration of Variables
DATA : gv_atext TYPE abwtxt, " Absence Type Text
gv_ktext TYPE kotxt, " Absence Type Text
gv_title1 TYPE sylisel, " Report title
gv_year(4) TYPE c, " Year
gv_mon(2) TYPE c, " Month
gv_hrs TYPE abwtg, " Hours
gv_date TYPE sydatum, " Date
gv_date1 TYPE sydatum, " Date
gv_dial. " Color flag
Declaration of Constants
CONSTANTS :
c_x TYPE c VALUE 'X', " Sign
c_1 TYPE persg VALUE '1', " Emp Group
c_pernr(8) TYPE n VALUE '00000000', " Pernr
c_moabw TYPE moabw VALUE '01', " Per SA Grouping
c_mozko TYPE mozko VALUE '01', " Per SA Grouping
c_mopgk TYPE mopgk VALUE '1', " Emp SGrp Grouping
c_endda TYPE sydatum VALUE '99991231', " End Date
c_val1(2) TYPE c VALUE '31', " Date Type
c_val2(2) TYPE c VALUE '12', " Date Type
c_val LIKE p0041-dar01 VALUE '01', " Date Type
c_date1 LIKE sy-datum VALUE '18000101'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_2001 TYPE STANDARD TABLE OF s_2001 WITH HEADER LINE,
i_2006 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
i_rep1 TYPE STANDARD TABLE OF s_2006 WITH HEADER LINE,
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_ktart FOR t556a-ktart, " Absence Quota Type
s_awart FOR t554s-subty. " Absence Type
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-003. " Quota & Absence
PARAMETERS: p_qa RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-004. " Quota
PARAMETERS: p_q RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(33) text-005. " Absence
PARAMETERS: p_a RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN END OF BLOCK b2.
I N I T I A L I Z A T I O N *
INITIALIZATION.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_screen.
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Selection of Period
PERFORM get_period.
Get PERNR from LDB
GET pernr.
IF p0000-stat2 <> '0'.
Get the data from PA0001,PA2001, PA2006
PERFORM get_pers_data.
ENDIF.
T O P - O F - P A G E *
TOP-OF-PAGE.
Header of the List
PERFORM header.
E N D - O F - P A G E *
Footer
END-OF-PAGE.
IF p_qa = c_x.
Display both Absence and Quota Data
WRITE /1(188) sy-uline.
ELSEIF p_q = c_x.
Display only Quota Data
WRITE /1(114) sy-uline.
ELSEIF p_a = c_x.
Display only Absence Data
WRITE /1(125) sy-uline.
ENDIF.
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
Combine the Absence and Quota Data
PERFORM append_data.
IF p_qa = c_x.
Display both Absence and Quota Data
PERFORM display_qa_data.
ELSEIF p_q = c_x.
Display only Quota Data
PERFORM display_q_data.
ELSEIF p_a = c_x.
Display only Absence Data
PERFORM display_a_data.
ENDIF.
*& Form validate_screen
Validation of Selection Screen fields
FORM validate_screen .
Validation of Personnel Number
CLEAR pa0003.
IF NOT pnppernr[] IS INITIAL.
SELECT pernr
FROM pa0003 UP TO 1 ROWS
INTO pa0003-pernr
WHERE pernr IN pnppernr.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Number'(006).
ENDIF.
ENDIF.
Validation of Employee Status
CLEAR t529u.
IF NOT pnpstat2[] IS INITIAL.
SELECT SINGLE statv
INTO t529u-statv
FROM t529u
WHERE statv IN pnpstat2 AND
statn = '2' AND
sprsl = sy-langu.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Invalid Employee Status'(007).
ENDIF.
ENDIF.
Validation of Personnel Area
CLEAR t500p.
IF NOT pnpwerks[] IS INITIAL.
SELECT persa
FROM t500p UP TO 1 ROWS
INTO t500p-persa
WHERE persa IN pnpwerks.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Area'(008).
ENDIF.
ENDIF.
Validation of Personnel Sub Area
CLEAR t001p.
IF NOT pnpbtrtl[] IS INITIAL.
SELECT btrtl
FROM t001p UP TO 1 ROWS
INTO t001p-btrtl
WHERE btrtl IN pnpbtrtl.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Personnel Sub Area'(009).
ENDIF.
ENDIF.
Validation of Employee Group
CLEAR t501.
IF NOT pnppersg[] IS INITIAL.
SELECT persg
FROM t501 UP TO 1 ROWS
INTO t501-persg
WHERE persg IN pnppersg.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Group'(010).
ENDIF.
ENDIF.
Validation of Employee Sub Group
CLEAR t503k.
IF NOT pnppersk[] IS INITIAL.
SELECT persk
FROM t503k UP TO 1 ROWS
INTO t503k-persk
WHERE persk IN pnppersk.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Sub Group'(011).
ENDIF.
ENDIF.
Validation of Payroll Area
CLEAR t549a.
IF NOT pnpabkrs[] IS INITIAL.
SELECT abkrs
FROM t549a UP TO 1 ROWS
INTO t549a-abkrs
WHERE abkrs IN pnpabkrs.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Payroll Area'(026).
ENDIF.
ENDIF.
Validation of Absence Type
CLEAR t554s.
IF NOT s_awart[] IS INITIAL.
SELECT subty
FROM t554s UP TO 1 ROWS
INTO t554s-subty
WHERE subty IN s_awart AND
moabw EQ c_moabw AND
endda EQ c_endda.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Absence Type'(012).
ENDIF.
ENDIF.
Validation of Absence Quota Type
CLEAR t556a.
IF NOT s_ktart[] IS INITIAL.
SELECT ktart
FROM t556a UP TO 1 ROWS
INTO t556a-ktart
WHERE ktart IN s_ktart AND
mopgk EQ c_mopgk AND
mozko EQ c_mozko AND
endda EQ c_endda.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e999 WITH 'Incorrect Employee Quota Type'(013).
ENDIF.
ENDIF.
ENDFORM. "validate_screen
*& Form get_period
Get the Correct Period based on Selection screen selection
FORM get_period.
CLEAR: gv_year,gv_mon, gv_date, gv_date1.
gv_year = sy-datum+0(4).
gv_mon = sy-datum+4(2).
IF pnptimr1 = c_x. " Current Date
pnpbegda = sy-datum.
pnpendda = sy-datum.
ELSEIF pnptimr2 = c_x. " Current Month
CONCATENATE gv_year gv_mon c_val INTO gv_date.
CONCATENATE gv_year gv_mon c_val1 INTO gv_date1.
pnpbegda = gv_date.
pnpendda = gv_date1.
ELSEIF pnptimr3 = c_x. " Current Year
CONCATENATE gv_year c_val c_val INTO gv_date.
CONCATENATE gv_year c_val2 c_val1 INTO gv_date1.
pnpbegda = gv_date.
pnpendda = gv_date1.
ELSEIF pnptimr4 = c_x. " Upto Today
pnpbegda = c_date1.
pnpendda = sy-datum.
ELSEIF pnptimr5 = c_x. " From Today
pnpbegda = sy-datum.
pnpendda = c_endda.
ELSE.
IF ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
pnpbegda = c_date1.
pnpendda = c_endda.
ELSEIF pnpbegda IS INITIAL AND NOT pnpendda IS INITIAL.
pnpbegda = c_date1.
pnpendda = pnpendda.
ELSEIF NOT ( pnpbegda IS INITIAL AND pnpendda IS INITIAL ).
pnpbegda = pnpbegda.
pnpendda = pnpendda.
ENDIF.
ENDIF.
ENDFORM. "get_period
*& Form get_pers_data
Get the Absence and Quota Data from PA0001,PA2001,PA2006
FORM get_pers_data.
DATA: lv_year1(4) TYPE n,
lv_year2(4) TYPE n,
lv_date1 TYPE sydatum,
lv_date2 TYPE sydatum,
lv_anzhb TYPE ptm_quonum. " Last Year Balance days
Get data from Respective Infotypes
rp_provide_from_last p0001 space pnpbegda pnpendda.
Absence Data
LOOP AT p2001 WHERE pernr = pernr-pernr AND
begda GE pnpbegda AND
endda LE pnpendda.
IF p2001-awart IN s_awart.
i_2001-pernr = pernr-pernr.
i_2001-subty = p2001-subty.
i_2001-awart = p2001-awart.
i_2001-abrtg = p2001-abrtg.
i_2001-begda = p2001-begda.
i_2001-endda = p2001-endda.
READ TABLE p0001 WITH KEY pernr = p2001-pernr.
i_2001-ename = p0001-ename.
Get the Absence Type Text
CLEAR gv_atext.
SELECT SINGLE atext INTO gv_atext FROM t554t
WHERE sprsl = sy-langu AND
moabw = c_moabw AND
awart = p2001-awart.
IF sy-subrc = 0.
i_2001-atext = gv_atext.
ENDIF.
APPEND i_2001.
CLEAR i_2001.
ENDIF.
ENDLOOP.
Quota Data
LOOP AT p2006 WHERE pernr = pernr-pernr AND
begda GE pnpbegda AND
endda LE pnpendda.
IF p2006-ktart IN s_ktart.
i_2006-pernr = pernr-pernr.
i_2006-subty = p2006-subty.
i_2006-begda = p2006-begda.
i_2006-endda = p2006-endda.
i_2006-year = p2006-endda+0(4).
i_2006-ktart = p2006-ktart.
i_2006-anzhl = p2006-anzhl.
i_2006-kverb = p2006-kverb.
i_2006-anzhb = p2006-anzhl - p2006-kverb.
READ TABLE p0001 WITH KEY pernr = p2001-pernr.
i_2006-ename = p0001-ename.
Get the Quota Type Text
CLEAR gv_ktext.
SELECT SINGLE ktext INTO gv_ktext FROM t556b
WHERE sprsl = sy-langu AND
mopgk = c_mopgk AND
mozko = c_mozko AND
ktart = p2006-ktart.
IF sy-subrc = 0.
i_2006-ktext = gv_ktext.
ENDIF.
APPEND i_2006.
CLEAR i_2006.
ENDIF.
ENDLOOP.
For Vacation Quota (80) get the Balance of the Last Year and
add to the Current Year Quota
LOOP AT i_2006.
IF i_2006-ktart = '80'.
lv_year1 = i_2006-endda+0(4).
lv_year2 = lv_year1 - 1.
CONCATENATE lv_year2 '01' '01' INTO lv_date1.
CONCATENATE lv_year2 '12' '31' INTO lv_date2.
LOOP AT p2006 WHERE pernr = i_2006-pernr AND
begda GE lv_date1 AND
endda LE lv_date2 AND
ktart = '80'.
lv_anzhb = p2006-anzhl - p2006-kverb.
i_rep1-pernr = i_2006-pernr.
i_rep1-ktext = i_2006-ktext.
i_rep1-anzhl = p2006-anzhl.
i_rep1-kverb = p2006-kverb.
i_rep1-ename = i_2006-ename.
i_rep1-begda = p2006-begda.
i_rep1-endda = p2006-endda.
i_rep1-anzhb = lv_anzhb.
i_rep1-ktart = '80'.
i_rep1-year = lv_year2.
APPEND i_rep1.
CLEAR: i_rep1.
ENDLOOP.
ENDIF.
CLEAR: lv_year1, lv_year2,
lv_date1, lv_date2,lv_anzhb.
ENDLOOP.
SORT i_rep1 BY pernr ktart.
ENDFORM. "get_pers_data
*& Form append_data
Put the Absence and Quota Data into one Report Int Table
FORM append_data.
CLEAR: i_rep.
REFRESH: i_rep.
SORT i_2001 BY pernr awart.
SORT i_2006 BY pernr ktart year.
Move I_REP1 data into i_2006
LOOP AT i_rep1.
MOVE-CORRESPONDING i_rep1 TO i_2006.
APPEND i_2006.
CLEAR i_2006.
ENDLOOP.
Move the Absence and Quota Data into a final Int Table
LOOP AT i_2006.
i_rep-pernr = i_2006-pernr.
i_rep-ename = i_2006-ename.
i_rep-ktart = i_2006-ktart.
i_rep-anzhl = i_2006-anzhl.
i_rep-kverb = i_2006-kverb.
i_rep-ktext = i_2006-ktext.
i_rep-anzhb = i_2006-anzhb.
i_rep-year = i_2006-year.
CLEAR i_2001.
CASE i_2006-ktart.
WHEN '81'.
PERFORM get_2001 USING i_2006-pernr '1000' i_2006-year.
WHEN '50'.
PERFORM get_2001 USING i_2006-pernr '1002' i_2006-year.
WHEN '80'.
PERFORM get_2001 USING i_2006-pernr '1001' i_2006-year.
WHEN '56'.
PERFORM get_2001 USING i_2006-pernr '1003' i_2006-year.
WHEN '51'.
PERFORM get_2001 USING i_2006-pernr '1004' i_2006-year.
WHEN '52'.
PERFORM get_2001 USING i_2006-pernr '1005' i_2006-year.
WHEN '54'.
PERFORM get_2001 USING i_2006-pernr '1006' i_2006-year.
WHEN '53'.
PERFORM get_2001 USING i_2006-pernr '1007' i_2006-year.
WHEN '55'.
PERFORM get_2001 USING i_2006-pernr '1008' i_2006-year.
WHEN '57'.
PERFORM get_2001 USING i_2006-pernr '1009' i_2006-year.
WHEN '90'.
PERFORM get_2001 USING i_2006-pernr '2000' i_2006-year.
WHEN '58'.
PERFORM get_2001 USING i_2006-pernr '2001' i_2006-year.
WHEN '59'.
PERFORM get_2001 USING i_2006-pernr '2002' i_2006-year.
WHEN '91'.
PERFORM get_2001 USING i_2006-pernr '2003' i_2006-year.
ENDCASE.
IF sy-subrc <> 0.
APPEND i_rep.
ENDIF.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY pernr ktart year.
DELETE i_rep WHERE pernr = ' '.
ENDFORM. " append_data
*& Form display_qa_data
Display the Absence and Quota Data
FORM display_qa_data.
DATA: lv_flag, " New Flag
lv_tot2 TYPE ptm_quonum. " Absence Balance days
IF i_rep[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_rep.
toggle color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_rep INDEX sy-tabix.
WRITE:/1 sy-vline,2(8) i_rep-pernr,
10 sy-vline,11(40) i_rep-ename.
ENDAT.
AT NEW ktart.
READ TABLE i_rep INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,52(25) i_rep-ktext.
ENDAT.
AT NEW year.
READ TABLE i_rep INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline, 78(4) i_rep-year,
82 sy-vline, 83(11) i_rep-anzhl,
94 sy-vline, 95(25) i_rep-atext,
120 sy-vline,133 sy-vline,
144 sy-vline,
155 sy-vline,156(13) i_rep-anzhb,
169 sy-vline.
lv_tot2 = lv_tot2 + i_rep-anzhb.
ENDAT.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline, 77 sy-vline,
82 sy-vline, 94 sy-vline,
120 sy-vline,121(12) i_rep-abrtg NO-ZERO,
133 sy-vline,134(10) i_rep-begda NO-ZERO,
144 sy-vline,145(10) i_rep-endda NO-ZERO,
155 sy-vline,169 sy-vline.
NEW-LINE.
AT END OF pernr.
WRITE : /1(169) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE:/1 sy-vline, 10 sy-vline,
51 sy-vline, 77 sy-vline,
82 sy-vline, 94 sy-vline,
120 sy-vline,121(12) i_rep-abrtg,
133 sy-vline,144 sy-vline,
155 sy-vline, 156(13) lv_tot2,
169 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(169) sy-uline.
CLEAR lv_tot2.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_qa_data
*& Form display_q_data
Display only the Quota Data
FORM display_q_data.
DATA: lv_flag. " New Flag
SORT i_2006 BY pernr ktart year.
IF i_2006[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_2006.
Toggle Color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: /1 sy-vline, 2(8) i_2006-pernr,
10 sy-vline,11(40) i_2006-ename.
ENDAT.
AT NEW ktart.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: 1 sy-vline,10 sy-vline,
51 sy-vline,52(25) i_2006-ktext.
ENDAT.
AT NEW year.
READ TABLE i_2006 INDEX sy-tabix.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline,78(4) i_2006-year,
82 sy-vline,83(11) i_2006-anzhl,
94 sy-vline,95(13) i_2006-anzhb,
108 sy-vline.
NEW-LINE.
ENDAT.
AT END OF pernr.
WRITE : /1(108) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE: /1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline, 82 sy-vline,
94 sy-vline, 95(13) i_2006-anzhb,
108 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(108) sy-uline.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_q_data
*& Form display_a_data
Display Only the Absence Quota
FORM display_a_data.
DATA: lv_flag. " New Flag
SORT i_2001 BY pernr awart.
IF i_2001[] IS INITIAL.
MESSAGE i000 WITH 'No Data found'(014).
ELSE.
LOOP AT i_2001.
Toggle Color
PERFORM toggle_color.
IF lv_flag <> space.
NEW-LINE.
ENDIF.
AT NEW pernr.
READ TABLE i_2001 INDEX sy-tabix.
WRITE: /1 sy-vline, 2(10) i_2001-pernr,
10 sy-vline,11(40) i_2001-ename.
ENDAT.
WRITE: 1 sy-vline, 10 sy-vline,
51 sy-vline,52(25) i_2001-atext,
77 sy-vline,78(12) i_2001-abrtg,
90 sy-vline,91(10) i_2001-begda,
101 sy-vline,102(10) i_2001-endda,
112 sy-vline.
NEW-LINE.
AT END OF pernr.
WRITE : /1(112) sy-uline.
SUM.
FORMAT COLOR 3.
WRITE: /1 sy-vline, 10 sy-vline,
51 sy-vline,
77 sy-vline,78(12) i_2001-abrtg,
90 sy-vline,101 sy-vline,
112 sy-vline.
FORMAT COLOR OFF.
WRITE : /1(112) sy-uline.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. " display_a_data
*& Form header
Write the Report Header
FORM header .
data : lv_pers type pbtxt,
lv_orgn type orgtx.
gv_title1 = sy-title. " Set List Header
IF p_qa = c_x.
NEW-PAGE LINE-SIZE 193.
ELSEIF p_a = c_x.
NEW-PAGE LINE-SIZE 125.
ELSEIF p_q = c_x.
NEW-PAGE LINE-SIZE 119.
ENDIF.
Standard header
FORMAT RESET.
CALL FUNCTION 'Z_STANDARD_HEADER'
EXPORTING
title1 = gv_title1.
Get the Personal Area and Org.Unit Texts
clear : lv_pers,lv_orgn.
select single name1 into lv_pers
from t500p where persa = pnpwerks-low.
select single orgtx into lv_orgn
from t527x where sprsl = sy-langu and
orgeh = pnporgeh-low and
endda = c_endda.
if not lv_pers is initial.
write : /2 'Personal Area:'(017), 17(25) lv_pers color 7.
endif.
if not lv_orgn is initial.
write : /2 'Organization Unit:'(021), 20(25) lv_orgn color 3.
endif.
IF p_qa = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(169) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Quota Description'(018) CENTERED,
77 sy-vline,78(4) 'Year'(027),
82 sy-vline,83(11) 'Entitlement'(019),
94 sy-vline,95(25) 'Absence Description'(022) CENTERED,
120 sy-vline,121(12) 'Absence days'(023),
133 sy-vline,134(10) 'From Date'(024),
144 sy-vline,145(10) 'To Date'(025),
155 sy-vline,156(13) 'Quota Balance'(020),
169 sy-vline.
WRITE : /1(169) sy-uline.
ELSEIF p_q = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(108) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Quota Description'(018) CENTERED,
77 sy-vline,78(4) 'Year'(027),
82 sy-vline,83(11) 'Entitlement'(019),
94 sy-vline,95(13) 'Quota Balance'(020),
108 sy-vline.
WRITE : /1(108) sy-uline.
ELSEIF p_a = c_x.
FORMAT COLOR COL_HEADING.
WRITE : /1(112) sy-uline.
WRITE:/1 sy-vline,2(8) 'Emp.No'(015) CENTERED,
10 sy-vline,11(40) 'Employee Name'(016) CENTERED,
51 sy-vline,52(25) 'Absence Description'(022) CENTERED,
77 sy-vline,78(12) 'Absence days'(023),
90 sy-vline,91(10) 'From Date'(024),
101 sy-vline,102(10) 'To Date'(025),
112 sy-vline.
WRITE : /1(112) sy-uline.
ENDIF.
ENDFORM. " header
*& Form toggle_color
This routine alters the color of the records in the list
FORM toggle_color.
IF gv_dial = space.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
gv_dial = c_x.
ELSE.
FORMAT COLOR 1 INTENSIFIED OFF.
CLEAR gv_dial.
ENDIF.
ENDFORM. " toggle_color
*& Form get_2001
Get the ABsence type for each Quota type
FORM get_2001 USING p_pernr TYPE persno
p_value TYPE awart
p_year.
LOOP AT i_2001 WHERE pernr = p_pernr AND
awart = p_value AND
endda+0(4) = p_year.
i_rep-awart = i_2001-awart.
i_rep-abrtg = i_2001-abrtg.
i_rep-atext = i_2001-atext.
i_rep-begda = i_2001-begda.
i_rep-endda = i_2001-endda.
APPEND i_rep.
ENDLOOP.
ENDFORM. " get_2001
<b>Reward points for useful Answers</b>
Regards
Anji -
How to refresh ODI variables from file
Hi,
I followed the fillowing links to implement the dynamic file parameter passing in to the resource name of a datastore.
part-1. http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value
part-2. http://odiexperts.com/how-to-refresh-odi-variables-from-file-%e2%80%93-part-2-%e2%80%93-getting-all-lines-once-at-time
For me first part is working fine where as in second part i made canvas looks like
Vlinevariable(refreshing variable)------------------dyanamicfile(refereshing variable)--------------------- interface.
Interface looks like Flatfile to db ,km's are lkm file------sql and ikm is sql incremental update
Vlinevariable is working fine where i am getting numbers in sequence manner to assign in to code of dynamicfile variable and in dynamicfile is not taking that value in to that code and causing session failed.
The code which i put in a refreshing code of dynamicfile is followed below
select samplefile1_csv C1_SAMPLEFILE1_CSV
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=code_generationSNP$CRLOAD_FILE=C:\file/my_test_file.txtSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=samplefile1_csvSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRACTION_ON_ERROR=0SNP$CR$$SNPS_END_KEY*/
For the firstrow the number has to get from vlinevariable where in my case not working .
In session while loading the interface (load data) i am getting error like
message-------------- ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection file_tgt.
Caused By: java.sql.SQLException: File not found: C:\file/
at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeQuery(FilePreparedStatement.java:131)
at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java:602)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeQuery(SnpSessTaskSql.java:3078)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java:571)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2815)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
source code is select a C1_A,
b C2_B
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=sample1SNP$CRLOAD_FILE=C:\file/#PROJECT1.FILENAMESNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x002cSNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=aSNP$CRTYPE_NAME=NUMERICSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=12SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=bSNP$CRTYPE_NAME=NUMERICSNP$CRORDER=2SNP$CRLENGTH=50SNP$CRPRECISION=12SNP$CRACTION_ON_ERROR=0SNP$CR$$SNPS_END_KEY*/
target code insert into STAGING.C$_0SAMPLE1
C1_A,
C2_B
values
:C1_A,
:C2_B
KIndly help me and thanks in advance.ODI is complaning it cannot locate the file. Try replacing the '/' character with a '\' after file in the designated filepath.
-
I have a requirement to write a query which is much like an aged debt report.
I would have a number of variables which will allow the user to create buckets of data, i.e. invoices that are not yet due, 30 days overdue, 60 days overdue, 90 days overdue, etc. However, the data will be coming from CRM, and I would like to pre-fill the variables from a table, and not have the user enter them every time they wish to run the query. The table containing the variable values will also be extracted from CRM into BW.
Does anybody have any idea how I can pick the bucket parameters up to use in my query?Stuart,
if you know already how to build and fill this kind of variable (but for other purpouse), you start from a very good point !!!
It's enough to do a select onto the table on which you pass the relevant values (do you need some ABAP sample ? with the search engine you can find a lot of good example) ...or do you have problem to pass these values from CRM environment...let us know if you need some more specific!
Bye,
Roberto
(about point, I think it's enough to hit the radiobutton that you should find in every answer...if there is some problem, write an e-mail to [email protected] or wait for some minute..) -
Pass a shared variable from a sub-report into cross-tab
Hello everyone!
I need to pass a calculated value in a shared variable from a sub-report into a croos-tab in the Group footer of the main report. When I place this variable in the group footer I can see the value, when I use this variable in the Cross-tab, it is 0.
In the Sub Report:
whileprintingrecords;
shared numberVar Total_SF;
Total_SF:= calculation.
In the Main report:
whileprintingrecords;
shared numberVar Total_SF;
In the Cross-Tab I am using the above formula from the main report.
Do you guys know what I need to do for this to work?
Thank you,
T.Hey Tat,
I have learned to avoid passing shared variable from sub reports back to main reports. You just always seem to run into issues with execution order.
Personally, I try to create a shell report and add sub reports, calculating the values I need in the first sub report and pass the values to subsequent sub reports using shared variables. I'd recommend thinking about arranging your reports like this during your design time. It has saved me some headaches. -
[SOLVED] Pass Environment variables from PKGBUILD to .INSTALL script
Hi everyone,
I am trying to modify the grub2-efi-bzr (http://aur.archlinux.org/packages.php?ID=38369) package making some changes in the PKGBUILD and the post-install script. I want to pass few environment variables from the PKGBUILD to the install script. How do I do that?
Some code from the PKGBUILD
_bzrtrunk="lp:grub/grub2" # GRUB2 BZR Main Trunk
# _bzrtrunk="lp:~skodabenz/grub/grub2-bzr-exp" # GRUB2 BZR Experimental Branch
_bzrmod="grub2"
if [ ${_bzrtrunk} = "lp:~skodabenz/grub/grub2-bzr-exp" ]
then
_bzrmod="grub2_exp"
pkgver="exp_${pkgver}"
fi
# grub-extras bzr repo locations
_bzrtrunk_zfs="lp:~skodabenz/grub/grub2-extras-zfs"
_bzrtrunk_lua="lp:~skodabenz/grub/grub2-extras-lua"
if [ "$CARCH" = 'i686' ]
then
_EFI_ARCH=i386
elif [ "$CARCH" = 'x86_64' ]
then
_EFI_ARCH=x86_64
fi
# _EFI_ARCH=x86_64 # Uncomment if you want to override the if condition for _EFI_ARCH above, incase the EFI ARCH does not match the Linux Kernel ARCH.
# $CARCH=x86_64 and _EFI_ARCH=i386 requires gcc-multilib with lib32-glibc installed in the system.
# I do not know about $CARCH=i686 and _EFI_ARCH=x86_64
if [ ${_EFI_ARCH} = "i386" ]
then
pkgver="${pkgver}_x86"
_trns_name="grub2_efi_x86"
elif [ ${_EFI_ARCH} = "x86_64" ]
then
pkgver="${pkgver}_x64"
_trns_name="grub2_efi_x64"
fi
Now the post-install script needs the values of _EFI_ARCH and _trns_name env variables. I do not want to copy the if statements to that script as these are decided at compile time but needed while setting up grub2-efi. This is due to the fact that EFI-ARCH need not match the Linux Kernel ARCH. How do I do that.
Code from the post-install script
${_trns_name}-install --root-directory=/ --no-floppy --recheck --debug
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/lua.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfs.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfsinfo.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/unifont.pf2 /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/ascii.pf2 /boot/${_trns_name}/
${_trns_name}-mkimage --verbose --directory=/usr/lib/${_trns_name}/${_EFI_ARCH}-efi --prefix="" --output=/boot/${_trns_name}/grub2.efi --format=${_EFI_ARCH}-efi ${_EFI_APP_MODULES}
Thank in advance.
Last edited by skodabenz (2010-07-27 15:46:40)falconindy wrote:
Don't rely on %foo% existing -- it won't after the first build and this will prevent the PKGBUILD from being reentrant. I would use something like this (untested):
sed -i "s|^\(_EFI_ARCH\)=.*|\1=${_EFI_ARCH}|; \
s|^\(_trns_name\)=.*|\1=${_trns_name}|; \
s|^\(export _EFI_APP_MODULES\)=.*|\1=${_EFI_APP_MODULES}|" \
${startdir}/grub2-efi-bzr.install
Your code works except for 1 problem in the install script I want
export __EFI_APP_MODULES="${_EFI_APP_MODULES}" (the passed ${_EFI_APP_MODULES} value should again come inside double quotes).
right now
export _EFI_APP_MODULES=ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm
which is equivalent to
export _EFI_APP_MODULES=ata
I want
export _EFI_APP_MODULES="ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm"
How to do it with sed since sed already uses double quotes? -
Passing variables from PHP to Flash
I have a contact form that works. The user enters their info,
hits submit, and their info is emailed to me. I need to figure out
how to have the PHP script send back a confirmation that the email
was actually sent. I can't get the php to echo just a "yes" or
"no". Here is what I have so far:
Flash code to bring in PHP variable to notify user if mail
has been sent or not:
function receive_response(e:Event):void
var loader:URLLoader = URLLoader(e.target);
var email_status = new URLVariables(loader.data).success;
if(email_status == "yes")
status_txt.text = "Success! Your message was sent.";
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, on_timer);
timer.start();
else
status_txt.text = "Send failed! Please email or call us";
and here is my entire PHP Code. The code in bold at the bottom
is where it is supposed to pass the "yes" or "no" as the variable
success
<<meta http-equiv="content-type"
content="text/html;charset=utf-8">
<?php
// Create local PHP variables from the info the user gave in
the Flash form
$senderName = $_POST['userName'];
$senderEmail = $_POST['userEmail'];
$senderMessage = $_POST['userMsg'];
// Strip slashes on the Local variables
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);
$to = "info@*******.com";
// change this to reflect your site
$from = "contact@*********.com";
$subject = "Contact from ***********.com";
//Begin HTML Email Message
$message = <<<EOF
<html>
<body bgcolor="#FFFFFF">
<b>Name</b> = $senderName<br /><br />
<b>Email</b> = <a
href="mailto:$senderEmail">$senderEmail</a><br
/><br />
<b>Message</b> = $senderMessage<br />
</body>
</html>
EOF;
//end of message
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$to = "$to";
if (mail($to, $subject, $message, $headers))
echo “success=yes”;
else
echo “success=no”;
exit();
?>
ThanksI have a contact form that works. The user enters their info,
hits submit, and their info is emailed to me. I need to figure out
how to have the PHP script send back a confirmation that the email
was actually sent. I can't get the php to echo just a "yes" or
"no". Here is what I have so far:
Flash code to bring in PHP variable to notify user if mail
has been sent or not:
function receive_response(e:Event):void
var loader:URLLoader = URLLoader(e.target);
var email_status = new URLVariables(loader.data).success;
if(email_status == "yes")
status_txt.text = "Success! Your message was sent.";
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, on_timer);
timer.start();
else
status_txt.text = "Send failed! Please email or call us";
and here is my entire PHP Code. The code in bold at the bottom
is where it is supposed to pass the "yes" or "no" as the variable
success
<<meta http-equiv="content-type"
content="text/html;charset=utf-8">
<?php
// Create local PHP variables from the info the user gave in
the Flash form
$senderName = $_POST['userName'];
$senderEmail = $_POST['userEmail'];
$senderMessage = $_POST['userMsg'];
// Strip slashes on the Local variables
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);
$to = "info@*******.com";
// change this to reflect your site
$from = "contact@*********.com";
$subject = "Contact from ***********.com";
//Begin HTML Email Message
$message = <<<EOF
<html>
<body bgcolor="#FFFFFF">
<b>Name</b> = $senderName<br /><br />
<b>Email</b> = <a
href="mailto:$senderEmail">$senderEmail</a><br
/><br />
<b>Message</b> = $senderMessage<br />
</body>
</html>
EOF;
//end of message
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$to = "$to";
if (mail($to, $subject, $message, $headers))
echo “success=yes”;
else
echo “success=no”;
exit();
?>
Thanks -
Passing Variables From PHP to Java Applet ?
I took one page of a project which was written entirely in PHP, and translated it into a JAVA applet, so as to support better GUI funcitonalities (immediate calculation and display of Time/Billing data, on LostFocus events...stuff like this).
In any case - I need to pass four variables from the php scripts, to the Java Applet. I had initially, written them out from the php scripts to an html file on the server, and read them in from the applet doing something like this:
. this.m_TheURL = new URL(url);
InputStream in = m_TheURL.openStream();
DataInputStream data = new DataInputStream(new BufferedInputStream(in));
while ((unparsed = data.readLine()) != null)
// parsed the strings here and got my variables
The URL I read from, was the same file I wrote out to from the PHP scripts. This worked fine - until I told my boss about it, and realised that this wasnt going to work - because the applet updates a MySql database, and issues regarding multiple users became apparent.
The Applet has to get these variables from the previous PHP page, the same way it had - before my applet was an applet, and it was just another PHP script page.
The PHP pages are passing variabes using CGI, and a PostGet function. My applet has to do the same thing.
Anybody know how I can do this - safely ?Updated some code... in case people wanted to use it....
<?php
class JavaApplet {
var $param;
function setParam($name, $value) {
$temp1 = array("name" => $name, "value" => $value);
$this->param = array_merge($this->param, $temp1);
function delParam($name) {
foreach ($this->param as $key => $value) {
if ($key = $name) {
unset( $this->param["$id"]);
function echo_html() {
echo '<applet code=TimeEntry.class width=600 height=90 >';
foreach ($this->param as $value) {
foreach ($value as $key => $value2) {
echo '<param name="' . $key . '" value="' . $value2 . '">';
echo '</applet>';
$applet = &New JavaApplet;
$applet->setParam("name1", "value");
$applet->setParam("name2", "value");
$applet->setParam("name3", "value");
$applet->echo_html();
?>
Maybe you are looking for
-
Get the file directory/location using JFileChooser
Dear, How to get the file directory and it location with using JFilechooser after select the indicate file? Thanks
-
I copied itunes from old pc onto new macbook pro and now itunes recognises iphone but I have to sync entire library and lose all apps etc. The sync playlists etc is greyed out. what can I do?
-
HI, I have created a Blocked ALV with 2 blocks.. first block is editable by the user , I want to store the editted date into my Internal table for further processing.. Kindly guide me how to do.. Plz dont give any links... all sites are blocked h
-
Hi, I am developing an ABAP Webdynpro application with a main view that acts as a data input screen. In this screen there are 2 fields ID & Description of which ID is display only. I need to give a search help functionality for the Description field
-
Creating Radio Button in Module Pool
Hi All, I have created a Two radio button on screen 100. When I run this I will get both radio button selected. I am unable to group these. How can I group both? I am using 4.7. I am not getting Graphical Layout of the screen. How to group in classic