Inserting titles between multiple dynamic EPM reports
Hi,
I am currently working on some templates where there are multiple dynamic EPM reports with shared column dimensions and multiple dimensions in the rows. I am using EPM Add-in SP21 patch 1.
We would like to have a section title appearing between the reports, I have tried a number of methods but have not found a solution that produces quality results.
Methods tried:
1. A local member on the row inserted at the start of the second report. The local member text appears in the right most row dimension column which is not the right place for a title. Also the titles for the dimension rows are not copied.
2. Insert a dummy member and override the member name. There are a couple of problems with this method, subsequent dimension ID's are populated and local members are also applied to this member.
3. EPMInsertCellsBeforeAfterBlock. I only managed to get this to copy a single cell into the data columns, not the row dimension columns.
4. Use VBA to add a title. The API GetDataTopLeftCell will return the starting position of data in a specific report. This can then be used to insert text into the previous line as a title. The disadvantage here is that VBA is being used but it can be used to produce the required results though you need to handle formatting and any password protection within the VBA.
I imagine that this is quite a common requirement. Ideally I would like to solve this without resorting to VBA or some exotic workaround.
Any suggestions appreciated.
Cheers,
Mark
Dear Vadim
I want results similar to what I have achieved using VBA. Where I have one row for column titles, which I am copying using Excel formulas, these should appear on every column including the dimension columns. On the row above this should be a subsection title, in this example this is "Bezüger"
The screen shots contain two reports, one below the other with shared column axis. The second report has been shifted down by a couple of rows to introduce a break between the reports.
Using VBA I inserted titles onto two rows, with a section title above a repeat of the original column header.
The best that I have achieved using local members resulted in a title being on the right most column, and there being no way to put title column header above the dimension columns.
I have played around with all the options for the local member but find no way to make the title appear in the left most column.
In this screen shot, the local member is disabled, because I have replaced it with the VBA solution.
I hope that the updated screen shots make this clearer to you.
Regards,
Mark
Similar Messages
-
Share Data Source between multiple report projects in Microsoft SQL Server 2012 Reporting Services
I have a reports solution in 2012 which contains multiple report projects one each for target deployment folder and we use TFS 2012 for report deployment.
We have a template project which has a bunch of template reports and all the datasources used in different reports.
When I develop a report, I cannot "Preview" in TFS but, for deploy this used to work fine util the reports solution was in TFS 2010 & Visual Studio 2008 R2. Since we moved to TFS 2012 & SSRS 2012 not being able to deploy till I create all
the necessary datasources for each project and now all the developers complaining that they cannot develop reports in TFS itself as they cannot preview (this problem was existing previously) and now not being able to deploy as it errors for each report "Could
not find specified rds file". I tried messing around with the .rptproj file DataSources tag that did not help either by modifying it like below.
<DataSources>
<ProjectItem>
<Name>DB.rds</Name>
<FullPath>Template\Data Source\DB.rds</FullPath>
</ProjectItem>
</DataSources>
Is there a way I could share a Data Source between multiple projects in Microsoft SQL Server 2012 Reporting Services?
Thanks in advance.............
IoneHi ione721,
According to your description, you want to create a shared data source which works for multiple projects. Right?
In Reporting Services, A shared data source is a set of data source connection properties that can be referenced by multiple reports, models, and data-driven subscriptions that run on a Reporting Services report server. It must be within one project.
We can't specify one data source working for multple projects. In this scenario, we suggest you put those reports into one project. Otherwise you can only create one data source for each project.
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Set Report Title in Center Dynamically
I have 3 crosstabs in WEBI report and the column of those tables are changing dynamically. So how can I set my report title in center when the report is changed.
Please help me.
Thanks in advanceYou cannot do it unfortunately. It can only be achieved in horizontal and vertical tables.
-
Multiple Parameter Dynamic Query/Report
I'm very much a newbie to both APEX and SQL. I want to create a page with two regions, one used to hold parameters (LOV Select Lists), and one to reflect a dynamic SQL report including filtering the results using the values of the items in the select lists.
I can do this with one Parameter/LOV select list - but am not clear on how to code for multiple parameters.
Can someone give me an example on how to code the query, to include multiple parameters (P1_Empl, P1_AssetNo, P1_AssetType, etc)? The query with 'null' parameters/filters gives you all records; with any or many parameters acting as filters the query and resulting report would reflect the value of the filters.
In addition, is there a specific type of region that needs to be used for the report region?
Implied is the question - how do you handle the initial page view, so no error messages are seen - I'd like to get all records as a default.
Thanks
Richsbkenned,
The referenced sql for that report gives me problems.
[ P3_Department_ID is the LOV of departments ]
[ Null allowed and null return value is -1 ]
<code>
SELECT e.EMPLOYEE_ID,
e.FIRST_NAME,
e.LAST_NAME,
e.HIRE_DATE,
e.SALARY,
e.COMMISSION_PCT,
calc_remuneration(salary, commission_pct) REMUNERATION,
e.DEPARTMENT_ID,
d.DEPARTMENT_NAME
FROM OEHR_EMPLOYEES e,
OEHR_DEPARTMENTS d
WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID(+) AND
(e.DEPARTMENT_ID = :P3_DEPARTMENT_ID or
(e.DEPARTMENT_ID is null and nvl(:P3_DEPARTMENT_ID,'-1') = '-1'))
</code>
The where clause: I'm guessing it is checking e.deptno = d.deptno
but then what is (+)?
can I use the '(+) and' to add on sections for each select list/parameter?
In the paran part of the where clause, I get the first part and the use of 'or' - but I'm not sure what the last statement is doing.
e.deptno is null AND ?? if there is a null value in P3_Department_ID return -1 otherwise return -1 ??
I'm lost at that point as I clearly don't understand the syntax.
Would you suggest multiple clauses in a where statement in order to add multiple filter values, and how do I handle nulls so those filters are not used/relfected?
I am not using a self submitting LOV select list - I am using a button to refresh the query region manually
I am comfortable with using an interactive report, but that interface is not what I need to present.
As I indicated - I'm weak in the SQL area and need an example on how to code this type of query.
Thanks.
Rich -
Show inside dynamic text the title for multiple images on mouseover
I have 25 animated movieclips dragged on the stage and they have similar instance names for easier manipulation purposes inside programming using loops. The instance names look like this: image0, image1, image2 and so on.
Each time I go mouseover on one of these unique images I want to show the unique title of that image using for all titles just one dynamic text container named imageTitle.
I have succeeded to make this work image by image but this would require me to copy paste and modify for each image the following code.
image0.onRollOver = function() {
imageTitle.text = "First image title";
imageTitle.textColor = 0x000000; // setting the text color here
image0.onRollOut = function() {
imageTitle.text = "Choose an image";
imageTitle.textColor = 0x000000;
Question: The above code would work but seems redundant to me. Since I have similar instance names (image0, image1, ....,image24), how can I put this code inside a loop or something in order to work for all images without repeating this code 25 times.
Update: I have added an array to the project that contains all the titles:
var imagesTitles = new Array("First image title", "Second image title", .... );imageTitle.textColor=0x000000;
for(var i:Number=0;i<imagesTitles.length;i++){
this["image"+i].ivar = i; // key step
this["image"+i].onRollOver=function(){
imageTitle.text = imagesTitles[this.ivar]; // key step used here
this["image"+i].onRollOut=function(){
imageTitle.text="Choose an image"; -
How to show multiple dynamic tables on a single screen?
right now im displaying alv for singlr attribute of dimension.
eg for dimension PRODUCT attribute PROFITCENTER im displaying in alv when user executes it.
but the requirement is that multiple attributes can be there so multiple tables is to be displayed on a single screen.
User basically wants to see data of all attributes. if there are 10 attributes hee wants to see 10 tables as every attribute has a different table.
what i have achieved is below in snapshots. only one attribute table PRODUCT im able to display. since i believe multiple headers cant be displyed in alv so even if i display multiple dynamically populated tables on a single screen then it will be fine.
i have also ADDED my code below: ZMDREPORT
this report is for SAP BPC.
*& Report ZMDREPORT
REPORT zmdreport.
TABLES /1cpmb/bfrdp3rp.
DATA: gw_datatbl TYPE tabname,
gw_datatbl1 TYPE tabname,
gw_descrptbl TYPE tabname,
gw_attribute TYPE tabname.
DATA:
BEGIN OF gw_attr,
appset_id TYPE uja_dim_attr-appset_id,
dimension TYPE uja_dim_attr-dimension,
tech_name TYPE uja_dim_attr-tech_name,
attribute_name TYPE uja_dim_attr-attribute_name,
caption TYPE uja_dim_attr-caption,
END OF gw_attr,
gt_attr LIKE TABLE OF gw_attr.
DATA: gt_slis_fcat1 TYPE slis_t_fieldcat_alv,
gw_slis_fcat1 LIKE LINE OF gt_slis_fcat1.
DATA : gt_except TYPE TABLE OF zbpcbt007,
gw_except LIKE LINE OF gt_except,
gt_except_t TYPE TABLE OF zbpcbt007,
gt_attrib TYPE TABLE OF tabname,
gw_attrib LIKE LINE OF gt_attrib.
DATA: gr_r_ref TYPE REF TO data.
DATA:BEGIN OF gw_mdr,
appset_id TYPE uj_appset_id,
dimension TYPE uj_dim_name,
reasoncd TYPE zmdreason,
refdimension TYPE uj_dim_name,
attrib TYPE uj_attr_name,
END OF gw_mdr,
gt_mdr1 LIKE TABLE OF gw_mdr,
gt_mdr2 LIKE TABLE OF gw_mdr,
gt_mdtable1 TYPE zbpctt_attr,
gt_mdtable2 TYPE zbpctt_attr,
gw_mdtable2 LIKE LINE OF gt_mdtable2,
gt_mdtable3 TYPE zbpctt_attr,
gt_mdtable4 TYPE zbpctt_attr,
gw_mdtable4 LIKE LINE OF gt_mdtable4,
BEGIN OF gw_finalattr,
dim(32) TYPE c,
END OF gw_finalattr,
gt_finalattr LIKE TABLE OF gw_finalattr,
gt_tab1 LIKE TABLE OF gw_finalattr,
gw_tab1 LIKE LINE OF gt_tab1,
gt_tab2 LIKE TABLE OF gw_finalattr,
gw_tab2 LIKE LINE OF gt_tab2.
FIELD-SYMBOLS: <gfs_tab1> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <gfs_tab2> TYPE STANDARD TABLE,
<gfs_tab3> TYPE STANDARD TABLE,
<gfs_tab4> TYPE STANDARD TABLE.
FIELD-SYMBOLS:<gfs_attr> TYPE any,
<gfs_field3> TYPE any,
<gfs_field4> TYPE any.
DATA: gw_sortcond TYPE string.
FIELD-SYMBOLS: <gfs_t_final> TYPE STANDARD TABLE.
FIELD-SYMBOLS: <gfs_final> TYPE any.
FIELD-SYMBOLS: <gfs_data> TYPE any .
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_env TYPE uja_dimension-appset_id OBLIGATORY.
PARAMETERS: p_dim TYPE uja_dimension-dimension OBLIGATORY.
SELECT-OPTIONS: s_member FOR /1cpmb/bfrdp3rp-mbr_name .
PARAMETERS: p_hir TYPE /1cpmb/bfrdp3rp-/cpmb/hir.
PARAMETERS:p_attr TYPE uj_attr_name MODIF ID m1.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: p_radio1 RADIOBUTTON GROUP g1 USER-COMMAND abc DEFAULT 'X',
p_radio2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_reason TYPE zbpcbt007-reasoncd MODIF ID m1.
SELECTION-SCREEN END OF BLOCK b3.
*********************************************************************alv
DATA :gt_fcat TYPE lvc_t_fcat.
DATA: gw_ok_code TYPE sy-ucomm,
gw_okcode TYPE sy-ucomm.
DATA: go_custom_container TYPE REF TO cl_gui_custom_container,
gw_g_container TYPE scrfname VALUE 'CC1',
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:BEGIN OF gw_table,
dimension TYPE uja_dimension-dimension,
END OF gw_table,
gt_tab LIKE TABLE OF gw_table ,
BEGIN OF gw_member,
mbr_name TYPE uj_dim_member,
END OF gw_member ,
gt_member LIKE TABLE OF gw_member,
BEGIN OF gw_hir ,
hir TYPE /1cpmb/bfrdp3rp-/cpmb/hir,
END OF gw_hir,
gt_hir LIKE TABLE OF gw_hir.
DATA:gt_slis_fcat2 TYPE slis_t_fieldcat_alv,
gw_slis_fcat2 LIKE LINE OF gt_slis_fcat2 .
DATA: lr_data TYPE REF TO data.
DATA :gt_fcat1 TYPE lvc_t_fcat,
gt_fcat2 TYPE lvc_t_fcat,
gt_fcat3 TYPE lvc_t_fcat,
gt_fcat2_t TYPE lvc_t_fcat,
gw_fcat LIKE LINE OF gt_fcat2,
gw_fcat3 LIKE LINE OF gt_fcat3.
DATA: gt_fcat3_t LIKE gt_fcat3.
DATA: gw_desc TYPE uj_desc.
DATA : gw_string TYPE string,
gw_str TYPE string.
DATA: gw_len TYPE string,
BEGIN OF gw_refdim,
dimension TYPE uja_dimension-dimension,
END OF gw_refdim,
gt_refdim LIKE TABLE OF gw_refdim,
gt_refdim_t LIKE TABLE OF gw_refdim,
BEGIN OF gw_refdata,
data_table TYPE tabname,
desc_table TYPE tabname,
END OF gw_refdata,
gt_refdata LIKE TABLE OF gw_refdata,
BEGIN OF gw_techattr,
tech_name TYPE uja_dim_attr-tech_name,
END OF gw_techattr,
gt_techattr LIKE TABLE OF gw_techattr,
gw_cond TYPE string.
DATA:gw_hircond TYPE string.
DATA: gt_dynpread TYPE TABLE OF dynpread,
gw_dynpread LIKE LINE OF gt_dynpread,
gw_dynpread2 LIKE LINE OF gt_dynpread,
gw_dim TYPE string,
gw_env TYPE string.
FIELD-SYMBOLS: <gfs_w_tab1> TYPE any,
<gfs_w_tab2> TYPE any,
<gfs_w_tab3> TYPE any,
<gfs_field> TYPE any,
<gfs_field2> TYPE any,
<gfs_field_final> TYPE any,
<gfs_s_fcat> TYPE lvc_s_fcat,
<gfs_s_fcat2> TYPE lvc_s_fcat,
<gfs_s_fcat3> TYPE lvc_s_fcat
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dim.
REFRESH gt_dynpread.
gw_dynpread-fieldname = 'P_ENV'.
APPEND gw_dynpread TO gt_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = 'X'
* start_search_in_main_screen = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
dynpfields = gt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
READ TABLE gt_dynpread INTO gw_dynpread INDEX 1.
IF sy-subrc EQ 0.
TRY .
REFRESH gt_tab.
SELECT dimension
FROM uja_dimension CLIENT SPECIFIED
INTO TABLE gt_tab
WHERE mandt EQ sy-mandt
AND appset_id EQ gw_dynpread-fieldvalue.
IF sy-subrc EQ 0.
SORT gt_tab BY dimension.
DELETE ADJACENT DUPLICATES FROM gt_tab COMPARING dimension.
IF gt_tab IS NOT INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' "#EC CI_SUBRC
EXPORTING
* DDIC_STRUCTURE = ''
retfield = 'DIMENSION'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_DIM'(004)
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* display = ''
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = gt_tab
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc NE 0.
ENDIF.
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_member-low.
REFRESH gt_dynpread.
gw_dynpread-fieldname = 'P_ENV'.
APPEND gw_dynpread TO gt_dynpread.
gw_dynpread-fieldname = 'P_DIM'.
APPEND gw_dynpread TO gt_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = 'X'
* start_search_in_main_screen = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
dynpfields = gt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
SORT gt_dynpread BY fieldname.
DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
IF gt_dynpread IS NOT INITIAL.
LOOP AT gt_dynpread INTO gw_dynpread.
IF gw_dynpread-fieldname EQ 'P_ENV'.
gw_env = gw_dynpread-fieldvalue.
ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
gw_dim = gw_dynpread-fieldvalue.
ENDIF.
ENDLOOP.
IF sy-subrc EQ 0.
CLEAR: gw_datatbl1, gt_member.
SELECT SINGLE data_table
INTO (gw_datatbl1)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ gw_env
AND dimension EQ gw_dim.
IF sy-subrc EQ 0.
TRY .
REFRESH gt_member.
SELECT mbr_name
INTO TABLE gt_member
FROM (gw_datatbl1) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt .
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'MBR_NAME'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_MEMBER'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
callback_program = sy-repid
callback_form = 'F4CALLBACK'
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = gt_member
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_member-high.
REFRESH gt_dynpread.
gw_dynpread-fieldname = 'P_ENV'.
APPEND gw_dynpread TO gt_dynpread.
gw_dynpread-fieldname = 'P_DIM'.
APPEND gw_dynpread TO gt_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = 'X'
* start_search_in_main_screen = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
dynpfields = gt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
SORT gt_dynpread BY fieldname.
DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
IF gt_dynpread IS NOT INITIAL.
LOOP AT gt_dynpread INTO gw_dynpread.
IF gw_dynpread-fieldname EQ 'P_ENV'.
gw_env = gw_dynpread-fieldvalue.
ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
gw_dim = gw_dynpread-fieldvalue.
ENDIF.
ENDLOOP.
IF sy-subrc EQ 0.
CLEAR: gw_datatbl1.
SELECT SINGLE data_table
INTO (gw_datatbl1)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ gw_env
AND dimension EQ gw_dim.
IF sy-subrc EQ 0.
TRY .
REFRESH gt_member.
SELECT mbr_name
INTO TABLE gt_member
FROM (gw_datatbl1) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'MBR_NAME'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_MEMBER'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
callback_program = sy-repid
callback_form = 'F4CALLBACK'
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = gt_member
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*& Form F4CALLBACK
* text
* -->RECORD_TAB text
* -->SHLP text
* -->CALLCONTROL text
FORM f4callback TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr
callcontrol TYPE ddshf4ctrl.
callcontrol-no_maxdisp = ''.
ENDFORM. "F4CALLBACK
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_hir.
REFRESH gt_dynpread.
CLEAR gw_dynpread.
gw_dynpread-fieldname = 'P_ENV'.
APPEND gw_dynpread TO gt_dynpread.
gw_dynpread-fieldname = 'P_DIM'.
APPEND gw_dynpread TO gt_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = 'X'
* start_search_in_main_screen = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
dynpfields = gt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc EQ 0.
SORT gt_dynpread BY fieldname.
DELETE ADJACENT DUPLICATES FROM gt_dynpread COMPARING fieldname.
LOOP AT gt_dynpread INTO gw_dynpread.
IF gw_dynpread-fieldname EQ 'P_ENV'.
gw_env = gw_dynpread-fieldvalue.
ELSEIF gw_dynpread-fieldname EQ 'P_DIM'.
gw_dim = gw_dynpread-fieldvalue.
ENDIF.
ENDLOOP.
IF sy-subrc EQ 0.
CLEAR: gw_datatbl1.
SELECT SINGLE data_table
INTO (gw_datatbl1)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ gw_env
AND dimension EQ gw_dim.
IF sy-subrc EQ 0.
REFRESH gt_member.
TRY .
SELECT /cpmb/hir
INTO TABLE gt_hir
FROM (gw_datatbl1) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt.
IF sy-subrc EQ 0.
SORT gt_hir BY hir.
DELETE ADJACENT DUPLICATES FROM gt_hir COMPARING hir.
IF gt_hir IS NOT INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = '/CPMB/HIR'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_HIR'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = gt_hir
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
ENDIF.
CATCH cx_root.
ENDTRY.
ENDIF.
ENDIF.
ENDIF.
* CLASS lcl_main DEFINITION
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
create_alv1,
create_alv2,
create_alv3,
create_fieldcatalog,
create_dynamicalv,
merge_tables,
show_alv1
ENDCLASS. "lcl_main DEFINITION
* CLASS lcl_main IMPLEMENTATION
CLASS lcl_main IMPLEMENTATION.
METHOD create_fieldcatalog.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' "#EC CI_SUBRC
EXPORTING
i_structure_name = gw_datatbl
CHANGING
ct_fieldcat = gt_fcat1
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' "#EC CI_SUBRC
EXPORTING
i_structure_name = gw_descrptbl
CHANGING
ct_fieldcat = gt_fcat2
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDMETHOD. "create_fieldcatalog
METHOD create_dynamicalv.
* DATA: lr_data TYPE REF TO data.
CLEAR lr_data.
CALL METHOD cl_alv_table_create=>create_dynamic_table
"#EC CI_SUBRC
EXPORTING
* i_style_table =
it_fieldcatalog = gt_fcat2
* i_length_in_byte =
IMPORTING
ep_table = lr_data
* e_style_fname =
EXCEPTIONS
generate_subpool_dir_full = 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.
ENDMETHOD. "create_dynamicalv
METHOD merge_tables.
SORT gt_fcat2 BY col_pos.
ASSIGN lr_data->* TO <gfs_t_final>.
LOOP AT <gfs_tab1> ASSIGNING <gfs_w_tab1>.
APPEND INITIAL LINE TO <gfs_t_final> ASSIGNING <gfs_final>.
LOOP AT gt_fcat2 ASSIGNING <gfs_s_fcat>. "#EC CI_NESTED
ASSIGN COMPONENT <gfs_s_fcat>-fieldname OF STRUCTURE
<gfs_w_tab1> TO <gfs_field>.
IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
ASSIGN COMPONENT <gfs_s_fcat>-fieldname OF STRUCTURE
<gfs_final> TO <gfs_field_final>.
IF sy-subrc EQ 0 AND <gfs_field_final> IS ASSIGNED.
<gfs_field_final> = <gfs_field>.
ENDIF.
*** Creating dynamic where clause for the key fields
IF <gfs_s_fcat>-key = 'X'.
READ TABLE gt_fcat2_t ASSIGNING <gfs_s_fcat2>
WITH KEY
key = abap_true
fieldname = <gfs_s_fcat>-fieldname.
IF sy-subrc EQ 0.
IF gw_string IS INITIAL.
*Putting value into quotes
CONCATENATE `'` <gfs_field> `'` INTO gw_str.
*Concatenating first field into string
CONCATENATE <gfs_s_fcat>-fieldname '=' gw_str
INTO gw_string SEPARATED BY space.
CLEAR gw_str.
ELSE.
*Concatenating rest all key fields
CONCATENATE `'` <gfs_field> `'` INTO gw_str.
CONCATENATE gw_string 'AND' <gfs_s_fcat>-fieldname
'=' gw_str INTO gw_string SEPARATED BY space.
CLEAR gw_str.
ENDIF.
ENDIF.
*** End of Creation
ENDIF.
ENDIF.
ENDLOOP.
IF NOT gw_string IS INITIAL.
*Concatenating sy-langu (-> always present)
CONCATENATE gw_string 'AND LANGU = SY-LANGU'
INTO gw_string SEPARATED BY space.
ENDIF.
*** Filling Description field based on dynamically created where clause
LOOP AT <gfs_tab2> ASSIGNING <gfs_w_tab2> WHERE (gw_string).
"#EC CI_NESTED
ASSIGN COMPONENT 'TXTLG' OF STRUCTURE <gfs_w_tab2>
TO <gfs_field>.
IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
ASSIGN COMPONENT 'TXTLG' OF STRUCTURE <gfs_final>
TO <gfs_field_final>.
IF sy-subrc EQ 0 AND <gfs_field_final> IS ASSIGNED.
<gfs_field_final> = <gfs_field>.
ENDIF.
ENDIF.
ENDLOOP.
CLEAR gw_string.
ENDLOOP.
ENDMETHOD. "merge_tables
METHOD create_alv3.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
ASSIGN gr_r_ref->* TO <gfs_tab1>.
SELECT *
INTO TABLE <gfs_tab1>
FROM (gw_datatbl) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND mbr_name IN s_member
AND /cpmb/calc EQ 'N'.
IF sy-subrc EQ 0.
IF p_hir IS NOT INITIAL.
CLEAR gw_hircond.
CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR' INTO gw_hircond
SEPARATED BY space.
DELETE <gfs_tab1> WHERE (gw_hircond).
ENDIF.
CLEAR: gr_r_ref.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
ASSIGN gr_r_ref->* TO <gfs_tab2>.
SELECT *
FROM (gw_descrptbl) CLIENT SPECIFIED
INTO TABLE <gfs_tab2>
WHERE mandt EQ sy-mandt
AND langu EQ sy-langu.
IF sy-subrc EQ 0.
READ TABLE gt_refdata INTO gw_refdata INDEX 1.
IF sy-subrc EQ 0.
CLEAR gr_r_ref.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_refdata-data_table).
ASSIGN gr_r_ref->* TO <gfs_tab3>.
SELECT *
INTO TABLE <gfs_tab3>
FROM (gw_refdata-data_table) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND /cpmb/calc EQ 'N'.
IF sy-subrc EQ 0.
CLEAR gr_r_ref.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_refdata-desc_table).
ASSIGN gr_r_ref->* TO <gfs_tab4>.
SELECT *
INTO TABLE <gfs_tab4>
FROM (gw_refdata-desc_table) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND langu EQ sy-langu.
lcl_main=>create_fieldcatalog( ).
gt_fcat2_t[] = gt_fcat2[].
DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
APPEND LINES OF gt_fcat1 TO gt_fcat2.
gw_len = lines( gt_fcat2 ).
gw_len = gw_len + 1.
gw_fcat-fieldname = 'TXTLG1'.
gw_fcat-reptext = 'Attribute Description'.
gw_fcat-col_pos = gw_len.
gw_fcat-outputlen = 60.
APPEND gw_fcat TO gt_fcat2.
SORT gt_fcat2 BY fieldname.
READ TABLE gt_techattr INTO gw_techattr INDEX 1.
LOOP AT gt_fcat2 INTO gw_fcat.
READ TABLE gt_attr INTO gw_attr
WITH KEY tech_name = gw_fcat-fieldname.
IF sy-subrc EQ 0.
gw_fcat-reptext = gw_attr-caption.
ENDIF.
IF gw_fcat-fieldname = 'TXTLG'.
gw_fcat-outputlen = 60.
ENDIF.
MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING
outputlen reptext .
IF gw_fcat-fieldname NE 'MBR_NAME'
AND gw_fcat-fieldname NE 'TXTLG'
AND gw_fcat-fieldname NE 'TXTLG1'
AND gw_fcat-fieldname NE gw_techattr-tech_name."gw_attrib.
gw_fcat-no_out = 'X'.
MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING no_out.
ENDIF.
ENDLOOP.
lcl_main=>create_dynamicalv( ).
lcl_main=>merge_tables( ).
CLEAR gw_cond.
READ TABLE gt_techattr INTO gw_techattr INDEX 1.
* CONCATENATE 'MBR_NAME =' '<Gfs_field>' INTO Gw_cond
* SEPARATED BY space.
TRANSLATE gw_techattr-tech_name TO UPPER CASE.
CONCATENATE `'` gw_techattr-tech_name `'`
'=' '<Gfs_field>' INTO gw_cond
SEPARATED BY space.
CHECK NOT <gfs_t_final> IS INITIAL.
SORT <gfs_t_final> BY (gw_techattr-tech_name).
LOOP AT <gfs_tab3> ASSIGNING <gfs_w_tab3>.
ASSIGN COMPONENT 'MBR_NAME' OF STRUCTURE <gfs_w_tab3>
TO <gfs_field>.
IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
DELETE <gfs_t_final> WHERE (gw_cond).
ENDIF.
IF <gfs_t_final> IS INITIAL.
EXIT.
ENDIF.
ENDLOOP.
*adding attribute description
DATA gw_cond1 TYPE string.
DATA gw_cond2 TYPE string.
CLEAR gw_cond1.
CONCATENATE `'` gw_techattr-tech_name `'` 'eq' '<gfs_field>'
INTO gw_cond1 SEPARATED BY space.
CLEAR gw_cond2.
CONCATENATE 'TXTLG1' 'eq' 'SPACE'
INTO gw_cond2 SEPARATED BY space.
CLEAR gw_cond.
CONCATENATE 'TXTLG' 'NE' 'SPACE' INTO gw_cond SEPARATED BY
space.
gw_sortcond = 'TXTLG'.
SORT <gfs_tab4> BY (gw_sortcond).
LOOP AT <gfs_t_final> ASSIGNING <gfs_final> WHERE
(gw_cond2).
ASSIGN COMPONENT gw_techattr-tech_name OF STRUCTURE
<gfs_final> TO <gfs_field>.
IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
ASSIGN COMPONENT 'TXTLG1' OF STRUCTURE
<gfs_final> TO <gfs_field4>.
IF sy-subrc EQ 0 AND <gfs_field4> IS ASSIGNED.
LOOP AT <gfs_tab4> ASSIGNING <gfs_attr>
WHERE (gw_cond).
ASSIGN COMPONENT 2 OF STRUCTURE <gfs_attr> TO
<gfs_field2>.
IF sy-subrc EQ 0 AND <gfs_field2> IS ASSIGNED.
ASSIGN COMPONENT 5 OF STRUCTURE <gfs_attr>
TO <gfs_field3>.
IF sy-subrc EQ 0 AND <gfs_field3> IS ASSIGNED.
IF <gfs_field> EQ <gfs_field2>.
<gfs_field4> = <gfs_field3>.
MODIFY <gfs_t_final> FROM <gfs_final>
TRANSPORTING ('TXTLG1') WHERE (gw_cond1).
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
* LOOP AT <gfs_tab4> ASSIGNING <gfs_attr> WHERE (gw_cond) .
* ASSIGN COMPONENT 2 OF STRUCTURE <gfs_attr> TO
* <gfs_field2>.
* IF sy-subrc EQ 0 AND <gfs_field2> IS ASSIGNED.
* ASSIGN COMPONENT 5 OF STRUCTURE <gfs_attr> TO
* <gfs_field3>.
* IF sy-subrc EQ 0 AND <gfs_field3> IS ASSIGNED.
* LOOP AT <gfs_t_final> ASSIGNING <gfs_final>
* WHERE (gw_cond2).
* ASSIGN COMPONENT gw_techattr-tech_name OF STRUCTURE
* <gfs_final> TO <gfs_field>.
* IF sy-subrc EQ 0 AND <gfs_field> IS ASSIGNED.
* ASSIGN COMPONENT 'TXTLG1' OF STRUCTURE <gfs_final>
* TO <gfs_field4>.
* IF sy-subrc EQ 0 AND <gfs_field4> IS ASSIGNED.
* IF <gfs_field> EQ <gfs_field2>.
* <gfs_field4> = <gfs_field3>.
* MODIFY <gfs_t_final> FROM <gfs_final>
* TRANSPORTING ('TXTLG1') WHERE (gw_cond1).
* EXIT.
* ENDIF.
* ENDIF.
* ENDIF.
* ENDLOOP.
* ENDIF.
* ENDIF.
* ENDLOOP.
IF <gfs_t_final> IS NOT INITIAL.
CALL SCREEN 9000.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDMETHOD. "create_alv3
METHOD create_alv2.
READ TABLE gt_techattr INTO gw_techattr INDEX 1.
CONCATENATE gw_techattr-tech_name 'EQ' 'space' INTO gw_cond
SEPARATED
BY
space.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
ASSIGN gr_r_ref->* TO <gfs_tab1>.
SELECT *
INTO TABLE <gfs_tab1>
FROM (gw_datatbl) CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND mbr_name IN s_member
AND /cpmb/calc EQ 'N'
AND (gw_cond).
IF sy-subrc EQ 0.
IF p_hir IS NOT INITIAL.
CLEAR gw_hircond.
CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR' INTO gw_hircond
SEPARATED BY space.
DELETE <gfs_tab1> WHERE (gw_hircond).
ENDIF.
CLEAR: gr_r_ref.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
ASSIGN gr_r_ref->* TO <gfs_tab2>.
SELECT *
FROM (gw_descrptbl) CLIENT SPECIFIED
INTO TABLE <gfs_tab2>
WHERE mandt EQ sy-mandt
AND langu EQ sy-langu.
IF sy-subrc EQ 0.
lcl_main=>create_fieldcatalog( ).
gt_fcat2_t[] = gt_fcat2[].
DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
APPEND LINES OF gt_fcat1 TO gt_fcat2.
SORT gt_fcat2 BY fieldname.
LOOP AT gt_fcat2 INTO gw_fcat.
READ TABLE gt_attr INTO gw_attr WITH KEY
tech_name = gw_fcat-fieldname.
IF sy-subrc EQ 0.
gw_fcat-reptext = gw_attr-caption.
ENDIF.
IF gw_fcat-fieldname = 'TXTLG'.
gw_fcat-outputlen = 60.
ENDIF.
MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING outputlen reptext.
* READ TABLE gt_attrib INTO gw_attrib INDEX 1.
* IF sy-subrc EQ 0.
IF gw_fcat-fieldname NE 'MBR_NAME'
AND gw_fcat-fieldname NE 'TXTLG'
AND gw_fcat-fieldname NE gw_techattr-tech_name."gw_attrib.
gw_fcat-no_out = 'X'.
MODIFY gt_fcat2 FROM gw_fcat TRANSPORTING no_out.
ENDIF.
* ENDIF.
ENDLOOP.
lcl_main=>create_dynamicalv( ).
lcl_main=>merge_tables( ).
CHECK NOT <gfs_t_final> IS INITIAL.
SORT <gfs_t_final> BY ('MBR_NAME').
CALL SCREEN 9000.
ENDIF.
ENDIF.
ENDMETHOD. "create_alv2
METHOD create_alv1.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_datatbl).
ASSIGN gr_r_ref->* TO <gfs_tab1>.
SELECT *
FROM (gw_datatbl) CLIENT SPECIFIED
INTO TABLE <gfs_tab1>
WHERE mandt EQ sy-mandt
AND mbr_name IN s_member.
IF sy-subrc EQ 0.
IF p_hir IS NOT INITIAL.
CLEAR gw_hircond.
CONCATENATE '/CPMB/HIR' 'NE' 'P_HIR'
INTO gw_hircond SEPARATED BY
space.
DELETE <gfs_tab1> WHERE (gw_hircond).
ENDIF.
CLEAR: gr_r_ref.
CREATE DATA gr_r_ref TYPE TABLE OF (gw_descrptbl).
ASSIGN gr_r_ref->* TO <gfs_tab2>.
SELECT *
FROM (gw_descrptbl) CLIENT SPECIFIED
INTO TABLE <gfs_tab2>
WHERE mandt EQ sy-mandt
AND langu EQ sy-langu.
IF sy-subrc EQ 0.
lcl_main=>create_fieldcatalog( ).
SORT gt_fcat2 BY col_pos fieldname.
gt_fcat2_t[] = gt_fcat2[].
DELETE gt_fcat2 WHERE fieldname NE 'TXTLG'.
APPEND LINES OF gt_fcat1 TO gt_fcat2.
SORT gt_fcat2 BY fieldname.
SORT gt_attr BY tech_name.
LOOP AT gt_fcat2 INTO gw_fcat .
IF gw_fcat-reptext IS INITIAL.
READ TABLE gt_attr INTO gw_attr
WITH KEY tech_name = gw_fcat-fieldname BINARY SEARCH.
IF sy-subrc EQ 0.
gw_fcat-reptext = gw_attr-caption.
ELSE.
gw_fcat-reptext = gw_fcat-fieldname.
ENDIF.
ENDIF.
IF gw_fcat-fieldname EQ 'OBJVERS'.
gw_fcat-no_out = 'X'.
ELSEIF gw_fcat-fieldname EQ 'ROWFLAG'.
gw_fcat-no_out = 'X'.
ELSEIF gw_fcat-fieldname EQ 'MBR_NAME'.
gw_fcat-no_out = 'X'.
ELSEIF gw_fcat-fieldname EQ '/CPMB/CALC'.
gw_fcat-no_out = 'X'.
ELSEIF gw_fcat-fieldname EQ 'TXTLG'.
gw_fcat-outputlen = 70.
ELSEIF gw_fcat-fieldname EQ '/CPMB/HIR'.
gw_fcat-outputlen = 20.
ENDIF.
MODIFY gt_fcat2 FROM gw_fcat
TRANSPORTING reptext no_out outputlen.
ENDLOOP.
lcl_main=>create_dynamicalv( ).
lcl_main=>merge_tables( ).
CHECK NOT <gfs_t_final> IS INITIAL.
* SORT <gfs_t_final> BY ('TXTLG').
CALL SCREEN 9000.
ENDIF.
ENDIF.
ENDMETHOD. "show_alv1
METHOD show_alv1.
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING
* parent =
container_name = gw_g_container
* style =
* lifetime = lifetime_default
* repid =
* dynnr =
* no_autodef_progid_dynnr =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid1
EXPORTING
* i_shellstyle = 0
* i_lifetime =
i_parent = go_custom_container
* i_appl_events = 'X'
* i_parentdbg =
* i_applogparent =
* i_graphicsparent =
* i_name =
* i_fcat_complete = SPACE
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5
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 METHOD go_grid1->set_table_for_first_display "#EC CI_SUBRC
* EXPORTING
* i_buffer_active =
* i_bypassing_buffer =
* i_consistency_check =
* i_structure_name =
* is_variant =
* i_save = 'X'
** i_default = 'X'
* is_layout =
** is_print =
** it_special_groups =
* it_toolbar_excluding =
* it_hyperlink =
* it_alv_graphics =
* it_except_qinfo =
* ir_salv_adapter =
CHANGING
it_outtab = <gfs_t_final>
it_fieldcatalog = gt_fcat2
* it_sort =
* it_filter =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
ENDMETHOD. "SHOW_alv1
ENDCLASS. "lcl_main IMPLEMENTATION
AT SELECTION-SCREEN OUTPUT.
IF p_radio1 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'M1'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
* IF screen-group1 = 'M'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
ENDLOOP.
ENDIF.
* IF p_radio2 EQ 'X'.
* LOOP AT SCREEN.
* IF p_reason EQ 30.
* IF screen-group1 = 'M2'.
* screen-active = 0.
* MODIFY SCREEN.
* ENDIF.
* ENDIF.
* ENDLOOP.
* ENDIF.
START-OF-SELECTION.
IF p_radio1 EQ 'X'.
SELECT SINGLE data_table desc_table
INTO (gw_datatbl , gw_descrptbl)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
SELECT appset_id dimension tech_name attribute_name caption
INTO TABLE gt_attr
FROM uja_dim_attr CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
lcl_main=>create_alv1( ).
ENDIF.
ENDIF.
ELSE.
IF p_reason NE 30.
SELECT *
INTO TABLE gt_except
FROM zbpcbt007 CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim
AND reasoncd EQ p_reason.
IF sy-subrc EQ 0.
SELECT SINGLE data_table desc_table
INTO (gw_datatbl,gw_descrptbl)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
SELECT appset_id dimension tech_name attribute_name caption
INTO TABLE gt_attr
FROM uja_dim_attr CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
gt_except_t[] = gt_except[].
SORT gt_except_t.
DELETE ADJACENT DUPLICATES FROM gt_except_t.
IF gt_except_t IS NOT INITIAL.
SELECT tech_name
INTO TABLE gt_techattr
FROM uja_dim_attr CLIENT SPECIFIED
FOR ALL ENTRIES IN gt_except_t
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim
AND attribute_name EQ gt_except_t-attrib.
IF sy-subrc EQ 0.
lcl_main=>create_alv2( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ELSEIF p_reason EQ 30.
SELECT SINGLE data_table desc_table
INTO (gw_datatbl,gw_descrptbl)
FROM uja_dimension CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
* gt_except_t[] = gt_except[].
* SORT gt_except_t BY attrib.
* DELETE ADJACENT DUPLICATES FROM gt_except_t COMPARING attrib.
* IF gt_except_t IS NOT INITIAL.
SELECT refdimension
INTO TABLE gt_refdim
FROM zbpcbt009 CLIENT SPECIFIED
* FOR ALL ENTRIES IN gt_except_t
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim
AND attrib EQ p_attr."gt_except_t-attrib.
IF sy-subrc EQ 0.
gt_refdim_t[] = gt_refdim[].
SORT gt_refdim_t BY dimension.
DELETE ADJACENT DUPLICATES FROM gt_refdim_t COMPARING
dimension.
IF gt_refdim_t IS NOT INITIAL.
SELECT data_table desc_table
INTO TABLE gt_refdata
FROM uja_dimension CLIENT SPECIFIED
FOR ALL ENTRIES IN gt_refdim_t
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ gt_refdim_t-dimension.
IF sy-subrc EQ 0.
SELECT appset_id dimension tech_name attribute_name
caption
INTO TABLE gt_attr
FROM uja_dim_attr CLIENT SPECIFIED
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim.
IF sy-subrc EQ 0.
SELECT tech_name
INTO TABLE gt_techattr
FROM uja_dim_attr CLIENT SPECIFIED
* FOR ALL ENTRIES IN gt_except_t
WHERE mandt EQ sy-mandt
AND appset_id EQ p_env
AND dimension EQ p_dim
AND attribute_name EQ p_attr."gt_except_t-attrib.
IF sy-subrc EQ 0.
REFRESH: gt_refdim_t.",gt_except_t.
lcl_main=>create_alv3( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
* ENDIF.
* ENDIF.
ENDIF.
ENDIF.
*& Module SHOW_ALV1 OUTPUT
*&-------Yes you can, although you need to do it slightly differently, depending on what your 'original' form is doing.
You end up having to do two things:
1. In your second tabular form, you need to explicitly identify the relevant form fields using calls to the relevant APEX_ITEM functions - as well as this, you need to 'manually' specify the array number in the arguments for the function call, ensuring it doesn't overlap with your original form. Normally, this aspect is done for you.
2. Create your own custom CRUD processes, referencing the above elements. There are a few threads floating around the forum relating to how to deal with this. Do a search for "APEX_APPLICATION.G_F" or "HTMLDB_APPLICATION.G_F" for pointers.
Happy hunting! -
Problem in Data Display in Dynamic ALV Report
Hi all,
I am developing a Dynamic ALV report where I want display material batch (zjpack_base-charg) in column and Material (zjpack_base-matnr) & Qty (Zjpack_base-netwr) field row wise.My intention is to show report datewise for a material how many batch developed with there qty.I am sending you the code which i already wrote.Here column is developed batchwise but I am not able to show the qty against each batch.Please see my code and guide me how to display.
REPORT zdynamic_test .
*REPORT ztest_notepad.
*& Declarations
*Type-pools
TYPE-POOLS: slis.
*TABLES
TABLES: zjpack_base.
*Types
TYPES:
ty_fcat TYPE lvc_s_fcat,
ty_fcatalog TYPE slis_fieldcat_alv.
*Work areas
DATA:
wa_fcat TYPE ty_fcat,
wa_fcatalog TYPE ty_fcatalog.
*Internal tables
DATA:
it_fcat TYPE STANDARD TABLE OF ty_fcat,
it_fcatalog TYPE STANDARD TABLE OF ty_fcatalog.
*Type reference
DATA:
it_dyn_tab TYPE REF TO data,
wa_newline TYPE REF TO data.
*INTERNAL TABLE
DATA: BEGIN OF it_itab OCCURS 0.
INCLUDE STRUCTURE zjpack_base.
DATA: END OF it_itab.
*Filed symbols
FIELD-SYMBOLS:
<gt_table> TYPE STANDARD TABLE,
<fs_dyntable>,
<fs_fldval> TYPE ANY,
<l_field> TYPE ANY.
*Variables
DATA:
l_fieldname TYPE lvc_s_fcat-fieldname,
l_tabname TYPE lvc_s_fcat-tabname,
l_fieldtext TYPE lvc_s_fcat-seltext,
l_index TYPE char2.
"Selection-screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s11 .
SELECT-OPTIONS:s_matnr FOR zjpack_base-matnr.
SELECT-OPTIONS:s_charg FOR zjpack_base-charg.
SELECT-OPTIONS:s_fdate FOR zjpack_base-fdate .
SELECTION-SCREEN END OF BLOCK b1.
PARAMETERS:
p_colms TYPE i.
*& start-of-selection.
START-OF-SELECTION.
PERFORM select_data.
PERFORM build_fieldcat.
PERFORM create_dynamic_table.
DO 20 TIMES.
DO p_colms TIMES.
l_index = sy-index.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
<l_field> = sy-index.
ENDDO.
INSERT <fs_dyntable> INTO TABLE <gt_table>.
ENDDO.
LOOP AT it_itab.
l_index = sy-tabix.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
<l_field> = it_itab-matnr.
INSERT <fs_dyntable> INTO TABLE <gt_table>.
ENDLOOP.
LOOP AT it_fcat INTO wa_fcat.
PERFORM fieldcatalog1 USING: wa_fcat-fieldname
wa_fcat-tabname
wa_fcat-seltext.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_NOTEPAD'
it_fieldcat = it_fcatalog
TABLES
t_outtab = <gt_table>.
*& Form BUILD_FIELDCAT
FORM build_fieldcat .
CLEAR: l_fieldname,
l_tabname,
l_fieldtext,
l_index.
DO p_colms TIMES.
CLEAR l_index.
l_index = sy-index.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
CONCATENATE 'Field' l_index INTO l_fieldtext.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
ENDDO.
ENDFORM. " BUILD_FIELDCAT
*& Form CREATE_DYNAMIC_TABLE
FORM create_dynamic_table .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_dyn_tab.
ASSIGN it_dyn_tab->* TO <gt_table>.
Create dynamic work area and assign to FS
CREATE DATA wa_newline LIKE LINE OF <gt_table>.
ASSIGN wa_newline->* TO <fs_dyntable>.
ENDFORM. " CREATE_DYNAMIC_TABLE
*& Form FIELDCATALOG
FORM fieldcatalog USING field table f_txt.
wa_fcat-fieldname = field.
wa_fcat-tabname = table.
wa_fcat-seltext = f_txt.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ENDFORM. " FIELDCATALOG
*& Form FIELDCATALOG1
FORM fieldcatalog1 USING field table f_txt.
wa_fcatalog-fieldname = field.
wa_fcatalog-tabname = table.
wa_fcatalog-seltext_m = f_txt.
APPEND wa_fcatalog TO it_fcatalog.
CLEAR wa_fcatalog.
ENDFORM. " FIELDCATALOG1
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
DATA: v_srlno TYPE i.
SELECT matnr charg blqty
INTO CORRESPONDING FIELDS OF it_itab
FROM zjpack_base
WHERE matnr IN s_matnr
AND charg IN s_charg
AND fdate IN s_fdate.
COLLECT it_itab.
ENDSELECT.
v_srlno.
LOOP AT it_itab.
v_srlno = v_srlno + 1.
ENDLOOP.
CLEAR: l_fieldname,
l_tabname,
l_fieldtext,
l_index.
1st Field
l_index = sy-tabix.
CONCATENATE 'FIELD' '1' INTO l_fieldname.
l_fieldtext = 'MATNR'.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
Other fields
LOOP AT it_itab.
CLEAR l_index.
l_index = sy-tabix + 1.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
CONCATENATE 'CHARG-' it_itab-charg INTO l_fieldtext.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
ENDLOOP.
Please guide me how my problem will solve.
Thanks & Regards
NirmalHi all, I am developing a Dynamic ALV report where I want display material batch (zjpack_base-charg) in column and Material (zjpack_base-matnr) & Qty (Zjpack_base-netwr) field row wise.My intention is to show report datewise for a material how many batch developed with there qty.I am sending you the code which i already wrote.Here column is developed batchwise but I am not able to show the qty against each batch.Please see my code and guide me how to display.
*& Report ZDYNAMIC_TEST *
REPORT zdynamic_test .
*REPORT ztest_notepad.
*& Declarations
*Type-pools
TYPE-POOLS: slis.
*TABLES
TABLES: zjpack_base.
*Types
TYPES:
ty_fcat TYPE lvc_s_fcat,
ty_fcatalog TYPE slis_fieldcat_alv.
*Work areas
DATA:
wa_fcat TYPE ty_fcat,
wa_fcatalog TYPE ty_fcatalog.
*Internal tables
DATA:
it_fcat TYPE STANDARD TABLE OF ty_fcat,
it_fcatalog TYPE STANDARD TABLE OF ty_fcatalog.
*Type reference
DATA:
it_dyn_tab TYPE REF TO data,
wa_newline TYPE REF TO data.
*INTERNAL TABLE
DATA: BEGIN OF it_itab OCCURS 0.
INCLUDE STRUCTURE zjpack_base.
DATA: END OF it_itab.
*Filed symbols
FIELD-SYMBOLS:
<gt_table> TYPE STANDARD TABLE,
<fs_dyntable>,
<fs_fldval> TYPE ANY,
<l_field> TYPE ANY.
*Variables
DATA:
l_fieldname TYPE lvc_s_fcat-fieldname,
l_tabname TYPE lvc_s_fcat-tabname,
l_fieldtext TYPE lvc_s_fcat-seltext,
l_index TYPE char2.
"Selection-screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s11 .
SELECT-OPTIONS:s_matnr FOR zjpack_base-matnr.
SELECT-OPTIONS:s_charg FOR zjpack_base-charg.
SELECT-OPTIONS:s_fdate FOR zjpack_base-fdate .
SELECTION-SCREEN END OF BLOCK b1.
PARAMETERS:
p_colms TYPE i.
*& start-of-selection.
START-OF-SELECTION.
PERFORM select_data.
PERFORM build_fieldcat.
PERFORM create_dynamic_table.
* DO 20 TIMES.
* DO p_colms TIMES.
* l_index = sy-index.
* CONCATENATE 'FIELD' l_index INTO l_fieldname.
* ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
* <l_field> = sy-index.
* ENDDO.
* INSERT <fs_dyntable> INTO TABLE <gt_table>.
* ENDDO.
LOOP AT it_itab.
l_index = sy-tabix.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
<l_field> = it_itab-matnr.
INSERT <fs_dyntable> INTO TABLE <gt_table>.
ENDLOOP.
LOOP AT it_fcat INTO wa_fcat.
PERFORM fieldcatalog1 USING: wa_fcat-fieldname
wa_fcat-tabname
wa_fcat-seltext.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_NOTEPAD'
it_fieldcat = it_fcatalog
TABLES
t_outtab = <gt_table>.
*& Form BUILD_FIELDCAT
FORM build_fieldcat .
* CLEAR: l_fieldname,
* l_tabname,
* l_fieldtext,
* l_index.
* DO p_colms TIMES.
* CLEAR l_index.
* l_index = sy-index.
* CONCATENATE 'FIELD' l_index INTO l_fieldname.
* CONCATENATE 'Field' l_index INTO l_fieldtext.
* l_tabname = '<GT_TABLE>'.
* PERFORM fieldcatalog USING: l_fieldname
* l_tabname
* l_fieldtext.
* ENDDO.
ENDFORM. " BUILD_FIELDCAT
*& Form CREATE_DYNAMIC_TABLE
FORM create_dynamic_table .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat
IMPORTING
ep_table = it_dyn_tab.
ASSIGN it_dyn_tab->* TO <gt_table>.
* Create dynamic work area and assign to FS
CREATE DATA wa_newline LIKE LINE OF <gt_table>.
ASSIGN wa_newline->* TO <fs_dyntable>.
ENDFORM. " CREATE_DYNAMIC_TABLE
*& Form FIELDCATALOG
FORM fieldcatalog USING field table f_txt.
wa_fcat-fieldname = field.
wa_fcat-tabname = table.
wa_fcat-seltext = f_txt.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ENDFORM. " FIELDCATALOG
*& Form FIELDCATALOG1
FORM fieldcatalog1 USING field table f_txt.
wa_fcatalog-fieldname = field.
wa_fcatalog-tabname = table.
wa_fcatalog-seltext_m = f_txt.
APPEND wa_fcatalog TO it_fcatalog.
CLEAR wa_fcatalog.
ENDFORM. " FIELDCATALOG1
*& Form SELECT_DATA
* text
* --> p1 text
* <-- p2 text
FORM select_data .
* DATA: v_srlno TYPE i.
SELECT matnr charg blqty
INTO CORRESPONDING FIELDS OF it_itab
FROM zjpack_base
WHERE matnr IN s_matnr
AND charg IN s_charg
AND fdate IN s_fdate.
COLLECT it_itab.
ENDSELECT.
* v_srlno.
* LOOP AT it_itab.
* v_srlno = v_srlno + 1.
* ENDLOOP.
CLEAR: l_fieldname,
l_tabname,
l_fieldtext,
l_index.
* 1st Field
* l_index = sy-tabix.
CONCATENATE 'FIELD' '1' INTO l_fieldname.
l_fieldtext = 'MATNR'.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
* Other fields
LOOP AT it_itab.
CLEAR l_index.
l_index = sy-tabix + 1.
CONCATENATE 'FIELD' l_index INTO l_fieldname.
CONCATENATE 'CHARG-' it_itab-charg INTO l_fieldtext.
l_tabname = '<GT_TABLE>'.
PERFORM fieldcatalog USING: l_fieldname
l_tabname
l_fieldtext.
ENDLOOP.
ENDFORM. " SELECT_DATA -
I can not copy a transition between multiple clips in premiere 12
Following the procedure described in the manual, I can not copy a transition between multiple clips in Premiere 12.
Premiere copy a single transition in the clip closer to the time bar.
I had tried in various ways but to no avail. The problem can be solved?
Thanks for the help.Sig. T.T. Romano,
javascript:void(0)
I finally figured out that you can not copy a transition between multiple clips at the same time and it will copy one at a time.
What seems strange, however, because in Pinnacle, which I used until recently, this could be done, and Adobe is not less than Pinnacle.
Maybe Adobe does not consider interesting this thing, or maybe it is inserted in Premiere Pro. How, for example, in the titles, the ability to animate multiple lines. In Premiere Elements missing but I knew that in the Pro's.
I thank you anyway for your helpful answers.
Vincent Chiti -
I have EPM report created dynamically for all base level member of the hierarchy.However in the left most coumn, I need to show the top most parent of these base level account.How to achieve this in reporting? For example ....my current state is Account 1: Amount Account 2: Amount My future requirement is Parent of account 1: Account 1: Amount Parent of Account 2: Account 2: Amount Is it possible to achieive this in report. I have nearly 500 accounts depends on which parent Iam running the report for.How toachieve this in dynamic repot(not the EPM retrieve formula) based report. Appreciate inputs
Hi there,
I understand the set up of the report, but fail to understand the reason for the structure of the report being the way it is - especially because the folks who run the reports know the account structure.
Anyways, as you know, in BPC reports we cannot have the same dimension show up more than once in the same axis. You may however use a local member (for example, to retrieve the description for "Assets") and insert this local member before the column axis. Hope this helps.
Vijay -
Making Worksheet logic work with Dynamically expanding report
Hello,
Sorry if its basic, but I am trying to understand how can I make worksheet logic work with dynamically expanding reports? Because if the expansion parameters change, it stops producing correct values for me. Please advise.
Thanks.Hi Zack,
Now I understood your problem.
Actually, when the expansion changes, it deletes the columns, and then shifts the subsequent columns with the appropriate expansion. So, if you have the formula somewhere in between, you will lose it. If you put it in the beginning, then it will be copied to all the cells. You need to put it at the end. But, you are saying this is viable for your scenario.
My suggestion would be you can try to break the single expansion into multiple expansions using the pipe (|) character, and place the formula in one of them.
Hope this helps. -
PLSQL processing of a dynamic sql report
Hi there,
I have a problem processing a dynamic sql report, specifically in referencing the PL/SQL column headings I have.
Basically I have a report that generates one row for each project a person belongs to, and then using htmldb_item.text creates one field for each day of the week (sysdate - sysdate+6) so that people can enter their hours worked. The idea is they then press a submit button and the hours are entered into a project table something like (date_worked, project_id, hours_worked), one row for each entry.
So I have:
for i in 1..HTMLDB_APPLICATION.G_F01.count
loop
... err... here I want to insert into the table the values(column_header, project_id, HTMLDB_APPLICATION.G_F01(i)).. but I don't know how to access that column_header value.
Is this possible and if so, how?
Many thanks,
Tosh.that gives me the values of the text fields, but what
I'd like to insert is the value of the column
header... so for example:Yes, I understood what you meant. I did have a differect project_id for each INSERT in my SQL above. I guess that should have been day_id
Since you are generating the tabular form SQL manually, you know which htmldb_item.text index corresponds to which column (which represents day_id in your case). So, use this to write 6 INSERT statements, one for each day. day_id would be a number going from 0 thru 6 where 0 represents Sunday and 6 represents Saturday.
Bottom line: This is like generating/updating a calendar, your column headings are always fixed (Sun thru Saturday), just the date they represent would change. -
I want to create dynamic ALV report
Hi great abapers,
I want to create dynamic ALV report.Please help me.
Regards,
BillaHi,
Please check the code below:
REPORT YMMR_PALLET_OVERVIEW MESSAGE-ID Y_MESSAGE_0001.
Short description:
To Display and sum up the Quantity of scanned materials on pallet for*
each Shipment number for the Packaging Materials. *
TYPE-POOLS : SLIS.
TABLES: YYLE0003. " Scanned SSCC No.
--Structure Declaration--
Structure for Shipment No. and Date.
TYPES : BEGIN OF T_VTTK_TAB ,
TKNUM LIKE VTTK-TKNUM, " Shipment number
ERDAT LIKE VTTK-ERDAT, " created Date
END OF T_VTTK_TAB .
Structure for Shipment No., Packaging Materials and Date.
TYPES: BEGIN OF T_ITAB2,
TKNUM LIKE YYLE0003-TKNUM, " Shipment number
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
QUANTITY TYPE P,
ERDAT LIKE YYLE0003-ERDAT, " created Date
COUNT TYPE I,
END OF T_ITAB2.
Structure for Shipment No. and Packaging Materials.
TYPES: BEGIN OF T_ITAB3,
TKNUM LIKE YYLE0003-TKNUM, " Shipment number
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
QUANTITY TYPE P, " Quantity
END OF T_ITAB3.
--Internal table Declaration--
*Internal tables for the above Declared structures
DATA: G_VTTK_TAB TYPE TABLE OF T_VTTK_TAB,
G_ITAB5_TAB TYPE TABLE OF T_ITAB2,
G_ITAB4_TAB TYPE TABLE OF T_ITAB3,
G_ITAB3_TAB TYPE TABLE OF T_ITAB2. "#EC NEEDED
*Internal table Holding Shipment No.and quantity
DATA: BEGIN OF G_TOTAL_TAB OCCURS 0 ,
TKNUM TYPE YYLE0003-TKNUM, " Shipment number
QUANTITY TYPE P,
COUNT TYPE I,
END OF G_TOTAL_TAB .
*Internal table for selection screen data
DATA: BEGIN OF G_SCANDATA_TAB OCCURS 0,
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
EXIDV TYPE EXIDV, " External Handling Unit
TKNUM LIKE YYLE0003-TKNUM, " Shipment number
QUANTITY LIKE YYLE0003-QUANTITY, " Quantity
END OF G_SCANDATA_TAB.
DATA: BEGIN OF ST_SCANDATA_TAB,
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
EXIDV TYPE EXIDV, " External Handling Unit
TKNUM LIKE YYLE0003-TKNUM, " Shipment number
QUANTITY LIKE YYLE0003-QUANTITY, " Quantity
END OF ST_SCANDATA_TAB.
DATA: BEGIN OF G_SCANDATA_COUNT_TAB OCCURS 0,
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
TKNUM LIKE YYLE0003-TKNUM, " Shipment number
QUANTITY LIKE YYLE0003-QUANTITY, " Quantity
COUNT TYPE I,
END OF G_SCANDATA_COUNT_TAB.
DATA: L_COUNT TYPE I.
*Internal table for Packaging Materials and quantity
DATA: BEGIN OF G_ITAB6_TAB OCCURS 0,
VHILM LIKE YYLE0003-VHILM, " Packaging Materials
QUANTITY TYPE P, " Quantity
END OF G_ITAB6_TAB.
*- Field catalog
DATA: L_ALV_CAT1_TAB TYPE TABLE OF LVC_S_FCAT.
--Work area Declaration--
DATA: WA_VTTK TYPE T_VTTK_TAB,
WA_ITAB3 TYPE T_ITAB2,
WA_ITAB5 TYPE T_ITAB2,
WA_ITAB4 TYPE T_ITAB3,
WA_ITAB1 LIKE G_SCANDATA_TAB,
WA_ALV_CAT1 LIKE LINE OF L_ALV_CAT1_TAB.
----Variable Defnition -
DATA: G_CUSTOM_CONTAINER_0100 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
G_ALV_GRID_0100 TYPE REF TO CL_GUI_ALV_GRID,
G_CONTAINER_0100 TYPE SCRFNAME VALUE 'LIST',
G_MYLAYOUT TYPE LVC_S_LAYO, "#EC NEEDED
G_WA TYPE REF TO DATA.
DATA: G_VAR TYPE I, " No of records
G_VAR1 TYPE CHAR20. " Variable
--field symbols Declaration--
FIELD-SYMBOLS : <F_FS> TYPE TABLE,
<F_FS3> TYPE ANY,
<F_FS4> TYPE ANY,
<F_FS5> TYPE ANY,
<F_WA> TYPE ANY,
<F_FS15> TYPE ANY,
<F_FS16> TYPE SY-DATUM,
<F_FS2> TYPE T_ITAB2,
<F_FS6> TYPE ANY,
<F_FS7> TYPE ANY,
<F_FS12> TYPE ANY,
<F_FS13> TYPE ANY.
--Selection Parameters--
SELECTION-SCREEN: BEGIN OF BLOCK BLCK01 WITH FRAME TITLE TEXT-000.
"Select options
SELECT-OPTIONS :
S_TKNUM FOR YYLE0003-TKNUM , " Shipment number
S_YYREF FOR YYLE0003-YY_REFERENCE, " Packing reference
S_YYREFT FOR YYLE0003-YY_REFTP, " Reference type
S_EXIDV FOR YYLE0003-EXIDV, " External HU
S_MATNR FOR YYLE0003-MATNR, " Material number
S_VBELN FOR YYLE0003-VBELN, " SD number
S_POSNR FOR YYLE0003-POSNR, " Item number
S_LGTOR FOR YYLE0003-LGTOR, " Door for Wr Hs No
S_VHILM FOR YYLE0003-VHILM, " Packaging Mat
S_YYMEIN FOR YYLE0003-YY_MEINH, " Indicator for UOM
S_QUANTI FOR YYLE0003-QUANTITY, " Quantity
S_YCHECK FOR YYLE0003-YYCHECKED, " Destination_door
S_STATUS FOR YYLE0003-STATUS, " Packing status
S_STASHI FOR YYLE0003-STATUSSHIPTO, " Status on ship-to
S_LOADTR FOR YYLE0003-LOADTRUCK, " Load truck
S_ERDAT FOR YYLE0003-ERDAT , " Date
S_ERZET FOR YYLE0003-ERZET, " Entry time
S_AEDAT FOR YYLE0003-AEDAT, " Last changed on
S_ERNAM FOR YYLE0003-ERNAM, " Name of Person
S_AEZET FOR YYLE0003-AEZET, " Time last change
S_AENAM FOR YYLE0003-AENAM. " Name of person
SELECTION-SCREEN: END OF BLOCK BLCK01.
--INITIALIZATION--
INITIALIZATION.
Clear the variables and workarea
CLEAR :G_VAR,
G_VAR1,
WA_VTTK,
WA_ITAB3,
WA_ITAB5,
WA_ITAB4,
WA_ITAB1,
WA_VTTK,
WA_ITAB3,
WA_ITAB5,
WA_ITAB4,
WA_ITAB1.
--AT SELECTION-SCREEN--
AT SELECTION-SCREEN.
To validate the data entered in selection screen
PERFORM SUB_VALIDATE.
--START-OF-SELECTION--
START-OF-SELECTION.
*To fetch the data from table yyle0003
PERFORM GET_INPUT_DATA.
*To create the Dynamic Field Catalog
PERFORM GET_FIELDCAT.
To populate the data to final table
PERFORM GET_FINAL_DATA.
MODULE status_0100 OUTPUT *
MODULE STATUS_0100 OUTPUT.
*set title bar and PF status.
SET PF-STATUS 'ZVKS'.
SET TITLEBAR 'ZVKS'.
CHECK SY-UCOMM IS INITIAL.
SORT G_SCANDATA_TAB BY TKNUM VHILM.
*Create object for Custom container
CREATE OBJECT G_CUSTOM_CONTAINER_0100
EXPORTING
CONTAINER_NAME = G_CONTAINER_0100
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
*Create object for ALV grid
CREATE OBJECT G_ALV_GRID_0100
EXPORTING I_PARENT = G_CUSTOM_CONTAINER_0100.
G_MYLAYOUT-GRID_TITLE = 'Display Scanning data'.
*Call method for table Display
CALL METHOD G_ALV_GRID_0100->SET_TABLE_FOR_FIRST_DISPLAY
CHANGING
IT_OUTTAB = <F_FS>
IT_FIELDCATALOG = L_ALV_CAT1_TAB
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. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
User Interaction
MODULE USER_COMMAND_0100 INPUT.
CALL METHOD CL_GUI_CFW=>DISPATCH.
*To exit , back or cancel
CASE SY-UCOMM.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
LEAVE PROGRAM.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form get_input_data
This sub routine will get the data from yyle0003 table.
FORM GET_INPUT_DATA.
CONSTANTS: C_DOT TYPE C VALUE '.',
C_CHAR TYPE C VALUE 'D'.
CLEAR G_SCANDATA_TAB.
Get the data from yyle0003
SELECT VHILM " Packaging Materials
EXIDV " External Handling Unit
TKNUM " Shipment number
QUANTITY " Quantity
FROM YYLE0003
INTO TABLE G_SCANDATA_TAB
WHERE TKNUM IN S_TKNUM " Shipment number
AND YY_REFERENCE IN S_YYREF " Packing reference
AND YY_REFTP IN S_YYREFT " Reference type
AND EXIDV IN S_EXIDV " External Handling Unit
AND MATNR IN S_MATNR " Material number
AND VBELN IN S_VBELN " SD number
AND POSNR IN S_POSNR " Item number
AND LGTOR IN S_LGTOR " Door for warehouse No
AND VHILM IN S_VHILM " Packaging Materials
AND YY_MEINH IN S_YYMEIN " Indicator for UOM
AND QUANTITY IN S_QUANTI " Quantity
AND YYCHECKED IN S_YCHECK " Destination_door
AND STATUS IN S_STATUS " Packing status
AND STATUSSHIPTO IN S_STASHI " Status on ship-to
AND LOADTRUCK IN S_LOADTR " Load truck
AND ERDAT IN S_ERDAT " Date
AND ERZET IN S_ERZET " Entry time
AND AEDAT IN S_AEDAT " Last changed on
AND ERNAM IN S_ERNAM " Name of Person
AND AEZET IN S_AEZET " Time last change
AND AENAM IN S_AENAM. " Name of person
If VHILM contains any Decimal '.', replace it with D
LOOP AT G_SCANDATA_TAB.
REPLACE C_DOT WITH C_CHAR INTO G_SCANDATA_TAB-VHILM.
IF SY-SUBRC = 0.
MODIFY G_SCANDATA_TAB TRANSPORTING VHILM.
ENDIF.
CLEAR G_SCANDATA_TAB.
ENDLOOP.
*To get the Shipment No Creation date from VTTK.
SELECT TKNUM
ERDAT
FROM VTTK
INTO TABLE G_VTTK_TAB
WHERE TKNUM IN S_TKNUM.
SORT G_SCANDATA_TAB BY VHILM EXIDV. "TKNUM VHILM.
*To get the repeatition of Pacakaging material for each Shipment.
*--- to find the count of packaging materials under each shipment
LOOP AT G_SCANDATA_TAB.
READ TABLE G_SCANDATA_TAB INTO ST_SCANDATA_TAB INDEX SY-TABIX.
AT END OF EXIDV.
L_COUNT = L_COUNT + 1.
MOVE-CORRESPONDING ST_SCANDATA_TAB TO G_SCANDATA_COUNT_TAB.
G_SCANDATA_COUNT_TAB-COUNT = L_COUNT.
CLEAR: ST_SCANDATA_TAB, L_COUNT.
COLLECT G_SCANDATA_COUNT_TAB.
ENDAT.
CLEAR : G_SCANDATA_TAB.
ENDLOOP.
ENDFORM. " get_input_data
*& Form sub_validate
*This subroutine will validate the data eneterd in the selection screen
FORM SUB_VALIDATE.
*Varaiable declaration for Shipment number
DATA: L_TKNUM TYPE YYLE0003-TKNUM."#EC NEEDED " Shipment number
*- Condition will not qualify all primary key (IDENT)
SELECT TKNUM FROM YYLE0003 UP TO 1 ROWS
INTO L_TKNUM "wa_scandata
WHERE TKNUM IN S_TKNUM " Shipment number
AND YY_REFERENCE IN S_YYREF " Packing reference
AND YY_REFTP IN S_YYREFT " Reference type
AND EXIDV IN S_EXIDV " External Handling Unit
AND MATNR IN S_MATNR " Material number
AND VBELN IN S_VBELN " SD number
AND POSNR IN S_POSNR " Item number
AND LGTOR IN S_LGTOR " Door for warehouse No
AND VHILM IN S_VHILM " Packaging Materials
AND YY_MEINH IN S_YYMEIN " Indicator for UOM
AND QUANTITY IN S_QUANTI " Quantity
AND YYCHECKED IN S_YCHECK " Destination_door
AND STATUS IN S_STATUS " Packing status
AND STATUSSHIPTO IN S_STASHI " Status on ship-to
AND LOADTRUCK IN S_LOADTR " Load truck
AND ERDAT IN S_ERDAT " Date
AND ERZET IN S_ERZET " Entry time
AND AEDAT IN S_AEDAT " Last changed on
AND ERNAM IN S_ERNAM " Name of Person
AND AEZET IN S_AEZET " Time last change
AND AENAM IN S_AENAM. " Name of person
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E987 . " No data found for these selection criterias
ENDIF.
ENDFORM. " sub_validate
*& Form get_fieldcat
Preparing Field catalog
FORM GET_FIELDCAT.
DATA: L_REF TYPE REF TO DATA,
L_I TYPE I. " Variable
CONSTANTS: C_CENTER TYPE C VALUE 'C'. " Center Justified
LOOP AT G_SCANDATA_TAB INTO WA_ITAB1.
MOVE-CORRESPONDING WA_ITAB1 TO WA_ITAB3.
APPEND WA_ITAB3 TO G_ITAB3_TAB.
MOVE-CORRESPONDING WA_ITAB1 TO WA_ITAB4.
COLLECT WA_ITAB4 INTO G_ITAB4_TAB.
*To sum up the qunatity field for each TKNUM.
AT END OF TKNUM.
SUM.
MOVE WA_ITAB1-TKNUM TO G_TOTAL_TAB-TKNUM.
MOVE WA_ITAB1-QUANTITY TO G_TOTAL_TAB-QUANTITY .
APPEND G_TOTAL_TAB.
CLEAR G_TOTAL_TAB.
ENDAT.
CLEAR : WA_ITAB1,
WA_ITAB3,
WA_ITAB4.
ENDLOOP.
*--- Begin of change - SKR.EXT - EBDK986377
SORT G_ITAB4_TAB BY TKNUM.
*--- End of change - SKR.EXT - EBDK986377
LOOP AT G_ITAB4_TAB INTO WA_ITAB4.
MOVE-CORRESPONDING WA_ITAB4 TO WA_ITAB5.
MOVE-CORRESPONDING WA_ITAB4 TO G_ITAB6_TAB.
*---- to get the count
READ TABLE G_SCANDATA_COUNT_TAB WITH KEY TKNUM = WA_ITAB5-TKNUM
VHILM = WA_ITAB5-VHILM.
IF SY-SUBRC EQ 0.
WA_ITAB5-COUNT = G_SCANDATA_COUNT_TAB-COUNT.
ENDIF.
APPEND WA_ITAB5 TO G_ITAB5_TAB.
COLLECT G_ITAB6_TAB.
ENDLOOP.
CLEAR : WA_ITAB3.
SORT G_ITAB4_TAB BY TKNUM VHILM.
DELETE ADJACENT DUPLICATES FROM G_ITAB4_TAB COMPARING VHILM.
*To get the Number of fields to be displayed
DESCRIBE TABLE G_ITAB4_TAB LINES G_VAR.
L_I = '3'.
*Field catalog
WA_ALV_CAT1-FIELDNAME = 'TKNUM'(002).
WA_ALV_CAT1-COL_POS = 1.
WA_ALV_CAT1-COLTEXT ='ShipmentNo.'.
APPEND WA_ALV_CAT1 TO L_ALV_CAT1_TAB.
CLEAR : WA_ALV_CAT1.
WA_ALV_CAT1-FIELDNAME = 'ERDAT'(003).
WA_ALV_CAT1-COL_POS = 2.
WA_ALV_CAT1-COLTEXT ='Creation_Date.'(005).
APPEND WA_ALV_CAT1 TO L_ALV_CAT1_TAB.
CLEAR : WA_ALV_CAT1.
Create field catalog for each of VHILM
LOOP AT G_ITAB4_TAB INTO WA_ITAB4.
IF G_VAR >= 1.
CONDENSE WA_ITAB4-VHILM NO-GAPS.
WA_ALV_CAT1-FIELDNAME = WA_ITAB4-VHILM. "l_fieldname.
WA_ALV_CAT1-COL_POS = L_I.
WA_ALV_CAT1-COLTEXT = WA_ITAB4-VHILM.
WA_ALV_CAT1-JUST = C_CENTER. "'C'.
APPEND WA_ALV_CAT1 TO L_ALV_CAT1_TAB.
CLEAR WA_ALV_CAT1.
L_I = L_I + 1.
ENDIF.
*TOTAL-last column in the field catalog
AT LAST.
WA_ALV_CAT1-FIELDNAME = 'TOTAL'(004).
WA_ALV_CAT1-COL_POS = L_I.
WA_ALV_CAT1-COLTEXT = 'TOTAL'(004).
WA_ALV_CAT1-JUST = C_CENTER. " 'C'.
APPEND WA_ALV_CAT1 TO L_ALV_CAT1_TAB.
CLEAR WA_ALV_CAT1.
ENDAT.
SORT L_ALV_CAT1_TAB BY FIELDNAME.
*Non of the field name should not get repeated
DELETE ADJACENT DUPLICATES FROM L_ALV_CAT1_TAB.
ENDLOOP.
SORT L_ALV_CAT1_TAB BY COL_POS.
*Creating Dynamic Internal table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = L_ALV_CAT1_TAB
IMPORTING
EP_TABLE = L_REF.
Assigning the Dynamic field Catalog to field symbol.
ASSIGN L_REF->* TO <F_FS>.
CREATE DATA G_WA LIKE LINE OF <F_FS>.
ASSIGN G_WA->* TO <F_WA>.
DELETE ADJACENT DUPLICATES FROM <F_FS> COMPARING ALL FIELDS.
ENDFORM. " get_fieldcat
*& Form display_data
FORM GET_FINAL_DATA.
*variable declaration
DATA: L_TOTAL TYPE I, " Row wise total
L_FILL TYPE I, " Count
L_TOT TYPE I. " Grand total
*To get the TOTAL qunatity in the last line of out put.
LOOP AT G_ITAB6_TAB.
CLEAR WA_ITAB5.
WA_ITAB5-TKNUM = 'TOTAL'(004).
WA_ITAB5-ERDAT = SPACE.
MOVE-CORRESPONDING G_ITAB6_TAB TO WA_ITAB5 .
LOOP AT G_SCANDATA_COUNT_TAB WHERE VHILM = G_ITAB6_TAB-VHILM.
WA_ITAB5-COUNT = WA_ITAB5-COUNT + G_SCANDATA_COUNT_TAB-COUNT.
ENDLOOP.
APPEND WA_ITAB5 TO G_ITAB5_TAB.
CLEAR WA_ITAB5.
ENDLOOP.
DESCRIBE TABLE G_ITAB5_TAB LINES L_TOT.
*>>>>>>>>
****To get total qunatity of all TKNUM
LOOP AT G_TOTAL_TAB .
L_TOTAL = L_TOTAL + G_TOTAL_TAB-QUANTITY.
ENDLOOP.
*>>>>>>>>
*To assign ERDAT to g_itab5_tab
LOOP AT G_ITAB5_TAB INTO WA_ITAB5 .
READ TABLE G_VTTK_TAB INTO WA_VTTK WITH KEY TKNUM = WA_ITAB5-TKNUM.
IF SY-SUBRC = 0.
WA_ITAB5-ERDAT = WA_VTTK-ERDAT.
MODIFY G_ITAB5_TAB FROM WA_ITAB5 TRANSPORTING ERDAT.
ENDIF.
ENDLOOP.
*Assigning value in each field to respective Field symbols.
LOOP AT G_ITAB5_TAB ASSIGNING <F_FS2>.
CLEAR G_TOTAL_TAB-QUANTITY.
ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <F_FS2> TO <F_FS6>.
ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <F_WA> TO <F_FS7>.
<F_FS7> = <F_FS6>.
CONDENSE <F_FS2>-VHILM NO-GAPS.
ASSIGN COMPONENT 'VHILM' OF STRUCTURE <F_FS2> TO <F_FS3>.
ASSIGN COMPONENT 5 OF STRUCTURE <F_FS2> TO <F_FS4>.
MOVE <F_FS3> TO G_VAR1.
ASSIGN COMPONENT G_VAR1 OF STRUCTURE <F_WA> TO <F_FS5>.
<F_FS5> = <F_FS4>.
ASSIGN COMPONENT 'ERDAT' OF STRUCTURE <F_FS2> TO <F_FS16>.
ASSIGN COMPONENT 'ERDAT' OF STRUCTURE <F_WA> TO <F_FS15>.
WRITE <F_FS16> TO <F_FS15> .
Inorder not to display the date '00/00/000',
if there is no DATE .
IF ( <F_FS15> CP '00/*' )
OR ( <F_FS15> CP '00.*' )
OR ( <F_FS15> CP '00-*' ).
<F_FS15> = SPACE.
ELSEIF ( <F_FS15> CO ' / /' )
OR ( <F_FS15> CO ' . .' )
OR ( <F_FS15> CO ' - -' ) .
<F_FS15> = SPACE.
ENDIF.
READ TABLE G_TOTAL_TAB WITH KEY TKNUM = <F_FS6>.
IF SY-SUBRC = 0.
ASSIGN G_TOTAL_TAB-QUANTITY TO <F_FS12>.
ASSIGN COMPONENT 'COUNT' OF STRUCTURE <F_FS2> TO <F_FS12>.
ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <F_WA> TO <F_FS13>.
<F_FS13> = <F_FS13> + <F_FS12>.
L_TOTAL = L_TOTAL + <F_FS12>.
ENDIF.
L_FILL = L_FILL + 1.
IF L_FILL = L_TOT.
ASSIGN L_TOTAL TO <F_FS12>.
ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <F_WA> TO <F_FS13>.
<F_FS13> = <F_FS12>.
ENDIF.
AT END OF <F_FS2>-TKNUM.
APPEND <F_WA> TO <F_FS>.
CLEAR <F_WA>.
ENDAT.
ENDLOOP.
CLEAR: <F_FS6>,
<F_FS7>,
<F_WA>.
*Call the screen where Custom container is defined
CALL SCREEN 0100.
ENDFORM. " display_data
Regards
Kannaiah -
Empty rows, Columns in EPM reports
Thru the EPM new report creation ICON, I am selecting rows and columns to create new report.
I am selecting nearly 20 accounts in account selection most of them are parent account.
However while displaying the report inbetween some of the accounts I need to leave empty rows and put some summation totals.
Is it possible to leave many blank lines in between some of the accounts? How to do it?
Similarly in the column I have selected time dimension and inbetween some months I need to put some local member formula.
Does the EPM report works like that? Or do I have to go for EPMretrievedata based reports.
Appreciate inputs.Please, search forum about static reports, I have explained this approach number of times.
Example:
Static report in BPC NW 10
Replacing dim values with derived values
Vadim -
Insert data into multiple tables
Hi all,
I've a requirement where i need to insert data into multiple tables using PL/SQL procedure
Procedure should have two parameters
1. Table Name (parameter1)
2. Data (parameter2)
Based on these two parameters i need to insert data into table (parameter1) using data (parameter2)
ex:
Procedure insert_data (p_table IN VARCHAR2
,p_data IN -- what should be the datatype?
IS
l_statement VARCHAR2(2000);
BEGIN
-- insert data into tables
INSERT INTO p_table
values (....);
END insert_data;Thanks in advance!!BEDE wrote:
Amen to that!
So, I believe a better approach would be the following...
Suppose you have N datafiles with the same structure, and you wish to insert into the database the data from all those files.
For that, you should have a single table, named, say incoming_file_data, which should be structured more or less like below:
create table incoming_file_data (
filename varchar2(250) not null -- name of the file inserted from
,file_time timestamp -- timestamp when the data was inserted
,... -- the columns of meaningful data contained in the lines of those files
);And you will insert the data from all those files in this table, having normally one transaction for each file processed, for otherwise, when shit happens, some file may only get to be partially inserted into the table...
Maybe one good approach would be to create dynamically an external table for the file to be loaded, and then execute dynamically insert select into the table I said, so that you will have only one insert select for one file instead of using utl_file... RTM on that.If the file structures are the same, and it's just the filename that's changing, I would have a single external table definition, and use the alter table ... location ... statement (through execute immediate) to change the filename(s) as appropriate before querying the data. Of course that's not scalable if there are multiple users intenting to use this, but generally when we talk about importing multiple files, it's a one-user/one-off/once-a-day type of scenario, so multi-user isn't a consideration. -
Decision between multiple alternatives -question
Hello all,
I have some doubts about process Decision between Multiple Alternatives, from RSPC transaction.
The problem is like this:
1. I have one main process chain.
2. I have the process decision between multiple alternatives, in this main chain, after start.
I choosed formula and I put an if (as in the code below). Then I put the WORKINGDAY_MONTH
In it I want to test to have the 19-th working day of the current month , factory calender ' 01'.
If I have this day I want , I want to raise an event.
IF( WORKINGDAY_MONTH( Current Date, '01', '' ) = 19, 'ZEVENT_WD', 'ZEVENT_ERROR' )
This event would be usefull so I can start with it a second chain(inserted in the main chain).
The system says (when I check my formula) that it is sintactically correct, but incomplete.
Any clues why this message apears ?
I don't know if it is ok to put the events like that in my IF (one to start the subchain and one as error).
Thank you a lot.Hi,
The decision process type allows you to determine a set of conditions
For more info go though the below link , as they have explained step by step with screenshots
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/900be605-7b59-2b10-c6a8-c4f7b2d98bae&overridelayout=true
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/301fb325-9d90-2c10-7199-89fc7b5a17b9&overridelayout=true
Regards,
Marasa.
Maybe you are looking for
-
How do I set up Macintosh Classic printing to make PDFs?
A set-up that works very well, and one that I recommend, is that you maintain the latest Acrobat on the OS X side, and use it to create your PDFs. The executive summary is (1) set up printers in Classic using OS X Acrobat PPDs; (2) print PostScript f
-
Hi all, I'm experiencing a strange behavior with eclipse. If i type Ctrl+Space to allow auto code completion, eclipse hooks up, cpu goes to 100% and i can only force quit. Looking on google, it seems that is a xulrunner issue, they suggest to remove
-
Is it possible media could be saved to the Touch?8Gb
Although there is no way at the moment to save things (pictures, videos, etc) directly from the web. Is it possible that you would be able to do this on the iPT? perhaps in Feb once the SDK has been released? Can media other than iTunes media be save
-
Baking a Layer with Camera Movement
Picking up on my adjacent post... I'm trying to bake a layer in a project that has camera movement... we start on a man in closeup and then we zoom out to a long shot. But if I turn off the camera, the man is in closeup and stays that way. Baked and
-
How to tell which version of ipad I have?
I would like to know which version of the ipad I have and how to tell if its ipad2 or ipad3 ? I offten get this question but not sure how to properly answr it.