Creating a Dynamic Node for a Dynamic Graphic - Tutorial
Hi everyone,
I'm sharing my first tutorial, hope it'll be helpful for you.
In the Layout tab, it's possible to create an UI element "Business Graphic". It's a very simple tool that only requires a context node with a category attribute (that means, the values that will appear in the 'x' axis) and one or more series (each one with a color, generally a numerical value). It's possible to add a label for each series for better understanding of the Graphic.
Although it's a very powerful tool, there are some problems when we must create a graphic with N series and different labels. If the graphic use an ALV or internal table to fetch data, during runtime we can have more or less series. The definition of a static node and generic series is not enough in this case. That's why I'd like to present you this little tutorial to create a dynamic node that fetchs a dynamic graph:
In the WDDOINIT or Event Handler method that starts the application (once the data is available) we should create the dynamic node in the following way:
DATA: lr_node_info TYPE REF TO if_wd_context_node_info,
lt_attributes TYPE cl_abap_structdescr=>component_table,
attribute LIKE LINE OF lt_attributes,
struct_type TYPE REF TO cl_abap_structdescr,
lo_dyn_node TYPE REF TO if_wd_context_node.
* Let's suppouse we can LOOP at the data table, so we can fetch the
* category data type (for example company name, month, year, ...)
* and each series with a numeric type
attribute-name = 'CATEGORY'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ).
INSERT attribute INTO TABLE lt_attributes.
attribute-name = 'SERIE1'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
INSERT attribute INTO TABLE lt_attributes.
attribute-name = 'SERIE2'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
INSERT attribute INTO TABLE lt_attributes.
* Once we have all the attributs for the node, we create a formal structure
struct_type = cl_abap_structdescr=>create( lt_attributes ).
* Now we can get the context information to add a new node
lr_node_info = wd_context->get_node_info( ).
* Create the node
lr_node_info = lr_node_info->add_new_child_node(
name = 'GRPH_DYN'
IS_MANDATORY = ABAP_false
IS_MULTIPLE = ABAP_true
STATIC_ELEMENT_RTTI = struct_type
IS_STATIC = ABAP_false ).
* Now we should populates the node, I'll create a hardcoded table,
* simulating the internal table that you should already have
TYPES: BEGIN OF tw_alv,
category TYPE string,
SERIE1 TYPE i,
SERIE2 TYPE i,
END OF tw_alv.
TYPES: tt_alv TYPE STANDARD TABLE OF tw_alv.
DATA: lw_alv TYPE tw_alv,
lt_alv TYPE tt_alv.
lw_alv-category = 'Alfa'.
lw_alv-serie1 = 3.
lw_alv-serie2 = 8.
APPEND lw_alv TO lt_alv.
lw_alv-category = 'Beta'.
lw_alv-serie1 = 4.
lw_alv-serie2 = 4.
APPEND lw_alv TO lt_alv.
lw_alv-category = 'Gamma'.
lw_alv-serie1 = 1.
lw_alv-serie2 = 3.
APPEND lw_alv TO lt_alv.
* Now let's call the recently created node and bind the lt_alv table.
* Get node from context
lo_dyn_node = wd_context->get_child_node( name = 'GRPH_DYN' ).
* Bind table with ALV Container
CALL METHOD lo_dyn_node->bind_table
EXPORTING
new_items = lt_alv.
* It's always good to check if the table was succesfully binded.
* I refresh the lt_alv table and get the values from the node for controlling
REFRESH lt_alv.
lo_dyn_node->get_static_attributes_table( IMPORTING table = lt_alv ).
There are other ways of adding a node structure in the method add_new_child_node, but it works for me only with STATIC_ELEMENT_RTTI. The node is now created and has the data required for the graphic. Now, we should go to WDDOONMODIFYVIEW, or save the target view as a parameter, to create the graphic, bind the category and series and show it on the screen.
DATA: lr_graph TYPE REF TO cl_wd_business_graphics,
lr_cat TYPE REF TO cl_wd_category,
lr_series1 TYPE REF TO cl_wd_simple_series,
lr_series2 TYPE REF TO cl_wd_simple_series,
lr_container TYPE REF TO cl_wd_uielement_container,
lr_flow TYPE REF TO cl_wd_flow_data.
* Get the root element from the Layout or the specific
* container you have created for the graphic
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
* Creates a line busniess graph
lr_graph = cl_wd_business_graphics=>new_business_graphics(
BIND_SERIES_SOURCE = 'GRPH_DYN'
CHART_TYPE = cl_wd_business_graphics=>e_chart_type-lines
HEIGHT = 340
WIDTH = 750
ID = 'GRAPH' ).
* Create the flow data for the new UI Element business graphic
lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).
* Set graph in the root container from the Layout tab
lr_container->add_child( lr_graph ).
* Bind the category from the dynamic node to the dynamic graphic
lr_cat = cl_wd_category=>new_category(
view = view
bind_description = 'GRPH_DYN.CATEGORY'
tooltip = 'Company Name' ).
lr_graph->set_category( lr_cat ).
* Bind the two series from the dynamic node to the dynamic graphic
lr_series1 = cl_wd_simple_series=>new_simple_series(
bind_value = 'GRPH_DYN.SERIE1'
label = 'Sales'
view = view
tooltip = 'Average Sales' ).
lr_graph->add_series( lr_series1 ).
lr_series2 = cl_wd_simple_series=>new_simple_series(
bind_value = 'GRPH_DYN.SERIE2'
label = 'Purchases'
view = view
tooltip = 'Average Purchases' ).
lr_graph->add_series( lr_series2 ).
Finally we have created our business graphic. Test the application and you'll see something like the attached image.
Hope you'll find it useful.
Daniel Monteros.
Hi,
http://htmldb.oracle.com/pls/otn/f?p=26372
then ApEx>Trees and pick a level.
Use Help for more information.
I you think that tree could help I will put more explanation into help page.
Konstantin
Similar Messages
-
How to create a context node for "IBHeader" at the view "BuPaIBaseDetail"?
hi, experts
for the requirement, i have to get data from a root BO-IBHeader in the view of "BuPaIBaseDetail".But the view already has IBHeader's child object-"IBComponent", whose controller class is "CL_CRM_IC_BUPACONTROLLER_CN08", how can i create the context node for "IBHeader"?
angerly wait for the answer. thanks a lotIf you right click on an empty container or a container with an object in it, it has the same available choices to select. However, if you create a blank property node on the block diagram, and wire up the .net object to it, you will see a much different list of properties.
So, the property node created from right clicking a .NET container will be for that container, even if there is an object inside. To create a property node for the object, you must wire the .NET object to an empty property node on the block diagram.
Chris Van Horn
Applications Engineer -
Alternatives to dynamic tables for displaying dynamic data
What methods are available for displaying data from MySQL
with PHP on a web page? Is there any alternative to a dynamic table
when the the quantity of data will vary? anything CSS based?
Many ThanksOn 27 May 2006 in macromedia.dreamweaver, Pingus mum wrote:
> so i could just output to a div for example?
Or a paragraph, or an <h4>, or an unordered list, or
any other container
tag, or the src attribute on an <img> tag, or any
combination of the
above. Consider the case where the database consists of press
releases -
date, headline, body. You could, say, make the repeat region
like this:
<h1>Press Releases</h1>
<!-- start of repeat region -->
<h2><& headlineFromDatabase &></h2>
<p><& dateFromDatabase &> - <&
bodyFromDatabase &></p>
<!-- end of repeat region -->
<address>Contact Information</address>
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php -
Create Multiple dynamic Node in Web Dynpro Abap
Hi Friends,
I need your help.My object is to create Multiple dynamic dropdown UI element.I am able to create this dynamic Dropdown element. But i need to assign default different values to this dropdown elements.So i created dynamic nodes for each dropdown and created attribute with same name as that of value table.
My issue is its giving me error as : -
Lower-Level Node with Name ZDCN_BRD_STATUS.ME Does Not Exist
Help me to rectify this error..
Regards,
SantoshHi,
This information is not enough for anybody to help you. Write more in detail about your code and where exactly in the code this error is coming.
One trial experiment can be that you split your problem into two or more level.
Create several nodes in your context with attribute and sample data.
Create Dynamic UI (DDBI) and Bind these attributes to your DDBI.
When it works perfectly, then tryout how to create the Node and attribute dynamically. This way you are not making it too complex to solve this problem. -
Dynamic Node bind to attribute of type "STRING_TABLE"
Hi ,
I want to create dynamic node which is bind to attribute of type "STRING_TABLE'.
Basically I want to create this node for inserting dynamic "TEXT EDIT' UI elements in my view .
can sm1 help me in this regard.Seems like you should be able to use the API: cl_wd_dynamic_tool=>create_nodeinfo_from_struct.
The real question is do you really need to create the node dynamically. Why not just create a node that has the string_table attribute in it. Make the node 1:n or 0:n. Bind this node to a RowReapter or MultiPane UI element. Then as a child of the RowReapter/MultiPane you place your textEdit UI element. This way, you will render dynamically how ever many textEdits as there are elements in your node. No need for dynamic node creation. -
How to create multiple nodes for single activity in workflow.
Hi Gurus,
I am developing the PR workflow. and in that I want to create 2 different nodes for signle activity.
how can I create those multiple outcomes for signel activity in workflow.
Thanks in Advcance.
VinodHi ,
You can use Outcomes tab in your workflow step...
What is the step... is it related to release...
what is that you want to do...
Regards
Gautam -
Creating Secondary Node for Oracle Apps
I've got an interesting issue.
Background -- We're running Oracle Apps 11.5.9 in an n-tier environment.
Servers -- Running HP-UX 11i (for both DB tier, Application tier).
Goad -- Implement MWA server. (mobile supply chain).
We started an implementation before and it had problems. The MWA devices (wireless barcode scanners) kept on freezing and we could never find the processes to kill. The only way to fix was to restart the application tier (uncool). More testing went and we found lots of patches to apply and did so. Things seem to be working fine, but I'd like to create a secondary node JUST for the MWA devices.
What it boils down to is creating a secondary node for Oracle Apps that ONLY the mobile devices will use. All other users will use the primary node. Once I've found that the MWA devices are working fine, then I'll load balance, but not for now.
I'm fairly new to Oracle Apps (1 year exp -- boss just left ACK!) and I'm not certian on how to create the secondary node and make it unavailable to all other users.
Any help is GREATLY APPRECIATED!
Thanks in Advance!Hi Jeremy,
Did you manage to solve your MWA devices (wireless barcode scanners) freezing by adding an extra node? there is a client that is experiencing the same problem, I have trive to increase the number of ports from 10200, adding 10202 & 10204 when I start the Mobile application and increasing memory from mx1024 - ms512 to mx2048 - ms1024 & all is fruitless, we rebbot our MWA everyday at night as the time goes on during the day approx 13h00 all hell break loose, slow response, freezing of barcode scanners, everything stops.
Regards
Sihle -
How to set property nodes for each of the multiple y-axes?
In Labview 6i, I have set up multiple y-axes on an xy graph. I want to change certain properties of each of the 2 y-axes independently. I believe I can do this using "property node".
However, after I have created a property node for the xy graph, I realised that there is only 1 y-axis selectable from the list of properties. How can I set the property of the other y-axis then?
Thanks for the help!I believe there is a property called "active graph"... this allows you to
select the active graph to apply the property changes to...
Later...
meng118230 wrote in message
news:[email protected]..
> In Labview 6i, I have set up multiple y-axes on an xy graph. I want to
> change certain properties of each of the 2 y-axes independently. I
> believe I can do this using "property node".
>
> However, after I have created a property node for the xy graph, I
> realised that there is only 1 y-axis selectable from the list of
> properties. How can I set the property of the other y-axis then?
>
> Thanks for the help! -
Create a deep structure for dynamic internal table
Hi All,
I am creating a dynamic table using method cl_alv_table_create=>create_dynamic_table.
The normal structure gets created. but now I want to creat a Deep structure for having information of colors also for each column. So I want to add a COLTAB type LVC_T_SCOL for colors information .
How should I create this using above method?
Rgds,
MadhuriI created a zcelltab structure as below. But while creating dynamic internal table, I received the error with
'Type "ZCELLTAB" is unknown 68 ZCELLTAB-CELLTAB
Here is the code.
DATA: BEGIN OF ZCELLTAB,
CELLTAB LIKE LVC_S_STYL,
END OF ZCELLTAB.
FIELD-SYMBOLS <T_CELLTAB> TYPE LVC_T_STYL.
DATA : LT_CELLTAB TYPE LVC_T_STYL.
DATA: WA_CELLTAB TYPE LINE OF LVC_T_STYL.
DATA: GT_FCAT1 TYPE LVC_T_FCAT,
GW_FCAT1 TYPE LVC_S_FCAT,
GT_FCAT2 TYPE LVC_T_FCAT,
GW_FCAT2 TYPE LVC_S_FCAT.
After filling the FCAT1, I added the field in FCAT2 like below
GT_FCAT2[ ] = GT_FCAT1[ ].
G_TABIX = G_TABIX + 1.
GW_FCAT2-INTTYPE = 'C'.
MOVE G_TABIX TO GW_FCAT2-COL_POS.
GW_FCAT2-OUTPUTLEN = '10'.
GW_FCAT2-FIELDNAME = 'T_CELLTAB'.
GW_FCAT2-TABNAME = 'ZCELLTAB'.
GW_FCAT2-REF_FIELD = 'CELLTAB'.
GW_FCAT2-REF_TABLE = 'ZCELLTAB'.
APPEND GW_FCAT2 TO GT_FCAT2
CLEAR GW_FCAT2.
While calling the below method, the error with
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = GT_FCAT2
IMPORTING
EP_TABLE = GT_REQ.
ASSIGN GT_REQ->* TO <F_TAB>.
CREATE DATA GWA_REQ LIKE LINE OF <F_TAB>.
ASSIGN GWA_REQ->* TO <F_WA>.
LOOP AT ITAB.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <F_WA> TO <F_VAL>
<F_VAL> = ITAB-MATNR.
IF ITAB-MATNR IS INITIAL.
ASSIGN COMPONENT 'T_CELLTAB' OF STRUCTURE <F_WA> TO <T_CELLTAB>
CLEAR WA_CELLTAB.
WA_CELLTAB-FIELDNAME = 'MATNR'.
WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
INSERT WA_CELLTAB INTO TABLE <T_CELLTAB>.
ENDIF.
APPEND <F_WA> TO <F_TAB>
ENDLOOP.
CALL METHOD GR_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_CONSISTENCY_CHECK = G_CONSISTENCY_CHECK
IT_TOOLBAR_EXCLUDING = G_EXCLUDE
I_SAVE = G_SAVE
I_DEFAULT = 'X'
IS_LAYOUT = G_LAYOUT
CHANGING
IT_OUTTAB = <F_TAB>
IT_FIELDCATALOG = F_CAT1.
Please let me know where I was wrong.
Should I remove the T_CELLTAB as the field name is not mentioned in the structure 'ZCELLTAB'.
Thanks,
Kumar.
Edited by: venn e on May 7, 2010 4:10 PM -
How to create bindings at runtime for Dynamic Tables ?
We have lot of Dynamic tables, In ADF, we need to try out the Dynamic EO, Dynamic VO, Dynamic DataControl and Dynamic binding for UI
Ex:
We need to load the data to the ADF table where database table name is dynamic, the columns in the tables are also dynamic. At runtime , we need to create VO, Dynamic binding and display to UI? We also should be able to add, delete,update records in the dynamic tables.
Does anyone done this before? Please shared your thoughts on thisHi,
for a table you can declaratively build a tree binding. Then you remove all the attribute items in the tree definition so that the number of attributes is dynamic. See: https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf
Frank -
To create a deep structure for dynamic internal table.
Hello
My ALV has fields which are defined dynamically during execution.
so, i did it in the following way,
Declared Field symbolds, DREF and fieldcatalog as,
FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
<fs_dyntable>.
DATA: dref_dyntab TYPE REF TO data,
dref_dynwa TYPE REF TO data.
DATA: ts_fieldcatalog TYPE lvc_t_fcat.
DATA: wa_fieldcatalog TYPE lvc_s_fcat.
Updated Fieldcatalog dynamically as,
*function module to read segment structure
CALL FUNCTION 'SEGMENT_READ'
EXPORTING
segmenttyp = v_segment_name
TABLES
segmentstructure = ts_seg_structure
EXCEPTIONS
no_authority = 1
segment_not_existing = 2
OTHERS = 3.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN '1'.
MESSAGE e024.
STOP.
WHEN '2'.
MESSAGE e025 WITH v_segment_name.
STOP.
WHEN OTHERS.
MESSAGE e023.
ENDCASE.
ENDIF.
*FETCH FIELDS FROM STRUCTURE OF SEGMENT AND CREATE FIELDCATALOG FOR
EACH FIELD OF SEGMENT (DYNAMIC FIELD CATALOG)
LOOP AT ts_seg_structure INTO wa_seg_structure.
ADD 1 TO v_counter.
wa_fieldcatalog-fieldname = wa_seg_structure-fieldname.
wa_fieldcatalog-col_pos = v_counter.
wa_fieldcatalog-ref_table = wa_seg_structure-segtyp.
APPEND wa_fieldcatalog TO ts_fieldcatalog.
CLEAR wa_fieldcatalog.
ENDLOOP.
and generated dynamic internal table using fieldcatalog as,
*--Method to get the structure of table using fieldcatalog.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = ts_fieldcatalog
IMPORTING
*--Variable of type REF TO DATA.
ep_table = dref_dyntab.
IF sy-subrc <> 0.
MESSAGE e023.
ENDIF.
*--Dynamic internal tables required when show segments selected
IF p_selseg IS NOT INITIAL.
ASSIGN dref_dyntab->* TO <t_dyntable>.
*--Create dynamic work area and assign to FS
CREATE DATA dref_dynwa LIKE LINE OF <t_dyntable>.
ASSIGN dref_dynwa->* TO <fs_dyntable>.
And then i populated this <t_dyntable> which is being passed as data-table to method
CL_GUI_ALV_GRID => SET_TABLE_FOR_FIRST_DISPLAY
for ALV grid Display along with above used filedcatalog ts_fieldcatalog.
Things are fine till here, but now i have the requirement to edit selected rows of the ALV display..
As you might be aware, we need a field
TS_STYLEROW TYPE lvc_t_styl, (i.e, a field of type 'h' and we can say as an internal table inside an internal table or else as a deep structure)
in the output internal table <t_dyntable> to meet our requirement.
My issue is about declaring one such field of type 'h' in this dynamically created internal table ''<t_dyntable>".
I tried in the following way by adding one such field to fieldcatalog :
*Field for Styling
ADD 1 TO v_counter.
wa_fieldcatalog-fieldname = 'TS_STYLEROW'.
wa_fieldcatalog-tabname = 'TS_STYLE'.
wa_fieldcatalog-col_pos = v_counter.
wa_fieldcatalog-no_out = 'X'.
wa_fieldcatalog-inttype = 'h'. " I even mentioned this
APPEND wa_fieldcatalog TO ts_fieldcatalog.
CLEAR wa_fieldcatalog.
But this is creating a field of type 'C' in the table <t_dyntable> instead of what i was expecting
Guyz and respected,
Please advice me with the solution or ur ideas....
Note : The overall requirement is create a deep structure for dynamically generated internal table.
Your help is highly appreciated and unforgettable..!!!!!!!hi,
Dynamic append
Dynamic internal table
Dynamic internal table
dynamic columns in ALV
Variant for dynamic selection
thanks -
Exchange 2010 SP3 Create Dynamic DL for Direct Reports
I am not sure this is possible but if there is a will there is a way I guess.
System: Exchange 2010 SP3 on Windows Server 2008 R2
I am trying to see if there is a way to create dynamic DLs for Manager(s) direct reports.
Example: Manager has 5 people that report directly to them, is there a way to make an dynamic email distribution list that will poll the direct reports as people leave or hired.
I know I can create one manually but some depts. may have high turnover rates which increase overhead so I am just trying to simplify the process. I of course googled my question but not getting the results I intended.
Thanks.hi,
as from above i understand you are asking about creating an custom attribute and then referencing them .. if yes please check below command
Get-Mailbox -OrganizationalUnit Sales | Set-Mailbox CustomAttribute1 "SalesOU"Now you can create an e-mail address policy for all recipients that have the CustomAttribute1 property that equals SalesOU, as shown in this example.
New-EmailAddressPolicy -Name "Sales" -RecipientFilter { CustomAttribute1 -eq "SalesOU"} -EnabledEmailAddressTemplates "SMTP:%s%[email protected] check this.. http://technet.microsoft.com/en-us/library/ee423541%28v=exchg.150%29.aspx
MARK AS USEFUL/ANSWER IF IT DID
Thanks
Happiness Always
Jatin -
Create Dynamic variant for date field
Hello all,
I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
and while saving the variant it is showing only 'T' (entries from TVARVC table) in "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
So,please help me in resolving this issue.
Thanks in advance.hi
good
go through this code,i hope this ll help you to create the dynamic variant.
Please find the sample using RS_CREATE_VARIANT (FM).
It make use of other FM also , just have a look .
Hope this may help you.
REPORT ZEXAMPLE.
DATA: JVARI_DESC LIKE VARID,
RC LIKE SY-SUBRC,
VARIANT_TEXT LIKE VARIT-VTEXT,
JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
JVARI_DESC-REPORT = SY-REPID.
JVARI_DESC-VARIANT = P_VAR.
JVARI_DESC-ENAME = 'EXAMPLES'.
JVT-REPORT = SY-REPID.
JVT-VARIANT = P_VAR.
JVT-LANGU = SY-LANGU.
JVT-VTEXT = 'FUNCTION EXAMPLES'.
APPEND JVT.
CLEAR SELPA.
SELPA-SIGN = 'I'.
SELPA-OPTION = 'EQ'.
SELPA-KIND = 'P'.
SELPA-SELNAME = 'P_VAR'.
SELPA-LOW = P_VAR.
APPEND SELPA.
CHECK IF VARIANT EXISTS
CALL FUNCTION 'RS_VARIANT_EXISTS'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
IMPORTING
R_C = RC
EXCEPTIONS
NOT_AUTHORIZED = 1
NO_REPORT = 2
REPORT_NOT_EXISTENT = 3
REPORT_NOT_SUPPLIED = 4
OTHERS = 5.
IF RC = 0 AND SY-SUBRC EQ 0.
DELETE OLD VARIANT
CALL FUNCTION 'RS_VARIANT_DELETE'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
FLAG_CONFIRMSCREEN = 'X'
EXCEPTIONS
NOT_AUTHORIZED = 1
NOT_EXECUTED = 2
NO_REPORT = 3
REPORT_NOT_EXISTENT = 4
REPORT_NOT_SUPPLIED = 5
VARIANT_LOCKED = 6
VARIANT_NOT_EXISTENT = 7
NO_CORR_INSERT = 8
VARIANT_PROTECTED = 9
OTHERS = 10.
IF SY-SUBRC NE 0.
WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
EXIT.
ELSE.
WRITE:/ P_VAR, 'DELETED'.
ENDIF.
ELSE.
WRITE:/ P_VAR, 'DOES NOT EXIST'.
ENDIF. " ALREADY EXISTS
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
CURR_REPORT = JVARI_DESC-REPORT
CURR_VARIANT = P_VAR
VARI_DESC = JVARI_DESC
TABLES
VARI_CONTENTS = SELPA
VARI_TEXT = JVT
EXCEPTIONS
ILLEGAL_REPORT_OR_VARIANT = 1
ILLEGAL_VARIANTNAME = 2
NOT_AUTHORIZED = 3
NOT_EXECUTED = 4
REPORT_NOT_EXISTENT = 5
REPORT_NOT_SUPPLIED = 6
VARIANT_EXISTS = 7
VARIANT_LOCKED = 8
OTHERS = 9.
IF SY-SUBRC EQ 0.
WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
ELSE.
WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
EXIT.
ENDIF.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
TABLES
VALUTAB = PARMS
OBJECTS = OBJS
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
WRITE : / 'ERROR READING VARIANT CONTENTS.'.
ELSE.
CALL FUNCTION 'RS_VARIANT_TEXT'
EXPORTING
LANGU = SY-LANGU
CURR_REPORT = JVARI_DESC-REPORT
VARIANT = P_VAR
IMPORTING
V_TEXT = VARIANT_TEXT.
WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
LOOP AT PARMS.
CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
45 PARMS-KIND,
PARMS-SIGN,
PARMS-OPTION,
PARMS-LOW,
PARMS-HIGH.
NEW-LINE.
ENDLOOP.
SKIP.
ENDIF.
some other approach....
This function module selects the Selection Screen contents
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = loc_int_tab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
LEAVE LIST-PROCESSING.
ENDIF.
Craete the variant VAR1
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = sy-repid
curr_variant = wf_variant
vari_desc = loc_varid
TABLES
vari_contents = loc_int_tab
vari_text = loc_varit
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
LEAVE LIST-PROCESSING.
ENDIF.
reward point if helpful.
thanks
mrutyun^ -
Is there a dynamic delay for feedback z nodes?
It seems the delay on the feedback node can only be hard coded. Is there a dynamic way to set the delay?
No there is not. The feedback node allocates room for all the data at compile time, so it must know then how large the delay is.
For a dynamic buffer size, you might search the forums or web for a LabVIEW circular buffer example, of which there should be many.
Jarrod S.
National Instruments -
Salmple at How to Create Dynamical Object for RTTC
Hi all, I need a sample at How to Create Dynamical Object for RTTC.
you can help me?.Hello Martinez,
I have attached a sample for structure types. With the Where-Used-List on the Create() Method of the various RTTC classes one may find more samples. If you meant with object on OO Type then it is to mention that this is not possible yet.
Regards
Klaus
PROGRAM sample.
DATA: sdescr1 TYPE REF TO cl_abap_structdescr,
sdescr2 TYPE REF TO cl_abap_structdescr,
tdescr1 TYPE REF TO cl_abap_tabledescr,
tdescr2 TYPE REF TO cl_abap_tabledescr,
tref1 TYPE REF TO data,
tref2 TYPE REF TO data,
comp TYPE abap_component_tab,
wa TYPE t100,
xbuf TYPE xstring.
FIELD-SYMBOLS: <tab1> TYPE table,
<tab2> TYPE table.
sdescr1 ?= cl_abap_typedescr=>describe_by_name( 'T100' ).
comp = sdescr1->get_components( ).
sdescr2 = cl_abap_structdescr=>create( comp ).
tdescr1 = cl_abap_tabledescr=>create( sdescr2 ).
tdescr2 = cl_abap_tabledescr=>create( sdescr2 ).
CREATE DATA: tref1 TYPE HANDLE tdescr1,
tref2 TYPE HANDLE tdescr2.
ASSIGN: tref1->* TO <tab1>,
tref2->* TO <tab2>.
wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'first text'. INSERT wa INTO TABLE <tab1>.
wa-sprsl = 'D'. wa-arbgb = 'SY'. wa-msgnr = '456'. wa-text = 'second text'. INSERT wa INTO TABLE <tab1>.
wa-sprsl = 'D'. wa-arbgb = 'XY'. wa-msgnr = '001'. wa-text = 'third text'. INSERT wa INTO TABLE <tab1>.
wa-sprsl = 'D'. wa-arbgb = 'ZZ'. wa-msgnr = '123'. wa-text = 'fourth text'. INSERT wa INTO TABLE <tab1>.
wa-sprsl = 'E'. wa-arbgb = 'SY'. wa-msgnr = '123'. wa-text = 'ABAP is a miracle'. INSERT wa INTO TABLE <tab1>.
EXPORT tab = <tab1> TO DATA BUFFER xbuf.
IMPORT tab = <tab2> FROM DATA BUFFER xbuf.
LOOP AT <tab2> INTO wa.
WRITE: / wa-sprsl, wa-arbgb, wa-msgnr, wa-text.
ENDLOOP.
Maybe you are looking for
-
Connecting my macbook pro 13" to Sony bravia via mini Displayport to HDMI
Hi, yesterday I bought a new LCD TV Sony Bravia KDL-32EX600 (Full-HD LED) that has 4 x HDMI inputs. I also bought a mini Displayport to HDMI and HDMI to HDMI cable. When I connect it to my computer, the screen goes blue for a second and it doesn't re
-
Create and Pack Handling Units in the Sales Order Using HU_CREATE_ONE_HU
Hello Experts, I am trying to use HU_CREATE_ONE_HU function module to create a handling unit and pack it with specific line items in the sales order program in the background. I am able to create the handling unit and pack it but it does not get ass
-
I updated my 16GB iPhone 4S with the new iOS 6.1 and now the speakers won't play music, videos, or anything that involves sound. The volume bar just doesn't appear. Can I get some help?
-
Lightroom confused with NEF + JPG pairs
I moved a directory of NEF+JPG files from directory "A" to "B". And then deleted "A". When I did this, directory "A" disappeared from the library, as expected. But something went wrong. Directory "A" on the hard drive (when viewed with Windows Explor
-
Hi Friends, in next month i take the next courses: FICO and ABAP/BASIS, my question is how to certificate in this courses, exist any academy? i am aprecciate any type of information, can anyone recommend me any tutorial about, for learn and try certi