Get value of formula variable during query runtime into a text variable
Hi all,
I wanna get the value of the formula variables during the query runtime into a text variable.
My scenario is like this: First I defined a formula variable Z_DATE_3 which is processing by replacement. It will get the day of a characteristcs(Startdate).
Then I defined a text variable and in the function module related to this text variable, I used the parameter I_T_VAR_RANGE which can store the value of formula variable during the query runtime.So I can read the value from this table in my function module.
But I have a issue, when I run the query which used the defined text variable, it seems that it doesn't call the corresponding function module. Because I set a breadpoint in hte code and it never reach this breakpoint.
If I removed the parameter I_T_VAR_RANGE , it can enter the function module.
So could you please give some advice?
Is my solution correct or not?
And what's wrong with the parameter I_T_VAR_RANGE? Did I use it correctly?
And My code is:
DATA: l_s_range_v TYPE rrrangeexit,
l_day type sy-datum.
if i_step <> 2.
raise no_processing.
endif.
READ TABLE i_t_var_range INTO l_s_range_v
WITH KEY vnam = 'Z_DATE_3'.
if sy-subrc = 0.
l_day = l_s_range_v-low.
endif.
Thanks in advance!
Best regards
Fanchest
Hi, Fanchest,
I'm having just the same issue. Did you find a solution?
I wrote a short routine in CMOD to derive the value of a formula variable to a text variable, but it's not working (I don't get any value). Can you share your solution?
Thanks in advance,
LL
Similar Messages
-
Values of Formula Variables are not determined
I have created a Purchase Order for services where the quantities for services line items are determined on the basis of predefined formulas. Values for all the variables are provided in PO and quantity is calculated on the basis of those values. When I try to adopt the services during the creation of Service Entry sheet with reference to PO, system shows the below error message:
Please enter a value for variable(s) NO OF PERSONS (Form.Val.1)
Message no. SE252
Diagnosis
You wish to have the system determine the quantity using a formula but have not entered any values for the variables in the formula.
Procedure
Maintain the values of the variables.
Example
For example, in a formula for calculating a volume, specify the values for the variables "length", "width", and "height".
The values of formula variables are not adopted from the PO. Please suggest the solution or possible cause of error.I have gone through the note you suggested. But in my case each variable is created with specific name and assigned to the formulas.
The formulas are getting adopted in RFQ but not in service entry sheet.
Edited by: abapuser on Dec 21, 2010 6:46 AM -
Not getting values in the variable
Hi experts,
in this program
i want VBPA-vbeln = xblnr....but there is a data length error. so I ahve declare one variavble of length 10. & i am moving this xblnr to this variable but not getting value in that variable that i am moving..& give me the possible solutions...
when '0FI_AR_4'.
data: t_DTFIAR_3 like DTFIAR_3 occurs 0 WITH HEADER LINE.
data: BEGIN OF t_DTFIAR_3 occurs 0.
include structure DTFIAR_3.
data: xblnr1(10).
data: END OF t_DTFIAR_3.
data : BEGIN OF t_partner occurs 0,
VBELN like vbpa-VBELN,
parvw like vbpa-PARVW,
kunnr like vbpa-kunnr,
END OF t_partner.
data : xblnr1(10).
t_DTFIAR_3[] = C_T_DATA[].
move t_DTFIAR_3-xblnr to t_DTFIAR_3-xblnr.
select VBELN PARVW kunnr
into table t_patner
from vbpa
FOR ALL ENTRIES IN t_DTFIAR_3
where VBELN = t_DTFIAR_3-xblnr.
SORT t_partner BY VBELN PARVW.
loop at t_DTFIAR_3.
loop at t_partner where VBELN = t_DTFIAR_3-xblnr1.
if t_partner-PARVW = 'ZA'.
t_DTFIAR_3-YPARVW1 = t_partner-PARVW.
t_DTFIAR_3-YPART1 = t_partner-kuNNR.
elseif t_partner-PARVW = 'ZR'.
t_DTFIAR_3-YPARVW2 = t_partner-PARVW.
t_DTFIAR_3-YPART2 = t_partner-kuNNR.
ELSEif t_partner-PARVW = 'ZE'.
t_DTFIAR_3-YPARVW3 = t_partner-PARVW.
t_DTFIAR_3-YPART3 = t_partner-kuNNR.
ELSEif t_partner-PARVW = 'ZS'.
t_DTFIAR_3-YPARVW4 = t_partner-PARVW.
t_DTFIAR_3-YPART4 = t_partner-kuNNR.
ENDIF.
MODIFY t_DTFIAR_3.
endloop.
ENDLOOP.
C_T_DATA[] = t_DTFIAR_3[] .
Thanks in advanceHI,
While moving use the WRITE TO option.
WRITE VBPA-vbeln TO xblnr.
Regards
Sudheer -
How to switch ON/OFF Unassigned Hierarchy Nodes during Query Runtime?
We have a GL Account Hierarchy based on an FSV that we use in BW reports.
All our reports are web reports accessible via BW Portal.
This hierarchy has an Unassigned Node also that we have suppressed (switched off) for display via Hierarchy Attributes Settings.
When you check the Suppress Unassigned Node box the unassigned nodes do not show on the report.
This has been working fine so far until we have this one requirement where user would like to see unassigned GL Accounts also.
We would like to check/uncheck this flag (Supress Unassigned Node) during the query run time.
Is there a way to control showing/hiding of unassigned node of a hierarchy during query runtime?Hi Ram,
If you have set hierarchy attribute as display unassigned node, then you can simply select the root as filter in order not to display the unassignd node.
However if you have set hierarchy attribute as suppress unassigned node, then you can't choose the unassigned node by the filter.
So if users want both, you need to set hierarchy attribute as display unassigned node. You cannot really change this setting at runtime by user.
Regards,
Patricia -
How to output a query results into a text file
How to output a query results into a text file instead of outputing it to the screen..
is there a way for us to write a SQL query which specifies to output the query results to a text file.
Pls let me know how to do it
Thanking u in advance
regards
MuralyMuraly,
If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
SPOOL c:\temp\report.html
SELECT DEPARTMENT_NAME, CITY
FROM EMP_DETAILS_VIEW
WHERE SALARY>12000;
SPOOL OFF
SET MARKUP HTML ENTMAP OFF
In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
Alison -
Getting the value(s) of varibales during the runtime
Dear All
I'm trying with the below listed code to log some information about a
programm process during the Runtime. I would have e.g. a timestamp
the values of some varibales s.o. The sutructure abap_call_stack_entry
has some interesting fields but I get shown #### as value if I use some of them.
The field abdbg-levent provides the form name which is called.
How can get for example the content (value) of a variable within a routine or
form ? Does anybody got an Idea on right using of this structure "abdbg"
or how to solve above mentioned problem?
perform first.
perform second.
perform fourth.
form first.
data latte type i.
latte = 78.
perform akt.
endform.
form second.
data bolo type i.
bolo = 345.
perform akt.
endform.
form fourth.
data sync type i.
sync = 989.
perform akt.
endform.
FORM akt.
TYPES:
begin of abap_call_stack_entry,
mainprogram like sy-repid,
include like sy-repid,
line type i,
eventtype like abdbg-leventtype,
event like abdbg-levent,
flag_system type c,
FLINE TYPE ABDBG-FLINE,
CLINE TYPE ABDBG-CLINE,
BCOUNT TYPE ABDBG-BCOUNT,
XCODE TYPE ABDBG-XCODE,
REPID TYPE ABDBG-REPID,
SREPID TYPE ABDBG-SREPID,
BREAKP TYPE ABDBG-BREAKP,
ACTUAL TYPE ABDBG-ACTUAL,
CURRLINE TYPE ABDBG-CURRLINE,
FIRSTV TYPE ABDBG-FIRSTV,
VINDEX TYPE ABDBG-VINDEX,
VNAME TYPE ABDBG-VNAME,
VTYPE TYPE ABDBG-VTYPE,
VLENGTH TYPE ABDBG-VLENGTH,
VLINE TYPE ABDBG-VLINE,
LITINDEX TYPE ABDBG-LITINDEX,
LITOFFSET TYPE ABDBG-LITOFFSET,
LITLENGTH TYPE ABDBG-LITLENGTH,
LITTYPE TYPE ABDBG-LITTYPE,
LITVALUE TYPE ABDBG-LITVALUE,
V1INFO TYPE ABDBG-V1INFO,
VNAME1 TYPE ABDBG-VNAME1,
V1VALUE TYPE ABDBG-V1VALUE,
V1HEX TYPE ABDBG-V1HEX,
V2INFO TYPE ABDBG-V2INFO,
VNAME2 TYPE ABDBG-VNAME2,
V2VALUE TYPE ABDBG-V2VALUE,
V2HEX TYPE ABDBG-V2HEX,
V3INFO TYPE ABDBG-V3INFO,
VNAME3 TYPE ABDBG-VNAME3,
V3VALUE TYPE ABDBG-V3VALUE,
V3HEX TYPE ABDBG-V3HEX,
V4INFO TYPE ABDBG-V4INFO,
VNAME4 TYPE ABDBG-VNAME4,
V4VALUE TYPE ABDBG-V4VALUE,
V4HEX TYPE ABDBG-V4HEX,
VNUMFROM TYPE ABDBG-VNUMFROM,
VNUMTO TYPE ABDBG-VNUMTO,
BUTTON TYPE ABDBG-BUTTON,
FIELDINFO TYPE ABDBG-FIELDINFO,
FLDNAME TYPE ABDBG-FLDNAME,
FLDVALUE TYPE ABDBG-FLDVALUE,
FLDHEX TYPE ABDBG-FLDHEX,
STRNAME TYPE ABDBG-STRNAME,
STRINGNAME TYPE ABDBG-STRINGNAME,
STRINGLEN TYPE ABDBG-STRINGLEN,
STRINGOFF1 TYPE ABDBG-STRINGOFF1,
STRINGOFF2 TYPE ABDBG-STRINGOFF2,
TABNAME TYPE ABDBG-TABNAME,
TABHEAD TYPE ABDBG-TABHEAD,
TABLINE TYPE ABDBG-TABLINE,
TLINE TYPE ABDBG-TLINE,
TMODE TYPE ABDBG-TMODE,
OBJNAME TYPE ABDBG-OBJNAME,
OBJVIEW TYPE ABDBG-OBJVIEW,
OBJMETHOD TYPE ABDBG-OBJMETHOD,
OBJNAME_HA TYPE ABDBG-OBJNAME_HA,
ICON_CI TYPE ABDBG-ICON_CI,
ICON_PPP TYPE ABDBG-ICON_PPP,
FLAGCLASAT TYPE ABDBG-FLAGCLASAT,
FLAGINSTAT TYPE ABDBG-FLAGINSTAT,
FLAGPUBLAT TYPE ABDBG-FLAGPUBLAT,
FLAGPRIVAT TYPE ABDBG-FLAGPRIVAT,
FLAGPROTAT TYPE ABDBG-FLAGPROTAT,
DYNAME TYPE ABDBG-DYNAME,
DYNUMB TYPE ABDBG-DYNUMB,
DEVENT TYPE ABDBG-DEVENT,
VOLEN TYPE ABDBG-VOLEN,
VODEC TYPE ABDBG-VODEC,
VOFFI TYPE ABDBG-VOFFI,
POPOK TYPE ABDBG-POPOK,
POPLINE TYPE ABDBG-POPLINE,
WARNLINE TYPE ABDBG-WARNLINE,
FIXPTARITH TYPE ABDBG-FIXPTARITH,
RFCHOST TYPE ABDBG-RFCHOST,
RFCSYSID TYPE ABDBG-RFCSYSID,
RFCDEST TYPE ABDBG-RFCDEST,
LICON TYPE ABDBG-LICON,
LLINENUM3 TYPE ABDBG-LLINENUM3,
LLINENUM6 TYPE ABDBG-LLINENUM6,
LPROGRAM TYPE ABDBG-LPROGRAM,
LEVENTTYPE TYPE ABDBG-LEVENTTYPE,
LEVENT TYPE ABDBG-LEVENT,
LPROGGROUP TYPE ABDBG-LPROGGROUP,
LLANGUAGE TYPE ABDBG-LLANGUAGE,
LLOADSIZE TYPE ABDBG-LLOADSIZE,
LUPDATE TYPE ABDBG-LUPDATE,
LFLAGKEY TYPE ABDBG-LFLAGKEY,
LFLAGSEAR TYPE ABDBG-LFLAGSEAR,
LSEARVALUE TYPE ABDBG-LSEARVALUE,
LFLAG TYPE ABDBG-LFLAG,
LISEARFROM TYPE ABDBG-LISEARFROM,
ROLL_AREA TYPE ABDBG-ROLL_AREA,
WFLAGOR TYPE ABDBG-WFLAGOR,
WFLAGAND TYPE ABDBG-WFLAGAND,
LWFLAGLOCA TYPE ABDBG-LWFLAGLOCA,
LWPROGRAM TYPE ABDBG-LWPROGRAM,
LWNAME TYPE ABDBG-LWNAME,
LWCOMPOPER TYPE ABDBG-LWCOMPOPER,
LWFLAGFIEL TYPE ABDBG-LWFLAGFIEL,
LWVALUE TYPE ABDBG-LWVALUE,
WPROGRAM TYPE ABDBG-WPROGRAM,
WNAME TYPE ABDBG-WNAME,
WVALUE TYPE ABDBG-WVALUE,
LCOMPONENT TYPE ABDBG-LCOMPONENT,
LCTYPE TYPE ABDBG-LCTYPE,
LCLENGTH TYPE ABDBG-LCLENGTH,
LVALUE TYPE ABDBG-LVALUE,
SEARCHSTR TYPE ABDBG-SEARCHSTR,
LTEXT TYPE ABDBG-LTEXT,
REGION TYPE ABDBG-REGION,
SUBKEY TYPE ABDBG-SUBKEY,
SUBKEYC TYPE ABDBG-SUBKEYC,
DISLINE TYPE ABDBG-DISLINE,
SYSAREAHEA TYPE ABDBG-SYSAREAHEA,
SYSAREALIN TYPE ABDBG-SYSAREALIN,
MEMTABALLO TYPE ABDBG-MEMTABALLO,
MEMTABUSED TYPE ABDBG-MEMTABUSED,
MEM_ROLL TYPE ABDBG-MEM_ROLL,
MEM_HEAP TYPE ABDBG-MEM_HEAP,
MEM_HEAPMX TYPE ABDBG-MEM_HEAPMX,
MEM_ROLLEX TYPE ABDBG-MEM_ROLLEX,
MEM_MMUSED TYPE ABDBG-MEM_MMUSED,
MEM_MMFREE TYPE ABDBG-MEM_MMFREE,
MEM_SHORT TYPE ABDBG-MEM_SHORT,
MEM_PAGING TYPE ABDBG-MEM_PAGING,
MEM_SUM TYPE ABDBG-MEM_SUM,
SYSTDEBUG TYPE ABDBG-SYSTDEBUG,
MEMORY TYPE ABDBG-MEMORY,
UPDTASKDBG TYPE ABDBG-UPDTASKDBG,
AC_FLUSH TYPE ABDBG-AC_FLUSH,
WARNLIST TYPE ABDBG-WARNLIST,
WARNSTOP TYPE ABDBG-WARNSTOP,
WARNDUMP TYPE ABDBG-WARNDUMP,
TABTYPE TYPE ABDBG-TABTYPE,
EXTTYPE TYPE ABDBG-EXTTYPE,
end of abap_call_stack_entry.
DATA:
acse type abap_call_stack_entry,
tab type table of abap_call_stack_entry.
CALL 'ABAP_CALLSTACK' ID 'DEPTH' FIELD -1
ID 'CALLSTACK' FIELD tab.
LOOP AT tab INTO acse FROM 2.
WRITE:
/ 'Mainprog:', acse-mainprogram,
/ 'Include: ', acse-include,
/ 'Event: ', acse-eventtype,
acse-event.
ENDLOOP.
ENDFORM.CALL 'ABAP_CALLSTACK' ID 'DEPTH' FIELD -1
ID 'CALLSTACK' FIELD tab.
provides useful information about a programm
and its routines like Programname linenumber etc.
All what I want to have is getting more information
concerning a programm during the runtime.
As I have heard the above mentioned structure
ABDBG provides exactly such things.
And I have problems on using this sructure
because I get characters like ##### instead
of values of variables and so on.
Please look to the structure components -
VARIABLE option for currencies during query runtime.
Hi Experts,
Please provide me the solution for the below.
In Bex query, during the runtime, selection time of currency,
We have to give variable option for Millions in rupees, thousands in rupees and rupees.
How we can give?
Is it any SAP exit variable is tre?
or How v can make it?
Point sure awarded.
Regards
Peras
Edited by: peras selvan on Apr 6, 2008 9:05 PMHi Gupta,
Thanks.
But they requirement is to give a drill down option in the first selection for those 3 format of currencies.. Is it possible to give while assigned scaling factor? -
How to set values of formula fields during runtime in crystal reports
Hello All,
Could any one help in letting me know how to set the values of a formula in the runtime.
I tried using the below systax in the formula field
Assume that I have 2 formula fields
1. format_count
2. format_display
my formula is like below:
in the formula field format_count i have
format_display=pagenumber
when checking for errors its throwing error stating "stamement is expected"
Could any one help in resolving this
ThanksHi Ranjeet,
Whenever you assign values to a variable, you need to use :=
Like this:
numbervar x := pagenumber
And what exactly are you trying to do anyway?
-Abhilash -
Creating Variable with Replacement Path to get value from ANOTHER Variable
Hi all,
Is anyone has created the Variable with Replacement Path to get the value from another User Entry Variable, PLEASE ?
First created the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next created the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we should get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error 'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path for my requirement, PLEASE ?
The following is from help.sap..com:
Replace with Characteristic Value
Text and formula variables with the processing type Replacement Path can be replaced with a corresponding characteristic value. In the variable editor, on the General tab page, you specify under Reference Characteristic the characteristic that is to be referenced by the replacement. On the Replacement Path tab page, you can choose whether the variable is replaced with the From or the To Value and with the Key or the Name of the characteristic value. You can also specify the Offset Start and Offset Length for the output.
Replace with Variable
Characteristic value variables, hierarchy variables, text variables, and formula variables with the Replacement Path processing type can take their values from a different variable.
The following prerequisites need to be fulfilled:
Variable
● The variable must not be input-ready
● The variable must represent a single value
Source Variable
● The source variable must not be a hierarchy node variable
● The source variable must be input-ready
● The source variable must be available in the query
● The source variable must represent a single value or an interval
In the variable editor, on the Replacement Path tab page, you specify the source variable from which the value is to be determined. The value is either determined from the key, the external attribute of the key, the description, or the attribute value. You can specify an Offset Start and an Offset Length for the output here. The variable is replaced on the variable screen upon each data release.
Thanks,
Venkat.Hi Eve,
It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
We are using the scenario in a couple of places, and it works very well.
Hope this helps... -
Default Value in Formula Variable - Inconsistent behaviour
Hi,
I am facing a very strange issue in a formula variable.
I had created three formula variables with default values and the user (Power user who has the Bex access) was able to change the default value themselves for two of these variables.
Now he wants to change all the three, so I have tried to check the issue and changed all the three for testing purpose.
Now, he is unable to change any of them!!! Sad, now I cant even say that "You dont have the Auth to do so"
Any clue? Anyone has faced similar issue.
Any thoughts are highy welcome! Suddenly users wants to get this one URGENTLY, usually he used to access the report once in month. Now he wants to use the same once in half an hour
We are on BI 7.0 with SP 24
Any thoughts PLS
Regardshi,
probably you can refer to SAP Note 1413030 - SAPBWNews NW 7.x BW Add-On Frontend Patch 1300 - GUI 7.10 or maybe SAP Note 1294382 - SAPBINews NW7.0 BI Add-On Frontend SP900 - GUI 7.1 that might help you in sorting out your problem, plus you can buy more time from the user as well
regards
laksh -
How to Get Value from a Variable to restrict a Key Figure ?
I am trying to make a query in Query designer, we are running BI7.
I have a user entry veriable on the Fiscal year period, the user will need to enter a period they want the report for, i.e. 07.2008 for July 2008 report and 04.2008 for April 2008 report.
Based on what the user entered as the starting period (in the variable entry), I have to then use that initial value and show the Year to date value (of sales etc) in the next column.
To Clarify, if user entered 07.2008 then all the data from 01.2008 to 07.2008 needs to be in the next column. if user entered 04.2008 then all the data from 01.2008 to 04.2008 should be in the next column.
So to summarise according to my understanding, I want to get the value from a variable and pass it onto another variable to restrict a key firgure (sales amount)...
Can someone please clarify what i need to do here?
Many thanks in advance, points will be awarded accordingly.hi,
please follow the below steps:
1. Create a new varialbe , this variable should be processed by customer exit.
2. In the column section, create a new column and drag the sales key figure, also drag fiscal year period and restrict with the new variable.
3. In the cmod tcode write a customer exit code to extract the value of the user entry and assign it your variable, you can refer to the below code.
WHEN '< New VAR name>'.
IF I_STEP = '2'. "AFTER THE POPUP
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = '<Fiscal Year Period VAR Name>'.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
L_S_RANGE-LOW+4(3) = '001'.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "LOW E.G. 2001006
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
For ex- if the user enters 008/2008, this code will create as range assign 001/2008 - 008/2008 value to the variable.
hope it helps,
rgs,
Parth. -
Default multiple values for formula variable on variable selection screen
Hi All,
Suppose 'A' is formula variable with customer exit as processing type then i want four default values for this variable eg: 3, 6,9, and 12 as selection options, when we will execute query user can able to pick any one of the default value.
is it possible in BEx for formula variables?
I also tried with ABAP code in 'cmod' t-code, but it is not working properly for 4 default values....but for single default value, code is working fine.
I am using following code ::
When 'ZCSIMCTB'. // variable name
IF i_step = '1'.
CLEAR : l_s_range.
l_s_range-low = 3.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
CLEAR : l_s_range.
l_s_range-low = 6.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
CLEAR : l_s_range.
l_s_range-low = 9.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
CLEAR : l_s_range.
l_s_range-low = 12.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
Thanks in advanceHi Sankar,
Thanks for reply...
With single quotes also its not working.......
Also as I am using Formula Variable so by default "Single Value" is coming on Variable Details....
Regards,
NIlesh -
XSL-How to get value of a variable from inside loop-- to the outside loop?
Pls help
hi im currently working on this xsl file..
This works on generating a txt file,my problem right now is
' how can i get the value of a variable generated from the inside forloop,
i have to get the total,sum value of this variables after performing the loop
***this is the for loop
<xsl:for-each select="OutboundPayment">
<xsl:variable name='id' select='generate-id(OutboundPayment)'/>
<xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
<xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
<xsl:value-of select='$id'/>
<xsl:text>D</xsl:text>
<xsl:value-of select='$DDate'/>
<xsl:value-of select='$Batch'/>
<xsl:text>3</xsl:text>
<xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
<xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
<xsl:value-of select='substring(Payee/Name,1,20)'/>
<xsl:value-of select='$PValue'/>
<xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
<xsl:variable name="LHash">
<xsl:call-template name="GetHash">
<xsl:with-param name="A1" select="$PValue" />
<xsl:with-param name="A2" select="$Addend" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat('[',$LHash,']')" />
<!--LHash*i have to get the total amount of this one from the outside loop /---->
<xsl:call-template name='NewLine'/>
</xsl:for-each>
<!--I have to put in here the total value of that LHash/---->
<!--This is the template on how to get the value of that variable in the inside loop/---->
<xsl:template name="GetHash">
<xsl:param name='A1'/>
<xsl:param name='A2'/>
<xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
<xsl:variable name='Weight' select='317191314191112'/>
<xsl:call-template name="WDigit">
<xsl:with-param name="Cnt" select="15"/>
<xsl:with-param name="Sum" select="$TwoSum"/>
<xsl:with-param name="Wgt" select="$Weight"/>
<xsl:with-param name="Tot" select="0"/>
</xsl:call-template>
</xsl:template>
<xsl:template name='WDigit'>
<xsl:param name='Cnt'/>
<xsl:param name='Sum'/>
<xsl:param name='Wgt'/>
<xsl:param name='Tot'/>
<xsl:choose>
<xsl:when test="$Cnt > 0">
<xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
<xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
<xsl:variable name='Prduct' select='$Multip$Factor'/>
<!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
<!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
<!--xsl:call-template name='NewLine'/-->
<xsl:call-template name="WDigit">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Sum" select="$Sum"/>
<xsl:with-param name="Wgt" select="$Wgt"/>
<xsl:with-param name="Tot" select="$Tot+$Prduct"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="Rem" select="$Tot mod 11"/>
<xsl:variable name="Chk" select="11 - $Rem"/>
<xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:template name='GetTotal'>
</xsl:template>
Thanks in advance for those who are willing to help.
-LeighyaIt would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
If that wasn't what you were asking, then please post your code in a readable format. -
Reg:Creation of chart during query runtime
Dear all,
I want to display a Pie-Chart during my query execution
dynamically. I am working only in query designer not in WAD.
For example : I have created a query in query designer based on Zonewise Sales Value. And i have designed the chart also based on these values. But i am facing the problem when i am executing the query i couldnt able to see the Pie-Chart desinged by me.
Is it possible to save the Pie-Chart as saved view in my query designer?
Kindly do the needful. Helpful answers will be rewarded.
Thanks,
Harikrishna Nhai expert's,
is there any option to save and execute the chart during query execution. i am asking in query designer?.....
please through a ligh on it........
Regards
Harikrishna N -
How to get value od one variable baesd on another variable
Hi Gurus,
Is this thing possible?My problem is i have one variable on "0calmonth2" based on this variable i want to populated the values in another object (0calquarter).i.e.
If i select " Jan or Feb or Mar" it should populate 1 in 0calquarter similarly, for other monthHello Deepak
Try a function module like this:
FUNCTION Z_YOUR_FM.
""Interfase local
*" IMPORTING
*" VALUE(I_AREA) TYPE UPC_Y_AREA
*" VALUE(I_VARIABLE) TYPE UPC_Y_VARIABLE
*" VALUE(I_CHANM) TYPE UPC_Y_CHANM OPTIONAL
*" VALUE(ITO_CHANM) TYPE UPC_YTO_CHA
*" EXPORTING
*" REFERENCE(ETO_CHARSEL) TYPE UPC_YTO_CHARSEL
*" EXCEPTIONS
*" FAILED
clear export table
CLEAR eto_charsel.
data: i TYPE i value 1,
ls_charsel TYPE upc_ys_charsel,
l_periv type periv value 'K1',
l_calmonth2 type UMC_Y_ICHAVAL,
l_buffer_call TYPE boole-boole VALUE ' ',
l_subrc LIKE sy-subrc,
ls_return LIKE bapiret2,
l_type LIKE upc_var-vartype,
lto_varsel_all TYPE upc_yto_charsel,
lto_varsel TYPE upc_yto_charsel,
lto_chanm TYPE upc_yto_cha,
wa_varsel like line of lto_varsel,
l_quarter(1),
l_quarterc(5).
Read value of CALMONTH2 variable
CALL FUNCTION 'Z_VARIABLE_GET_DETAIL'
EXPORTING
i_area = <YOUR PLANNING AREA>
i_variable = <YOUR CALMONTH2 VARIABLE>
i_buffer = l_buffer_call
IMPORTING
e_subrc = l_subrc
es_return = ls_return
e_type = l_type
eto_varsel_all = lto_varsel_all
eto_varsel = lto_varsel
eto_chanm = lto_chanm.
IF l_subrc eq 0.
loop at lto_varsel into wa_varsel.
move wa_varsel-low to l_calmonth2.
endloop.
ENDIF.
calculate quarter
CASE l_calmonth2.
WHEN '01' OR '02' OR '03'.
l_quarter = '1'.
WHEN '04' OR '05' OR '06'.
l_quarter = '2'.
WHEN '07' OR '08' OR '09'.
l_quarter = '3'.
WHEN '10' OR '11' OR '12'.
l_quarter = '4'.
ENDCASE.
passing QUARTER to variable value
CLEAR ls_charsel.
ls_charsel-CHANM = I_CHANM.
ls_charsel-SEQNO = i.
ls_charsel-sign = 'I'.
ls_charsel-opt = 'EQ'.
ls_charsel-low = l_quarter.
INSERT ls_charsel INTO TABLE eto_charsel.
add 1 to i.
ENDFUNCTION.
Hope this helps...
regards,
Ibrahim.
Maybe you are looking for
-
How do I set the aspect ration for 4:3 or for 16:9?
How do I set the aspect ration for 4:3 or for 16:9 in Adobe PE12?
-
Hello everybody, An error occurred while executing these codes <%@page import="examples.simple.ActiveClass" %> try String userId=request.getParameter("userID"); String activateCode=request.getParameter("activationCode"); ActiveClass object=new Active
-
My problem is Outlook e-mails. Every time I click an e-mail several popup windows come up as I had described before. Regarding option button when I type 'Use Firefox' nothing comes up but if I leave blank severalcontents come up but nothing related t
-
Output Mapping Preference for 5.1 Audio
Hello, I have my editing hardware hooked up to a surround sound processor (via HDMI) which feeds 7.1/5.1 speakers and an HDTV. The HDTV displays the output monitor content just fine, but I have been unable to get Premiere Pro CC 2014 to output 5.1 s
-
Rusty with CoolEdit / Audtion 1.0. Newbie with CS6 trial. I've got a lot of human speech tracks to clean up. Previously, I used the scripting capability of Audition 1.0 with the following "chain of effects": Convert to mono + 22050 hz Normalize to 90