Description on the column
Hi BI Gurus,
I have written a report in the Bex and I have included the infoobject 0BILL_BLOCK and on the properties of this, I have turned on Standard: Key and text on Display As option. It's ok in terms of displaying the key and text. It's displaying Key under 'Billing block' header and description for the key without header. It's as follows at the moment:
Billing block No column heading(blank)
08 Credit memo
The quesstion is how do I get the heading description? The users want as follows:
Billing block Description
08 Credit memo
Please let me know about it.
Thanks for your help.
you want to display the Column header for the the key and alo the text??
That has to be done using a macro and can only work if you are using a workbook.
Something like the below. This you have to include in SAPBEXONREFRESH (BI 7.0) or SAPBEXREFRESH (BW 3.x).
Sub Macro1()
Range("A17").Select
Selection.Copy
Range("B17").Select
ActiveSheet.Paste
End Sub
Triggering Macro when user Refreshes Workbook
There are many links which will help you achieve this. Search on SAPBEXONREFRESH / SAPBEXREFRESH.
Hope this helps.
Regards
Kumar
Similar Messages
-
Why does apple make this so difficult. I just want to know what the check mark column means in the song "window" of itunes 11. How does it relate to iCloud? When I click on a song, it disappears.
under usage-i only have the camera roll, photo library and photostream-they don't show the individual albums withing my libraries-if i delete library-i would delete about 12 albums
I don't sync pics but was hoping the albums showed up there. It was a long shot. -
How can I iterate over the columns of a REF CURSOR?
I have the following situation:
DECLARE
text VARCHAR2 (100) := '';
TYPE gen_cursor is ref cursor;
c_gen gen_cursor;
CURSOR c_tmp
IS
SELECT *
FROM CROSS_TBL
ORDER BY sn;
BEGIN
FOR tmp IN c_tmp
LOOP
text := 'select * from ' || tmp.table_name || ' where seqnum = ' || tmp.sn;
OPEN c_gen FOR text;
-- here I want to iterate over the columns of c_gen
-- c_gen will have different number of columns every time,
-- because we select from a different table
-- I have more than 500 tables, so I cannot define strong REF CURSOR types!
-- I need something like
l := c_gen.columns.length;
for c in c_gen.columns[1]..c_gen.columns[l]
LOOP
-- do something with the column value
END LOOP;
END LOOP;
END;As you can see from the comments in the code, I couln'd find any examples on the internet with weak REF CURSORS and selecting from many tables.
What I found was:
CREATE PACKAGE admin_data AS
TYPE gencurtyp IS REF CURSOR;
PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT);
END admin_data;
CREATE PACKAGE BODY admin_data AS
PROCEDURE open_cv (generic_cv IN OUT gencurtyp, choice INT) IS
BEGIN
IF choice = 1 THEN
OPEN generic_cv FOR SELECT * FROM employees;
ELSIF choice = 2 THEN
OPEN generic_cv FOR SELECT * FROM departments;
ELSIF choice = 3 THEN
OPEN generic_cv FOR SELECT * FROM jobs;
END IF;
END;
END admin_data;
/But they have only 3 tables here and I have like 500. What can I do here?
Thanks in advance for any help!The issue here is that you don't know your columns at design time (which is generally considered bad design practice anyway).
In 10g or before, you would have to use the DBMS_SQL package to be able to iterate over each of the columns that are parsed from the query... e.g.
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
v_v_val VARCHAR2(4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER;
f BOOLEAN;
rec_tab DBMS_SQL.DESC_TAB;
col_num NUMBER;
v_rowcount NUMBER := 0;
BEGIN
-- create a cursor
c := DBMS_SQL.OPEN_CURSOR;
-- parse the SQL statement into the cursor
DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
-- execute the cursor
d := DBMS_SQL.EXECUTE(c);
-- Describe the columns returned by the SQL statement
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
-- Bind local return variables to the various columns based on their types
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val); -- Number
WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val); -- Date
ELSE
DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Any other type return as varchar2
END CASE;
END LOOP;
-- Display what columns are being returned...
DBMS_OUTPUT.PUT_LINE('-- Columns --');
FOR j in 1..col_cnt
LOOP
DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
when 2 then 'NUMBER'
when 12 then 'DATE'
else 'Other' end);
END LOOP;
DBMS_OUTPUT.PUT_LINE('-------------');
-- This part outputs the DATA
LOOP
-- Fetch a row of data through the cursor
v_ret := DBMS_SQL.FETCH_ROWS(c);
-- Exit when no more rows
EXIT WHEN v_ret = 0;
v_rowcount := v_rowcount + 1;
DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
DBMS_OUTPUT.PUT_LINE('--------------');
-- Fetch the value of each column from the row
FOR j in 1..col_cnt
LOOP
-- Fetch each column into the correct data type based on the description of the column
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
ELSE
DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
END CASE;
END LOOP;
DBMS_OUTPUT.PUT_LINE('--------------');
END LOOP;
-- Close the cursor now we have finished with it
DBMS_SQL.CLOSE_CURSOR(c);
END;
SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
-- Columns --
EMPNO - NUMBER
ENAME - VARCHAR2
DEPTNO - NUMBER
SAL - NUMBER
Row: 1
EMPNO : 7782
ENAME : CLARK
DEPTNO : 10
SAL : 2450
Row: 2
EMPNO : 7839
ENAME : KING
DEPTNO : 10
SAL : 5000
Row: 3
EMPNO : 7934
ENAME : MILLER
DEPTNO : 10
SAL : 1300
PL/SQL procedure successfully completed.
SQL> exec run_query('select * from emp where deptno = 10');
-- Columns --
EMPNO - NUMBER
ENAME - VARCHAR2
JOB - VARCHAR2
MGR - NUMBER
HIREDATE - DATE
SAL - NUMBER
COMM - NUMBER
DEPTNO - NUMBER
Row: 1
EMPNO : 7782
ENAME : CLARK
JOB : MANAGER
MGR : 7839
HIREDATE : 09/06/1981 00:00:00
SAL : 2450
COMM :
DEPTNO : 10
Row: 2
EMPNO : 7839
ENAME : KING
JOB : PRESIDENT
MGR :
HIREDATE : 17/11/1981 00:00:00
SAL : 5000
COMM :
DEPTNO : 10
Row: 3
EMPNO : 7934
ENAME : MILLER
JOB : CLERK
MGR : 7782
HIREDATE : 23/01/1982 00:00:00
SAL : 1300
COMM :
DEPTNO : 10
PL/SQL procedure successfully completed.
SQL> exec run_query('select * from dept where deptno = 10');
-- Columns --
DEPTNO - NUMBER
DNAME - VARCHAR2
LOC - VARCHAR2
Row: 1
DEPTNO : 10
DNAME : ACCOUNTING
LOC : NEW YORK
PL/SQL procedure successfully completed.
SQL>From 11g onwards, you can create your query as a REF_CURSOR, but then you would still have to use the DBMS_SQL package with it's new functions to turn the refcursor into a dbms_sql cursor so that you can then describe the columns in the same way.
http://technology.amis.nl/blog/2332/oracle-11g-describing-a-refcursor
Welcome to the issues that are common when you start to attempt to create dynamic code. If your design isn't specific then your code can't be either and you end up creating more work in the coding whilst reducing the work in the design. ;) -
Fiscal year in the columns outside the key figure structure
Dear Experts
I have a report requirement to show the keyfigures in the columns from year 1 to year 10 and in each year there are 4 keyfigures each restricted to 1 quarter for 4 quarters.
So, there are too many keyfigures to create.
I am using fiscal year in the columns outside the Key figure structure containing the keyfigures restricted at each of 4 quarters.
So, when the report displays, all the 10 years will automatically be displayed.
The problem is one of the 4 quarter level keyfigures needs to be restricted by calendar year.
How can I read what is the fiscal year for each column at runtime so that I can reference this value to determine the calendar year ?
As you know, each FY spans 2 Calendar Years. So, i need to restrict this on the 4th keyfigure by calendar year but while having the FY outside the keyfigure structure i can get all the FY, I am not sure how to access this value at runtime so that eg.
if FY for column 1 is 2010, i can set calendar year to be 2010 to 2011.
Hope you can give me some clues.
Thanks you Gurus!
Best regards
JohnDear Sunnybt
Copy Riyes, I find your response interesting. Please could you elaborate your idea of using condition in more detail.
Sorry for my late response.
Allow me to clarify my statement, which you are right, is unclear.
By :
"if the current QuarterFY is less than the current QuarterFY"
I mean :
eg. user enters FY range : 2009 to 20NN (eg. 2017)
KF_column1_FY2009_Q1______KF_column2_FY2009_Q2____KF_column3_FY2009_Q3______KF_column_FY2009_Q4______KF_column_FY2010_Q1______KF_column2_FY2010_Q2____KF_column3_FY2010_Q3______KF_column_FY2010_Q4_____KF_column_FY_NNNN_Q1
For each column, where the FY can be any year range entered by user,
the Text Description of the Column should show either 'Actual' or 'Plan' based on what is the current FY Quarter at runtime.
If the FY Quarter (eg. 1st column is 200101) is before current FY Quarter (i.e 201103), then the Description of this column should be "Actual" , else "Plan".
In my current design, I am unable to use customer exit text variable to meet this requirement.
So, I like to check with you for fresher ideas.
If not , I would use a workbook, which I am avoiding as the user needs to drilldown and I believe drilldown is not possible in workbooks where report layout needs to be rigid or cell positions fixed. Of course, unless there is a way out of this which I do not know.
Best regards
Bass -
Fiscal Year in the columns outside KF structure
Dear Experts,
I have a manual Entry variable for Fiscal Year range.
In the query designer columns , I have a KF structure containing quarter level columns.
The FY is outside this structure. So, for each FY user entered in the FY range variable, the report will show the set of KFs at quarter level.
How can i refer to this FY values at runtime such that current date can be used to compare with the FY and Quarter in the columns?
The requirement is, if the current QuarterFY is less than the current QuarterFY, the TEXT variable for the columns should show 'Actual' else show 'Plan' .
I am not sure how to reference the FY range entered by user considering that the FY is placed outside the KF columns to automatically display all the FY entered by the user without the use of the FY range variable restricted in the KFs.
Please advise.
Thanks.
BassDear Sunnybt
Copy Riyes, I find your response interesting. Please could you elaborate your idea of using condition in more detail.
Sorry for my late response.
Allow me to clarify my statement, which you are right, is unclear.
By :
"if the current QuarterFY is less than the current QuarterFY"
I mean :
eg. user enters FY range : 2009 to 20NN (eg. 2017)
KF_column1_FY2009_Q1______KF_column2_FY2009_Q2____KF_column3_FY2009_Q3______KF_column_FY2009_Q4______KF_column_FY2010_Q1______KF_column2_FY2010_Q2____KF_column3_FY2010_Q3______KF_column_FY2010_Q4_____KF_column_FY_NNNN_Q1
For each column, where the FY can be any year range entered by user,
the Text Description of the Column should show either 'Actual' or 'Plan' based on what is the current FY Quarter at runtime.
If the FY Quarter (eg. 1st column is 200101) is before current FY Quarter (i.e 201103), then the Description of this column should be "Actual" , else "Plan".
In my current design, I am unable to use customer exit text variable to meet this requirement.
So, I like to check with you for fresher ideas.
If not , I would use a workbook, which I am avoiding as the user needs to drilldown and I believe drilldown is not possible in workbooks where report layout needs to be rigid or cell positions fixed. Of course, unless there is a way out of this which I do not know.
Best regards
Bass -
How to add a role description to the Role Library:Role Information Column
Hi to all,
I have an interesting question.I have a task to show a role description in the role sorting table information column.Is there any way to get this parameter ?
I tried with waveset.roleinfos.info.description but nothing happened.I saw that in some forms is used waveset.availableRoleInfos[$(rolename)].info.description, but i can not understand what is this parameter actualy for and from where it comes (and i did not get anything from it either when i tried with it).
So my question is is there any way i can add this description attribute to the Information role column ?Hi Mariana,
one way is to use the role upload if you want to use existing BI roles in Portal:
Here are more infos: http://help.sap.com/saphelp_nw04s/Helpdata/EN/9d/8c174082fe1961e10000000a155106/frameset.htm
Regards,
Adem -
Error while trying to change the Column description in Table Control
Hi,
I have created a table control using the wizard in Module Pool.
When i try to change the column description of the table control or adjust any other element which is already available on the screen and not in table control. It gives me an error
Unable to transfer data. End Program?
Any help would be appreciated.
Thanks
Sarves S V KHi.,
Check these [Table Control Change Column Description|Add new columns in table control in custom screen program;
and [Add Columns in Table Control|Re: Table control columns]
else delete and create Table control Again..!!
hope this helps u.,
Thanks & Regards,
Kiran -
Get description of the tables and columns
Where to get the database table describing each SAP B1 and description of your columns? This option is the generator of queries, but I want to do this via command in SQL, or a dynamic (automatic).
hi Harley,
Clint is correct! to make this document available to your local computer you need to install the SDK Documentation accompanied in your installer. if the SDK documentation is already installed to your local PC you can locate the SDK documentation from this path C:\Program Files\SAP\SAP Business One SDK\Help\SDK_EN.chm, or alternatively Start -->> SAP Business One -->> SDK -->> SDK Help Center.
regards,
Fidel -
Getting the Description of the Physical Column
Hi,
I am trying to populate the description attribute of each of the table columns in the Physical layer of my RPD. I have these descriptions stored in an Excel file. Is it possible to import these descriptions into my .rpd?
ThanksOh...
Do you have that structure..!!
okay, then that is individual column which gives description of selected column..
You need to import this column also in physical layer..
This is only when you select both columns in criteria.. but shows as another column of particular column...
It's not possible to get description (data) of column in description field of physical column in rpd...
Hope i am clear..
As per my knowledge, If you want you need to add it manually.. with this structure you have
Thanks & Regards
Kishore Guggilla
Edited by: Kishore Guggilla on Dec 23, 2008 8:09 PM -
How to import the column short description for Datastore in ODI
Hi
I am loading AS400/DB2 table in to oracle db staging tables. These AS400 table has 70 to 80 columns each with short description. Using common format designer I am able to get the DDL for the oracle db so that I do not have manually type in the table definition.
1. But how do I get the each column short description into Datastore?
2. In oracle Datastore where does the COLUMN Comments appear?
Thanks
obieefanin snp_table->table_desc column
comments cannot be reversed when using standard reverse.
for db2 400, I suppose you can use "RKM DB2 400", i can see it reverse table comment as below
select DBXLFI TABLE_NAME,
DBXLFI RES_NAME, /* DBXFIL for system name */
case
when LOCATE('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>' ,DBXLFI) <> 0
then SUBSTR( DBXLFI , LOCATE('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>' ,DBXLFI) + CHAR_LENGTH('<%=snpRef.getModel("REV_ALIAS_LTRIM")%>') )
else SUBSTR(DBXLFI , 1 , 4)
end TABLE_ALIAS,
case DBXATR
when 'PF' then 'T'
when 'TB' then 'T'
when 'VW' then 'V'
end TABLE_TYPE,
Trim(Substr( IfNull(Trim( Both From DBXTXT ), ' ')||' '||Ifnull(DBXREM, ' ') , 1 , 250)) TABLE_DESC,
0 R_COUNT
from QSYS.QADBXREF
where DBXLIB = '<%=snpRef.getModel("SCHEMA_NAME")%>'
and DBXLFI like '<%=snpRef.getModel("REV_OBJ_PATT")%>'
and DBXATR in ('PF' , 'TB' , 'VW') -
i bought pdf converter pro @$29.99 but when i convert to excel it only converts the columns with figures leaving out the columns with quantity descriptions
Contact the vendor of the product for support.
-
In Sales Order changing the column width to see all item desciption?
When in the sales order screen .
Expand the column width of say the item description.
How do I save the column width for all the sales documents for the field item description in sales order ?Hi,
The column width of the Document will be defaulted to the same size at which the user has saved the last document.
So, if a user has saved the Sales Order with a big column width for the 'Item Description' then after saving and re-entering into the Sales Order, the user can see the same column width for all the Sales Order's.
I hope the above helps.
Cheers~
Jitin Chawla -
The column names is not being displayed in maintenance view...
Hello experts,
I created a maintenance view for my custom table and I am wondering on why does the columns
have no names? It is just displayed with a '+'. Help would be appreciated. Thanks a lot
guys and take care!Hi,
Check whether is any description for the corresponding data element...
Otherwise you can go to SE51 to change the column text..
If you are adding text to the data element generate the screens again..
Thanks,
Naren -
How to add description of a column of a table in SQL Azure
Hi
I have some tables in my application database where there are descriptions added against certain columns. Needless to say they were done by using sp_addextendedproperty.
Now I am trying to migrate the Database to SQL Azure. SQL Azure does not support sp_addextendedproperty.
Hence I am not able to figure out how to add descriptions to those columns.
Any help would be much appreciated.
Thanks
SoumyadebHello,
Just as Latheesh post above, Windows Azure SQL database are not support extended stored procedures. That’s one of the limitations on SQL database, and I don’t know there is another way to achieve the same on Azure.
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Show different key fields for different caracteristics in the column.
Hi, experts
I am creating a query where there are 4 colomns reprensenting 4 different dates. But I would like to display diffferent key fields for them. For example, under DAY 1, i would like to diplay KeyField 1, for DAY2, DAY3 and DAY4, KeyField 2 et 3 will be added under them.
To do that, i made these key fields "Constant selection" and made some definition in the cells-------
On the line of DAY1 in the colomn KeyField 2 and KeyField 3, I made them "Always Hide".
But I didn't get what i wanted as the two columns (KF2 et KF3) still appear in the report, even if there are no data in these two columns.
Is it possible to realise this requirement:
DAY1 DAY2 DAY3
KF1 KF2 KF3 KF2 KF3
Thanks in advance!!!!There is no need to define a cell for this, use a restricted key figure:
KF1 needs to be restricted by Day1
KF2 restrict it by Day2 and so on,
and use those restricted figure in the key figure section, but to make the column more descriptive use a text variable for the name of the columns.
this should be easier than cell definition.
thanks.
Wond
Maybe you are looking for
-
Dear All, Would like to ask if B1 has the function to make schedule to generate a report and export it to excel file? seems B1 doesn't has this function, is it ? Thank you very much
-
Terminal window: how to close it ?
Hello, everytime i switch on my macbook the Terminal window appears on the dock, it opens and it stays open. It all started 2 months since then it happens everytime. It is automatic. So i do switch it off ? how do i make sure that it doesnt open anym
-
Corrupt summary TNEF content - Error 5.6.0
Hi, We are on Exchange 2013 CU3, and users are unable to send email when a message .msg file is used to create the email via outlook. The error message when sent to external (outside our exchange server realm) is : Diagnostic code = ContentTypeUnsupp
-
At the top of the Firefox window, click on the Firefox button (File menu in Windows XP) and then click ExitOn the menu bar, click on the Firefox menu and select Quit FirefoxAt the top of the Firefox window, click on the File menu and select QuitAt th
-
How to delete "on the go" folders
how do you delete "on the go folders" from the nano?