Fox syntax
Hello,
I try to build a FOX formula in SAP-IP.
The result is an table with manufactures in the rows and continents in the columns.
The changing characteristics are year, infoprovider, valuetype of reporting.
How can I get an attribute of the continent matched to each current cell using ATRV()?
DATA IP TYPE INFOPRIVIDER.
DATA VT TYPE 0VTYPE.
DATA Y TYPE YEAR.
FOREACH IP, VT, Y.
... = ... * ATRV(CONTINENT_FOO, ...)?.
ENDFOR.
with kind regards,
Alexander
Hi,
As continent is not present in the fields to be changed, you should read the value of continent using OBJV(), and then store the attribute value into one variable defined in FOX.
DATA continent TYPE continent_type.
DATA attribute TYPE attribute_type.
continent = OBJV().
attribute = ATRV('attribute',continent).
Bindu
Similar Messages
-
Fox syntax errors after SEM 600 Patching to SP12
Greetings all you experts out there..
Pre patching to SP12, all our Fox formulas using the following syntax to convert a fiscal period to a fiscal year worked without problem:
PER = 0092008.
YEAR = PER/0001000.
This would return a value for YEAR = 0002008.
Yes, it worked with the 3 leading zero's....!!!
Post patching, system no longer likes this syntax and throws out an syntax error message.
Please understand that I have no difficulty in changing the code - say using SUBSTR - to simply get the 4 digits only relevant to the fiscal year.......BUT...because we have these fox functions all over our solution, we were hoping for a more general fix which then would not require changes (and thus transports to production) etc.....
So, any ideas on how to fix WITHOUT changing the Fox code...???
Thanks and regards,
RaelHi Hans,
Sorry, well spotted.....a typing mistake...
Yes, the fiscal period is in format 2008009....and when you apply following Fox statement:
PER = 2008009.
YEAR = PER / 0001000.
the result is
YEAR = 0002008.
and this is where the Fox formula editor is throwing up the syntax error....because it expects a 4 digit number for the year, i.e., no leading zeros.......
Remember, these Fox formulas have beein working correctly for years, and it is only after patching that we are receiving the syntax error....
Regards,
Rael -
Hi I'm using the formula ATRV to get functional area from cost center. I'm getting a syntax error in IP at the line of the function while using this function. I've used this function in BW- BPS before and used to work properly. Somehow its not working here.. Pls check the code below..
syntax error. at ATRV line is..
"A comma and other arguments were expected instead of ).
The code below is
DATA L_COSTCENTER TYPE 0COSTCENTER.
DATA L_ACCOUNT TYPE 0GL_ACCOUNT.
DATA L_COSTELEMENT TYPE 0COSTELMNT.
DATA L_INFOPROVIDER TYPE 0INFOPROV.
DATA L_FUNCAREA TYPE 0FUNC_AREA.
DATA L_FLAG TYPE ZCH_REVF.
DATA L_FACTOR TYPE F.
L_FUNCAREA = ATRV ( 0FUNC_AREA , L_COSTCENTER ).
FOREACH L_COSTCENTER.
IF L_COSTCENTER <> '#'.
FOREACH L_COSTELEMENT.
IF L_COSTELEMENT <> '#'.
L_ACCOUNT = L_COSTELEMENT.
{ 0AMOUNT,#,#,1000,L_ACCOUNT, ZPCA_T01} ={ 0AMOUNT, L_COSTCENTER,L_COSTELEMENT,1000, #, ZCO_T01}
ENDIF.
ENDFOR.
ENDIF.
ENDFOR.Thanks, I Included the controlling area and there was no syntax error..however When I execute the code below .. I'm getting a new error saying Cost Center is invalid.. its not reading the statatement or something.. Can you answer how I should the CO AREA and the function..
This is the following error
Planning function Move Cost Center Information ( ZFORMULA1 ) ended with errors
Value 'D700012' from the 0COSTCENTER characteristic is not valid
Value 'D700012' from the 0COSTCENTER characteristic is not valid
Value 'D700012' from the 0COSTCENTER characteristic is not valid
DATA L_FUNCAREA TYPE 0FUNC_AREA.
DATA L_FLAG TYPE ZCH_REVF.
DATA L_FACTOR TYPE F.
L_FACTOR =20.
FOREACH L_COSTCENTER.
IF L_COSTCENTER <> '#'.
L_FUNCAREA = ATRV ( ' 0FUNC_AREA ', L_COSTCENTER,L_CONAREA ).
IF L_FUNCAREA = '1000'.
L_FLAG = 'N'.
ELSEIF L_FUNCAREA <> 1000 .
L_FLAG = 'Y'.
ENDIF.
FOREACH L_COSTELEMENT.
IF L_COSTELEMENT <> '#'.
L_ACCOUNT = L_COSTELEMENT.
{ 0AMOUNT,#,#,1000,#,L_ACCOUNT, ZPCA_T01,L_FLAG} ={ 0AMOUNT, L_COSTCENTER,L_COSTELEMENT,1000, #,#, ZCO_T01,#} * L_FACTOR.
ENDIF.
ENDFOR.
ENDIF.
ENDFOR. -
Hello all !!
I have a problem when I execute fox formulas in BPS0 in version 7.0, becuase they don't work.
The company migrated BW-BPS to 7.0 version.
The problem occurs when I execute the formulas in BPS0 in the quality environment, which is working with 7.0 version, but we are using 3.5 version in the productive environment; besides we are working with 7.0 version in BW.
I was wondering if the syntax of the FOX formulas between version is diferrent.....any idea??
I appreciate your help!!!Hi Arlene,
please check [Re: Foxformula].
Regards Matthias Nutt
SAP Consulting Switzerland -
Hi All,
Even though the syntax is correct in the belwo mentioned code .I am encountering problem with code in line mentioned for CYEAR = TMVL(PYEAR,-1).
Below is the error:
A comma and other arguments were expected instead of )
Syntax error in row 13, column 27
DATA IB TYPE ZDG_CIDVB.
DATA CLUSTER TYPE ZDG_CCLST.
DATA REGION TYPE ZDG_CREGN.
DATA CUSTOMER TYPE ZDG_CTCUS.
DATA PYEAR TYPE 0FISCYEAR.
DATA CYEAR TYPE 0FISCYEAR.
CLUSTER = VARV(ZDG_CCLST_C_01).
REGION = VARV(ZDG_CREGN_C_01).
CUSTOMER = VARV(ZDG_CTCUS_C_01).
PYEAR = VARV (ZDG_FYEAR_C_01).
CYEAR = TMVL(PYEAR,-1).
FOREACH IB.
IF IB <> #.
{ZDG_KGVLE,K4,PYEAR,ZDG_TCDEP, CLUSTER,IB,REGION,CUSTOMER,0000000001,S01,60,CS} =
({ZDG_KVOLC,K4,PYEAR,ZDG_TCDEP, CLUSTER,IB,REGION,CUSTOMER,0000000001,S01,60,CS} - {ZDG_KVOLC,K4,CYEAR,ZDG_TCDEP, CLUSTER,IB,REGION,CUSTOMER,0000000002,S00,60,CS}) /
{ZDG_KVOLC,K4,CYEAR,ZDG_TCDEP, CLUSTER,IB,REGION,CUSTOMER,0000000002,S00,60,CS}.
ENDIF.
ENDFOR.ZDG_FYEAR_C_01 - it has to be a global variable that is described in your planning area. The type of this variable must be 0FISCYEAR. And you have to set up the variable ZDG_FYEAR_C_01 in something.
Is it so in your system?
Edited by: Veronika Vnukova on May 30, 2008 11:48 AM -
Can Not Print Document -- Prints in Foxit
I have several Acrobat documents that were e-mailed to me. Most of them have no problems printing, but those with signatures will Not print in Acrobat Reader XI or Acrobat Pro 9. Trying to print to a local printer, network printer, or PDF all result in the message "The document could not be printed. -- There were no pages selected to print". It doesn't matter if I select one page or all, if I try to print to an image, trying to print from other computers, etc.
Looking on Google I can see that this problem has been reported more than Five years ago and people still see no resolution.
The only solution I have found is to print them with Foxit Reader which is not the optimal solution.
Why is this still a problem?Hello,
Try this may it will help you..
You should make default printer in remote pc.
first in server pc write this syntax in run command
Remote PC IP
press enter.
You find share folder and shared printer on Remote PC IP
After that select printer and make default it. now whenever you will print from Server PC it will print on Remote PC.
Thanks
Manvendra Singh Niranjan -
In fox , can I use call function which developed by ABAP?
I want to use the call function to read table in FOX.
thankshi
u can use functions, but not complex.
the syntax is as follows
CALL FUNCTION UPC_FUNCEXEC_SAVE
EXPORTING
I_NO_TRANSACTION_DATA = FLAG
tx
srin -
How to implement this planning function using Fox formula
Hello,
I am new to Fox.
I want to implement this complex logic in a planning function
i have A (Kf X from infoprovider Z_A), B (Kf Y from infoprovider Z_B) & moreover there is one more condition,
If current FISCPER > variable value of FISCPER
KF Z = KF Z1 (from Cube C1)
Else KF Z = KF Z2 (from Cube C2).
for a particular calender week,
X = ( Y * Z ) / (summation of (Y * Z) for each week of the whole year)
I know it is complex.
but i have to implement this in a planning function.
The aggreagtion level is built on a multiprovider having A, B , C1 & C2.
Can someone help me out with the FOX formula for this? or is there any better way to do this.
Thanks johnHi Gerardo,
Thanks for that.
I have tried something similiar to it
DATA CHA_CALWEEK TYPE 0CALWEEK.
DATA CHA_COMP_CODE TYPE 0COMP_CODE.
DATA CHA_FISCPER TYPE 0FISCPER.
DATA VAR_PERIOD TYPE 0FISCPER.
DATA SUM_YEAR TYPE F.
DATA TEMP_D TYPE F.
DATA SUM_WEEK TYPE F.
CURRENCY IS LOCAL CURRENCY. FOR DATA SELECTION TO BE RIGHT, NECESSARY TO DERIVE FROM CC.
DATA UN_LOC_CURRCY TYPE 0LOC_CURRCY.
UN_LOC_CURRCY = VARV(Z_U_I100).
CHA_COMP_CODE = VARV(Z_U_I100).
To Calculate the D
VAR_PERIOD = VARV(Z_U_I010).
SUM_YEAR = 0.
TEMP_D =0.
IF CHA_FISCPER > VAR_PERIOD.
TEMP_D = {ZSA_BUD2X,CHA_COMP_CODE,CHA_FISCPER,YBUDG_01X,CHA_CALWEEK}.
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1} .
ENDFOR.
ELSE.
TEMP_D = ({ZSAEXCUSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X} - {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X}).
FOREACH CHA_CALWEEK.
SUM_YEAR = SUM_YEAR + TEMP_D * {ZIP_INDEX,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1}) .
ENDFOR.
ENDIF.
But i am getting a syntax error
Formula error: } expected
Syntax error in row 21, column 20
i have marke line21 in bold. above.
I feel it is correct, still wonder why i am getting this error.
can you pls help ? -
Navigational attribute and FOX in IP
Hi,
I have experienced a strange behavior of a FOX.
This is a copy from ACTUAL InfoCube to PLAN InfoCube, keyfigures are different.
In the ACTUAL one, we have only cost center and profit center as navigational attribute. In plan, we have both. Here is the fox (operand is KF, infoprovider, profit center) :
{KF1, ACTUAL, PC01} = {KF3, PLAN, #}.
I doesn't work in IP (no data are read from the reference). We tested it in BPS and it works.
For me, this is the right syntax since profit center is not is the ACTUAL cube.
After that, we removed profit center from the operand (PC01 is a constant in the filter).
Here is the new fox (operand is KF, infoprovider) :
{KF1, ACTUAL} = {KF3, PLAN}. This fox is not supposed to work because it should try to read reference data with profit center PC01. But it works !!!
After saving data, we noticed that the fox copies every records from the ACTUAL cube with navigational attribute profit center = PC01.
Did you ever experience that or I missed something ?
The system seems to take into account the value of the navigational attribute.
ThanksHi Jaques,
I guess you have a MultiProvider and you have mapped the Characteristic PC from the plan cube and the navigational attribute from the actual cube both to the characteristic in the multiprovider.
Then it is correct, that the sytsem does the selection on the char in plan and the nav in actual.
regards
Cornelia -
Obtain a value of the char ( In a FOX formula) when CHAR is Modifiable
Hi ,
We are doing Integrated planning in NW04S BI.
Assume we have a Agg level field1, field2, field3, field4 and Amount field.
we defined a filter with Field1 and Field2.
We have defined Field3 and Field4 as changeable in the Planning function ( FOX)
In the planning function, we can use OBJ() to obtain values for Fiield1 and Field2 BUT not Field3 and Field4.
We have processing logic where we need to know the field value of Field4 and Field5 for the data object.
Is there a way to obtain Charteristic value, when the chartestics are actually defined as' To be changed' in the FOX planning function?
Appreciate your help.
BPSIPShyam,
While your answer is helpful, I would request you to provide a little detail of the exact syntax. For example, I have provided the logic below. Please let me know if I get the correct syntax of the FOREACH .
Thanks
assume field1, field2, field3, field4 all are info object in BI and are part of the Aggregation level.
field3 and field4 are configured as 'To be changed' in the planning function.
Here is the FOX CODE
data v_field1 type field1.
data v_field2 type field2.
data v_field3 type field3.
data v_field4 type field4.
v_field1 = obj().
v_field2 = obj().
foreach v_field3.
if v_field3 is initial.
I like to do some complex processing here. for some
reason, looks like it's not working, PLEASE HELP WITH *THE CORRECT SYNTAX for reading and comparing the value *of v_field1 for this data block.
endif.
endfor.
end of FOX CODE -
Using offset for global variables in FOX
Dear all,
I'm using global variables (i.e. defined in planning area)in my FOX formulas by using VARV-command.
I'm doing this for fiscal year, which has default value current year. However I'd like to use this variable also for next year thus creating the following code:
DATA CURYEAR TYPE 0FISCYEAR.
DATA NEXTYEAR TYPE 0FISCYEAR.
CURYEAR = VARV(Z021VA01).
NEXTYEAR = CURYEAR+1.
This gives a syntax error. Anabody any idea how I can use offset in the FOX for my variables?
Thanks in advance!
Kind regards, HarjanHarjan,
Use TMVL function to get the offsets.
DATA CURYEAR TYPE 0FISCYEAR.
DATA NEXTYEAR TYPE 0FISCYEAR.
CURYEAR = VARV(Z021VA01).
NEXTYEAR = TMVL(CURYEAR, +1).
hope it helps. -
How to use the SORT in the Fox Formulas
Hi,
Is it possible to use the SORT in the Fox forumals, if it is so
what is the syntax for SORT.
I
Thanks in advance
Best regards
SGHi,
What exactly you want to SORT ?
SAP provides in built sort functionality when you are using Looping conditions:
For instance: Here in below example, data records will be come in sorted order of A,B,C. If you want to change the order, change the sequence.. B,A,C or as per your requirement.
Foreach A, B,C
Endfor.
Thanks
pratyush -
Error FOX function BW 7.4 on HANA SP5
Dear Experts,
We are now involved in the Testing for SAP BW on HANA 7.4 SP5 and we are getting some issue regarding with IP FOX functions.
Everytime I execute a FOX function I get a dump as following:
Syntax error in program "00O2TG6FIIX6XEWDCX9ORY8KV
Error in the ABAP Application Program
The current ABAP program "CL_RSPLFC_FORMULA=============CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
In include "00O2TG6FIIX6XEWDCX9ORY8KV ", in line 148 of program
"00O2TG6FIIX6XEWDCX9ORY8KV ", the following syntax errors
have occurred:
Field "H0VE" is unknown. It is neither in one of the specified tables
nor defined by a "DATA" statement. "DATA" statement.
Error in the ABAP Application Program
The current ABAP program "CL_RSPLFC_FORMULA=============CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
In include "00O2TG6FIIX6XEWBDZMPVJ68K ", in line 175 of program
"00O2TG6FIIX6XEWBDZMPVJ68K ", the following syntax errors
have occurred:
The field "XT_MES" is unknown, but there is a field with the similar n
ame "XT_MESG". "XT_MESG".
I found a SAP note that match with this error, but is not relevant for SP5. Anyone of you have faced the same problem?
1716329 - Planning function formula: Syntax error in generated program
Thanks in advance
RegardsHi Eduardo ,,
We are facing one more standard code dump in function module RSPLSF_FORMULA_PARSE line number 3915
IF l_tabix > 1 OR ls_code-cline(2) <> '_F'.
Ls_code-cline is type of string but at run time which is getitng single char value "-".
and comparing with two char fixed value "_F" so that it is getting dump as per my understaning.
I serach for notes relted to this issue but I didn't get any Note .
I think there should be a note for this isses can u sugget me any note related to this isssue .
We are facing same probelm in BWX , BWT and BWP system ..
Thanks in advance ...
Regards,
Srikumar Anamlaa -
Fox editor for multiplying with minus value
Dear experts,
I am getting a source keyfigure of type amount and I need to change its value and need to send to the target in the transfornation.
So I am trying to do that in Fox formula editor ( I am not aware whether it can be done here or not but trying)
1) So I did like this
Sourcefiled * (-1) - > Syntax check is saying formula element is not allowed here
2) Then I tried like this
Sourcefield*-1 -> Syntax check is saying formula element is not allowed here
3) I tried with using the function Reverse sign.
NEGATIVE( sourcefield ) -> Syntax check shown correct.
Please tell me which is the best practise we need to follow to multiply the source value with -1 .
Do we need to do that in the routine or fox formula is ok.
Thank you .Hi SD,
If you have many fields which require this formula or other calculations then you can do it in End Routine.
Or if there is only one field on which you are going to apply formula then you can do it in field routine only by applying formula - In your 3 options - last option ' NEGATIVE( sourcefield )' is correct and will work fine.
For example, if you have amount field 10 then after applying this formula the amount value will be -10.
So in essence if one or two fields in transformation you can use field routine (strictly when you do not have to use any selects/loops in field routine) else you use end routine.
Please let me know if there are any questions.
Thanks
Amit -
Hi Ragav,
One more Question, how to create variables for charecteristics in fox formula.
can you give me the syntax. like user have to enter the year for fox formula.Hi,
my scenorio is like this, if user enters 2 account numbers , the amount in first account shoud become -ve and it should add to 2nd account.
Ex: before acc1 500
acc2 100
after acc1 -500
acc2 600
where user have to enter 2 account numbers for which he want to do transactions.
Maybe you are looking for
-
System Unstable after 10.8.3 install w/ Thunderbolt Display
I installed 10.8.3 on a MacBook Pro last week; system has a Thundebolt Display used as primary monitor, though both monitors are on and in use. Randomly, but not less than 3-5 times per day, all the windows on the machine will freeze. displays stop
-
Hi, i am not getting too much info on this New Multi-pass option now i was looking at The Daily show and i see that option if i pay 9.99, does that i mean i will NEVER have to pay for downloading episodes again or its only for the next 15? 30?
-
Question when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter
-
Procure to Asset Complete Cycle
Does anybody know all setups required to complete cycle from creating an item for asset ,creating PO, transfering asset to FA(rather than inventory) and paying this invoice etc .does any body have this test cycle-
-
I'm looking to write an Xslt extension to help produce Html-output. For part of the tags produced, some information in the Xml needs to be checked and the output changed accordingly. The idea I had was to dynamically add a piece of xsl to each styles