How to show all table fields in correct alv disply
Hi all,
This is my report that disply in ALV . but this is only displying the join table (t_p0001_p0002) fields.i want to disply the other two table fields i.e t_pa0315 and t_pa0007.what is the logic to ALV disply the other two table fields like the table t_pa0001_pa0002.pls help me regarding this.
send me the code its urgent.
thanks!
Vipin
pls find the code below:->
REPORT Y_WP03 .
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
TYPE-POOLS: slis. " ALV Global types
tables:pa0001,
pa0315,
pa0007,
disvariant.
Selection-Screen
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
*SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_pernr FOR pa0001-pernr. " Personnel No
SELECT-OPTIONS: s_orgeh FOR pa0001-orgeh . " Organization unit
SELECT-OPTIONS: s_werks FOR pa0001-werks. " Personnel Area
SELECT-OPTIONS: s_plans FOR pa0001-plans. " Position
SELECT-OPTIONS: s_ebeln FOR pa0315-ebeln. " Purchase order
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK b2k2 WITH FRAME TITLE text-002.
*SELECT-OPTIONS: s_var FOR disvariant-variant.
PARAMETERS: p_disva1 LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK b2k2.
Type Definition *
TYPES :
BEGIN OF ty_pa0001_pa0002,
pernr TYPE pa0001-pernr , " Personnel no.
endda TYPE pa0001-endda , " end date
begda TYPE pa0001-begda , " start date
bukrs TYPE pa0001-bukrs , " company code
werks TYPE pa0001-werks , " Personnnel area
persg TYPE pa0001-persg , " Employee group
persk TYPE pa0001-persk , " Employee subgroup
btrtl TYPE pa0001-btrtl , " Personnnel subarea
abkrs TYPE pa0001-abkrs , " Payroll area
kostl TYPE pa0001-kostl , " cost center
orgeh TYPE pa0001-orgeh , " Organizational Unit
plans TYPE pa0001-plans , " Position
nachn TYPE pa0002-nachn , " Last name
vorna TYPE pa0002-vorna , " First name
midnm TYPE pa0002-midnm , " Middle name
END OF ty_pa0001_pa0002 ,
BEGIN OF ty_pa0315,
pernr TYPE pa0315-pernr , " Personnel no.
kostl TYPE pa0315-kostl , " Sending cost center
lstar TYPE pa0315-lstar , " Activity type
werks TYPE pa0315-werks , " Plant
lifnr TYPE pa0315-lifnr , " Vendor number
ebeln TYPE pa0315-ebeln , " Sending pruchase ord
ebelp TYPE pa0315-ebelp , " Sending PO item
lstnr TYPE pa0315-lstnr , " Activity number
END OF ty_pa0315,
BEGIN OF ty_pa0007,
pernr TYPE pa0007-pernr,
schkz TYPE pa0007-schkz,
END OF ty_pa0007.
*BEGIN OF ty_pa0002,
pernr TYPE pa0002-pernr,
nachn TYPE pa0002-nachn,
vorna TYPE pa0002-vorna,
midnm TYPE pa0002-midnm,
*END OF ty_pa0002.
Data Declaration *
DATA :
t_pa0001_pa0002 TYPE STANDARD TABLE OF ty_pa0001_pa0002 ,
w_pa0001_pa0002 TYPE ty_pa0001_pa0002 ,
t_pa0315 TYPE STANDARD TABLE OF ty_pa0315 ,
w_pa0315 TYPE ty_pa0315 ,
t_pa0007 TYPE STANDARD TABLE OF ty_pa0007 ,
w_pa0007 TYPE ty_pa0007 .
t_pa0002 TYPE STANDARD TABLE OF ty_pa0002 ,
w_pa0002 TYPE ty_pa0002 .
START-OF-SELECTION .
SELECT a~pernr
a~endda
a~begda
a~bukrs
a~werks
a~persg
a~persk
a~btrtl
a~abkrs
a~kostl
a~orgeh
a~plans
b~nachn
b~vorna
b~midnm
INTO TABLE t_pa0001_pa0002
FROM pa0001 AS a INNER JOIN pa0002 AS b
ON apernr = bpernr
WHERE a~pernr IN s_pernr
AND a~werks IN s_werks
AND a~orgeh IN s_orgeh
AND a~plans IN s_plans.
SORT t_pa0001_pa0002 BY pernr .
IF NOT t_pa0001_pa0002[] IS INITIAL .
SELECT pernr
kostl
lstar
werks
lifnr
ebeln
ebelp
lstnr
FROM pa0315
INTO TABLE t_pa0315
FOR ALL ENTRIES IN t_pa0001_pa0002
WHERE pernr = t_pa0001_pa0002-pernr
AND kostl = t_pa0001_pa0002-kostl
AND ebeln IN s_ebeln.
SELECT pernr
schkz
FROM pa0007
INTO TABLE t_pa0007
FOR ALL ENTRIES IN t_pa0001_pa0002
WHERE pernr = t_pa0001_pa0002-pernr.
SELECT pernr
nachn
vorna
midnm
FROM pa0002
INTO TABLE t_pa0002
FOR ALL ENTRIES IN t_pa0001
WHERE pernr = t_pa0001-pernr .
ENDIF.
PERFORM f_display_data.
FORM f_display_data.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'PERNR' 'PA0001'.
m_fieldcat 'NACHN' 'PA0002'.
m_fieldcat 'VORNA' 'PA0002'.
m_fieldcat 'MIDNM' 'PA0002'.
m_fieldcat 'BUKRS' 'PA0001'.
m_fieldcat 'WERKS' 'PA0001'.
m_fieldcat 'PERSG' 'PA0001'.
m_fieldcat 'PERSK' 'PA0001'.
m_fieldcat 'BTRTL' 'PA0001'.
m_fieldcat 'ABKRS' 'PA0001'.
m_fieldcat 'ORGEH' 'PA0001'.
m_fieldcat 'PLANS' 'PA0001'.
m_fieldcat 'SCHKZ' 'PA0007'.
m_fieldcat 'KOSTL' 'PA0315'.
m_fieldcat 'LSTAR' 'PA0315'.
m_fieldcat 'WERKS' 'PA0315'.
m_fieldcat 'LIFNR' 'PA0315'.
m_fieldcat 'EBELN' 'PA0315'.
m_fieldcat 'EBELP' 'PA0315'.
m_fieldcat 'LSTNR' 'PA0315'.
m_fieldcat 'BEGDA' 'PA0001'.
m_fieldcat 'ENDDA' 'PA0001'.
Display the list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = t_pa0001_pa0002.
ENDFORM. " F_DISPLAY_DATA_VBAK
FORM USER_COMMAND *
FORM user_command USING u_ucomm TYPE syucomm
us_selfield TYPE slis_selfield. "#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE t_pa0001_pa0002 INDEX us_selfield-tabindex INTO
w_pa0001_pa0002.
CHECK sy-subrc EQ 0.
ENDCASE.
ENDFORM. " USER_COMMAND
Hey,
Look at ur code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = <b>t_pa0001_pa0002</b>.
Here you're passing only the join table t_pa0001_pa0002. If you want to display the other tables as well, then u must have an internal table that has the columns of all the 3 tables. Then u need to buil;d the fieldcatalog accordingly and then display that table,
Cheers,
Sam
Similar Messages
-
How to show all available fields in the SQL Worksheet's Code Assist pop-up
I have table with many fields and wanted to scroll through the fields list by typing something like:
select a. from test a
The Code Assist pop-up (after the 'a.') that shows the field list shows '...' as last available field before '*'. Many fields are not shown on the pop-up. I have to click on the '...' field to tell the pop-up to refresh itself with a full list of fields. Is there a way that I can configure SQL Worksheet to always show all fields on the pop-up, instead of having to select '...' on every attempt to add a field to the select SQL?Sure, happens to everyone ;)
Not the case here, but often the OP gives credit to the first to respond rather than acknowledging everyone's effort and time invested, which of course is independent from posting order. Add that to the nicely conceived, but badly implemented reward point system. Should have moderators for that to work as it should. Sooo many questions remain unanswered and/or unrewarded. I even think you're the most underrated helping hand on the forum. Let's hope time will rectify all that...
Regards,
K. -
How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables
Hi Everyone,
Iam stuck with 1 problem please can any 1 help me if u know the solution.
Here is my problem:
How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).Thanks Nikhil. But I am fetching the values from the LOVCache.java.
I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
I mean to say can I write
unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
where LOVCache.entityTypeSelectionList is used to populate the drop down box.
Regards,
Aseet -
Table Maintainace generator not showing all the fields in table
Hello,
I generate table maintainace genrator for Z-Table and also create Tranaction code for that.
I have 27 fields in my Z-table but when I run tranaction code for table maintanance generator it shows only 8 fields.
I want to show all 27 fields in my tranaction code of table maintainace generator.
How I can Achieve this?
Please Suggest.
Thanks,
AmitHello Ram,
Thanks for your answer.
I increases lenght of screen and table control and activate function group.
But still in program PBO of screen it showing 8 fields as follows:
CHAIN.
FIELD ZPROJ_FIN_STATS-PSPID .
FIELD ZPROJ_FIN_STATS-GJAHR .
FIELD ZPROJ_FIN_STATS-MONAT .
FIELD ZPROJ_FIN_STATS-POSID .
FIELD ZPROJ_FIN_STATS-IS_REL .
FIELD ZPROJ_FIN_STATS-IS_TECO .
FIELD ZPROJ_FIN_STATS-IS_CLSD .
FIELD ZPROJ_FIN_STATS-LEG_STATUS .
MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
ENDCHAIN.
but Iwant total 27 field to show.
How I can achieve this?
Thanks,
Amit -
How to split all the fields of output ls-l from an internal table
Hi all,
Using ls-l command i have brought the file attributes of a file like its read and write permissions,creation date ,path etc in a internal table.
Now how to split all these fields from the internal table or what should be the splitting criteria.
The field contents of internal table are like this:
-rw-rw---- 1 devadm sapsys 18360 apr 29......so on
I want to split this into different fields.
Kindly suggest.
Thank You.Hi,
I think the delimiter will be space. For date alone (Apr 29) you need to concatenate after the string has been split.
Thanks and regards,
S. Chandramouli -
How to display all tables residing in my database
i'm using 10g express edition.
i'm developing a .net application using oracle
i want display table infomation in a datagrid
for that i need to select tables fromthe database using the interface given by them
in that i found server name field.....what it actually means?
also how to create a new database in 10g and how to display all tables residing in the database?
pls help me
thanking u
chaitanyauser11359516 wrote:
i want display table infomation in a datagrid
select owner||'.'||table_name owner_table_name
from all_tables
user11359516 wrote:in that i found server name field.....what it actually means?i'm not sute what you mean by server name field? if you refer to table column name see this code below:
select owner||'.'||table_name||'.'||column_name table_column_name,
decode(data_type,'VARCHAR',data_type||'('||to_char(data_length)||')',
'VARCHAR2',data_type||'('||to_char(data_length)||')',
'NUMBER',decode(data_scale,0,data_type||'('||to_char(data_precision)||')',
null,data_type,
data_type||'('||to_char(data_precision)||','||to_char(data_scale)||')'),
data_type) type,
nullable
from all_tab_cols
order by table_name, column_id -
How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9
I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
oRptRun=createobject("CrystalRuntime.Application")
oRptView=thisform.oleRptViewer
oRptOpen=oRptRun.OpenReport('MyReport.rpt')
oRptView.ReportSource=oRptOpen
oRptView.ViewReport
Inside the MyReport.rpt there is two subreport name :
1. MySubReport1
2. MySubReport2
My Question is :
How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
I try to using command :
oRptRun=createobject("CrystalRuntime.Application")
oRptView=thisform.oleRptViewer
oRptOpen=oRptRun.OpenReport('MyReport.rpt')
oRptSub=oRptOpen.OpenSubreport("MySubReport1")
oRptSub=oRptOpen.OpenSubreport("MySubReport2")
oRptView.ReportSource=oRptOpen
oRptView.ViewReport
but only show Main Report (view tab name : Preview)?
Did I miss any command before I call oRptView.ViewReport?Your right, there is only one tab to view the report.
To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
http://diamond.businessobjects.com/robhorne</a> -
How to show all the search result in a report page
I have a report page which the user can enter first or last name to find the matched employees. The current report only show maximum of 15 matched results. How to show all of them in one page if more than 15.
Also, the employee name on the report is a link, how to make the link to be conditional. ( I mean it can be a link or not based on another column)
Thanks.
JenHi, you can change the number of rows on the report definition page (15 is the default value)- that's also where you can change pagination and max. number of rows etc.
About the second question - you will have to use Case or Decode in your report query and have the value as link or not based on the condition column, something like:
Select Decode(condition_column, 'link_value', '<a href="f?p=YOUR_APP:PAGE_TO_LINK_TO:' || :SESSION || ':::::">display_column</a>' , display_column) From .....
Hope this helps. -
How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2
Thanks. That solved it. I had my doubts since I wasn't concerned about my lost bookmarks. I was concerned about the broken functionality. In any event, restoring from a backup solved both the functionality and the lost bookmarks. I appreciate the response!
-
How to show all the user entry variables in a workbook.
Hi,
My user need to see in the workbook all variables he had entered in the variable entry popup at the openning of the workbook.
I know how to show all the variables, included the hardcoded variable in the query (with a text element, select the checkbox "Display All Statics Filters"), but I need only the user entry variables.
There is a way to print only these variables?
Thank youThanks, but the problem is that this workbook is my Global default workbook used for all the queries. So I only want the user entry variables visible automaticly.
There is a way to do that ?
For information, i'm using Netweaver 7.
Thank you -
How to show all days of the year 1900
how to show all days of the year 1900
As you show days for any other year.
Do you want to catch us on the fact year 1900 wasn't a leap year?
Regards
Etbin
select to_date('1.1.' || :the_year,'DD.MM.YYYY') + level - 1
from dual
connect by level <= to_date('31.12.' || :the_year,'DD.MM.YYYY') - to_date('1.1.' || :the_year,'DD.MM.YYYY') + 1*** not tested ***
Message was edited by: Etbin
user596003 -
How to view all table of a database
How to view all table of a database created on a oracle 9.2/10g database management system.
How to view available tables of oracle dbms which comes by default with package.
Thank you so much in advance!
With Regards,
NiksYou posted the same question twice.
How to view all table of a database -
Hi gurus how to provide the table field validations
hi gurus how to provide the table field validations , plz help me
Hi,
Say you need to provide valdiation for WERKS(Plant) field.
Goto SE11. Find the domain of the field. (Say WERKS in our case.) now goto the domain, click on value range. Now at the bottom you will find the value table. Note this table (T001W).
In your report, at selection screen, you need to validate the field against this table. like this
At selection-screen,
select single werks from T001W where werks = p_werks.
if sy-subrc NE 0
message e000 with 'Plant not found'.
endif.
Reward points if useful. -
How to include all the fields of a Table into a Structure.
How to include a Complete Table into a Structure.
I want to include all the fields of KNA1 into a structure say W_KNA1(A local structure declared within a program)....How this can b acheived.
Thanks in Advance.if i want to use INCLUDE STRUCTURE.....how will it work.
TYPES : begin of ty_kna1,
INCLUDE STRUCTURE KNA1,
end of ty_kna1.
tell me this is correct stmt. -
seems <bc4juix:Table ....> tag by default shows the rows one by
one. I just need to know any attribute/way to change the default
to show all rows, or more than one row in each iteration.even <jbo:DataTable...> only shows one row. I'd to show all
rows retrieved. Please advice.
Maybe you are looking for
-
I emptied out my ipod, so it had no more songs on it and itunes says there is only 1.53 gb available, that 2.24 gb are used up -what is taking up that 2.24 gb space - when I put songs on, I can only fit 400+ songs on my mini using itunes - when I loo
-
I've downloaded the driver several times. rebooted - verify pref's - and it still gives me the same message. very very very very annoying. "Can't install the software for the Canon iP100 series because it is not currently available from the Software
-
MDS error while starting Admin server
Hi, I am getting below error while starting Weblogic Admin Server : [2012-02-06T20:53:34.247-05:00] [AdminServer] [ERROR] [] [oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Defa
-
Process Chain issue-Needs urgent Help
R/3 Master Data Main Chain Problem Description: When we trigger the process chain from SM64, the process chain fails at the step as shown below. There are no logs for the local chain i.e. the local chain fails without linking. If we manually schedule
-
Hello everybody! I hope not to bug you do to my frequent question but without your help I simply do not get past these little problems I have. I've been reading a lot about the jQuery and jQueryUI liabraries today and also use them by referencing the