How to make column tree the ALV
As in normal table we can make column tree by using 'TreeByNestingTableColumn' property, can any one tell me how to do the same in alv.
I have used set_hierarchy_column( abap_true ), but i was not able to map all the elements with in a node to other columns present in the alv table.
requirement:
Column 1 Column 2
P1 value 1
->C1 value 2
-> C11 value 3
-> C12 value 4
->C2 value 5
-> C21 value 6
-> C22 value 7
P2 value 8
Can some please tell me how to do it.
Thanks
Abhishek
Can some one please help me!!
I need to implement column tree in web dynpro application using ALV
Similar Messages
-
How to make columns in the select list dynamic
Hi
I need to make columns in the select query dynamic.I have three tables.Table 1 contains master information lets say name of group(A group consists of members of various skill sets) and its period(A group is of specific period lets say for 18 months).Table 2 contains different skill sets corresponding to a group i.e there is one to many relationship between table 1 and table 2.Table 3 contains months information of skill sets.For example if skill set 1 is required for 5 months then there will be 5 rows(for each month) in table 3 corresponding to a skill set i.e there is again one to many relationship between table 2 and table 3.Tabale 3 will also contain man month value for perticular month.I need to show all the periods of a group and its sum of man month value for all skill sets.
If group1 is of 6 months (starts nov2006 and ends Apr2007) and has 5 skill sets then there will be one entry in table 1 and 5 entry in table 2(For skill set).For each entry in table 2 there will be 6 entry in table 3(for each month).I need to write a query which would display
Group name nov2006 dec2006 jan2007 feb2007 mar2007 apr2007
Gr1 10 15 21 17 18 22--These are sum of man month of all skill set for a particular groupIf Gr 2 is of 9 months then it would disply all the information in respective months.i.e for group 2 nine months information and group 1 six months information
Pls help
Thanks in advance
SasHi,
From your requirement, we understand that you want to make Rows in table 3 as Columns.
Please search pivot in this Forum.
Regards
K.Rajkumar -
How to make some fields in ALV tree editable
Hello All,
Can any one tell me how to make some fields in ALV tree editable.
If possible please post some code.
Regards,
Lisa.Hi Lisa,
I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
I tried making the wa_fieldcat-edit = 'X' But in vain.
Also i made the layout fields wa_layout-edit = 'X' and wa_layout-edit_mode = 'X'.
But still the alv tree field appears as display.
As you have mentioned in the post as answered, So please guide me to make the field editable.
I am using oops method.
Please provide me code if any.
Thanks & Regards,
Mozila -
Phap_admin: how to add columns to the initial ALV
Hello everyone,
I have a requirement which is to add 2 new columns on the ALV that appears after going through the phap_admin selection screen.
I show you a picture as an example:
I need to add 2 fields form infotype 0002 in this ALV list.
I've been looking around and I found this badi: HRHAP00_REPORTING, but I don't think it can help me, because this bady Works after clicking the status button "Reporting" at /nphap_search.
Does anybody faced the same issue?
Do you now any badi for that purpose?
Help would be apreciated and rewarded with points.
Kind regards.Append your additional fields in this structure HAP_S_DOCUMENTS it will show in the layout.
then write implicit enhancement for data population where final itab is filling.
and after append structure, for data population in the following include LHRHAP_UI_DOCUMENT_REPORTF06 and subroutine f1100_ctrl_create modify table based on ur logic.
I tried in my sandbox its working fine and data is showing perfectly.
suri -
HOw to make an Object oriented alv respond to double click
Hi all,
HOw to make an Object oriented alv respond to double click.SAmple code will be helpful.
Thanks in advance,
Alex.Hi,
1. Create a Control (for Custom and Split Containers only)
2. Instantiate a Container Object (in case of Custom and Split Containers, specify the control which is created by us in Screen painter) CREATE OBJECT
3. Instantiate an Object of the kind of report that has to be displayed (List, Grid or Tree). CREATE OBJECT . Here we need to specify the Parent Container as the so that it sits in that container.
4. Call appropriate methods to display the report on the screen. CALL METHOD ->
DATA : g_dock TYPE REF TO cl_gui_docking_container,
g_split TYPE REF TO cl_gui_easy_splitter_container,
g_cont1 TYPE REF TO cl_gui_container,
g_cont2 TYPE REF TO cl_gui_container,
g_grid1 TYPE REF TO cl_gui_alv_grid,
g_grid2 TYPE REF TO cl_gui_alv_grid.
i_mara is an internal table of structure MARA
SELECT * FROM mara INTO TABLE i_mara.
i_kna1 is an internal table of structure KNA1
SELECT * FROM kna1 INTO TABLE i_kna1.
To create an Object of type Docking Container
CREATE OBJECT g_dock
EXPORTING
side = cl_gui_docking_container=>dock_at_top
extension = 200 .
To Create an Object of Type Split Container. Here we can see that the Docking *Container Created above has been used as a parent .
CREATE OBJECT g_split
EXPORTING
parent = g_dock
orientation = 1 .
Easy Split container splits one Control into 2 manageable controls, each of them is used * to handle one GUI Container each
g_cont1 = g_split->top_left_container.
g_cont2 = g_split->bottom_right_container.
To Create an Object of type Grid . Here we can see that the Left Split Container * Created above has been used as a parent .
CREATE OBJECT g_grid1
EXPORTING
i_parent = g_cont1 .
To Create an Object of type Grid . Here we can see that the Right Split Container * Created above has been used as a parent .
CREATE OBJECT g_grid2
EXPORTING
i_parent = g_cont2 .
The method of Grid Control Object is used to display the Data.
CALL METHOD g_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'MARA'
CHANGING
it_outtab = i_mara[] .
The method of Grid Control Object is used to display the Data.
CALL METHOD g_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNA1'
CHANGING
it_outtab = i_kna1[] .
Regards
Hari -
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. -
How to make column range based on a column in Oracle BI 11g
Hello everyone!
I want to know, how to make column range from a column in oracle bi 11g.
for example!
I have a column amounts and I want to build on this with other values of quantity, other column range 1-9,10-49,50-99,100-249, 249 o more.
regards!
when I try to make the range I have error.
Syntax error [nQSError: 26012] . (HY000)
SQL Issued: SELECT CASE WHEN "CUBO_DEEE_TAB"."CANTIDAD" BETWEEN 1 AND 9 THEN 1 a 9 ELSE "CUBO_DEEE_TAB"."CANTIDAD" END FROM "DM_DEEE"
Edited by: 964157 on 09-oct-2012 11:50You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);
-
Subtotal text in the 3rd column of the alv list
Hi Guru,
Can anyone know or have some codes on how to implement a subtotal text in the 3rd column of the ALV list. Im using FM REUSE_ALV_HIERSEQ_LIST_DISPLAY to display the report.
Please give some advise or help.
Thanks and rewards is given.Hi my friend,
Insted Using FM REUSE_ALV_HIERSEQ_LIST_DISPLAY
better use REUSE_ALV_GRID_DISPLAY.
in that
it_sort = i_sort[]
constants : c_x type char1 value 'X'.
l_rec_fieldcat_wa-do_sum = c_x.
endif. -
How to make an interactive block ALV
Hi,
I am new to the field of ABAP and have recently started working on ALV's. My problem is that i do not know how to make an interactive block ALV. I have implemented this functionality with the simple ALV but I am not getting the same for block ALV. Anyone who has worked on the same or has any idea please help me.
Regards.
Alok BhardwajHi jester526,
You'll need Acrobat to create links in a PDF file. Please see https://acrobatusers.com/tutorials/creating-and-editing-links for instructions.
Best,
Sara -
New column in the ALV output of transaction phap_admin_pa
Hello All,
I want to display a new column in the ALV output of transaction phap_admin_pa. Is this possible? If so, could anyone please give some guidance how to proceed. The new column willl contain the elements from appraisal catalog. Do u think there will be any BADi's to achieve this or I am not sure if a custom program need to be created?
Thank you very much,
RushHi
I had same problem of adding felds from additional data into the ALV and when I asked SAP they told me to implement BADI HRHAP00_REPORTING.
I am still trying to get some info on how to implement it if you find any documentation of someone who has implemented appreciate you tell me.
regards
Pravin -
How to make cell editable in ALV
Hello all,
I have following scenario.
I am using ALV_GRID_DISPLAY.
I have 5 field on output screen say A , B , C , D , E.
In field A i have check box.
In field B i have number like 0 ,1 , 2 , 3 ,4 ,5.
My problem is whenever i get value of field A as 0 i want to make my only check box of that row editable.
So can anyone help me.
Thanks in advance
SachinHi Sachin,
REPORT zalv_editf4display.*Type pools for alv
TYPE-POOLS : slis.*structure for t582a tbale
TYPES : BEGIN OF ty_table,
infty TYPE infty,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_table.*Structure for infotype text
TYPES : BEGIN OF ty_itext,
infty TYPE infty,
itext TYPE intxt,
sprsl TYPE sprsl,
END OF ty_itext.*Structure for output display
TYPES : BEGIN OF ty_output,
infty TYPE infty,
itext TYPE intxt,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_output.*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.*Data declarations for dropdown lists for f4
DATA: it_dropdown TYPE lvc_t_drop,
ty_dropdown TYPE lvc_s_drop,
*data declaration for refreshing of alv
stable TYPE lvc_s_stbl.*Global variable declaration
DATA: gstring TYPE c.
*Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout*ok code declaration
DATA:
ok_code TYPE ui_func.
initialization eventINITIALIZATION.start of selection event
START-OF-SELECTION.*select the infotypes maintained
SELECT infty
pnnnn
zrmkz
zeitb
dname
davo
davoe
FROM t582a UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE it_table.* *Select the infotype texts
IF it_table[] IS NOT INITIAL.
SELECT itext
infty
sprsl
FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE infty = it_table-infty
AND sprsl = 'E'.
ENDIF.
*Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table. wa_output-infty = wa_table-infty.
wa_output-pnnnn = wa_table-pnnnn.
wa_output-zrmkz = wa_table-zrmkz.
wa_output-zeitb = wa_table-zeitb.
wa_output-dname = wa_table-dname.
wa_output-davo = wa_table-davo.
wa_output-davoe = wa_table-davoe.* For texts READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
wa_output-itext = wa_ittext-itext.
APPEND wa_output TO it_output.
CLEAR wa_output. ENDLOOP.* Calling the ALV screen with custom container CALL SCREEN 0600.*On this statement double click it takes you to the screen painter SE51.
*Enter the attributes
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen ,
Here we can give a title and customized menus
*create 2 buttons with function code 'SAVE' and 'EXIT'.
GIVE A SUITABLE TITLE&---------------------------------------------------------------------
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module PBO OUTPUT
text
MODULE pbo OUTPUT.*Creating objects of the container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CCONT'.* create object for alv grid
create object c_alvgd
exporting
i_parent = c_ccont.* SET field for ALV
PERFORM alv_build_fieldcat.* Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.* Call ALV GRID CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.ENDMODULE. " PBO OUTPUT&----
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
*subroutine to build fieldcatFORM alv_build_fieldcat. DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'INFTY'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'Infotype'.
lv_fldcat-icon = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PNNNN'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Structure'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'ITEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '5'.
lv_fldcat-fieldname = 'ZRMKZ'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 1.
lv_fldcat-scrtext_m = 'PERIOD'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '6'.
lv_fldcat-fieldname = 'ZEITB'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 5.
lv_fldcat-scrtext_m = 'Time constraint'.
lv_fldcat-edit = 'X'.
*To avail the existing F4 help these are to
*be given in the field catalogue
lv_fldcat-f4availabl = 'X'.
lv_fldcat-ref_table = 'T582A'.
lv_fldcat-ref_field = 'ZEITB'. APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '7'.
lv_fldcat-fieldname = 'DNAME'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Dialogmodule'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '8'.
lv_fldcat-fieldname = 'DAVO'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Start'.
lv_fldcat-edit = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat. lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '9'.
lv_fldcat-fieldname = 'DAVOE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'End'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
*To create drop down for the field 'DAVO'
with our own f4 help
ty_dropdown-handle = '1'.
ty_dropdown-value = ' '.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '1'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '2'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '3'.
APPEND ty_dropdown TO it_dropdown. CALL METHOD c_alvgd->set_drop_down_table
EXPORTING
it_drop_down = it_dropdown.
LOOP AT it_fcat INTO lv_fldcat.
CASE lv_fldcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'DAVO'.
lv_fldcat-drdn_hndl = '1'.
lv_fldcat-outputlen = 15.
MODIFY it_fcat FROM lv_fldcat.
ENDCASE.
ENDLOOP.ENDFORM. " alv_build_fieldcat&----
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
*Subroutine for setting alv layout
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.ENDFORM. " alv_report_layout* PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module PAI INPUT
text
MODULE pai INPUT.*To change the existing values and refresh the grid
*And only values in the dropdown or in the default
*F4 can be given , else no action takes place for the dropdown
*and error is thrown for the default F4 help and font changes to red
and on still saving, value is not changed c_alvgd->check_changed_data( ).Based on the user input
*When user clicks 'SAVE;
CASE ok_code. WHEN 'SAVE'.*A pop up is called to confirm the saving of changed data
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
IMPORTING
answer = gstring
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.*When the User clicks 'YES'
IF ( gstring = '1' ).
MESSAGE 'Saved' TYPE 'S'.
*Now the changed data is stored in the it_pbo internal table
it_pbo = it_output.
*Subroutine to display the ALV with changed data.
PERFORM redisplay.
ELSE.
*When user clicks NO or Cancel
MESSAGE 'Not Saved' TYPE 'S'.
ENDIF.
**When the user clicks the 'EXIT; he is out
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE. CLEAR: ok_code.ENDMODULE. " PAI INPUT
*& Form REDISPLAY
text
--> p1 text
<-- p2 text
FORM redisplay .*Cells of the alv are made non editable after entering OK to save CALL METHOD c_alvgd->set_ready_for_input
EXPORTING
i_ready_for_input = 0.*Row and column of the alv are refreshed after changing values stable-row = 'X'.
stable-col = 'X'.*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
CALL METHOD c_alvgd->refresh_table_display
EXPORTING
is_stable = stable
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.ENDFORM. " REDISPLAY
Regards,
Flavya -
Subtotal of the columns in the ALV
Hi,
I want to do the Subtotal of the columns in the ALV by using any of the FMs:
ALV_OPTIONS_FOR_SUBTOTALS
ALV_SUBTOTALS_GET
ALV_SUBTOTALS_GET_H
But since the functional documentation is not available.
I am not getting how to use.
Please provide me the code or reply me about how to go about.
Thanks & Regards,
PoojaHi,
Consider i have 3 fields
lifnr curr DMBTR
5600 GBP 1000
5600 GBP 1000
5600 USD 1000
5600 TND 1000
5601 GBP 1000
5602 GBP 1000
I want output to be :
lifnr curr DMBTR
5600 GBP 1000
5600 GBP 1000
5600 USD 1000
5600 TND 1000
5600 GBP 2000
USD 1000
TND 1000
5601 GBP 1000
5601 GBP 1000
5602 GBP 1000
5602 GBP 1000
Actually i tried using the using subtotal option here:
**Method 1:
lv_fieldname = lc_lifnr.
lw_sort-spos = 1.
lw_sort-fieldname = lv_fieldname.
lw_sort-up = c_mark.
lw_sort-subtot = 'X'.
APPEND lw_sort TO i_sort.
Next i tried using the modifying field catalog like this
**Method 2:
LOOP AT i_fieldcat INTO wa_fieldcat.
IF wa_fieldcat-fieldname EQ 'DMBTR'.
wa_fieldcat-do_sum = 'X'.
ENDIF.
IF wa_fieldcat-fieldname EQ 'WRBTR'.
wa_fieldcat-do_sum = 'X'.
ENDIF.
MODIFY i_fieldcat FROM wa_fieldcat
TRANSPORTING do_sum .
ENDLOOP.
But both the methods didnt work .
So kindly tel me how to go about?
Regards,
Pooja -
I have a $10 gift card balance on my Apple ID but when I try to rent a movie it wants me to use my debit card. How can Make it use the iTunes credit?
Hi ...
Select None for payment method > iTunes Store: Changing account information
Be aware, an auto renewing subsciption by require a credit card. -
How to make use of the presentation variable in SQL result query
I have 2 prompts in my dashboard.
Prompt1 decides the values of Prompt2.
I have set a presentation Variable (selected_comp) in prompt1 which holds the value selected.
To populate the values for Prompt2, I need to execute a query using the presenation variable set by Prompt1.
SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=@{selected_comp}
the query is resulting into
SQL Issued: SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=0
but the value in selected_comp is "ABC".
Can anybody help in how to make use of the presentation variable in query to get the correct value
thanks
ShubhaJust use constrain check box to filter your 2nd prompt values based on the 1st prompt.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
How to make use of the FM EDIT_TEXT_FORMAT_DOC
Hi frnz,
How to make use of the FM
EDIT_TEXT_FORMAT_DOC
Could anyone explain with an example how to use this
regardshi
I need an example please....
did any one use that FM
Regards
Maybe you are looking for
-
Free goods determination from material determination.
Hi experts, I have one issue for you, My scenario is: we issue freee goods 1:1. i configured free goods setting and maintained VBN1 (condition records for free goods). i even maintained material determination configuration settings and maintained VB1
-
Windows 8.1 Hyper-V virtualization rights
So in Windows 7 Pro we had XP mode. It was a full copy of XP which was licensed under the Windows 7 Pro license. Do I have the licensing rights to install Windows 7 Pro on my Windows 8/8.1 machine using Hyper-V? Quite often my company uses XP mode
-
R9 290 Black screens with newer drivers
Hi guys. I have a brand new Gaming 290 4G. I cannot get both my displays (1 on DVI and the other on HDMI) to work when trying to install the latest couple of drivers. I have tried 14.12, 14.11.2 and 14.9. As soon as the driver is installed, both my s
-
Help need to script(urgent)
hai everybody... i ahve written a javascript for popup a new window...this is my script script function open() if(portal40.wwctx_api.get_user=='JAYANTHAN') window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQUIRY_REP.show?p_arg_names=_show_hea
-
Hai, 1) I have two session bean which do some database operation. And in my deployment descriptor I have set transcational attribute as Required, as well as transcation type as bean. I have