Need clarification to write transformation routine for my requirement
Hi all,
I have a requirement as mentioned below...
I have a keyfigure amount which will hold the amount value..now i have been asked to add amount_2000 key figure...it has been done..
But the real problem is that
They will give a filter value in DTP selection for the field "area".
now if they give area as 1000 then the amount field should populat with the respective amount value
but whereas amount_2000 should populate with only the amount of the area 2000 irrespective of the filter condition given...
i need to write the routine in the transformation...But the problem is that when we give the filter value in DTP i coudnt get value for amount_2000 as only it gets the value for 1000.
I hope the requirement is clear...
can any one help me in this.
Thanks & Regards,
Hari.
Write a routine for the InfoObject amount_2000.
Use amount and area as source fields.
Now the coding should look like:
IF source_fields-area = '2000'.
RESULT = source_fields-amount.
ELSE.
RESULT = 0.
ENDIF.
This is independent of the filter values in the DTP.
Best regards
Dirk
Similar Messages
-
How to write conversion routine for key figure?
Our customer has this requirment:
we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this: 00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time, BW system will report a error that say it is not acceptable time. If we want to define a integer, but we need display it like hhmmss format. We know we can write conversion routine for char. but I don't how to write conversion routine for key figure. Please give me any hint if any other solutions?
Edited by: SY DONG on Dec 2, 2010 3:36 AMIf you want to do in Transformation Layer :
You can use routine ...break up the seconds into minute hour and seconds
you will have to handle few cases in this:
let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
DATA: lv_seconds type i,
lv_hrs type i,
lv_sec type i,
lv_min type i.
lv_hrs = lv_seconds / 3600
if lv_hrs >= 1.
lv_min = (lv_hrs - trunc(lv_hrs))*60
here again handle seconds if min >60.
else.
lv_hrs = '00'.
lv_min = lv_hrs*60
It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
Regards,
RK -
Transformation Routine for checking condition only once
Hello,
I would like to perform he calculations based on certain criteria which goes like this...
LOOP AT ITab WHERE EMPno = ITAB Empno AND
ATYPE = ITAB-stype .
IF ITAB-LTYP = '1000'.
CHECK ITab-ABEGIN GE YR_BEGDT AND ITab-ABEGIN LE YR_ENDDT.
CHECK FLAG_ST <> 1.
ITAB-PENDING_ST = ITAB-PENDING_ST + ( ( ITab-BAL / 825 ) * 100 ).
ELSEIF ITAB-STPE = '2000'.
CHECK FLAG_SL <> 1.
ITAB-PENDING_SL = ITAB-PENDING_ST + ( ( ITab-BAL / 825 ) * 100 ).
ENDLOOP.
IF ITAB-stype = '1000'.
FLAG_ST = 1.
ENDIF.
IF ITAB-stype = '2000'.
FLAG_SL = 1.
ENDIF.
MODIFY ITAB.
How to implement this logic in Transformation roles ... as this flag checks only once.... to perform the calculation.
Thanks
ENDLOOP.Hi there,
You must be aware of start and end routine in a transformation.
Assumin that you would like to modify the code before sending it to individual( field wise transormation) transformation , you can write your code in start routine tab of the transformations.
Code written in Start routine in a transformation can manipulate the data data package wise..
say for eg if u need to fill the values in indivual routine then u can save all the values in an internal table ( say for eg ur itab) in the start routine and this data is available for u in the transformation routines.. so anything written in start rotuine shall work as global modification for the transformation routines.
Similarly code written in end rotuine shall work for chunk of data which is modified individually in transformation routine.
you ca go thr this link for more clarification
http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417700)ID2067718350DB10090875593766856688End?rid=/library/uuid/609eea32-455e-2c10-c08a-c23adf8c934e&overridelayout=true
http://help.sap.com/saphelp_nw04/helpdata/en/4f/a9ea964a86b04dbe4df20af6e598cf/frameset.htm
Regards,
kk -
Transformation routine for Infoobject lookup
Hey guys,
I am aware of Update rule routines but never done Transformation routine before. I didnt get any related post for my req.
My requirement is on WBS element I have some attributes which is coming from std WBS Attr extractor but I have one custom attribute infooject which I want to populate through an Infoobject which is also a master data Infoprovider. For this I have to write a Tranfer rule routine.
Please note these are transfer rules in BW 3.5 not BI 7. Please provide exact code. Appreciate your help.
Thanks.
BMW M///Declaration of Types table for your master data object in the declaration area....
Replace your attributes in place of plant, GSRCSYS and CALMONTH
TYPES: BEGIN OF TY_WBS,
/BIC/GPLANT TYPE /BIC/OIGPLANT,
/BIC/GSRCSYS TYPE /BIC/OIGSRCSYS,
CALMONTH TYPE /BI0/OICALMONTH,
END OF TY_WBS.
DATA: IT_WBS TYPE TABLE OF TY_WBS,
WA_WBS TYPE TY_WBS.
/BIC/AWBS = your master data table name
SELECT * FROM /BIC/AWBS INTO WA_WBS
WHERE OBJVERS = 'A'.
THen in the transformation Routine on field level use the below code to populate the value
" /BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
substitute your objects here to query the master data object to get values.
READ TABLE IT_WBS INTO WA_WBS WITH KEY
/BIC/GPLANT = L_SOURCE_PACKAGE-/BIC/GPLANT.
RESULT = WA_WBS-Your object name.
Hope this will help you... -
Transformation routine for record manipulation DSO to cube
Hi Experts
My scenario is this
1 row going into the transformation will be transformed into 1 or more rows out of the transformation. Same consept as return table in v3.5.
Does any one have a sample code for this?
I am thinking this should be put into the start routine and include a loop and manipulation of the the source_package.
I just can't figure out the syntax. Perhaps this is not even the right way to go. Any suggestions?
Help will be rewarded with points.
best regards,
NinaHi Shambhu ,
thanks for reply...
My DSO key fileds are PR No and PR Line item No
Data field is Indicator ( R/D ) for every line item .
per example One PR No contains 3 line ietms and indicators are D / R
PR No -
Item No -
Indicator
1000 10 D
1000 20 D
1000 30 R
next day i will recieve delta -
1000 , 30 , D ---then my data will be in DSO
PR No -
Item No -
Indicator
1000 10 D
1000 20 D
1000 30 D
i want to report , how many PR No are deleted or released in Calander day ?
Report conditions :
if at least one line item indiactor has 'R' then that PR No is called as Released PR.
if all line item indicator has 'D' then the PR No is called as Deleted PR.
Plz tell me , how can i write routine ...and where can write ?
i assign points...
Regards,
PSR -
Need Assistance to write a procedure for the below requirements!!!
Hi Forum,
Could some body give me a hand in writing an oracle procedure to pull the results as per the below requirement
A JOBNUM is transfered from the first JSP page to second JSP page and based on that JOBNUM I have to write a procedure to populate the second page
I need to pull these feilds from the respective tables
QM_JOB_NUM, QM_JOB_STATUS from QMI which matches the value of the JOBNUM from the first JSPpage
QN_JOB_GPH_FILE, QN_COMMENTS from QNI where QM_JOB_NUM = QN_JOB_NUM
VM_NAME concertnate with VM_SURNAME from VMI where QM_PROFILE = VM_PROFILE
QF_NARRATIVE_1,QF_NARRATIVE_2,QF_NARRATIVE_3( if these feilds has any values in DB then only pull them, if not dont pull them.so, we need to put a IF condition) where QF_JOB_NUM = QM_JOb_NUM
JI_DESC from JII where QM_USER_STATUS = JII_STATUS _CODE
RR_NAME from RRI where QM_REP = RR_REP
and
a case condition to match the QM_JOB_STATUS to the string value ( LIVE, PENDING , CLOSED ) as the QM_JOB_STATUS stores in the database as the numerical values 1,2,3 and while displaying on to the web page I need to match to the correspond string value and display it
if ( QM_JOB_STATUS ) = 1 then print to the webform LIVE
if ( QM_JOB_STATUS ) = 2 then print to the webform PENDING
if ( QM_JOB_STATUS ) = 3 then print to the webform CLOSED
Thanks for your assistance.
Cheers,
Krishna.First off, you need to turn the requirement into a sql statement. If I followed things correctly, that would be something like:
SELECT qmi.qm_job_num,
DECODE(qmi.qm_job_status, 1, 'LIVE',
2, 'PENDING',
3, 'CLOSED') qm_job_status,
qni.qn_job_gph_file,
qni.qn_comments, vmi.vm_name||' '||vmi.vm_surname name,
qfi.qf_narrative_1, qfi.qf_narrative_2, qfi.qf_narrative_3,
jii.ji_desc, rri.rr_name
FROM qmi
JOIN qni ON qmi.qm_job_num = qni.qn_job_num
JOIN vmi ON qmi.qm_profile = vmi.vm_profile
LEFT JOIN qfi ON qmi.qm_job_num = qfi.qf_job_num
JOIN jii ON qmi.qm_user_status = jii.jii_status_code
JOIN rri ON qmi.qm_rep = rri.rr_rep
WHERE qmi.qm_job_num = p_jobnumP_jobnum in the query is the parameter you will pass to your stored proc.
Next, you need to decide how many rows will be returned for a particular job number. If there will be more than one row, then you will probably need to return a ref cursor. If there will be only one row, then you could return either a set of variables, one for each column in the resultset, or a record type with a field for each column.
If you are returning a ref cursor or a record type, then you probably want to build the stored proc as a function, if you are returning multiple variables, then you will need to build it as a procedure.
So, to return a ref cursor, the signature of the function would look something like:
CREATE FUNCTION get_page2 (p_jobnum IN qmi.qm_job_num%TYPE)
RETURN sys_refcursor ASReturning a record type would be similar except that you would RETURN the record type you defined in the database.
To return several variables in a procedure, the signature would look something like:
CREATE PROCEDURE get_page2 (p_jobnum IN qmi.qm_job_num%TYPE,
p_status OUT VARCHAR2,
p_gph_file OUT VARCHAR2,
p_comment OUT VARCHAR2,
p_name OUT VARCHAR2,
p_narrative1 OUT VARCHAR2,
p_narrative2 OUT VARCHAR2,
p_narrative3 OUT VARCHAR2,
p_desc OUT VARCHAR2,
p_rrname OUT VARCHAR2) ASHTH
John -
Need help to write a query for Update statement with join
Hi there,
The following update statement gives me error as the given table in set statement is invalid. But its the right table .
Is the statement correct? Please help .
update (
select distinct(vpproadside.VEHICLE_CRED_OVERRIDE.vin)
from vpproadside.VEHICLE_CRED_OVERRIDE
join vpproadside.vpp_vehicle
on vpproadside.vpp_vehicle.vin = vpproadside.VEHICLE_CRED_OVERRIDE.vin
where VPP_CARRIER_SEQ_NUMBER = 90
and EXPIRY_DATE = '17-MAR-10'
set vpproadside.VEHICLE_CRED_OVERRIDE.EXPIRY_DATE = '15-SEP-10';Edited by: Indhu Ram on Mar 12, 2010 1:00 PM
Edited by: Indhu Ram on Mar 12, 2010 1:22 PM
Edited by: Indhu Ram on Mar 12, 2010 2:35 PM
Edited by: Indhu Ram on Mar 15, 2010 8:04 AM
Edited by: Indhu Ram on Mar 15, 2010 8:06 AM
Edited by: Indhu Ram on Mar 15, 2010 8:28 AMAsk Tom has very good discussion about this, if UPDATE does not work for PK issue, you can use MERGE
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:760068400346785797 -
Need clarification on Solaris 10 upgrade for E Business suite application
Hi All,
Server details :
(1)Database tier : Sun Solaris 8 - 64 Bit
(2)Application tier ( E Business suite application services ): Sun Solaris 8 - 64 Bit
(3)Application tier ( E Business suite External tier - DMZ configuration ) : Sun Solaris 8 - 64 Bit
(4)10gAS and discoverer : Sun Solaris 8 - 64 Bit
We are planning to upgrade the Database tier (1) and Application tier (2) to Sun solaris 10 and leave the Application tier {
External - DMZ configuration } ( 3) and 10gAS and discoverer ( 4 ) with Sun
solaris 8 .
Please let us know if we will be having issues if we perform the OS upgrade in such a way.
Thanks & Regards,
RakeshRakesh,
There should be no issues with this upgrade path. Just make sure you relink all binaries after an OS Upgrade to ensure that everything is working as expected.
- Take a backup of the application/database
- Upgrade the OS
- Relink all binaries
- Start up the application/database
- Take another backup once you confirm that everything works properly
Note: 356878.1 - How to relink the whole Applications 11i Installation
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=356878.1
Note: 131321.1 - How to Relink Oracle Database Software on UNIX
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=131321.1
Note: 407055.1 - Process To Upgrade the Operating System and Oracle Database Server
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=407055.1
Regards,
Hussein -
How to use Start Routine for this requirement
Hello,
I am having data in 2 ods and should load that data into cube, but there isn't any common object in both the ods's. I need to analyze based on these ods objects. so I thought of pulling some objects into 1ods which are used for analysis and added some objects to ods and cube. Now I have to write a start routine in update rules to fetch the data from the info objects which are present in another ods. Can any one help me in this?
Rajesh.Hi Surya,
Extract all info from table BKPF
select * into it_bkpf
from bkpf
where gjahr = p_fisyr.
Select record based on internal table it_BKPF
The reason why FOR ALL ENTRIES syntax is used because of its cluster table.
select * into it_bseg
from bseg
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr = it_bkpf-belnr.
Delete duplicate record based on Company Code and GL No.
delete adjacent duplicates from it_bseg
comparing bukrs belnr. -
Please help me to write a function for this requirement!
Hi,
I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score'
Eg:
Exec uspScorecalculation StudentID,DeptID
output: 85
Now, My requirement is , I want to populate this value as one of the columns in a 'Select' statement.
Can you please give me some input like how can i write a funtion to retrieve this score from the procedure and use it in the select statement?
I assume, the funciton should pass the two parameters into the stored procedure 'uspScorecalculation' and retreives the Score.
Can you please help me on this?
thanks!>> I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score' <<
We have no idea from this posting what this procedure does. No code. No spec. Only a vague, useless narrative.
We do not put that silly “usp_” prefix on a proc name; this is one version of tibbling. When we wrote in FORTRAN I and II, we had to put “fn_” on user functions name. A procedure uses a “<verb>_<object>” format. Have you read ISO-11179 Standards
or any book on data modeling?
EXEC Calculate_Something_Score student_id, dept_id;
>> Now, My requirement is, I want to populate this value as one of the columns in a 'SELECT' statement. <<
Populate a column? We do not do that in a declarative language like SQL. The row with that column comes into existence all at once, and all the rows in the table come into existence all at once. This is a set-oriented language.
>> Can you please give me some input like how can I write a function to retrieve this score from the procedure and use it in the SELECT statement? <<
NO! An SQL programmer will take the body of the procedure and replace the parameters with column names. It will be part of a SELECT statement and not a function call. We hate UDFs and other procedural constructs.
Please post the code and DDL, if you want help. Your failure and rudeness in not following Netiquette only hurt yourself. Your mindset is still locking into 1960's FORTRAN, not SQL.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How should i write a pcr for this requirement?
Dear Friends,
Can any tell me whether we can write a pcr in such a way that if the person resigns the company on any day after 15th his full absence quota(for that month) should be accrued.
if yes can you tell me
what are the key decision parameters i have to use in writing the pcr.
waiting for you kind reply.
Regards,
Sai Prasad.Hai Prasad,
I can give you the logic, cannot write exact rules.
While genegarting absence quota
- Check for termination action using OUTWPMASSN
- If yes
Check for Action year current year. (HRS=YSAY, HRS?CURYR)
- If its equal to 0
Check for current month (HRS=YSAO, HRS?CURMO)
- if its equal to 0
check for current day (HRS=YSAA, HRS?CURDY
- if its >=15
generate quota
- Exit
(Note: for this logic you have to generate monthly quota)
With regards
Shyam V -
How to write select query for below requirement
Hi sir,
i have a table x have one column y which containing value like below
Y
a
b
c
d
I want out put like below kindly help me:
Y
a
d
c
bHi ,
Please check:
select y from (
select case when y='a' then 1 else 2 end no, y from table_x
) order by no asc, y desc
with table_x as(
select 'a' y
from dual
union
select 'b' y
from dual
union
select 'c' y
from dual
union
select 'd' y
from dual
select y from (
select case when y='a' then 1 else 2 end no, y from table_x
) order by no asc, y desc
Thank you -
Hi Gurus,
I need your urgent help on one requirement. I have to write a routine and the requirement is to bring data for K.F. "B" via comparing Materials between 0Material and 0MAT_UNITS.
0Material is already present in my flow and being loaded from DSO1 to DSO2 but 0MAT_UNITS not present. So I have to use a look-up on it using Materials from 0Material.
Materials has to be taken from 0Material and using condition as Observer-A(active) have to match with the materials of 0MAT_UNITS. If the material is present in 0MAT_UNITS with observer 'A' then take the Denominator and Numerator value for that material and produce a conversion factor for that material i.e. (Denominator/Numerator).
Now this factor need to be multiply with a K.F. "A" (already present in my DSO1) and assign the value to K.F. "B" as output (DSO2).
So pls guide me how should I code it in routine and which type of routine should I prefer.
Any effective help will be highly appreciated!!!!Dear Ravi,
Thanks for the promt response.
Actually no as such user exit is found for this requirement.
U know in the transaction VOFM we can create formula for example in my case for condition value..this is achieved by routine(some form in the include program) and then the routine number can be assigned in the configuration setting for the particular transaction. This is what info so far I have searched..but how to crete the routine and all.still i'm searching. Hope I gave you some ground abt the prob??
So if any body have ever come across this requirement..please suggest.
Thanks.
Anup. -
I need someone local who can write the software for a new application.
Hello:
I need someone to write the program for a new application.
This person should be local to the Pittsburgh area.
I'm not really sure if this is the right forum for this as I am not computer literate.
Any help is appreciated and I live in SW Pennsylvania.
ThanksThis isn't really the right place. But you can try elance.com or others like it.
Good luck. -
Need Someone to write me a script for ExtendScript Tool
My understanding is that Adobe InDesign no longer highlights relink files and I need someone to write a script for ExtendScript Tool to resolve this issue. Our print publication is generally printed grayscale but our online version is full color...after creating the print edition we relink hundreds of images to go online...it becomes time consuming, hense the issue.
If you have all your color images in a folder together, you could use "Relink to folder" to update them all at once.
(Below is from Adobe Help)
Relink to a different folder
When you use the Relink To Folder command, you can point to a folder that contains files with the same names as your out-of-date links. For example, if your current links point to low-resolution images, you can specify a different folder that contains high-resolution images. You can specify a different extension for the files, allowing you to change links from .jpg to .tiff, for example.
Select one or more links in the Links panel.
Choose Relink To Folder from the Links panel menu.
Specify the location of the new folder.
To use a different extension, select Match Same Filename But This Extension, and specify the new extension (such as AI, TIFF, or PSD).
Click Select (Windows) or Choose (Mac OS).
Maybe you are looking for
-
IPhone does not appear in iTunes when connected
After installing new iTunes update, my phone is no longer recognized when I attempt to sync and has been running very very low lately. HELP PLEASE!
-
So when i install the 7.2 crossgrade
my 7.0 projects will open just fine right?
-
Premiere CC Choppy Playback in Full Res
Hey All, I just made the switch to premiere from FCP, like many others, and can't seem to watch my edits back full res without them being very choppy. This is important because of the review process I go through with many clients. I have done some
-
Headphones picking up, but microphone is not?
Like, I have a headset from Turtle Beach, and I've had them for a few months now, and they have been working just fine. The headphones + microphone plug in through one cable. In the sound panel of System Preferences, I go to output and it gives me th
-
Configure EP to display contents from Solution Manager
Hello, How to Configure EP to display contents from Solution Manager? I want to access Solution Monitoring through Portal, how to do this? I will appreciate if someone can help me, Waiting for reply, Regards Sharmishtha