Attributes in Layout
Hi
Case: We have costcenter in the Cube but the costcenter manager responsible for that costcenter is not there in the cube but it is the attribute to Costcenter. When I design the Layout, Can I use the person responsible to costcenter attribute in the layout as the Header.If yes, let me know how? We already have some planning levels built on the cube.
Thanks,
Raj.
Hello Raj,
One way to display the responsible person is to use the cost center in the lead columns and display the attribute in the lead columns as well. But this is probably not what you want.
If you select the cost centers via the attribute you could use a variable and display the variable value in the web interface. Unfortunately if you do so you cannot jump between responsible persons as you cannot change the value of a variable type attribute in a web interface. As one person might be responsible for several cost centers you would have to make sure that the cost center is again in the lead columns.
The last option is to use the web interface extension class. In this class you could read the actual value of the cost center in the header and then get the corresponding responsible person from the master data record. You could display the value in a text field. You can get some information on how to use this extension class in the how to papers "...Validate key figure values in web interfaces" or "... Execute a planning function on save in a web interface".
Best regards,
Gerd Schoeffl,
SAPNetWeaver RIG BI EMEA
Similar Messages
-
Attribute "Report Layout" is missing in the "Print Attributes" tab for IR
Hallo,
The attribute “Report Layout” is missing in the “Print Attributes” tab for an interactive report?
How to alter the report layout (xsl-fo) of an interactive report?
Has someone any idea where to configure this?
Btw, for the "classic" SQL Report the XSL-FO "Report Layout" can be cahnged in "Print Attributes" and this works fine for me. But I want to change the xsl-fo for the interactive report.
"If you do not select a report layout, a default XSL-FO layout is used. The default XSL-FO layout is always used for rendering Interactive Report regions. ... Unlike classic reports, the Interactive Report Print Attributes can only utilize the default XSL-FO layout and is initiated from the Report Attributes, Download section rather than directly from this screen. Once configured, these attributes only apply only to the current region and cannot be used outside the context of the region."
http://apex.oracle.com/i/doc/bldapp_rpt_print.htm
How can the "default XSL-FO layout" be changed?
Changing is necessary because the Apache FOP 1.0 reports the following error (for the transmitted default XSL-FO):
"fo:simple-page-master", "fo:region-body" must be declared before "fo:region-before"
http://www.w3.org/TR/xsl/#fo_region-before
The default report layout is not saved in:
select * from APEX_040000.WWV_FLOW_REPORT_LAYOUTS
Thx, WilliI've found two workaround for getting Apache FOP 1.0 to work with Oracle Apex 4.0 for PDF printing of interactive reports:
1, Use an application process to set your custom layout for interactive reports:
[ ] grant all on APEX_040000.WWV_RENDER_REPORT3 to {YOUR_SCHEMA_NAME};
[ ] Create an Application Process e.g. "Custom Report Layout" with constraint for request 'PDF' and Process Text:
declare
v_xsl varchar2(32767);
begin
v_xsl := '<?xml version = ''1.0'' encoding = ''utf-8''?>
<xsl:stylesheet version="2.0"
<fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
<fo:region-before region-name="region-header" extent="54.0pt"/>
</xsl:stylesheet>';
APEX_040000.WWV_RENDER_REPORT3.g_prn_template := v_xsl;
end;2, If you have some knowlege in Java change the sequnce of the the nodes in the apex_fop.jsp (or servlet), ie. changing the xsl before you use it for transformation.
The code depends on the solution you are using to parse the xsl string.
Hope this may help someone,
Willi -
How to display xml attributes in Layout (indesign cs2)
Hi,
Javascript
Indesign CS2
PC Version
Any one tell me, i want to display the ids in the margin. i read xml attribute, but i didn't know how to display to the margin. Help me.One way of doing that is to use JDOM...
u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls. -
Making attributes of field dynamic in dialog program in layout editor.
hi,
to make a field required or possible or hidden, we define its attributes in attributes in layout editor.
is it possible to make attributes of fields that we define in layout editor dynamic ?
if functional people want to make some field non-mandatory or mandatory then they go in configuration, and do it. so does this mean that the attributes of the fields that we define in layout editor during dialog program can be made dynamic.
how is this possible ? because attributes are selected using dropdown, its not a code ?
please help in solving this mystery...Screen Modifications --
<u>demo_dynpro_modify_simple
demo_dynpro_modify_screen</u>
<b><u>Please dont forget to reward points</u></b>
Sudheer -
Help required in Struts Layout Tags
Is it possible to pass more the one parameter in paramProperty & paramId attribute of<layout:link /> tag.
I am using an collecetion item.
pls let me know if it is possible.
<layout:collectionItem title="Edit" property="editImage" styleClass="FORM">
<layout:link href="/epat-app/editUserInfo.do?method=loadEdit" paramId="racfId" paramName="UserInfoParamEntryForm" paramProperty="racfId">
<img src = "<%=strContextPath%>/config/edit.gif" border="0"/>
</layout:link>
</layout:collectionItem>i bet this would be an excellent question for a struts forum
-
Xalan: extension element, evaluating xsl:attribute in an extension
Hi,
Can I evaluate in an extension method of an extension class an <xsl:attribute ... ?
for example in:
<test:layout figure="rectangle" >
<xsl:attribute name="color"><xsl:value-of select="$var1" /></xsl:attribute>
</test:layout>
having Test as the extension class, and "layout" the corresponding method, I need to evaluate attribute "color", I have test it and when Test.layout is called it does'nt has color attribute, is there any way to evaluate the <xsl:attribute ... expression to access the value of color ?
thanks for any help.Hi, I found the answer, and here it is for any body with same dude:
String attrExpr = ((ElemExtensionCall)elem).getAttribute ( "color", context.getContextNode(), context.getTransformer() );
org.apache.xpath.XPathContext xctxt = context.getTransformer().getXPathContext();
XPath myxpath = new XPath(attrExpr, elem, xctxt.getNamespaceContext(), XPath.SELECT);
XObject xobj = myxpath.execute(xctxt, context.getContextNode(), elem);
return xobj.str(); // this is the value of the attribute.
in xslt: <test:entension1 color="@Attr" /> or any other xPath
I found it at Redirect.java
thanks to you all. -
Read master data variable values in fox before executing the layout
Hello,
I do have a requirement that if a user picks up a customer which do not have any account group assigned, the layout cannot be plannable. Account grp is an attribute of customer.I kept this function under function attribute before layout display. It is not giving any message if the selected combination of the variables in the planning data do not have any data. The user should get a message even before the data is entered.
My basic understanding is that the below function is reading thru transaction data and is not reading the variable values before opening the planning layout under planning folder.
Any suggestions.. Your help is greatly appreciated.
Thanks,
Code is below------
DATA CUSTOMER TYPE 0CUSTOMER.
DATA ACCOUNTGRP TYPE ZKATR3.
CUSTOMER =VARV(CUSTOMER).
ACCOUNTGRP =ATRV(ZKATR3,CUSTOMER).
DO.
IF ACCOUNTGRP = #.
MESSAGE E003(/SEM/001) WITH '*** CUSTOMER NOT PLANNABLE:*'.
EXIT.
ENDIF.
ENDDO.Hey,
can you tell a little more how you want to use your coding ? I mean is it a fox formula and when it is the case when and how do you execute this function ? And even if you have the right coding, how will you set the accountgrp for a customer that has none assigned ?
Genenrally your coding (if it will be executed by a fox formular) will check the value of the global variabel 'customer', checks the value of the named attribute. But I think your loop is not 100% right. You have to put the exit statement outside your if statement because if the accountgrp != # it will be an endless loop. -
F4 for Editable field in ALV, display Name but capture ID
Hi Friends,
I have a ALV for which i have defined a Structure, which is passed to Fieldcatlog.
I have defined a Search help - ZUSER_NAME which has following fields to display.
USERID - USR02-BNAME
FNAME
LNAME
FULLNAME
So my structure for fieldcatalog has User-id which is linked to this search help with Domain XUBNAME.
So in my report i made this User-Id as editable and F4 available, everything is working fine.
when user does a F4, its displaying Userid,Fname,Lname and complete name.upon selection and save i am capturing the id and storing in the ztable.
But now i have a requirement that when user selects a value from this search help on F4, i need to display Fullname but capture the User Id. How can i do that?
This is something similar to the one we have in BSP- key-value pair.
how to do this in ALV.
Appreciate if someone can guide me thru.
Thanks,
Simha
Edited by: Simha on Sep 6, 2008 2:24 PMhai , this is example code for editing the F4 display .. check out this
REPORT zalv_editf4display.
*Type pools for alv
TYPE-POOLS : slis.
*structure for t582a tbale
TYPES : BEGIN OF ty_table,
infty TYPE infty,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_table.
*Structure for infotype text
TYPES : BEGIN OF ty_itext,
infty TYPE infty,
itext TYPE intxt,
sprsl TYPE sprsl,
END OF ty_itext.
*Structure for output display
TYPES : BEGIN OF ty_output,
infty TYPE infty,
itext TYPE intxt,
pnnnn TYPE pnnnn_d,
zrmkz TYPE dzrmkz,
zeitb TYPE dzeitb,
dname TYPE dianm,
davo TYPE davo,
davoe TYPE davoe,
END OF ty_output.
*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.
*Data declarations for dropdown lists for f4
DATA: it_dropdown TYPE lvc_t_drop,
ty_dropdown TYPE lvc_s_drop,
*data declaration for refreshing of alv
stable TYPE lvc_s_stbl.
*Global variable declaration
DATA: gstring TYPE c.
*Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout
*ok code declaration
DATA:
ok_code TYPE ui_func.
*initialization event
INITIALIZATION.
*start of selection event
START-OF-SELECTION.
*select the infotypes maintained
SELECT infty
pnnnn
zrmkz
zeitb
dname
davo
davoe
FROM t582a UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE it_table.
*Select the infotype texts
IF it_table[] IS NOT INITIAL.
SELECT itext
infty
sprsl
FROM t582s
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE infty = it_table-infty
AND sprsl = 'E'.
ENDIF.
*Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table.
wa_output-infty = wa_table-infty.
wa_output-pnnnn = wa_table-pnnnn.
wa_output-zrmkz = wa_table-zrmkz.
wa_output-zeitb = wa_table-zeitb.
wa_output-dname = wa_table-dname.
wa_output-davo = wa_table-davo.
wa_output-davoe = wa_table-davoe.
For texts
READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
wa_output-itext = wa_ittext-itext.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
Calling the ALV screen with custom container
CALL SCREEN 0600.
*On this statement double click it takes you to the screen painter SE51.
*Enter the attributes
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen ,
Here we can give a title and customized menus
*create 2 buttons with function code 'SAVE' and 'EXIT'.
GIVE A SUITABLE TITLE
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module PBO OUTPUT
text
MODULE pbo OUTPUT.
*Creating objects of the container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CCONT'.
create object for alv grid
create object c_alvgd
exporting
i_parent = c_ccont.
SET field for ALV
PERFORM alv_build_fieldcat.
Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " PBO OUTPUT
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
*subroutine to build fieldcat
FORM alv_build_fieldcat.
DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'INFTY'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'Infotype'.
lv_fldcat-icon = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PNNNN'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Structure'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'ITEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '5'.
lv_fldcat-fieldname = 'ZRMKZ'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 1.
lv_fldcat-scrtext_m = 'PERIOD'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '6'.
lv_fldcat-fieldname = 'ZEITB'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 5.
lv_fldcat-scrtext_m = 'Time constraint'.
lv_fldcat-edit = 'X'.
*To avail the existing F4 help these are to
*be given in the field catalogue
lv_fldcat-f4availabl = 'X'.
lv_fldcat-ref_table = 'T582A'.
lv_fldcat-ref_field = 'ZEITB'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '7'.
lv_fldcat-fieldname = 'DNAME'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Dialogmodule'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '8'.
lv_fldcat-fieldname = 'DAVO'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'Start'.
lv_fldcat-edit = 'X'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '9'.
lv_fldcat-fieldname = 'DAVOE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'End'.
lv_fldcat-icon = ''.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
*To create drop down for the field 'DAVO'
with our own f4 help
ty_dropdown-handle = '1'.
ty_dropdown-value = ' '.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '1'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '2'.
APPEND ty_dropdown TO it_dropdown.
ty_dropdown-handle = '1'.
ty_dropdown-value = '3'.
APPEND ty_dropdown TO it_dropdown.
CALL METHOD c_alvgd->set_drop_down_table
EXPORTING
it_drop_down = it_dropdown.
LOOP AT it_fcat INTO lv_fldcat.
CASE lv_fldcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'DAVO'.
lv_fldcat-drdn_hndl = '1'.
lv_fldcat-outputlen = 15.
MODIFY it_fcat FROM lv_fldcat.
ENDCASE.
ENDLOOP.
ENDFORM. " alv_build_fieldcat
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
*Subroutine for setting alv layout
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.
ENDFORM. " alv_report_layout
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module PAI INPUT
text
MODULE pai INPUT.
*To change the existing values and refresh the grid
*And only values in the dropdown or in the default
*F4 can be given , else no action takes place for the dropdown
*and error is thrown for the default F4 help and font changes to red
*and on still saving, value is not changed
c_alvgd->check_changed_data( ).
*Based on the user input
*When user clicks 'SAVE;
CASE ok_code.
WHEN 'SAVE'.
*A pop up is called to confirm the saving of changed data
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'SAVING DATA'
text_question = 'Continue?'
icon_button_1 = 'icon_booking_ok'
IMPORTING
answer = gstring
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*When the User clicks 'YES'
IF ( gstring = '1' ).
MESSAGE 'Saved' TYPE 'S'.
*Now the changed data is stored in the it_pbo internal table
it_pbo = it_output.
*Subroutine to display the ALV with changed data.
PERFORM redisplay.
ELSE.
*When user clicks NO or Cancel
MESSAGE 'Not Saved' TYPE 'S'.
ENDIF.
**When the user clicks the 'EXIT; he is out
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
CLEAR: ok_code.
ENDMODULE. " PAI INPUT
*& Form REDISPLAY
text
--> p1 text
<-- p2 text
FORM redisplay .
*Cells of the alv are made non editable after entering OK to save
CALL METHOD c_alvgd->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
*Row and column of the alv are refreshed after changing values
stable-row = 'X'.
stable-col = 'X'.
*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
CALL METHOD c_alvgd->refresh_table_display
EXPORTING
is_stable = stable
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " REDISPLAY -
Menu Button in ALV toolbar (multiple choices for a button)
Hi abapers,
I would like to have a button with multiple choices in the toolbar;
at the moment I have created a menu button with just one function.
Here is my code:
CLASS lcl_event_receiver (Definition)
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
ENDCLASS. "lcl_event_receiver DEFINITION
CLASS lcl_event_receiver (Implementation)
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
DATA: ls_toolbar TYPE stb_button.
*Separator
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
*Button
CLEAR ls_toolbar.
MOVE 1 TO ls_toolbar-butn_type.
MOVE 'EDIT' TO ls_toolbar-function.
MOVE icon_change TO ls_toolbar-icon.
MOVE ' Modifica'(l02) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
MOVE 'Modifica' TO ls_toolbar-quickinfo.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
ENDCLASS. "lcl_event_receiver IMPLEMENTATIONhi,
check this code and reward me if it helps you..
TYPE-POOLS : slis,icon.
*Structure declaration for tcodes
TYPES : BEGIN OF ty_table,
tcode TYPE tcode,
pgmna TYPE progname,
END OF ty_table.
*Structure for tocde text
TYPES : BEGIN OF ty_itext,
tcode TYPE tcode,
ttext TYPE ttext_stct,
sprsl TYPE sprsl,
END OF ty_itext.
*Structure for output display
TYPES : BEGIN OF ty_output,
tcode TYPE tcode,
pgmna TYPE progname,
ttext TYPE ttext_stct,
END OF ty_output.
*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.
*Class definition for ALV toolbar
CLASS: lcl_alv_toolbar DEFINITION DEFERRED.
*Declaration for toolbar buttons
DATA : ty_toolbar TYPE stb_button.
Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo, "Layout
c_alv_toolbar TYPE REF TO lcl_alv_toolbar, "Alv toolbar
c_alv_toolbarmanager TYPE REF TO cl_alv_grid_toolbar_manager. "Toolbar manager
*Initialization event
INITIALIZATION.
*Start of selection event
START-OF-SELECTION.
*Subroutine to get values from tstc table
PERFORM fetch_data.
*subroutine for alv display
PERFORM alv_output.
CLASS lcl_alv_toolbar DEFINITION
ALV event handler
CLASS lcl_alv_toolbar DEFINITION.
PUBLIC SECTION.
*Constructor
METHODS: constructor
IMPORTING
io_alv_grid TYPE REF TO cl_gui_alv_grid,
*Event for toolbar
on_toolbar
FOR EVENT toolbar
OF cl_gui_alv_grid
IMPORTING
e_object.
ENDCLASS. "lcl_alv_toolbar DEFINITION
CLASS lcl_alv_toolbar IMPLEMENTATION
ALV event handler
CLASS lcl_alv_toolbar IMPLEMENTATION.
METHOD constructor.
Create ALV toolbar manager instance
CREATE OBJECT c_alv_toolbarmanager
EXPORTING
io_alv_grid = io_alv_grid.
ENDMETHOD. "constructor
METHOD on_toolbar.
Add customized toolbar buttons.
variable for Toolbar Button
ty_toolbar-icon = icon_generate.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button1'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_voice_output.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button2'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_phone.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button3'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_mail.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button4'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_voice_input.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button5'.
APPEND ty_toolbar TO e_object->mt_toolbar.
Call reorganize method of toolbar manager to
display the toolbar
CALL METHOD c_alv_toolbarmanager->reorganize
EXPORTING
io_alv_toolbar = e_object.
ENDMETHOD. "on_toolbar
ENDCLASS. "lcl_alv_toolbar IMPLEMENTATION
*& Form fetch_data
text
--> p1 text
<-- p2 text
FORM fetch_data .
Select the tcodes upto 200 rows from TSTC
SELECT tcode
pgmna
FROM tstc
INTO CORRESPONDING FIELDS OF TABLE it_table
UP TO 200 ROWS
WHERE dypno NE '0000'.
*Select the tcode textx
IF it_table[] IS NOT INITIAL.
SELECT ttext
tcode
sprsl
FROM tstct
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE tcode = it_table-tcode
AND sprsl = 'E'.
ENDIF.
Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table.
wa_output-tcode = wa_table-tcode.
wa_output-pgmna = wa_table-pgmna.
For texts
READ TABLE it_ittext INTO wa_ittext WITH KEY tcode = wa_table-tcode.
wa_output-ttext = wa_ittext-ttext.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
ENDFORM. " fetch_data
*& Form alv_output
text
--> p1 text
<-- p2 text
FORM alv_output .
*Calling the ALV
CALL SCREEN 0600.
ENDFORM. " alv_output
Calling the ALV screen with custom container
On this statement double click it takes you to the screen painter SE51.Enter the attributes
*Create a Custom container and name it CC_CONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
Now a normal screen with number 600 is created which holds the ALV grid. PBO of the actual screen , Here we can give a title and *customized menus
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module ALV_GRID OUTPUT
text
MODULE alv_grid OUTPUT.
*create object for custom container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CC_CONT'.
*create object of alv grid
CREATE OBJECT c_alvgd
EXPORTING
i_parent = c_ccont.
create ALV event handler
CREATE OBJECT c_alv_toolbar
EXPORTING
io_alv_grid = c_alvgd.
Register event handler
SET HANDLER c_alv_toolbar->on_toolbar FOR c_alvgd.
Fieldcatalogue for ALV
PERFORM alv_build_fieldcat.
ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " ALV_GRID OUTPUT
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
FORM alv_build_fieldcat.
DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'TCODE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'TCODE'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PGMNA'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'PROGNAME'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'TTEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
ENDFORM. " alv_build_fieldcat
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-zebra = 'X'.
ENDFORM. " alv_report_layout
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module USER_COMMAND_0600 INPUT
text
MODULE user_command_0600 INPUT.
ENDMODULE. " USER_COMMAND_0600 INPUT
thanks,
gupta -
Access to customizing default: report templates
I seem to remember far back in the corners of my memory, someone here on the forum mentioning that although we didn't have access at the time (probably back at HTMLDB 2.0) to customize the default report templates, that there were plans to make this an option in a future version of Apex. Does anyone have any idea if this is something that is being planned, or better yet, available today?
If you're not sure what I'm talking about I'm referring to the field that says 'Report Template' in the 'Layout and Pagination' section of the 'Report Attributes' page in the application builder.
The problem I'm having is that I'm using the 'default: vertical report, look 2 (show null columns)' report template and I've got some long column headings that I want to include a line break between each word of the heading, so they're stacked vertical instead of wide horizontally. I've add HTML break tags to the headings but they're disappearing when the page is rendered.
I've made sure to set the 'Strip HTML' setting to 'No', but whether it's set to yes or no doesn't matter, the headings display the same either way.
BTW, doing the same thing in a template based multi-row report seems to work fine. However, trying to use/apply the 'Value Attribute Pairs' report template yields the same result as the default vertical look template.
So I have 2 questions:
1) anyone know how I can make these heading words stack up vertically, one word to a line?
2) are we going to get access to customize the default report templates?
EarlHello,
1) anyone know how I can make these heading wordsstack up vertically, one word to a line?
Probably the best way to do this is to just hard code
a <br /> between your words.That's exactly what I'm doing (and what I said in my original post), however those breaks are disappearing during page rendering when I choose the report templates I mentioned.
I don't understand why this technique works in the multi-row report templates and not in these vertically oriented value/attribute report layouts.
2) are we going to get access to customize thedefault report templates?
No, you should just use a regular theme based
template, the default report templates are there for
backwards compatibility and well basically for people
that don't care about the UI. Since your at the point
it seems you do care about UI the proper thing to do
is to move to a standard report template that you
have full control over.Fair enough. I'll look into that, but I think there's still an open question here as to why the HTML breaks aren't being returned in the page markup for these report layouts.
Regards,
CarlEarl -
Empty report with pagination, rows not displayed
Dear HTML DB Team,
We have in our reports the next error: An empty report with pagination appears , no rows not displayed
The test case to reproduce the error:
1. Create "SQL report" with next report attributes in "Layout and Pagination"
a. Row ranges 1-15 16-30 in select list (with pagination)
b. Number of Rows : 15
c. Number of Rows (Item): empty
d. Max Row Count: empty
2. Fill the table on which the report is based with 17 rows
3. Go to the 2nd page of the report , pagination rows 16-17 of 17
4. Remove 2 rows from the table, refresh report
5, The pagination shows now 1 - 15 of 15 rows
- no rows displayed
- no "previous button" ( only )
- no way to get the rows displayed, except logging out and in again
Any suggestions?
ErikHello,
i encountered the same problem while developing in HTMLDB.
In application builder, i select application Application 106, then click on items, then click next ( the application has 22 global items). Now i want to take a look at the global items in application 105 (there are only 5). In the menu i click Builder - Application 106, select application 105 from Available Applications, click Go and Items. It shows no rows, but says that is displaying rows 1-5, and offers a Next button. No way to see/modify the items unless make a new session or go back to Application 106, Click Previous to see the first page of global items and then again switch to Appication 105 or click to the next button and then manually set pg_min_row=1 in URL.
One more question - is this forum the right place to report bug suspicions, or is there some other special place for that?
Best regards,
Andres -
Web ADI- Modification of FA Additions standard template problem
Dear Gurus,
We are on Oracle EBS 11.5.10.2. DB 10g On Oracle Enterprise Linux 5.8 BOX..
I have modified the custom template of FA Addition.. Here is what I needed and what I have done..
1. I excluded the mandatory Clearing Account Field from the template.
2. I enabled Attribute 1 to Attribute 6 columns for display.
3. Enabled those fields for mapping as well.
4. Created a new template.
All these I have done is by adjusting back end information.
Problem:
I am getting the attributes in layout creation page there I can select them for showing it on web adi spread sheet lines
but when I create the document the Attribute Columns does not appear in the sheet.
I have bounced the machine after doing the changes Still no result.
Technical Changes I made for doing this :
update bne_interface_cols_b x
set x.DISPLAY_FLAG = 'Y'
where x.INTERFACE_COL_NAME in ('ATTRIBUTE1','ATTRIBUTE2','ATTRIBUTE3','ATTRIBUTE4','ATTRIBUTE5','ATTRIBUTE6')
and x.INTERFACE_CODE = 'FA_MASS_ADD_INTERFACE'
update bne_interface_cols_b x
set x.MAPPING_ENABLED_FLAG = 'Y'
where x.INTERFACE_COL_NAME in ('ATTRIBUTE1','ATTRIBUTE2','ATTRIBUTE3','ATTRIBUTE4','ATTRIBUTE5','ATTRIBUTE6')
and x.INTERFACE_CODE = 'FA_MASS_ADD_INTERFACE'
Please let me know what I need to do for making these visible.
Regards,
Rubayat NewazLeo thanks your reply was really helpful.
here is what I did,
update bne_interface_cols_b
set val_type = null, group_name =null
where application_id = 140
and interface_code = 'FA_MASS_ADD_INTERFACE'
and interface_col_name in ('ATTRIBUTE2','ATTRIBUTE4','ATTRIBUTE5','ATTRIBUTE6','ATTRIBUTE7')
Walla it is showing in web adi. I am able to upload data..
but I am facing a new kind of problem.. When I upload data using pre validate
data is uploaded but I get this warning
No concatenated descriptive flexfield value to validate.
how to get rid of it ?
Regards,
Rubayat -
Not triggering PBO in OOABAP ALV grid
Hi all.
I want to create drop down for Document type BSART.for that iam using OOABAP but my program is not triggering PBO module itself.I have seen so many examples but iam unable to fetch data.what are the changes i have to do here.i have reduced some code here.i have written my final internal table select query before this stataement.
loop at it_git_final into wa_git_final.
APPEND wa_git_final TO it_git_final.
ENDLOOP.
*Call to ALV
CALL SCREEN 600.
MODULE status_0600 OUTPUT.
SET PF-STATUS 'DISP'.
SET TITLEBAR 'ALVF4'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
MODULE pbo OUTPUT.
*Creating objects of the container
* SET field for ALV
if g_custom_container is initial.
perform create_and_init_alv changing it_git_final
gt_fieldcat.
PERFORM alv_build_fieldcat.
endif.
* Set ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
i_save = 'A'
CHANGING
it_outtab = it_git_final
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
ENDMODULE. "pai INPUT
*subroutine to build fieldcat
FORM alv_build_fieldcat changing pt_fieldcat type lvc_t_fcat..
DATA lx_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'IT_GIT_FINAL'
CHANGING
ct_fieldcat = gt_fieldcat.
* To assign dropdown in the fieldcataogue
LOOP AT gt_fieldcat INTO lx_fcat.
DATA : lx_fcat TYPE lvc_s_fcat.
lx_fcat-row_pos = '1'.
lx_fcat-col_pos = '1'.
lx_fcat-fieldname = 'CHECK1'.
lx_fcat-ref_field = 'CHECK1'
lx_fcat-EDIT = 'X'.
lx_fcat-coltext = 'Check Box'.
lx_fcat-seltext = text-c01.
APPEND lx_fcat TO Gt_fieldcat.
CLEAR lx_fcat.
lx_fcat-row_pos = '1'.
lx_fcat-col_pos = '15'.
lx_fcat-fieldname = 'BSART'.
lx_fcat-ref_field = 'BSART'.
lx_fcat-ref_table = 'T161P'.
lx_fcat-coltext = 'Document Type'.
lx_fcat-drdn_hndl = '1'.
lx_fcat-outputlen = 15.
lx_fcat-edit = 'X'.
append lx_fcat to gt_fieldcat.
CLEAR lx_fcat.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = '01 ZFC Vesselchart Contract'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '02 ZQTY QTY Contract(SESA)'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
*method to display the dropdown in ALV
CALL METHOD g_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
LOOP AT it_fcat INTO lx_fcat.
CASE lx_fcat-fieldname.
To assign dropdown in the fieldcataogue
WHEN 'BSART'.
lx_fcat-drdn_hndl = '1'.
lx_fcat-outputlen = 15.
MODIFY it_fcat FROM lx_fcat.
ENDCASE.
ENDLOOP.
endform.
form ALV_OUTPUT .
*Create object for container
CREATE OBJECT g_custom_container
EXPORTING container_name = 'CCONT'.
*create object for grid
CREATE OBJECT g_grid
EXPORTING i_parent = g_custom_container.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = it_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = it_git_final.
endform. " ALV_OUTPUT
form ALV_REPORT_LAYOUT .
it_layout-cwidth_opt = 'X'.
it_layout-col_opt = 'X'.
it_layout-zebra = 'X'.
endform. " ALV_REPORT_LAYOUT
form CREATE_AND_INIT_ALV changing p_it_git_final
p_gt_fieldcat.
create object g_custom_container
exporting container_name = g_container.
create object g_grid
exporting i_parent = g_custom_container.
endform.Hello Raj
Actually all the code is described in PBO module, so you need to invoke this module in PBO when defining the screen.
For example, access transaction SE51, start in Change mode and inser line
MODULE PBO.
Then activate the object
Best regards
Carlos Machad o -
How to place the images in Indesign xml file by Javascript?
How to place the images in Indesign xml file by Javascript?
We got the Indesign xml file, how to give the image placement link by Indesign javascript? Please help me its urgent.Hi,
You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
var x = some XMLElement
x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
If already placed, then you have to get the associated pageItem, then place your file into it.
pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
Hope that helps,
Loic
http://www.loicaigon.com -
Table in interactive form using webynpro for abap
Hi All,
I am working on itercative form in adobe forms.I had a problem.
I have one field in webdynpro and interactive form in my view.
In interiae form layout i have a table which should be populated based on the input given in the field context attribute.
in layout i have 5 fields from 2 fields should poulated based on the input 3 fields user can enter anything i.e these three fields should be interactive.
I am able to sucessfully fill the data if i set 'Enabled' property to space in element interactive form.If i set enabled property i am not able see any data i my form.
How can i do this happen.I am very confused.I searched in many forums everybody says that if you put 'Enbaled' check box in interactive that will became a interactive form.
Thanks,
ThraginiHi..
use normal wedynpro codeings for table also..
interactive form is a one of the GUI element in WD.so asual just create one attribute for input.
and one node for table bind the node to table. create action for input inside the action write select query in where condition give the readed value and once you create the inteactive form throuth the interface values will be shared automatically ..
regards
jayaprakash T
Maybe you are looking for
-
I have come across an interesting error which appears when accessing the Configure service accounts setting under Security>General Security. Has anyone come across this problem? I would appreciate some help with this as I am still fairly new to SP201
-
Chinese Characters Not Displayed Properly when iCal sync with Palm T5
Hi All, I am having problem with the Chinese Character display on iCal. I am using iMac Intel Core Duo and Palm T5. I can read on my iMac the Chinese Characters which I typed on the iMac. Also I can read on my Palm those Chinese I inputted on my Palm
-
After installing iOS5, I now have a MobileMe account AND an iCloud account in the mail settings on my iPad 2. This means double the mail. This did not happen on my iPhone 4, which only shows an iCloud account. Can I safely delete the MobileMe accoun
-
CXMS_NON_CHAR_MAPPING_UC - middleware issue
Dear all, after the installation of SP we are facing the following issue with Middleware (from ECC to CRM). When calling FM CXMS_NON_CHAR_MAPPING_UC we enter in a new part of the code that has been introduced with note 1395248. The comment to the new
-
How do I delete old open windows. Before the upgrade, I held an icon til it wiggles, then touched the x to delete.