Variable value from another variable
Hi all,
I created a query where one variable fill nother variable with following abap code:
when 'ZODACE'.
tables: /BIC/AZSD_O0100,
/BIC/AZSD_O0200.
ranges: r_createdon for /BIC/AZSD_O0100-CREATEDON.
break-point.
if i_step = 2.
loop at i_t_var_range into loc_var_range
where vnam = 'ZDATADOC'.
clear r_createdon.
r_createdon-low = loc_var_range-low.
r_createdon-high = loc_var_range-high.
r_createdon-sign = 'I'.
r_createdon-option = 'BT'.
append r_createdon.
exit.
endloop.
select DOC_NUMBER into
/BIC/AZSD_O0100-DOC_NUMBER
from /BIC/AZSD_O0100
where /BIC/ZAUDAT in r_createdon.
select single * from /BIC/AZSD_O0200
select * from /BIC/AZSD_O0200
where refer_doc = /BIC/AZSD_O0100-DOC_NUMBER.
clear l_s_range.
l_s_range-low = /BIC/AZSD_O0200-refer_doc.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
endselect.
endselect.
endif.
The variable are:
ZODACE based on IO 0REFER_DOC with customer exit
ZDATADOC based on IO ZDATU with manual entry
After wich end-user digit a data in ZDATADOC popup I take ODOC_NUMBER in order item ODS ZSD_O01 where ZDATADOC=CREATEDON.
With 0DOC_NUMBER I go to delivery item ODS ZSD_O02 and I take the corresponding 0REFER_DOC and then I fill variable ZODACE.
0REFER_DOC is in row of the query.
When I start the query I receive the following error message:
Error for variable in the customer exit ZODACE
and in debug i find this message:
System error in the program CL_RSR_REQUEST and Form GET_SETXX_WA
How can I do please?
Thanks in advance
Gianmarco
0DOC_NUMBER type-CHAR lenght-10
0REFER_DOC type-CHAR lenght-10
ZAUDAT type-DATS lenght-8
0CREATEDON type-DATS lenght-8
Can you help me please?
Thanks a lot
Similar Messages
-
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... -
Variable type Hierarchy, how to get the value from another similar variable
Hi.
We have created a variable, type hierarchy (using ORGEH hierarchy in HR based on 0ORGUNIT). Let's call this VAR1. We want to fill this with an User Exit, beacuse we want VAR1 to have the value from another variable, VAR2, which is also type hierarchy (and based on the same characteristic).
However, when we program this user exit and use the VAR1 afterwards, it just behaves as if we have a single characteristic value and not a node value. As a result, we just get posts which do have the 'parent itself' as characteristic value, and none of the subnodes... Any hints as to what we can do in our User exit to get the value passed over from VAR2 to VAR1 as a node value? Is there any spesific syntax to be used here that we are missing? ( The VAR1 and VAR2 are both defined as hierarchy variables, we have double checked...).Hi,
are you on BI7.0? There you can create variables type replacement path and get the value out from a different variable without any coding.
regards
Cornelia -
How to derive a variable value from another variable of a different IO?
Hi Gurus,
I am aware that using BEx variables and Customer Exit you are able to derive a variable value from another variable of the same infoobject (for example, Fiscal Year/Period (0FISCPER) and Calendar Day (0CALDAY)).
However, is is possible, using the same approach to derive a variable value from another variable that is in a different InfoObject? (for example, Input Fiscal Year/Period (0FISCPER) but derive Output of Required Start Date (0REQSTDAT))?
There are 2 BEx variables involved,
1) A user entry variable that is restricted in 0FISCPER
2) A customer exit variable that is restricted in ZREQSTDAT
In CMOD under EXIT_SAPLRRS0_001, Include ZXRSRU01, the code (I assume, correct me if I'm wrong) should perform 3 functions in I_STEP = 2,
1) After the pop up, capture user entry of Fiscal Year/Period
2) Identify or convert Fiscal Year/Period to Calendar Day range (unsure on how to code this portion)
3) Use the Calendar Day to lookup on matching Required Start Date and display all Required Start Date that matches. (unsure on how to code on this portion)
Hope to hear your thoughts soon.
Regards,
EricHi Shanthi,
I've made the necessary adjustments. The only difference in my code is,
Instead of,
If I_VNAM = 'ZREQSTDAT'
I use,
CASE I_VNAM.
Instead of,
PARAMETERS: ZFISCPER TYPE /BI0/OIFISCPER.
ZYEAR = ZFISCPER(4).
ZMM = ZFISCPER+4(3).
I use ,
This is the Customer Exit Variable in ZREQSTDAT
WHEN 'ZRSD_CX'.
The loop I use for the User Entry Variable in 0FISCPER-ZFYP_IN
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZFYP_IN'.
IF SY-SUBRC = 0.
CLEAR L_S_RANGE.
ZYEAR = LOC_VAR_RANGE(4).
ZMM = LOC_VAR_RANGE+4(3).
The codes were checked with no errors.
However, when I input the Fiscal Year/Periods and hit 'Execute'. The report went blank, not sure what is the cause. I've tried it several times. No error message appeared.
Regards,
Eric -
How to create a new row for a VO based on values from another VO?
Hi, experts.
in jdev 11.1.2.3,
How to create a new row for VO1 based on values from another VO2 in the same page?
and in my use case it's preferable to do this from the UI rather than from business logic layer(EO).
Also I have read Frank Nimphius' following blog,but in his example the source VO and the destination VO are the same.
How-to declaratively create new table rows based on existing row content (20-NOV-2008)
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
I have tried:
1.VO1(id,amount,remark1) and VO2(id,amount,remark2) are based on different EO,but render in same page,
2.Drag and drop a Createwithparams button for VO1(id,amount,remark),
3.add: Create insertinside Createwithparams->Nameddata(amount),
4.set NDName:amount, NDValue:#{bindings.VO2.children.Amount}, NDtype:oracle.jbo.domain.Number.
On running,when press button Createwithparams, cannot create a new row for VO1, and get error msg:
<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "Amount"
java.lang.NumberFormatException: For input string: "Amount"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
Can anyone give some suggestions?
Thanks in advance.
bao
Edited by: user6715237 on 2013-4-19 下午9:29Hi,CM,
I'm really very appreciated for your quick reply! You know, today is Saturday, it's not a day for everyone at work.
My principal requirement is as follows:
1.select/check some rows from VO2, and for each selection create a new row with some attributes from VO2 as default values for VO1's corresponding attributes, and during this process the user may be cancel/uncheck or redo some of the selections.
--so it's better to implement it in UI rather than in EO.
2.it's better to implement this function with declarative way as in Frank Nimphius' blog.
--little Jave/JS coding, the better. I only have experience in ORACLE FORMS, little experience in JAVA/JS.
In order to get full information for the requirements of my use case, can take a check at:
How to set default value for a VO query bind variable in a jspx page?
(the end half of the thread: I have a more realworld requirement similar to the above requirement is:
Manage bank transactions for clients. and give invoices to clients according to their transaction records. One invoice can contain one or many transactions records. and one transaction records can be split into many invoices.
Regards
bao
Edited by: user6715237 on 2013-4-19 下午11:18
JAVE->JAVA -
SSRS Parameter value from another parameter
Hello Everybody,
I have a parameter that I need to get it value from another parameter.
The first parameter @rdt is a date - 11/01/2012
The second parameter @mm is the year and month = 2012
I tried putting in a select inside the query but it did not work
SET @mm = (SELECT cast(year(@rdt) as char(4)) + cast(month(@rdt) as varchar(2)))
Then I put it as a default value inside the parameter and it still did not work
=cast(year(Parameters!rdt.Value) as char(4)) + cast(month(Parameters!rdt.Value) as varchar(2))
Any ideas or suggestions ?
Thanks in advanceHi Msj99,
I have tested the expression provided by
Visakh16 that it works fine , you will get the value as Integer type "YYYYMM", you can also use expression as below to get the string type of @mm (YYYYMM):
=Year(Parameters!rdt.Value)&Month(Parameters!rdt.Value)
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support -
Field with a default value from another field
I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
Topic
Acrobat 5 - field with default value of another field
Ben PF - 03:31am Mar 23, 2007 Pacific
How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
I've tried, but I just can't figure it out!
Any help much appreciated.
Ben
| Back to Topic List | Bookmark | Subscribe
To start a NEW discussion click on the Back to Topic List link and select Add Topic.
If you are in an archive forum please go up to the main topic list (archives are read only).
Messages
2 messages. Displaying 1 through 2.
First Previous Next Last Show All Messages
Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
This, or some variation of this, should work:
if(this.getField("date2").value == ""{
this.getField("date2").value = this.getField("date1).value;
| Bookmark back to top
Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
Thanks very much.
I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
Thanks for your help.
BenOkay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
Put this:
this.getField("myField2").value = event.target.value;
Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes. -
Id from one table showing value from another
I have an article id (rs_comments.id_com) but I would like it
to take this data and collect the value from another table.
I have joined the two tables with:
SELECT * FROM blg_comment_com INNER JOIN blg_article ON
idart_com=id_art
WHERE valid_com=1
ORDER BY date_com DESC
rs_comments.idart_com needs to be equal to rs_comments.id_art
displaying the value from rs_comments.title_art
How would I go about doing this. There only seems to be an
option in DW to do this with a dynamic list/menu but I just want to
display the text without option to change it.
Any help much appreciated.i was stupid. The answer was staring me in the face. No
wonder no-one bothered to reply... -
Default value from another table in dummy field on a portal form ..
A form based on a table :
id
name
xx_id
I created a dummyfield on the form in which i would like the
name corresponding to xx_id -> I would like to fetch a value
from another tabel into a dummy field.
thanx
Trine HindsholmI could do this task by creating the form manually - is there anyway I can modify the insert for a form created by the wizard?
-
Get the value from another node.
Hi, expert
In the component BT131I_SLS , I create a enhanced attribute in the node: BT131I_SLS/Details BTADMINI
Then i define the GET-V method to create a search help for the attribute.
Now , i want to pass a BP number to the search help function to filter the data.
We need to get the BP number as below:
When create a order, we input the product id ,
then there will be a popup window , we can choose a vendor in the window.
The vendor number is the value which we want to pass to the search help.
How can i do that ?
Thanks.
Oliver.Hi , expert
Can i use the 'get_related_entities' to get the value I need?
I think maybe i can use the method to get the value from another view which is not in my component.
Now I write codes in the GET-V method, as below:
method GET_V_ZZZFLD000011.
DATA:
LS_MAP TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING,
LT_INMAP TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB,
LT_OUTMAP TYPE IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB.
DATA: LV_PARTNER_NO TYPE CRMT_PARTNER_NUMBER.
data: lr_current TYPE REF TO if_bol_bo_property_access,
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_col TYPE REF TO if_bol_bo_col,
value TYPE string.
lr_entity ?= me->collection_wrapper->get_current( ).
lr_col = lr_entity->get_related_entities( iv_relation_name = 'Relation_Name' ).
lr_current = lr_col->get_current( ).
* value =
LS_MAP-CONTEXT_ATTR = 'EXT.ZZZFLD000011'.
LS_MAP-F4_ATTR = 'LGORT'.
APPEND LS_MAP TO: LT_OUTMAP.
* LS_MAP-CONTEXT_ATTR = 'EXT.ZZZFLD000011'.
* LS_MAP-F4_ATTR = 'LANGU'.
* APPEND LS_MAP TO LT_INMAP.
IF SY-SUBRC = 0.
ENDIF.
CREATE OBJECT RV_VALUEHELP_DESCRIPTOR
TYPE
CL_BSP_WD_VALUEHELP_F4DESCR
EXPORTING
IV_HELP_ID = 'ZHELP_ZSAKCDD'
* IV_HELP_ID_KIND = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_COMP
IV_HELP_ID_KIND = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_NAME
IV_INPUT_MAPPING = LT_INMAP
IV_OUTPUT_MAPPING = LT_OUTMAP
iv_trigger_submit = abap_true
* IV_F4TITLE = ' '"# EC NOTEXT
endmethod.
But i don't know the Relation_Name which i can get the vender's information.
Another question : i want to trigger the code 'get_related_entities' when i click the search help,
How can i do that ?
Thanks.
Oliver.
Edited by: oliver.yang on Aug 7, 2009 5:56 AM -
Getting a variable value from another class
Is there any way to get the value of a variable from another class? I have a file that calls another that does some checking then gives a true or false. The place the checking is done is inside an ActionListener I want to use that value in the file that calls the second. Any help would be great.
in 'another class', implement a method,
public boolean isCheckedOutOK( Object obj )
do the comparison in that method (use a suitable argument) -
How to derive value from another variable and use it to read master data?
Hi,
I have following case:
First I need to read the value from Cost Center -variable (ZIPCC) and then I need to use that value to determine the home currency of that cost center from the cost center master data table (field: OBJ_CURR).
I know to basic idea on how to do this, but don't seem to get the syntax correct. Could someone point me in the right direction?
So the objects in play are:
ZIPCC = Cost center selection variable (mandatory, single value)
ZIPCUR = Cost Center Currency variable (customer exit, single value)
0COSTCENTER
0OBJ_CURR = Field in cost center master data
Help will be greatly appreciated!
-mHi,
Thank you very much for your example I can see that this logic works! However I'm experiencing trouble in selecting the 0OBJ_CURR
This kind of declaration isn't working: "D1 Like /BIC/0OBJ_CURR."
And the same goes for the Selection:
"Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low."
This is where my syntax also went wrong.
0OBJ_CURR is a unit, is there a special way to declare it and use it in the code?
(and 0CURRENCY is a reference unit for 0OBJ_CURR).
Do you have adivce on this?
-miikka -
hi all,
I have to build a report on infoprovider A (infocube A). this report has a column, where data have to be calculated with information from another infoprovider (Infocube B).
The information needed from B is just one value depending on parameter year.
I didnt find a way to put this value as variable
in the query.
Is there a way to get the information from Infocube B in the query?
thanks for any help !If the info you need is always the same (unique) for the entire query you can use a formula variable and fill it thanks to an exit in which you can read the value from the infoprovider (look at previous posts in order to see how)...otherwise (if the value from the infoprovider can change for every row of your query) you have to do the same, but inside a virtual KF...
Hope it helps!
Bye,
Roberto
Message was edited by: Roberto Negro -
Refreshing sql report region based on values from another region - 4.0
Greetings All,
I have a page with two regions, say region 1 and region 2. I have a before header process that fetches values from db based on criteria entered from another page. Region 2 is a sql report region with bind variables from region 1. When this page is rendered region 1 renders properly however sql report region always returns no records. What am i missing here?
I would like to have the region 2 render a report based on the values from region 1. Region 2 has a sql query that looks something like
select
colum 1,
column 2,
column 3
from table t1
where t1.c1 = :p10_item1
and t1.c2 = :p10_item2Using apex 4.0
thanks
SeetharamanIf these items hidden, try making them display only .
Also what happens when you move the items from region 1 to region 2.
From my experience items do not have much of a dependency on the region they are attached to other than cases when the region is not rendered(when its condition fails) and then the item values become null(bcoz they themselves are not rendered). -
How to access attribute value from another VO using groovy?
Hello, I am using JDeveloper 11.1.2.3.0
I read a lot of information about this but still I am missing something. I am trying to set the value of a bind variable through Groovy expression in my VO. I want this Bind variable
to have the value from an attribute from another VO. I tried ''adf.object.MyAppModuleImpl.findViewObject('Users1').currentRow.Iduser''
I am getting "oracle.jbo.expr.JISyntaxError: Variable MyAppModuleImpl not recognized". I tried with 'MyAppModule' only but the result is the same.
Can anyone help please?
ThanksCheck out http://www.oracle.com/technetwork/developer-tools/adf/learnmore/august2011-otn-harvest-457288.pdf Page 18 'Optimized Groovy data access to view objects'
Timo -
How to get a int value from another class method?
Hi,
how can I get a value of another class method variable value.
example,
class elist
int a;
ArrayList<Event> eventArray;
void addEvent(Event e);
Event getEvent(int index);
void removeEvent(int index);
void orderEventByTime();
interface Event
void Command();
class servo implements Event
String ip;
int time = 10;
void Command();
class servo_2 implements Event
String ip;
int time = 20;
void Command();
[\code]
I want to get the time value in elist variable a;
and want to compare each class time?.Hi,
1) this foum provides means to format/tag code, no need to manually add -tags
2) by default, classname start with a capital letter, method names with a lower case letter
3) where do you want to get the time value to Elist.a? During addEvent()?
4) what do you want to do with the time value of each event? Sum all values up to make a an overall sum?
5) where do you want to compare the time value(s)?
To put it in one sentence: please be more specific with your description and answer.
Bye.
Maybe you are looking for
-
Reading values from standard report in custom report dynamically
Hello Gurus, I have a strange requirement, We have some standard reports which displays output in drop down blocked data. I want to create a custom report which will get that data in my internal tables. Just to elaborate this requirement, I will give
-
I have looked at various help topics but nothing is working; I have not deleted my history lately and nothing in my preferences is checked to do so automatically. I also tried deleting 'sessionstore.js' but that didn't help either. Firefox acknowledg
-
I have an iPhone 4s, I want to download iOS 6 software but anywhere I look and also in the AppStore it's nowhere to be found, how do I find and download it?!
-
Sender File Adapter pulling Incomplete File - Throwing Alert with MSecsWait
Hi, <br>We have sender File communication channel which is polling every 600 Secs. The directory where the files are available is basically an FTP Server directory. Vendors are putting file in this directory and PI is picking up from there. <br> Some
-
Using BT FON with a different home router
I currently have a BT Home Hub and have opted in to BT FON, which I have been using quite a bit when away from home. However, I am thinking about switching to a different router at home, for unrelated reasons. Am I correct in my interpretation that I