Hideing a Column in ALV Table which is Displaying the POWL Query data
Hi SDNers,
I want to hide a column of ALV Table which is displaying my POWL Query data in it and hideing should be based on the Role as well. i.e few of the role the column shoudl be hidden and few of the roles should have the Column visible.
waiting for the Valueble Answers.
Thanks & Regards,
Govindu
Hai Kris,
I took help from ur link and i declared a global attribute request_number.
and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
DATA bill_details TYPE REF TO zdom_bill_detail.
LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
bill_details ?= <wa_row>-r_value.
IF bill_details->REQ_NUMBER IS INITIAL.
DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
lo_el_bill_detail->set_attribute(
EXPORTING
name = 'REQ_NUMBER'
value = wd_comp_controller->request_number
Wen am setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
lo_el_bill_detail->set_attribute(
name = `REQ_NUMBER`
value = wd_comp_controller->request_number ).
Pls give some suggestions,
Thanks in Advance,
Nalla.B
Similar Messages
-
Hiding a column in ALV GRID function module if it doesnt have data
Hi ,
I am using alv grid function module, in output i dont want to display the fields which dont have datawe dont know which column has no data..... we have to do it dynamically
This code does that dynamically, Here the field2 & Fiels4 are not displayed.
TYPE-POOLS:slis,abap.
TYPES:BEGIN OF ty_stru,
field1 TYPE c,field2 TYPE c,field3 TYPE c,field4 TYPE c,
END OF ty_stru.
DATA:itab TYPE TABLE OF ty_stru,
wa_stru TYPE ty_stru,
lv_repid TYPE sy-repid,
wa_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE TABLE OF slis_fieldcat_alv,
it_details TYPE abap_compdescr_tab,
wa_components TYPE abap_compdescr,
lf_ref_descr TYPE REF TO cl_abap_structdescr,
lv_field TYPE abap_compname.
FIELD-SYMBOLS:<fs> TYPE ANY,
<fs1> TYPE ANY.
lf_ref_descr ?= cl_abap_typedescr=>describe_by_data( wa_stru ).
it_details[] = lf_ref_descr->components[].
wa_stru-field1 = 'A'.wa_stru-field3 = 'C'.APPEND wa_stru TO itab.
wa_stru-field1 = 'X'.wa_stru-field3 = 'Y'.APPEND wa_stru TO itab.
IF NOT itab[] IS INITIAL.
LOOP AT it_details INTO wa_components.
ASSIGN wa_components-name TO <fs>.
CHECK sy-subrc = 0.
SORT itab BY (<fs>) DESCENDING.
CONCATENATE 'WA_STRU' '-' <fs> INTO lv_field .
ASSIGN (lv_field) TO <fs1>.
CHECK sy-subrc = 0.
READ TABLE itab INTO wa_stru INDEX 1 TRANSPORTING (<fs>).
IF sy-subrc = 0 AND ( NOT <fs1> IS INITIAL ).
wa_fieldcat-fieldname = wa_components-name.
wa_fieldcat-seltext_m = wa_components-name.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDIF.
ENDLOOP.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
it_fieldcat = it_fieldcat[]
TABLES
t_outtab = itab[].
ENDIF. -
How to remove a column from alv table
Hi All
How to remove a specific column from alv table.?
Thanks & Regards
SUNFor delete u can follow the above post..
Fo making invisible :
data m_col type ref to cl_salv_wd_column.
m_col = alv_mode->IF_SALV_WD_COLUMN_SETTINGS->GET_COLUMN (' col1' ).
m_col->SET_VISIBILITY( '01' ). -
Write protect a column in ALV Table
Hi All,
I have an ALV Table with few columns. Some of the columns has got check boxes. Now my question is, depending on the conditions i want to write protect a particular column. Could you tell me how to do it?
Thanks & Regards,
RaviHi Ravi,
By default the column of ALV table are in read only mode but you want them to based on certain contion them first make that column editable by using the following code
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
lr_column_settings ?= l_table.
l_column = lr_column_settings->get_column( 'CARRID' ).
CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'CARRID'.
l_column->set_cell_editor( lr_input_field ).
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_table.
lr_table_settings->set_read_only( abap_false ).
Now create an event handler associated with the ON_CLICK event of alv and used the following code the made the column read only (based on condition)
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_table.
lr_table_settings->set_read_only( abap_false ).
I hope it helps.
You can also refer this article[Editing ALV in Web Dynpro for ABAP |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1].
Regards
Arjun -
How to get one column of ALV table as dropdown by key.
Hi experts,
How can I get one column of ALV table as dropdown and editable. If user wants to change that column value he can just select from that dropdown and click on update button. Can I provide tool tip to that column as " Select from drop down to change the status "?
Please Help.
Thanks,
PratibhaYou just need to change the cell editor of that column in ALV.
So first get access to the alv model object (adjusting the code below for your ALV Component Usage name - mine was ALV_ADV):
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv_adv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ).
DATA l_table TYPE REF TO cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
Then access the column object you want to change:
DATA l_column TYPE REF TO cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'REGION' ).
Then create the cell editor for DDLB and set it as the new cell editor for this column:
DATA ddlb TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
create object ddlb
exporting
selected_key_fieldname = 'REGION'.
ddlb->set_tooltip( `Select from drop down to change the status` ).
l_column->set_cell_editor( ddlb ). -
Hi my name is vishal
For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Diagnostics;
using System.IO;
namespace DRRS_CSharp
public partial class frmPDF : Form
public frmPDF()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
Document doc = new Document(PageSize.A4.Rotate());
var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(6);
table.TotalWidth =530f;
table.LockedWidth = true;
PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
cell.Colspan = 6;
cell.HorizontalAlignment = 0;
table.AddCell(cell);
Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
para.Alignment = Element.ALIGN_CENTER;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(105f, 105f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("Reprocessing Date");
table.AddCell("Patient Name");
table.AddCell("Dialyzer(Manufacturer,Size)");
table.AddCell("No.of Reuse");
table.AddCell("Verification");
table.AddCell("DialyzerID");
while (dr.Read())
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
table.AddCell("@count".ToString());
table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
table.AddCell(dr[0].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(table);
doc.Close();
System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
this.Close();
The above code executes well with no problem at all!
As you can see the file to which i create and save and open my pdf report is
AssignedDialyzer.pdf.
The column headers of table in pdf report from c# windows forms using iTextSharp are
"Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
"DialyzerID".
However the problem i am facing is after execution and opening of document is my
column headers in table in pdf report from
c# and datas in it all appear in bold.
I have browsed through net regarding to solve this problem but with no success.
What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
vb6,adodb with ms access using iTextSharp?
I have approached Sound Forge.Net for help but with no success.
I hope anyone/someone truly understands what i am trying to ask!
I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
I hope i get a reply in terms of solving this problem.
vishalHi,
About iTextSharp component issue , I think this case is off-topic in here.
I suggest you consulting to compenent provider.
http://sourceforge.net/projects/itextsharp/
Regards,
Marvin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
List view to include a column or field which would display the sequence number in a view
I have a view for a list which displays items following any condition or sorting. Now, i would like to display the list items in such a way that
the auto incremented numbers are displayed as an arbitary field which would display the numbers such that
its just going to display items in sequence. Is there anything that can be done in sharepoint designer for the list to accomodate a column/field which would display the sequence numbers.
ThanksThere are columns such as
Name, Goals
and it should be arranged in descending order of Goals and it could be paginated but also a column should be displayed for ranks e.g
Name Goals Rank
A 40 1
B 39 2
C 30 3
So, the idea is the ways it is sorted in descending order, if we possibly have a counter then we could display the ranking of the items.
Thanks -
To find out the table which gives me the vendor no. to whom i pay brokerage
Hello Everyone!
My question is,
In PO i have two different vendors... one vendor is the one from which we purchase goods and second vendor is the one to whom we pay brokerage. We mention the brokerage amount in 'ZBR0' condition type. Now I want to find out the table which gives me the vendor no. to whom i pay brokerage.
Please its so urgent.
Thanks & Regards,
Pranil Shinde.Hi,
look in table KONV and you will find your condition and the vendor.
Regards Vassko! -
A transacction or table which can display all the souce system
Hi,
Is there any transaction or table which can display all the source systems?
Thanks in advance.RSA1->Modeling-> Click on Source Systems, here you can see all the source systems connected with BW.
tcode: SM59 & expand all the connections. Here you can see all the connections.
Hope it helps.. -
11GR2
=-----------------------------------
I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
begin
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY', TRUE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES', FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE', FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'TABLESPACE',FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS',FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'REF_CONSTRAINTS',FALSE);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS_AS_ALTER',FALSE);
End;
select REGEXP_REPLACE(dbms_metadata_diff.compare_alter('TABLE','TABLE_NAME_A','TABLE_NAME_A','USER1','USER2'),('USER1...'),'', 1, 0, 'i') from dualI am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
If you want help you have to SHOW us what you are doing and how you are doing it; you can't just try to tell us in your own words.
We can't see your computer screen. -
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv -
Name of the table which stores all the cubes
hi all,
can any one of you give me the name of the table which stores all the names of the cubes which are been using in the system.
and please give me the way of finding it also.hi Antony,
the table is RSDCUBE, and RSDCUBET is the text table
also check related tables RSDCUBE*,
you can open 2 sessions, one run ST05 and activate sql trace,
another session right click infocube and 'change' or display,
then go back to ST05 session, and deactivate trace, and display trace
a list of tables will come out.
hope this helps. -
How to get data from COSP table, field HRKFT as the key to data from PM?
Dear ladies and gentlemen!
I need to get data from COSP table, field HRKFT as the key to data from PM tables (AFKO and AUFK).
The problem is that it is a key field to the COSP, and all non-key fields as an alternative to HRKFT are not suitable for this task.
All this is necessary for the extractor, which loads the data from the R \ 3 systems in the BW-system. I need to perform SELECT from a table COSP and maybe also JOIN, most likely between tables COSP and AUFK.
What should I do in this case?
Thank you very much in advance!From information on help.sap.com I've made a conclusion that one of possible solutions in theory is to modify standard extractor PM_OM_OPA_1 in order to make HRKFT field available for work, because by default it is hidden by SAP and not available for use as a key field.
Of course, it's not a very good solution, but for now I know no other way to solve this problem.
Maybe someone knows better ways? In this case I will be very grateful for any help!
Moderator: You'd better post it on BI forums -
I like to know the table name where all the Interface name ( Data Type and
Dear Friends,
I like to know the table name where all the Interface name ( Data Type and Message Type in IR ) is stored.
Thanks.Hi,
Please find the repository APIs in the SE24 class builder that can be used for accessing repository objects from the ABAP stack of SAP XI. Check CL_SRAPI* in the SE24 transactions for digging further.
location of interface objects
CL_SRAPI_DATA_TYPE---data type
CL_SRAPI_DATA_TYPE_ENH---data type enhancement
CL_SRAPI_FAULT_MESSAEG_TYPE--fault message type
CL_SRAPI_MESSAGE_TYPE--message type
CL_SRAPI_INTEGRATION_SCENARIO--integration scenario
have a look at the table SXMSPMAST, SXMSCLUP & SXMSCLUR
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4fbe7b8e-0a01-0010-b69b-b7e717378f22#search=%22SXMSPMAST%20%2B%20XI%22
That document has references to lot of tables maybe it can be of use to u.
Look at the below thread for SXMB_MONI tables and Function module:
In Which Database Table the Messages are Stored in XI
Message Monitoring --> corresponding tables?
Edited by: Dharamveer Gaur on Oct 8, 2008 10:40 AM -
Datasource which could extract the PO history data
Hi all,
Is there a BCT datasource which could extract the PO history data i.e from EKBE table ?
Thanks in advanced.
SAMDepending on which infi you need, there are 3 datasource:
Header - 2LIS_02_HDR
Item - 2LIS_02_ITM
and
Scheduling - 2LIS_02_SCL
The info about the history (good receipt and invoice related) are on the scheduling, but to define correctly the PO in your query you should need also the others two datasource.
You'll find more info at
http://help.sap.com/saphelp_nw04/helpdata/en/e9/62073c44564d59e10000000a114084/frameset.htm
under Datasource.
regards,
Sergio
Maybe you are looking for
-
Modify Web Gallery - Paypal Integration - Filename Extraction
Hi Everyone, I'm embarking on a mission to try and create a custom web template that will integrate Paypal's "Add to Cart" buttons on the "Details" page of an exported Web Gallery. It only requires modifying a Web Gallery template file and adding the
-
Objects or text when clicked on to 'trigger' individual builds
I have seen it used on newer versions of powerpoint they call them "Triggers". It allows me assign a build to text or object and it executes when i click on the area of the text or object. This causes these items to work whenever i choose and not in
-
Linked Today, Gone in 5 Minutes or That Was Just Linked Or Am I NUTS?!
I started having the "iTunes Dropping Songs" problem about the same time as everyone else started to and I see that it's with different versions iTunes. So anyway, I'm using 7.2, and that was an unapproved update that was done to 6.0.2 that was great
-
Erec - When an External window opens after click of a button
We are using an Standard Webdynpro Erec Appln. When an External window opens after click of a button the smart form embedded in that windows view is not appearing instead and small X mark (in Red) is appearing with fully plain background It is happe
-
IPad issues when trying to go to App Store
I tried to download a new app from the app store, but the app store on my iPad only has images and the wording overlays itself so it looks a blur for all descriptions. The last time I downloaded an app was in Dec, and when I tried today, it looks we