Output different data based on user select
Hi everyone,
Quick question, I would like to output different report columns based on user select, eg., users would be presented with two choices in a radiobutton list, eg., 1 and 2.
I have query results that contain columns A, B, C, D, E, F, G.
If user selects 1 then the output should be columns A, B, C, D, E.
If user selects 2 then the output should be columns A, B, C, F, G.
I am sure this is possible and easy? If so, what topic should I be reading/searching internet on?
Please advise.
Thanks!
I would say that this is most often something that your user interface should be dealing with (i.e. which columns should be shown).
There is no way to do that in SQL.
In PL/SQL it is a simple situation of creating two cursors and simply deciding which one to open.
<pre>declare
l_cur sys_refcursor;
begin
if :user_selection = 1 then
open l_cur for select A, B, C, D, E from tbl;
else
open l_cur for select A, B, C, F, G from tbl;
end if;
-- use the cursor
close l_cur; -- or return to user interface
end;
/</pre>
Hope this helps.
Similar Messages
-
Displaying internal table fields data based on user selection
Hi all,
I am having a checkbox for each field in the internal table.
and i only have to display the fields of the internal table which the user has selected based on the check boxes provided.
Could you plz help me out, how can i display the data of only those fields which the user has selected initially.....
Thanks,
anil.Hi,
This is not the best solution but this can be one solution.
Check this code
REPORT z_sdn.
PARAMETERS:
p_kunnr AS CHECKBOX DEFAULT 'X',
p_land1 AS CHECKBOX,
p_name1 AS CHECKBOX.
DATA:
BEGIN OF fs_tab,
kunnr TYPE kunnr,
land(10) TYPE c,
name(10) TYPE c,
END OF fs_tab.
DATA:
t_tab LIKE
TABLE OF
fs_tab.
START-OF-SELECTION.
CLEAR fs_tab.
fs_tab-kunnr = '001'.
fs_tab-land = 'Land1'.
fs_tab-name = 'Name1'.
APPEND fs_tab TO t_tab.
CLEAR fs_tab.
fs_tab-kunnr = '002'.
fs_tab-land = 'Land2'.
fs_tab-name = 'Name2'.
APPEND fs_tab TO t_tab.
IF p_kunnr = 'X' AND p_land1 IS INITIAL AND p_name1 IS INITIAL.
WRITE: / 'KUNNR:'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-kunnr.
ENDLOOP.
ENDIF.
IF p_land1 = 'X' AND p_kunnr IS INITIAL AND p_name1 IS INITIAL.
WRITE: / 'LAND:'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-land.
ENDLOOP.
ENDIF.
IF p_name1 = 'X' AND p_kunnr IS INITIAL AND p_land1 IS INITIAL.
WRITE: / 'NAME:'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-name.
ENDLOOP.
ENDIF.
IF p_kunnr = 'X' AND p_land1 = 'X' AND p_name1 IS INITIAL.
WRITE: / 'KUNNR:',
'LAND'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-kunnr,
fs_tab-land.
ENDLOOP.
ENDIF.
IF p_kunnr = 'X' AND p_name1 = 'X' AND p_land1 IS INITIAL.
WRITE: / 'KUNNR:',
'NAME'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-kunnr,
fs_tab-name.
ENDLOOP.
ENDIF.
IF p_name1 = 'X' AND p_land1 = 'X' AND p_kunnr IS INITIAL.
WRITE: / 'LAND:',
'NAME:'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-land,
fs_tab-name.
ENDLOOP.
ENDIF.
IF p_name1 = 'X' AND p_land1 = 'X' AND p_kunnr = 'X'.
WRITE: / 'KUNNR',
'LAND:',
'NAME:'.
LOOP AT t_tab INTO fs_tab.
WRITE: / fs_tab-kunnr,
fs_tab-land,
fs_tab-name.
ENDLOOP.
ENDIF.
Regards
Abhijeet -
Problems in Opening same jspx in different modes based on user selection
Hello,
I'm using JDeveloper 11.1.1.4.0
Following is my use case and problems with each of the solutions that I have tried so far.
1. Screen1 displays 4 af:tables. Right cilck of each table is a separate context sensitive menu.
2. Using context sensitive menu items, user should open ReplyScreen and ConfirmScreen. Each of these screens support different functinoality however,
they share quite a few common fields and functionality (variables).
3. User should be allowed to work with each of the screens simultaneously.
4. For simplicity, only 'Reply' and 'Confirm' modes are mentioned. However there are going to be 3 additional modes such as 'Correct', 'View' and 'Delete'.
From code maintenability perspective, each of the 'Mode' specific screens should be a result of a single JSPX and bean.
Solutions tried:
1. Create a single JSP. Maintain the common variables in session.
Problem: When user opens ReplyScreen, common variables are initialized. However, when he opens ConfirmScreen without closing ReplyScreen, common variables
get overwritten.
2. Create a single JSP. Maintain the common variables in Iterator, along with all the values fetched from DB.
Problem: Same iterator object is shared amongst both pages.
Question:
1. How to create a single JSPX and attach each of its 'modes' (ReplyScreen and ConfirmScreen) to different Iterator objects?
Any help will be appreciated...
Thanks,
Rohit
Edited by: rohit6699 on Nov 18, 2011 1:15 AM
Added tagsTry creating a bounded taskflow that relies on parameters to define what it shows and how it behaves.
The taskflow can use its own memory and transaction scope as needed and therefor you should be able to have multiple instances of it open with different behaviors.
Learn more about taskfllows and regions here:
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html#a2 -
Importing Excel files and using a search function to use specific data based on user selection
Hi, I'm trying to create a search and solve function within Visual Basic.
I want to use the combustion equation C8H18 + 20(O2 + 3.76 N2) = 8 CO2 + 9H20 + 47 N2 to determine flame temperature using
9*Hf of C02 + 8 * Hf H20 + 47 Hf N2 = Hf C8H18
I have all of the values of Hf in an excel spreadsheet but I want to be able to search the spreadsheet as my application requires the user to change to fuel (the C8H18 bit) which changes the value of Hf.
Is there a way of searching that excel file each time I run my program?
Thanks
JackThanks for answering so quickly.
I've used that method before, and I'm sorry I didn't specify.
This will be used as a student learning aid and so the application itself and the tables will be downloaded as a zip file and so I don't believe the line below would work?
I've heard about including excel as a reference file in the application but I haven't been able to find any further information on that.
Thanks again
Dim oWBa As Excel.Workbook = oApp.Workbooks.Open("C:\Users\v-youtan\Desktop\colleagues.xlsx")" -
[MDX] Define date range based on user selection
Hi All,
I'm trying to define date range (of 3 months) using mdx based on user selection.
This is what I'm trying to do:
- If user select 2013, I would like range to be: from
1 Oct 2013 to 31 Dec 2013
- If user select Aug 2013, I would like range to be: from
1 Jun 2013 to 31 Aug 2013
- If user select 15 Sep 2013, I would like range to be : from
15 Jul 2013 to 15 Sep 2013
It is not a problem to get the upper bound of the range like this:
ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
But I'm not able to get the lower bound of the range:
OpeningPeriod(
[Date].[Calendar].[Date],
ParallelPeriod(
[Date].[Calendar].[Month Number],
2,
ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
Error:If user selection is
15 Aug 2013, I get
14 Jun 2013
If user selection is Apr 2013, I get
(null)
And even more strange, if user selection is
2013, I get 28 Oct 2013
Any idea of how to solve this ?
Thanks,
GuillaumeHello Guillaume,
Can you please check if the following works for you? By the way, the performance will suffer due to all these IIF, the solution is very complex in order to avoid null in ParallelPeriod.
with member measures.high as MemberToStr(ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
member measures.low as
MemberToStr(
iif(ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
) IS ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
).Parent.LastChild --last date of the month
OpeningPeriod(
[Date].[Calendar].[Date],
Ancestor(ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
), [Date].[Calendar].[Month]).lag(2)
iif([Date].[Calendar].CurrentMember.level is
[Date].[Calendar].[Date]
and
Right(CSTR([Date].[Calendar].CurrentMember.Properties("KEY0")),4)="0429" --take care of 4/29
OpeningPeriod(
[Date].[Calendar].[Date],
Ancestor(ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
), [Date].[Calendar].[Month]).lag(2)
OpeningPeriod(
[Date].[Calendar].[Date],
ParallelPeriod(
[Date].[Calendar].[Month],
2,
ClosingPeriod(
[Date].[Calendar].[Date],
[Date].[Calendar].CurrentMember
select {measures.low,measures.high } on 0
from [Adventure Works]
where
--[Date].[Calendar].[Date].&[20070815]
--get [Date].[Calendar].[Date].&[20070615]
--[Date].[Calendar].[Date].&[20070530]
--get[Date].[Calendar].[Date].&[20070330]
--[Date].[Calendar].[Date].&[20070429]
--get [Date].[Calendar].[Date].&[20070201]
--[Date].[Calendar].[Calendar Year].&[2007]
--get [Date].[Calendar].[Date].&[20071001]
--[Date].[Calendar].[Month].&[2007]&[4]
--get [Date].[Calendar].[Date].&[20070201]
--[Date].[Calendar].[Month].&[2007]&[5]
--get [Date].[Calendar].[Date].&[20070301]
--[Date].[Calendar].[Date].&[20070228]
--get [Date].[Calendar].[Date].&[20061201]
--[Date].[Calendar].[Date].&[20070831]
--get [Date].[Calendar].[Date].&[20070601]
If this does not work for you, I would suggest opening a ticket with Microsoft Support, with an advisory type of request.
Hope this helps.
Thanks.
Meer Al - MSFT -
Redirect to different pages based on user input value
Hello,
Anyone please help.
I am trying to redirect to different pages based on user inputs. I have a form in which I have one text item and a submit button. For example consider text item to be empno; So once the user enters a empno and hits submit button; I need to redirect to different pages based on this job.
For Ex: if user inputs empno whose job is 'ANALYST' then redirect to page 1
if user inputs empno whose job is 'MANAGER' then redirect to page 10
For this scenario. i wrote a pl/sql process for the submit button; but no luck -- its not at all redirecting instead its in the same page. Below is the process.
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:1:&SESSION.::&DEBUG.::', TRUE);
end if;
if v_job = 'MANAGER' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:10:&SESSION.::&DEBUG.::', TRUE);
end if;
end;Please help. I am using Oracle APEX version 4.2 and database Oracle 11g R2
Thanks,
Ortonorton607 wrote:
Hello,
Anyone please help.
I am trying to redirect to different pages based on user inputs. I have a form in which I have one text item and a submit button. For example consider text item to be empno; So once the user enters a empno and hits submit button; I need to redirect to different pages based on this job.
For Ex: if user inputs empno whose job is 'ANALYST' then redirect to page 1
if user inputs empno whose job is 'MANAGER' then redirect to page 10
For this scenario. i wrote a pl/sql process for the submit button; but no luck -- its not at all redirecting instead its in the same page. Below is the process.
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:1:&SESSION.::&DEBUG.::', TRUE);
end if;
if v_job = 'MANAGER' then
OWA_UTIL.REDIRECT_URL('f?p=&APP_ID.:10:&SESSION.::&DEBUG.::', TRUE);
end if;
end;Please help. I am using Oracle APEX version 4.2 and database Oracle 11g R2
Thanks,
OrtonI have a similar scenario in my application and this is how I handle it.
1. Create a page item on the page, say Px_PAGE_NUM
2. Create a "On Submit - After Computations and Validations" page process to set the above page item. In your case, you can use the same logic that you have already in place (except the call to OWA_UTIL.REDIRECT_URL) :
declare
v_job varchar2(20);
begin
select job into v_job from emp where empno = :P9_EMPNO_R;
if v_job = 'ANALYST' then
:Px_PAGE_NUM := '1';
end if;
if v_job = 'MANAGER' then
:Px_PAGE_NUM := '10';
end if;
end;3. Create a "On Submit: After processing" branch. Specify the "Target Type" as "Page in the application" and "Page Number" as &Px_PAGE_NUM. (with the dot).
I hope the above helps.
BTW, the following thread in the forum related to OWA_UTIL.REDIRECT_URL might help:
issue OWA_UTIL.REDIRECT_URL with APEX 4.1.1 -
How to create dynamic ed flash charts based on user selected fields in Orac
Hi all,
Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
Thanks
ManishHello,
Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
How to determine Organizational Data based on User Login
Dear all,
How to determine organizational data based on user login in Activity transaction, currently org determination is happening after entering customer number in the transaction.
We have used 'Responsibility' determination rule for this configuration. Now the requirement is to determine org data based on user login.
In Org model we have assigned user to org data through a business partner. But still org data is not getting determined in the transaction.
Please help me to trace out the problem.. your suggestions will be highly appreciated.
Best regards
Raghu ramYou just have to use other organization determination rule. In your case this would be rule 10000194 (ORGMAN_12). This determination rule delivers the responsible organizational unit of the user
User is defined as a business partner in the container attribute 'PARTNER'. If not, the system user (sy-uname) is used.
So you have to do the following:
- use this determination rule
- in BP link username with employee
- assign in PPOMA_CRM employee or user to organizational unit
This should solve your problem. -
How to display filtered data based on user login
We have a SSRS report (.rdlc) which gives the report about Online count of machines. Report is incoperayed in Asp.net.
We have many filters in This report. Now we have to retrict the report based on user login to the application .
For ex: report has a drop down for Regional Admin. Now if one person login to the application he has to view only his region online count.
How can we do this in SSRS?. We have our application hosted in Microsoft Azure . Please suggestHi csmbrnoc,
In Reporting Services, if we want to filter data based on user login, then there must be some relationship between the UserID and the Region in the dataset. For example, there is a field named UserID in the dataset, and each ID map some region and the corresponding
“Online count of machines”. In this scenario, just as Visakh suggested, we can use built-in field User!UserID to obtain UserID of the current user, then directly add a filter to the dataset as below:
Expression: [UserID]
Operator: =
Value: [&UserID]
If there are any other questions, please feel free to let me know.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Creating report based on user selected Date Range
Hello.
I am trying to display an Apex report that selects data for the report based on a user entered date range.
It's a simple page with two date picker fields (p18_start and p18_end).
The report region SQL looks like this:
SELECT *
FROM prj_items
WHERE LM_DT BETWEEN :p18_start AND :P18_end
One table, one field on the table to search and two Apex variables.
I thought this would be fairly simple, but I am obviously missing something.
I not even sure what other information is needed to help me figure this out.
-JodyHi,
You can set defaults for the datepickers if you need to - this could be done in a computation on the page for each item and conditional on the item being null.
When I've done something similar to this, I've created two hidden page items - eg, :P19_FIRST_DATE and :P19_LAST_DATE and populated these with the earliest/latest date that the user could reasonably select (perhaps, in your case, the MIN(LM_DT) and MAX(LM_DT) values).
Then your SQL would be:
select * from PRJ_ITEMS
where LM_DT BETWEEN TO_DATE(NVL(:P19_START,:P19_FIRST_DATE), 'DD-MON-YY')
AND TO_DATE(NVL(:P19_END,:P19_LAST_DATE), 'DD-MON-YY')If you don't want to set default dates, you could do something like:
SELECT * FROM PRJ_ITEMS
WHERE (:P19_START IS NULL AND :P19_END IS NULL)
OR (:P19_START IS NOT NULL AND :P19_END IS NULL AND LM_DT >= TO_DATE(:P19_START,'DD-MON-YY'))
OR (:P19_START IS NULL AND :P19_END IS NOT NULL AND LM_DT <= TO_DATE(:P19_END,'DD-MON-YY'))
OR (LM_DT BETWEEN TO_DATE(:P19_START,'DD-MON-YY') AND TO_DATE(:P19_END,'DD-MON-YY'))There are various reasons why your two dates are being cleared when the page is reloaded. Firstly, you should check the branch that returns to the same page - make sure you are not clearing the cache for the page. Then, have a look to see if there is a "reset page" process (usually created for you when you create a form page). Then, check the Source settings for the items. Typically, these would be "Only when current value in session state is null" and a Source Type of "Static Assignment" with the "Source Value or Expression" left empty.
Andy -
Select Data based on User Permissions
Post Author: nomore
CA Forum: General
I've got a Crystal Infoview server which is becoming quite cluttered with reports.In a lot of instances, I will have 4 or 5 copies of the same report which are tailored to specifc users. For example a sales report which will show data based on a specific customer. I could create on report with a parameter where the user could just select the customer - but i dont want some people to be able to see specific customers. So at present i have a seperate report for each customer - and then set the report permissions to only allow specific users to run it.I attended a course a while back where they showed us how, hiding particular fields/data to certain users if they should
not be allowed to view it - but for the life in me i cannot remember at
all how they did it. Any tips greatly appreciated.Post Author: V361
CA Forum: General
In the special fields section is CurrentCEUserName, not sure if this would work for you, because I have CR XI
You could surpress based on the id logged in, but that would be a lot of work,
Perhaps you could create a "permissions" list in excel or in the database if possible, with a list of the reports that each ID can run, then based on the id, you populate the list....
CurrentCEUserName inserts (in a formula) the name that was used to log on to the current session when using the Log On to BusinessObjects Enterprise dialog box. -
Filtering report data based on user login and Parameter fields
Post Author: mronquillo
CA Forum: General
Hi,I am running a report that filters data based on the user login. To do this, I created a formula called @user that compares the login name (using the CurrentCEUserName field) and returns the user's name. If the user login is not a login specified in the if statements, it returns the parameter field "user_name":For example: if CurrentCEUserName = "loginname1" then "User's Name 1"else if CurrentCEUserName = "loginname2" then "User's Name 2" else if CurrentCEUserName = "loginname3" then "User's Name 3" else if CurrentCEUserName = "loginname4" then "User's Name 4".. .else {?user_name} In select expert, I have a condition which filters data based on the string returned from that formula:{Table.Name} = {@user} This works fine and when the users run the report they only their own data. However, they are still prompted to choose a parameter field regardless if of the value returned by the @user formula. Oddly enough, regardless of what parameter field they choose, they will still only see their own data (i.e. if John chooses "Bob" from the parameter list, he will still only see John's data.)If I remove the "else {?user_name}" line from the @user formula, then the users are not prompted anymore. However, if they are not a "valid" user - that is, if any of the if statements in the formula are not true for their login name - then they will see no data. What I want to do is make the report ONLY prompt the user to choose a parameter field if their login name is not "valid". That is, if the @user formula is able to return a string value for their login name, then they will jump right into the report without being prompted to choose a parameter - otherwise, the user will be prompted to choose a name from the parameter list. I thought my formula would allow this (hence the "else" clause), but it seems that if a parameter field is present in any formula, then the report automatically prompts the user to choose a parameter. Is what I am trying to accomplish possible in CR (I'm using CR v10.0) or is there a better way to do what I am trying to do?Thanks in advance.Post Author: sharonmtowler
CA Forum: General
try, or something like that
(if CurrentCEUserName ={?user_name} then true else ({Table.Name} = {@user}) ) -
How to update records in a table based on user selection..
Hi all,
This time the above doubt is totally based on the logic of coding which I tried a lot but didn't get any solution. so atlast I come to sdn site.
please help..
The requirement is like that I have a table with 6 fields (1 primary key and other are nonkeys). If the user inputs some values in the fields on the screen, then a row will be added in the table. Upto this i have done well. but when the user want to change some value in the existing row of the table my program unable to do so. Because I couldn't get any logic to do that as there are 5 nonkey fields, so if any one field is modified then the respective row should be selected first based on the user selection and then it should be updated.
At this point I could not get any idea as it may take a lots of if conditions (I guess) to reach to that particular row.
Please help..
thanks ,
sekharHi Sekhar,
I am afraid, the whole design of your program is wrong, let me explain
Let us say you have two rows(5 non key fields) that the user wants to update and the data in these five non key fields are identical and in your program you are getting a number(which is the key) using a number range object. So you will have two entries in the table for the same data.
And on the update page when the user enters the non key fields, how will the program know(or for that matter any one of us) which record to pick, if you have two identical books and if asked for a book wouldn't you ask which one among these two do you want?
Possible Solution: Identify a possible key maintaining the integrity of the data, that is a combination of the non key fields which will help you identify a unique row and make these fields as key fields in the table.
A more costly solution(if you do not want to change the non key field keys to key fields) would be to, adding a check(using select statement) to see if the non key fields combination already exists in the Z table before inserting a record into the table.
If yes, throw a message to the user and just update the values in the table, else insert the record.
Another solution would be to, use the non key fields to generate a key(using some logic) and using this instead of the number range object.
regards,
Chen -
Grouping of data based on user prompt having a list of dimensions
Hi All,
I have a requirement to be able to group data in OBIEE request or Dashboard based on user prompt selection.
The prompt should list the Dimensions Available
e.g.
Dimensions: Product, Region, Employee
Fact: Sales
The report is to display sales total for the quarters of the current year.
The user prompt should list the available dimensions (In this case - Location, Employee and Product).
If I choose Product, the data is to be grouped by Products - Layout having a simple tabular grouping with Product names as Group headings.
Similarly any other choice of Dimension from the prompt should group the data by that dimension and have the dimension values used in the group headings.
How could we implement this? I understand this type of requirement (ability to choose dimension) is met in some OLAP reporting tools.
I have used multiple views and the View Selector for similar requirements previously, but looking for a dynamic solution here.
Any pointers or solution will be great.
Thanks,
Kiran
Edited by: Kiran Kudumbur on Sep 8, 2009 5:43 PM
Edited by: Kiran Kudumbur on Sep 9, 2009 12:42 PM
Edited by: Kiran Kudumbur on Sep 10, 2009 2:26 PMHi All,
I used column view to address this requirement.
Thanks,
Kiran -
Reading dynamic table column based on user selection
Hi there,
I am having a problem of reading and manipulating the data stored in a standard SAP table. The following example simulates the table and what i am trying to do:
Table: Storing sales data for sales person
SALES_PERSON REGION YEAR MTH_S1 MTH_S2 MTH_S3 MTH_S4...
Richard S NORTH 2007 100 200 300 400
John K SOUTH 2007 50 100 100 20
Brad P NORTH 2007 300 100 100 50
User have have the following selection option:
1. Month.
The program will calculate the sales based on the individual month selected
Example, if user select Month = 3, then program take only MTH_S3 column value
So total sales = 300100100=500
2. Month range
The program will calculate the sales based on the month range selected
Example, if user select Month 2 to 4, then program take MTH 2 to MTH_S4 columns value
So total sales = 400 (for MTH_S2) + 500 (for MTH_S3) + 470 (for MTH_S4) = 1370
How should i write the logic or code for this requirement?
Hope someone can help.
Thanks,
Pang HKTry something like this
TABLES:
t247.
SELECT-OPTIONS:
s_month FOR t247-mnr NO-EXTENSION.
DATA:
BEGIN OF fs_data,
person(30),
area(10),
year(4),
mon1 TYPE kbetr,
mon2 TYPE kbetr,
mon3 TYPE kbetr,
mon4 TYPE kbetr,
mon5 TYPE kbetr,
END OF fs_data,
t_data LIKE STANDARD TABLE OF fs_data,
w_no_months TYPE i,
w_kbetr TYPE kbetr,
w_total TYPE kbetr.
LOOP AT t_data INTO fs_data.
CLEAR w_kbetr.
DO 5 TIMES VARYING w_kbetr FROM fs_data-mon1
NEXT fs_data-mon2.
IF sy-index IN s_month.
w_total = w_total + w_kbetr.
ENDIF.
ENDDO.
ENDLOOP.
change the value 5, according to the no.of months in ur internal table
Maybe you are looking for
-
How to handle multiple Sender List in Apex.
Hi All, In our application we had created a Email configuration, the mail will be triggred based on selection of a particular "Group" it will redirect to specfic distribution list. Here is the Snippet code for the above one. if upper(:P1_ENG_GR
-
IDVD 6 / Slideshow Question
I created a slideshow in iPhoto; then "shared" it to iDVD; then burned a copy onto a DVD. Now when I go back in directly to iDVD and select "Open an Existing Project" to select that project it's not available. Actually the filename is there (under "m
-
Can't take ownership of files with take own get access diened
Good afternoon all, I've some files where can't take the ownership of. I've tried every and searched allot of technet and the rest of google. When is ue: Takeown /f *.* /r /a /d y i get like 4 succes messages and 16 INFO: Access is denied. I need to
-
Sky Go and Yosemite 10.10.3
Hi I am on Yosemite and I cannot get the Sky go desktop to login nor can I use the browser based Sky go to play a movie for more than 10 minutes before my Macbook Air locks up. I can see from similar posts that there has been a problem for Sky since
-
HT4236 no photo tab on my itunes from iphone 5
Can't sync the Photos. I have backups all on my old Iphone 4, so after that I am trying the new iphone 5, the same name on the phone. But there is not even a tab says "Photo" here. Anyone? Thanks.