How-to Dynamic Hierarchy Selection.
Hi guys,
does anyone know how to implement "Dynamic Hierarchy Selection"? I have a main hierarchy but would like to filter it further while loading the hierarchy.
E.g. I have a financial statement verison with both Balance Sheet and P/L items, i would like to separate the main into two new hierarchies, one BS and P/L hierarchies instead, apparently the infopackage allows you to write small codes to dynamically select which hierarhcy you want.
Cheers.
Hi,
We donot have this type selection at the time of upload. The thing we can do is upload both versions into BIW and in the report we can use Hierarchy variable to have dynamic selection of hierarchy.
with rgds,
Anil Kumar Sharma .P
Similar Messages
-
Ok I read this article and the selection is working. Is it possible to dynamically "Rename Hierarchy After Loading"?
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a03c23b1-1cb4-2d10-f1ae-9f5ed92be246?QuickLink=index&overridelayout=trueI had to modify RSLDPSEL-NEW_HIENM.
-
How to dynamic create Select SQL statements.
Hi frnds,
I want to make a SELECT statement in which all values I will get dynamically. Like i have two fields on selection screen, one for table name and one for field name. Now I need to make my ITAB according to the table selected and field name selected. So finally my ITAB will be having the field which I chosen from selection screen.
Now how can I make a dynamic ITAB and how to create a dynamic SELECT statement?
It wud be great if you can help me.
Thanks
ArpitHere is a sample program....
This will get you started in programming a dynamic internal table as well as dynamic select.
report zrich_0002.
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: alv_fldcat type slis_t_fieldcat_alv,
it_fldcat type lvc_t_fcat.
type-pools : abap.
data : it_details type abap_compdescr_tab,
wa_details type abap_compdescr.
data : ref_descr type ref to cl_abap_structdescr.
data: new_table type ref to data,
new_line type ref to data,
wa_it_fldcat type lvc_s_fcat.
selection-screen begin of block b1 with frame title text .
parameters: p_table(30) type c.
selection-screen end of block b1.
* Get the structure of the table.
ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
it_details[] = ref_descr->components[].
loop at it_details into wa_details.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = wa_details-name .
wa_it_fldcat-datatype = wa_details-type_kind.
wa_it_fldcat-intlen = wa_details-length.
wa_it_fldcat-decimals = wa_details-decimals.
append wa_it_fldcat to it_fldcat .
endloop.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
* Select Data from table.
select * into corresponding fields of table <dyn_table>
from (p_table).
* Write out data from table.
loop at <dyn_table> into <dyn_wa>.
do.
assign component sy-index of structure <dyn_wa> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <dyn_field>.
else.
write: <dyn_field>.
endif.
enddo.
endloop.
Regards,
Rich Heilman
Message was edited by: Rich Heilman -
How to dynamically and selectively update DSO based on values in a csv file
Hi,
I'm loading a csv file into a DSO. When loading the flat file in FULL mode I need to do a pseudo delete of records that were previously loaded but are not in the new flat file.
Is it possible to dynamically determine the unique set of records (say Pk1, Pk2, Pk3) in the csv file and then set all the corresponding DSO records' quantities to 0 - maybe in a start routine?? After that, I can load the csv file with the correct quantities (effectively update and inserts). The net result should be that the change log only be updated through to the next DSO.
Example: Load 10 records yesterday. Today reload 9 records. 10th records must have quantity set to 0. Other 9 records will have quantity values set to those in today's csv file - some will be the same & some will be different. The net change log of all 10 records must be loaded into the next DSO.
Any suggestions on how to do this logic?
Thanks!Hi Gregg,
You can create one transformation from the DataStore to itself. In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse). Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
I hope this helps you.
Regards,
Maximiliano -
How To Dynamically Set Selected Item in SELECT List in DW Object
Hi!
I hope I can explain this situation halfway decently...
I am creating a DW Object that captures specific metadata. In
this case, in the form I have a HTML <SELECT> list of
languages. When the language metadata attribute is first captured
in the form, the application adds the metadata
<meta name=language content="EN">
to the DW document correctly.
Now suppose the user wants to update their metadata.in order
to change the language attribute. I would like the metadata form
when it redisplays to have "EN" selected in the language attribute,
so that the user knows what the current value of the language
attribute is. If the user changes the language attribute to,say,
Japanese, the next time the metadata form displays, I would like
have "JP" selected in the form, again so the user knows what the
current value of the attribute is.
I looked at several of the well-known metadata extensions for
DW, but none of them exhibit the behavior I am looking for (usually
they have English as the default in the form)
This is probably easy, but I am just not seeing it. Thanks
for any help!
Kat---Hi Envision3D
Thank you for your reply. Unfortunately, none of this
information is stored in a database. It simply gets written as
<meta> tags in an HTML file. When the object is used again,
it reads the HTML file and pre-populates the form for the benefit
of the user. The application pre-populates the text-type inputs
correctly. It does not pre-populate the <select> inputs
correctly. It just leaves them blank. I was hoping to be able to
pre-populate the <select> form element with the selection
that is currently found in the <meta> tag.
<meta name="program" content="HR"> <==== meta tag
found in HTML file
Program: +-----------+
| HR | <==== pre-populated <select> form field
+-----------+
Thanks again!
Kat--- -
How to dynamically add field name in where clause of select query in web dynpro?
Hello,
Can any body tell me how i can use select query with dynamic wheere condition.
i have a requirement like there are multiple input fields and i want to select data from two database
and condition may vary .Hi
In the where clause you need to write like
WHERE NAME LIKE 'DE%'
Regards
Sudheer -
How to use Hierarchy Filter Selection?
Hi, experts !
Could anyone give me a detail for how to use hierarchy filter selection ?
When i locate a Hier filter selection in the template and execute it, a false info
accured while filtering data,and the IE inferred the hier node object was missing.
Then i add another hier filter in the same template, and the secend runs well, however the first one didn't.
At last, i hide the first one, but the second one can't either.
Help me !!!
Thx in advance!Thanks Toja !
Sorry to reply so late !
The error is line: 51. error:'document.HIERARCHY_MENU_1.NODEID' is null or is not the object.
The code on line of 51 says:document.HIERARCHY_MENU_1.NODEID.value = i_node;
Could you please give me some documents on the topic of Hierarchy Filter Selection ? -
How to dynamic select based on runtime value ?
how to dynamic select based on runtime value ?
I want to write a select function, which do selecting based on parameters. eg,
CREATE OR REPLACE FUNCTION myfunction
(tableName VARCHAR2, pkName VARCHAR2, pkValue VARCHAR2, requestString VARCHAR2)
RETURN VARCHAR2 AS
BEGIN
select requestString from tableName where pkName=pkValue;
RETURN NULL;
END;
myfunction('users', 'user_id', '100', 'user_name'); it will select 'user_name' from table 'users' where 'user_id' = '100'.
This way could save lots of coding. but it can't pass compiler. how to work out ?
Thanks.While this may save code, if used frequently it will be ineffecient as all [explicative deleted]. The danger is that it would be used even for repeatable statements.
This mode of operation ensures that every statement [calling the funciton] needs to be reparsed, which is extremely expensive in Oracle (in CPU cycles, recursive SQL and shared pool memory).
Such reparsing is rarely a good thing for the environment ... it could easily lead to buying more CPU (bigger box) and therefore adding more Oracle license ... which could quickly exceed the typical developer's salary.
However - if you really, really want to do this, look up 'execute immendiate' in the PL/SQL manuals. -
Script logic - how to use a selection variable within an allocation logic
Hi,
I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
If we hard code the members it works fine:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
So if we start with write the following logic, it does not work anymore:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
regards
Dries
solved it ...
Edited by: Dries Paesmans on Feb 22, 2009 8:31 PMHi Dries,
Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
*DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
Regards,
Tim -
Dynamic Hierarchy Reporting function
Hi All,
i was looking through the help and found:
You can choose also whether to view dynamic hierarchies or standard Groups and Entity dimensions in the current view by making the appropriate selecting in the Current View selector. Thereafter, when the application type is consolidation, the dynamic hierarchy replaces Groups and Entity in the Current View. In addition, when you select the Group dimension in the Current View, the dynamic hierarchy stored with ownership application displays instead of the normal dimension hierarchy.
from http://help.sap.com/saphelp_bpc75/helpdata/en/5A/69200C88AA40C9B18844A25259F147/frameset.htm
under dynamic hierarchies > reporting on dynamic hierarchies.
My question is:
The help indicates there is a 'setting' to make in the current view selector, thereafter when the app type is consolidation, the dynamic hierarchy replaces group/entity - where is setting and how do i set it?
I have bpc 7.5 sp4
Edited by: Hiren Amin on Dec 16, 2010 3:13 PMHi Hiren,
I'm afraid I can't give you good news, as we have the same issue (same version). We have been told by SAP that this is bug in the MS version, which I believe they are working on, however no news as yet as to when they expect to issue a fix for it.
Thanks,
Steve -
Hi Friends,
When I opened the Dynamic Hierarchy to edit ( Esubmit-->Manage open Dynamic Hierarchy) .. I am getting the error.
This key is already associate with an element of this collection.
Pls send your thoughts on this..
Regards
CSM ReddyHi Guys,
I found the following relevant notes for this error.
Visual Basic for Applications Reference - Visual Studio 6.0
This key is already associated with an element of this collection (Error 457)
A key is a string specified in the Add method that uniquely identifies a specific member of a collection. This error has the following cause and solution:
u2022 You specified a key for a collection member that already identifies another member of the collection.
Choose a different key for this member.
For additional information, select the item in question and press F1.
But how to choose a different key for this member........
Any thoughts on this pls..........
Regards
CSM Reddy -
How to dynamically determine Receivers within BPM
Im trying to design a way to determine my receivers within my BPM process during runtime. My Scenario is as follows:
SAP IDOC
V
XI
XI uses JAVA Mapping MT1 to determine vendors and if customer receives PIDX
JAVA Mapping MT2 to creates the PIDX output file if required
V
SENDs to required Vendor (PIDX if required otherwise email)
My problem is how to dynamically determine the appropriate receiving vendor for my PIDX.
I can not use the condition editor on the standard Receiver Determination because the output message (PIDX) doesn't have specific enough information to determine the vendor.
Other than the customer number there are no other values and we don't want to use customer number because each vendor can have multiple customer numbers (hundreds).
I've tried various attempts but none seem to work. This could also be because I have limited knowledge of BPMs and this is my first complex development. Below are the different attempts I've made at dynamically determining the receiver. Any input would be appreciated.
Receiver Scenario 1
I developed an interface mapping with MT1 as input and the SAP Receiver Determination as output. The problem is for me to use this, the interface mapping had to reference the PIDX output (MT2 instead of MT1) which has no data that I can use to determine the receiver.
Receiver Scenario 2
I added a receiver step right before my send step and used the receiver list. This appears to send the PIDX to everyone in the list and there is no way to evaluate or eliminate a name from the list.
Receiver Scenario 3
I created a context object in the Integration Builder and assigned it to a field in MT1. I then added a switch step with a branch for each vendor. Within each specific branch there is a Send step that has the context object name I created in the "Send Context" field. However, on the configuration side Im unable to access the context object which I created on the design side. Whenever I open the condition editor and select the radiobutton for "Context Object" the list does not include the context object I created in the Integration Builder.Hi,
Try using the enhaced receiver determination concept.
Maybe based on certain field values you can write a UDF which calculates the receiver.
Try this Blog out
Link : [
http://help.sap.com/saphelp_nw70/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm]
Regards,
Abhishek
Award if helpful. -
Dynamic hierarchy in parent child hierarchy table??
Do you have any experience to handle the requirement of dynamic hierarchy in universe/webi?
We have some data in parent child hierarchy as below u201CCustomeru201D table.
Customer
Parent Child
Z A
Z B
A AA
B BB
AA AAA
For example, Company Z is the parent company of Company A.
Another table, Amount is the amount value of different Customers.
Amount
ID Amt
AA 10
AAA 1
BB 2
Is there any functionality in Universe designer to build related Classes and objects, So that the web intelligence documents represent the following report with the drilling results?
When we want to see the ID and Amt, the expected result should be:
Z 13
when we drill down Z
the result should be:
A 11
B 2
when we drill down A:
the result should be:
AA 11
notes **
the level of hierarchy is dynamic
Any suggestion is appreciated. Thanks.Hi,
The only way to do it is to create recursive derived table that flatten you parent child hierarchy with a given maximum depth.
Here is a sample I built a long time ago to flatten a parent-child hierarchy on Employees table in Foodmart database (SQL Server).
Didier
SELECT DISTINCT
Z.employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
A.supervisor_id_6,
A.employee_id_6,
A.full_name_6,
Z.supervisor_id AS supervisor_id_7,
Z.employee_id AS employee_id_7,
Z.full_name AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
Z.supervisor_id AS supervisor_id_6,
Z.employee_id AS employee_id_6,
Z.full_name AS full_name_6
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
WHERE A.employee_id_5 = Z.supervisor_id
) A
WHERE A.employee_id_6 = Z.supervisor_id
UNION
SELECT DISTINCT
A.employee_id_6 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
A.supervisor_id_6,
A.employee_id_6,
A.full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
Z.supervisor_id AS supervisor_id_6,
Z.employee_id AS employee_id_6,
Z.full_name AS full_name_6
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
WHERE A.employee_id_5 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_5 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
A.supervisor_id_5,
A.employee_id_5,
A.full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
Z.supervisor_id AS supervisor_id_5,
Z.employee_id AS employee_id_5,
Z.full_name AS full_name_5
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
WHERE A.employee_id_4 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_4 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
A.supervisor_id_4,
A.employee_id_4,
A.full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
Z.supervisor_id AS supervisor_id_4,
Z.employee_id AS employee_id_4,
Z.full_name AS full_name_4
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
WHERE A.employee_id_3 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_3 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
A.supervisor_id_3,
A.employee_id_3,
A.full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
Z.supervisor_id AS supervisor_id_3,
Z.employee_id AS employee_id_3,
Z.full_name AS full_name_3
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
WHERE A.employee_id_2 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_2 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
A.supervisor_id_2,
A.employee_id_2,
A.full_name_2,
NULL AS supervisor_id_3,
NULL AS employee_id_3,
NULL AS full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
Z.supervisor_id AS supervisor_id_2,
Z.employee_id AS employee_id_2,
Z.full_name AS full_name_2
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A
WHERE A.employee_id_1 = Z.supervisor_id
) A
UNION
SELECT DISTINCT
A.employee_id_1 AS employee_id,
A.supervisor_id_1,
A.employee_id_1,
A.full_name_1,
NULL AS supervisor_id_2,
NULL AS employee_id_2,
NULL AS full_name_2,
NULL AS supervisor_id_3,
NULL AS employee_id_3,
NULL AS full_name_3,
NULL AS supervisor_id_4,
NULL AS employee_id_4,
NULL AS full_name_4,
NULL AS supervisor_id_5,
NULL AS employee_id_5,
NULL AS full_name_5,
NULL AS supervisor_id_6,
NULL AS employee_id_6,
NULL AS full_name_6,
NULL AS supervisor_id_7,
NULL AS employee_id_7,
NULL AS full_name_7
FROM employee Z,
SELECT DISTINCT
supervisor_id AS supervisor_id_1,
employee_id AS employee_id_1,
full_name AS full_name_1
FROM employee
WHERE supervisor_id = 0 OR supervisor_id IS NULL
) A -
Hierarchy selection tab missing in infopackage
Hi Experts,
i am looking how to load multiple hierarchies to Bi so inorder to know available hierarchies from OLTP in hierarchy selection tab in infopackage which was not available at all. i had only data selection tab.i am using version Bi 7.0
how can i found hierarchy selection tab in infopackage
Regards,
narasimha.Hierarchy loading is the same for info object which is created under the info object itself.
loading is uploading the data to the hierarchy, creating hierarchy is you will be maintaing the structure of the hierarchy under that info object
Are you sure you have Hierarchy maintained for your info object?
If the hierarchies are maintained you will find the Bell type symbol under the info objects in info providers tab.
As told by mti - drill down till you find the data source --right click on it and select create info package - here you can find the tab hierarchy selection tab (which is the second tab in that screen).
Check the below link to know more abt hierarchies
http://help.sap.com/saphelp_nw04/helpdata/en/0e/fd4e3c97f6bb3ee10000000a114084/frameset.htm -
How to dynamic field insert into intenal table?
hi friends
this is my urgent requirements .... how to dynamic field insert into internal table if it possible please tell me
thanks & regards
pauldharmaHi,
Go through this
REPORT yusmm_text1 NO STANDARD PAGE HEADING
LINE-SIZE 199.
T A B L E S
TABLES: MARA,
MAKT,
THEAD.
GLOBAL TYPE-POOLS
TYPE-POOLS : SLIS.
GLOBAL TYPES
TYPES : BEGIN OF TP_FINAL,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
SPRAS TYPE MAKT-SPRAS,
LTXT(2000) TYPE C ,
SRNO TYPE N ,
END OF TP_FINAL.
TYPES : BEGIN OF TP_T002,
SPRAS TYPE T002-SPRAS,
LAISO TYPE T002-LAISO,
SRNO TYPE N ,
END OF TP_T002.
TYPES : BEGIN OF TP_MARA_MAKT,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
SPRAS TYPE MAKT-SPRAS,
MAKTX TYPE MAKT-MAKTX,
END OF TP_MARA_MAKT.
Types: BEGIN OF tp_matnr,
matnr TYPE mara-matnr,
END OF tp_matnr.
GLOBAL ELEMENTARY VARIABLES
DATA : gv_date TYPE sy-datum.
DATA : gv_repid TYPE sy-repid.
DATA : g_var1(10) TYPE C.
DATA : gv_index TYPE sy-tabix.
DATA: gv_strg TYPE string,
gv_strg1(2000) TYPE C.
DATA : gv_lang TYPE sy-langu.
DATA : g_v(3) TYPE N .
DATA : gv_lines(3) TYPE N .
DATA : gv_var(3) TYPE N .
DATA : gv_var1(3) TYPE N.
DATA: gv_str TYPE STRING.
DATA: gv_str1 TYPE STRING.
DATA : gv_li TYPE I,
gv_lit TYPE I,
gv_lin TYPE I.
DATA: g_var11(3) TYPE N,
gv_li1(3) TYPE N,
g_var2(3) TYPE N.
DATA : gv_i1 TYPE I.
DATA : gv_i TYPE I.
DATA: gl_lenght TYPE I.
GLOBAL STRUCTURES
DATA: T_NEWTABLE TYPE REF TO DATA,
T_NEWLINE TYPE REF TO DATA,
T_FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
T_FLDCAT TYPE LVC_T_FCAT,
WA_IT_FLDCAT TYPE LVC_S_FCAT,
WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV,
WA_COLNO(2) TYPE N,
WA_FLNAME(5) TYPE C,
L_LT TYPE SLIS_LAYOUT_ALV.
GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
DATA : IG_MARA_MAKT TYPE STANDARD TABLE OF TP_MARA_MAKT,
WG_MARA_MAKT TYPE TP_MARA_MAKT.
DATA : IG_T002 TYPE STANDARD TABLE OF TP_T002,
WG_T002 TYPE TP_T002.
DATA : IG_FINAL TYPE STANDARD TABLE OF TP_FINAL,
WG_FINAL TYPE TP_FINAL.
data : IG_MATNR TYPE STANDARD TABLE OF TP_MATNR WITH HEADER LINE,
WG_MATNR TYPE TP_MATNR.
DATA:BEGIN OF IG_THEAD OCCURS 0.
INCLUDE STRUCTURE THEAD .
DATA: END OF IG_THEAD.
DATA:BEGIN OF IG_TLINE OCCURS 0.
INCLUDE STRUCTURE TLINE .
DATA:END OF IG_TLINE.
FIELD-SYMBOLS
FIELD-SYMBOLS: <T_DYNTABLE> TYPE STANDARD TABLE,"Dynamic internal
"tablename
<FS_DYNTABLE>, "Field symbol to create work area
<FS_FLDVAL> TYPE ANY. " Field symbol to assign values
COMPULSORY
FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
<FS_DATA1> TYPE REF TO DATA,
<FS_2> TYPE STANDARD TABLE,
<FS_22> TYPE STANDARD TABLE,
<FS_1>,
<FS_11>,
<F>,
<FA>,
<LWA_LINE_WA>,
<LWA_LINE_WA1>.
------- Create Dyn Table From FC
DATA: LT_DATA TYPE REF TO DATA,
LT_DATA1 TYPE REF TO DATA,
LWA_LINE TYPE REF TO DATA,
LWA_LINE1 TYPE REF TO DATA,
LI_FIELD_CAT TYPE LVC_T_FCAT,
LWA_FIELD_CAT TYPE LVC_S_FCAT.
PARAMETERS & SELECT-OPTIONS
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_SPRAS FOR MAKT-SPRAS NO INTERVALS DEFAULT 'EN'
OBLIGATORY ,
S_MATNR FOR MARA-MATNR,
S_MTART FOR MARA-MTART.
PARAMETERS: GP_SIZE TYPE I DEFAULT '200'.
SELECTION-SCREEN : END OF BLOCK B1.
INITIALIZATION
INITIALIZATION.
gv_repid = sy-repid.
gv_date = sy-datum.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
IF GP_SIZE < 0.
MESSAGE E002(00).
ENDIF.
IF GP_SIZE > 50000.
MESSAGE W130(26) WITH TEXT-004.
SET CURSOR FIELD 'gp_size'.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM DATA_FETCH.
PERFORM READ_DATA_TO_FINAL.
SORT ig_final BY matnr spras.
gv_lin = gv_li.
gv_li = gv_li - 2.
LOOP AT ig_final INTO wg_final.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Material Number'.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Authorization Group'.
g_VAR11 = wg_final-srno + 2.
gv_li1 = gv_li1 + 2.
MOVE : g_var11 TO gv_i1.
ASSIGN COMPONENT g_var11 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'MatDesc'.
g_var2 = g_var11 + gv_lines.
ASSIGN COMPONENT g_var2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'BasicData'.
APPEND <LWA_LINE_WA1> TO <FS_22>.
EXIT.
ENDLOOP.
LOOP AT ig_final INTO wg_final.
AT NEW matnr.
gv_index = sy-tabix.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-matnr.
ENDAT.
AT NEW MATNR.
GV_INDEX = SY-TABIX.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-matnr.
ENDAT.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-begru.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-begru.
gv_var = wg_final-srno + 2.
gv_li = gv_li + 2.
MOVE : gv_var TO gv_i.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-maktx.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-maktx.
gv_var1 = gv_var + gv_lines .
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-ltxt.
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-ltxt.
AT END OF matnr.
APPEND <LWA_LINE_WA> TO <FS_2>.
CLEAR <LWA_LINE_WA>.
ENDAT.
AT END OF matnr.
APPEND <LWA_LINE_WA1> TO <FS_22>.
CLEAR <LWA_LINE_WA1>.
ENDAT.
ENDLOOP.
PERFORM display..
*& Form data_fetch
text
--> p1 text
<-- p2 text
FORM DATA_FETCH .
SELECT matnr
from mara up to gp_size rows
appending corresponding fields of table ig_matnr
where matnr in s_matnr
and mtart in s_mtart.
loop at ig_matnr.
SELECT MARA~MATNR
MARA~BEGRU
MARA~MTART
MAKT~SPRAS
MAKT~MAKTX FROM MARA INNER JOIN MAKT
ON MARAMATNR = MAKTMATNR
appending corresponding fields of TABLE ig_mara_makt UP TO GP_SIZE
ROWS
WHERE makt~spras IN s_spras
AND mara~matnr IN s_matnr
AND mara~mtart IN s_mtart
AND mara~matnr EQ ig_matnr-matnr.
endloop.
IF sy-subrc = 0.
SORT ig_mara_makt.
ENDIF.
ENDFORM. " data_fetch
*& Form read_data_to_final
text
--> p1 text
<-- p2 text
FORM READ_DATA_TO_FINAL .
LOOP AT ig_mara_makt INTO wg_mara_makt .
wg_final-MATNR = wg_mara_makt-MATNR.
wg_final-BEGRU = wg_mara_makt-BEGRU.
wg_final-MTART = wg_mara_makt-MTART.
wg_final-SPRAS = wg_mara_makt-SPRAS.
wg_final-MAKTX = wg_mara_makt-MAKTX.
READ TABLE ig_t002 INTO wg_t002 WITH KEY spras = wg_final-spras.
IF sy-subrc = 0.
wg_final-srno = wg_t002-srno.
ENDIF.
CLEAR ig_thead[].
ig_thead-TDOBJECT = 'MATERIAL'.
ig_thead-TDNAME = wg_final-matnr.
ig_thead-TDID = 'GRUN'.
ig_thead-TDSPRAS = wg_final-spras.
CALL FUNCTION 'TEXT_READ'
EXPORTING
I_HEADER = IG_THEAD
I_READONLY = 'X'
IMPORTING
E_HEADER = IG_THEAD
TABLES
T_LINES = IG_TLINE[]
EXCEPTIONS
NOTFOUND = 1.
IF sy-subrc EQ 0.
LOOP AT ig_tline.
gv_strg = ig_tline-tdline.
IF gv_strg1 <> ' '.
CONCATENATE gv_strg1 ';' gv_strg INTO gv_strg1.
ELSE.
gv_strg1 = gv_strg.
ENDIF.
ENDLOOP.
wg_final-ltxt = gv_strg1.
APPEND wg_final TO ig_final.
CLEAR wg_final.
gv_strg1 = ' '.
ELSE.
APPEND wg_final TO ig_final.
ENDIF.
ENDLOOP.
ENDFORM. " read_data_to_final
" read_data_to_final
*& Form layout
text
--> p1 text
<-- p2 text
FORM LAYOUT .
CLEAR L_LT.
L_LT-ZEBRA = 'X'.
L_LT-COLWIDTH_OPTIMIZE = 'X'.
L_LT-WINDOW_TITLEBAR = 'MATERIAL DETAILS'.
ENDFORM. " layout
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
SELECT SPRAS
LAISO FROM t002 INTO CORRESPONDING FIELDS OF TABLE ig_t002
WHERE spras IN s_spras.
DESCRIBE TABLE ig_t002 LINES gv_lines.
LOOP AT ig_t002 INTO wg_t002.
g_v = g_v + 1.
Wg_t002-srno = g_v.
MODIFY ig_t002 FROM wg_t002 TRANSPORTING SRNO.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'MD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'BD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
MOVE 'MATNR' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Material No'.
WA_IT_FLDCAT-INTLEN = 18.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 1.
MOVE 'BEGRU' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Authorization Group'.
WA_IT_FLDCAT-INTLEN = 4.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 2.
DESCRIBE TABLE T_FLDCAT LINES gv_li.
ASSIGN LT_DATA TO <FS_DATA>.
Creating the Dynamic Internal Table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA> " Dynamic Internal Table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA>->* TO <FS_1>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_1> TO <FS_2>.
Creating a Workarea
CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
LOOP AT T_FLDCAT INTO WA_IT_FLDCAT.
WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
WA_IT_FLDCAT1-TABNAME = WA_IT_FLDCAT-TABNAME.
WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-SELTEXT.
WA_IT_FLDCAT1-REF_TABNAME = 'MARC'.
APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
ENDLOOP.
ASSIGN LT_DATA1 TO <FS_DATA1>.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA1> " Dynamic Internal table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA1>->* TO <FS_11>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_11> TO <FS_22>.
Creating a Workarea
CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
ENDFORM. " fieldcat
*& Form show
text
--> p1 text
<-- p2 text
FORM Display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = GV_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = L_LT
IT_FIELDCAT = T_FLDCAT1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = <FS_2>
EXCEPTIONS
PROGRAM_ERROR = 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. " display
FORM PF_STATUS_SET USING RS_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'DISPLAY' .
ENDFORM. "PF_STATUS_SET
*& Form Name: user_command *
*& Form Desc: For Handling USER_COMMAND *
FORM USER_COMMAND USING IF_UCOMM TYPE SY-UCOMM
IS_SELFIELD TYPE SLIS_SELFIELD.
CASE IF_UCOMM.
WHEN 'DOWNLOAD'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'Data download to excel'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER =
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'C:\Material-Text.xls'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = 'X'
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = 'X'
IMPORTING
FILELENGTH = GL_LENGHT
TABLES
DATA_TAB = <FS_22>
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF GL_LENGHT NE 0.
MESSAGE S398(00) WITH 'DATA downloaded to EXCEL'.
ENDIF.
Thanks
ENDCASE.
ENDFORM. "user_command
Maybe you are looking for
-
Is there a way to rotate canvas in FCP?
I've been told there is now way to rotate the cavas window 90 degrees. I'm assuming that is true. Anyone, have a solution. I'm editing 9x16 and I've been just turning my monitor on it's side. I'd like another way. I might not get it. Any suggestions?
-
Premiere Pro CS4 CRASHING ON START UP
When I start premiere pro it will begin loading and then open the window. In the window the screen is white with an hourglass loading symbol. If I click anywhere in the window Premiere stops responding. I can't end the task in Windows Task manger, o
-
Types and graphics displayed incorrect in Safari with a second User account
With my own user account (Admin) Safari works very well. With the second user account I have problems to display Websites correctly. They are only displayed in capital letters and graphics are not loaded. At first I was thinking it depends on the adm
-
Types of method calls in OO ABAP
Hai all, Is there call by value and call by reference is there in OO ABAP or not. Regards, Sreevathsava.G Moderator message: please search for available information before asking. locked by: Thomas Zloch on Aug 12, 2010 2:35 PM
-
Uploaded site from iWeb, not visible on Safari, only Netscape and Explorer
I uploaded my web page that I created with iWeb. It is viewable from Explorer and Netscape but NOT from Safari. What's up? This was created on a Mac, so there should be no problem. Here is the URL: http://home.comcast.net/~kardboardkid