How do I build a dynamic property list?
It has been a long time and all my old Authorware stuff is in the shed somewhere. I want to dynamically build a property list statement in Authorware 7
I figured it was something like property_list[1]["#"^variable_text]
but this doesn't seem to be working so I just wanted to check I was using the correct syntax?
Found some old code.
I think you need to do
property_text = "#"^variable_text
then you can do the following
property_list[1][property_text]
That seemed to work.
Similar Messages
-
Creating a Dynamic Property LIst
Hi everyone,
How to make a dynamic Property list in lingo
Actually the problem is I am fetching a list of Columns from
the databse which may vary so I want to make a dynamic PropertyList
in which I can Set the property and the values based on the number
of colums in a Database
For Example: In the DB, I have a Table which contains
follwing columns
FName, LName,CompName, Age, Address1, Address2, Email,
website
Now I will select specific colums based on some condition. So
I will be storing the result which would come in a property list.
So this List needs to be Dynamic i.e it should be getting created
based on the colums returned from the query.
Suppose for a specific condition i get Fname, Lname, Email as
a result so my List should look some thing like This
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult = [#FirstName : objRecord[1], #LastName :
objRecord[2], #Email : objRecord[3] ]
The Above List shoud be based on nos of colums returned from
the Query
Is there any way by which i can create such a Dynamic
Property List.
I hope the Question is Clear
Hope to get the answer at the earliest
-Thanks and Regards
-Atul SaxenaYou can create a new empty property list like this:
listQueryResult = [:]
To add a property/value pair, you can use:
listQueryResult[
<propertyName>
] =
<value>
or:
listQueryResult.setaProp(
<propertyName>
<value>
The above two commands will add the property if it doesn't
exist, or update a value if the property name is already present in
the list.
You may not be aware that you can use strings as property
names instead of symbols if you like, which you might find easier.
Couple of examples following your example:
listQueryResult = [:]
objRecord = objResult.rows[1] --Row Returned from the
Database
listQueryResult["FName"] = objRecord[1]
listQueryResult["LName"] = objRecord[2]
(etc)
Or, if you also have a list of the fieldnames returned from
the db:
listQueryResult = [:]
fieldNames = objResult.fieldNames --Field names for records
returned from Database
objRecord = objResult.rows[1] --Row Returned from the
Database
repeat with n=1 to fieldNames.count
thisFieldName = fieldNames[n]
thisFieldValue = objRecord[n]
listQueryResult[thisFieldName] = thisFieldValue
end repeat
hope this helps!
- Ben -
Building a dynamic Member list in HFM
Good day,
I want to build a dynamic memberlist in HFM by using the function HS.GetSubmissionPhase("S#scenario.P#period.A#account.C1#custom1.C2 #custom2.C3#custom3.C4#custom4.I#icp”). For some reason it does not return the correct submission phase but always 1 (one). I need to retrieve the submission phase of a specific cell (account) because it can vary from period to period, and therefore it must be dynamic. I am using version 11.1.1.2 (not patched). Is there a way to do this?
Please assist.
Thanks,
DaneeHi Chris,
I understand the member lists are metadata driven and might have a problem with the submission groups per phase (data):
But according to me the function should return me the valid phase submission for a specific account at a specific point in time. I need it on a report or web form, or need to find another way to filter.
1. Submission groups are set on the accounts
2. Submission groups are set per submission phase per period
3. Want to retrieve all valid accounts for a specific submission phase at a specific point in time in a report
4. Is there another way that I can filter these accounts dynamically?
Regards,
Danee -
How do you create a searchable property list?
I am trying to create a searchable database of historic military figures. It will be a permanent list of people that will not change. I need to be able to search the list by first and/or last name and create a selectable list. Once a search list is created you can click on a name to display all the data on that person. Also there should be an option to browse the entire list. The original 1000 name list is provided in an excel document. I am having a brain freeze on this. Any examples would be helpful. Thank you!
The simplest option might be to use a genuine database instead of a property list. For example, there's a free xtra from Valentin Schmidt for this (SQLite xtra)
Otherwise, you might create a list of property lists, with named properties being keys to search on, something like:
lData = []
lPerson = ["firstname": "Stonewall", "lastname": "Jackson", "data": "Some data you wish to record against this person's name"]
lData.append(lPerson)
lPerson = ["firstname": "Robert", "lastname": "Lee", "data": "Some data you wish to record against this person's name"]
lData.append(lPerson)
-- etc… -
How to get checkboxes in dynamic ALV list generation
hi ,
below is the code in which two lists we wll be displayed in one layout dynamically(i.e after entering the table name two lists wll be displayed in one layout) from two different clients(i.e. source and target).
TYPE-POOLS *
TYPE-POOLS: slis.
*-- Tables Declaration
TABLES: dd02l, t000.
*-- Constants Declaration
CONSTANTS: lc_z TYPE char1 VALUE 'Z',
lc_y TYPE char1 VALUE 'Y'.
DATA: ok_code TYPE sy-ucomm.
*--Internal table and Work Area Declaration
DATA: lines LIKE sy-dbcnt VALUE 0.
DATA: icursor TYPE cursor.
*DATA: icursor1 TYPE cursor.
DATA: lv_count TYPE i.
DATA: lv_table_var1 TYPE char1.
DATA: lv_ans TYPE char1.
DATA : gd_tabname TYPE tabname.
*for check boxes
DATA:l_pos TYPE i VALUE 1.
*field catalog for source client
DATA: c_cont1 TYPE REF TO cl_gui_custom_container,
c_alv1 TYPE REF TO cl_gui_alv_grid,
it_fieldcat1 TYPE lvc_t_fcat ,
ty_fieldcat1 TYPE lvc_s_fcat ,
struc_desc1 TYPE REF TO cl_abap_structdescr,
ls_fieldcatalogue1 TYPE slis_fieldcat_alv,
lt_fieldcatalogue1 TYPE slis_t_fieldcat_alv,
l_structure1 TYPE REF TO data,
l_table1 TYPE REF TO data.
for check boxes for source client
DATA: ls_edit TYPE lvc_s_styl,
lt_edit TYPE lvc_t_styl.
*field catalog for target client
DATA: c_cont2 TYPE REF TO cl_gui_custom_container,
c_alv2 TYPE REF TO cl_gui_alv_grid,
it_fieldcat2 TYPE lvc_t_fcat ,
ty_fieldcat2 TYPE lvc_s_fcat ,
struc_desc2 TYPE REF TO cl_abap_structdescr,
ls_fieldcatalogue2 TYPE slis_fieldcat_alv,
lt_fieldcatalogue2 TYPE slis_t_fieldcat_alv,
l_structure2 TYPE REF TO data,
l_table2 TYPE REF TO data.
*for source client
TYPES: BEGIN OF itab,
t_name TYPE tabname,
t_ref TYPE REF TO data,
*for checkboxes.
check(1),
style TYPE lvc_t_styl,
END OF itab.
*for target client
TYPES: BEGIN OF itab1,
t_name1 TYPE tabname,
t_ref1 TYPE REF TO data,
END OF itab1.
*-- Field Symbol declaration for Dynamic Internal Table for source client
FIELD-SYMBOLS: <tab> TYPE table.
FIELD-SYMBOLS: <tab1> TYPE ANY.
FIELD-SYMBOLS: <l_mandt>.
FIELD-SYMBOLS: <str_comp1> TYPE abap_compdescr,
<dyn_str1> TYPE ANY.
*--Field Symbol declaration for Dynamic Internal Table for target client
FIELD-SYMBOLS <tab2> TYPE table.
FIELD-SYMBOLS <tab3> TYPE ANY.
FIELD-SYMBOLS: <l_mandt1>.
FIELD-SYMBOLS: <str_comp2> TYPE abap_compdescr,
<dyn_str2> TYPE ANY.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_table LIKE dd02l-tabname,
p_mdt_fm LIKE t000-mandt DEFAULT sy-mandt,
p_mdt_to LIKE t000-mandt DEFAULT '910'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON p_table.
lv_table_var1 = p_table+0(1).
*-- Validation for Standard tables
IF ( lv_table_var1 NE lc_z ) AND ( lv_table_var1 NE lc_y ).
MESSAGE e001(00) WITH text-002.
ENDIF.
*-- Start of Selection
START-OF-SELECTION.
--for source client--
DATA itab2 TYPE itab.
DATA t_ref1 TYPE REF TO data.
itab2-t_name = p_table.
--for target client--
DATA itab3 TYPE itab1.
DATA t_ref2 TYPE REF TO data.
itab3-t_name1 = p_table.
*-- Create Dynamic Internal table for source client
CREATE DATA itab2-t_ref TYPE TABLE OF (itab2-t_name) .
ASSIGN itab2-t_ref->* TO <tab>.
CREATE DATA t_ref1 LIKE LINE OF <tab>.
ASSIGN t_ref1->* TO <tab1>.
*-- Create Dynamic Internal table for target client
CREATE DATA itab3-t_ref1 TYPE TABLE OF (itab3-t_name1) .
ASSIGN itab3-t_ref1->* TO <tab2>.
CREATE DATA t_ref2 LIKE LINE OF <tab2>.
ASSIGN t_ref2->* TO <tab3>.
*-- get the number of entries in table
SELECT COUNT(*) FROM dd03l INTO lv_count
WHERE tabname = p_table
AND fieldname = 'MANDT'.
Check MANDT field the the table, if not exists through an error message
IF lv_count = 0.
MESSAGE i000(8i) WITH text-001 space space.
EXIT.
ELSE.
*-- Delete the Table Entries in the target system
DELETE FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_to.
COMMIT WORK.
*-- Open cursor
OPEN CURSOR WITH HOLD icursor FOR
SELECT * FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_fm.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH text-001.
ENDIF.
DO.
FETCH NEXT CURSOR icursor INTO TABLE <tab> PACKAGE SIZE 1000.
IF sy-subrc <> 0.
CLOSE CURSOR icursor.
EXIT.
ENDIF.
*-- Modify Field 'MANDT' with the Target Client no.
LOOP AT <tab> ASSIGNING <tab1>.
ASSIGN COMPONENT: 'MANDT' OF STRUCTURE <tab1> TO <l_mandt>.
<l_mandt> = p_mdt_to.
MODIFY <tab> FROM <tab1>.
lines = lines + 1.
ENDLOOP.
*-- Insert records into target table
INSERT (p_table) CLIENT SPECIFIED FROM TABLE <tab>.
*-- Close the cursor
CALL FUNCTION 'DB_COMMIT'.
ENDDO.
ENDIF.
for target client
*-- Open cursor
OPEN CURSOR WITH HOLD icursor FOR
SELECT * FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_to.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH text-001.
ENDIF.
DO.
FETCH NEXT CURSOR icursor INTO TABLE <tab2> PACKAGE SIZE 1000.
IF sy-subrc <> 0.
CLOSE CURSOR icursor.
EXIT.
ENDIF.
*-- Close the cursor
CALL FUNCTION 'DB_COMMIT'.
ENDDO.
ENDIF.
CALL SCREEN 3000.
*& Module STATUS_3000 OUTPUT
text
MODULE status_3000 OUTPUT.
SET PF-STATUS 'ZTESTMENU'.
SET TITLEBAR 'xxx'.
For Source client
IF c_alv1 IS INITIAL.
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CONTAINER_SOURCE'.
IF sy-subrc = 0.
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
ENDIF.
IF sy-subrc EQ 0.
PERFORM field_cat1.
ENDIF.
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name =
is_variant =
i_save =
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 = <tab>
it_fieldcatalog = it_fieldcat1
it_sort =
it_filter =
EXCEPTIONS
valid_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.
ENDIF.
For Target client
IF c_alv2 IS INITIAL.
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CONTAINER_TARGET'.
IF sy-subrc = 0.
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
ENDIF.
IF sy-subrc EQ 0.
PERFORM field_cat2.
ENDIF.
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name =
is_variant =
i_save =
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 = <tab2>
it_fieldcatalog = it_fieldcat2
it_sort =
it_filter =
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.
ENDIF.
ENDMODULE. " STATUS_3000 OUTPUT
*& Module USER_COMMAND_3000 INPUT
text
MODULE user_command_3000 INPUT.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_3000 INPUT
*& Form field_cat1
text
--> p1 text
<-- p2 text
FORM field_cat1 .
Dynamic creation of a structure
CREATE DATA l_structure1 TYPE (p_table).
ASSIGN l_structure1->* TO <dyn_str1>.
Fields Structure
struc_desc1 ?= cl_abap_typedescr=>describe_by_data( <dyn_str1> ).
LOOP AT struc_desc1->components ASSIGNING <str_comp1>.
Build Fieldcatalog
ty_fieldcat1-fieldname = <str_comp1>-name.
ty_fieldcat1-ref_table = p_table.
CLEAR: l_pos.
*l_pos = l_pos + 1.
*ty_fieldcat1-seltext = 'CHECK'.
*ty_fieldcat1-fieldname = 'CHECK'.
*ty_fieldcat1-tabname = 'ITAB'.
*ty_fieldcat1-col_pos = l_pos.
*ty_fieldcat1-checkbox = 'X'.
*ty_fieldcat1-edit = 'X'.
*ty_fieldcat1-outputlen = '5'.
APPEND ty_fieldcat1 TO it_fieldcat1.
Build Fieldcatalog
ls_fieldcatalogue1-fieldname = <str_comp1>-name.
ls_fieldcatalogue1-ref_tabname = p_table.
APPEND ls_fieldcatalogue1 TO lt_fieldcatalogue1.
ENDLOOP.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table =
it_fieldcatalog = it_fieldcat1
i_length_in_byte =
IMPORTING
ep_table = l_table1
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.
ASSIGN l_table1->* TO <tab>.
Read data from the table selected.
SELECT * FROM (p_table)
CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE <tab>
WHERE mandt = p_mdt_fm.
ENDFORM. " field_cat1
*& Form field_cat2
text
--> p1 text
<-- p2 text
FORM field_cat2 .
CREATE DATA l_structure2 TYPE (p_table).
ASSIGN l_structure2->* TO <dyn_str2>.
Fields Structure
struc_desc2 ?= cl_abap_typedescr=>describe_by_data( <dyn_str2> ).
LOOP AT struc_desc2->components ASSIGNING <str_comp2>.
Build Fieldcatalog
ty_fieldcat2-fieldname = <str_comp2>-name.
ty_fieldcat2-ref_table = p_table.
APPEND ty_fieldcat2 TO it_fieldcat2.
Build Fieldcatalog
ls_fieldcatalogue2-fieldname = <str_comp2>-name.
ls_fieldcatalogue2-ref_tabname = p_table.
APPEND ls_fieldcatalogue2 TO lt_fieldcatalogue2.
ENDLOOP.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table =
it_fieldcatalog = it_fieldcat2
i_length_in_byte =
IMPORTING
ep_table = l_table2
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.
ASSIGN l_table2->* TO <tab2>.
Read data from the table selected.
SELECT * FROM (p_table) CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE <tab2>
WHERE mandt = p_mdt_to.
ENDFORM. " field_cat2
*FOR THE ABOVE CODE I NEED CHECKBOXES IN THE FIRST LIST AND I HAVE TRIED MANY WAYS BUT I HAVENT GOT THE SOLUTION. SO, PLZ CAN U EXPLAIN BY MENTIONING THE PIECE OF CODE IN ABOVE CODE.
PLZ DO THE NEED FUL.
thanks in advance.hi ,
below is the code in which two lists we wll be displayed in one layout dynamically(i.e after entering the table name two lists wll be displayed in one layout) from two different clients(i.e. source and target).
TYPE-POOLS *
TYPE-POOLS: slis.
*-- Tables Declaration
TABLES: dd02l, t000.
*-- Constants Declaration
CONSTANTS: lc_z TYPE char1 VALUE 'Z',
lc_y TYPE char1 VALUE 'Y'.
DATA: ok_code TYPE sy-ucomm.
*--Internal table and Work Area Declaration
DATA: lines LIKE sy-dbcnt VALUE 0.
DATA: icursor TYPE cursor.
*DATA: icursor1 TYPE cursor.
DATA: lv_count TYPE i.
DATA: lv_table_var1 TYPE char1.
DATA: lv_ans TYPE char1.
DATA : gd_tabname TYPE tabname.
*for check boxes
DATA:l_pos TYPE i VALUE 1.
*field catalog for source client
DATA: c_cont1 TYPE REF TO cl_gui_custom_container,
c_alv1 TYPE REF TO cl_gui_alv_grid,
it_fieldcat1 TYPE lvc_t_fcat ,
ty_fieldcat1 TYPE lvc_s_fcat ,
struc_desc1 TYPE REF TO cl_abap_structdescr,
ls_fieldcatalogue1 TYPE slis_fieldcat_alv,
lt_fieldcatalogue1 TYPE slis_t_fieldcat_alv,
l_structure1 TYPE REF TO data,
l_table1 TYPE REF TO data.
for check boxes for source client
DATA: ls_edit TYPE lvc_s_styl,
lt_edit TYPE lvc_t_styl.
*field catalog for target client
DATA: c_cont2 TYPE REF TO cl_gui_custom_container,
c_alv2 TYPE REF TO cl_gui_alv_grid,
it_fieldcat2 TYPE lvc_t_fcat ,
ty_fieldcat2 TYPE lvc_s_fcat ,
struc_desc2 TYPE REF TO cl_abap_structdescr,
ls_fieldcatalogue2 TYPE slis_fieldcat_alv,
lt_fieldcatalogue2 TYPE slis_t_fieldcat_alv,
l_structure2 TYPE REF TO data,
l_table2 TYPE REF TO data.
*for source client
TYPES: BEGIN OF itab,
t_name TYPE tabname,
t_ref TYPE REF TO data,
*for checkboxes.
check(1),
style TYPE lvc_t_styl,
END OF itab.
*for target client
TYPES: BEGIN OF itab1,
t_name1 TYPE tabname,
t_ref1 TYPE REF TO data,
END OF itab1.
*-- Field Symbol declaration for Dynamic Internal Table for source client
FIELD-SYMBOLS: <tab> TYPE table.
FIELD-SYMBOLS: <tab1> TYPE ANY.
FIELD-SYMBOLS: <l_mandt>.
FIELD-SYMBOLS: <str_comp1> TYPE abap_compdescr,
<dyn_str1> TYPE ANY.
*--Field Symbol declaration for Dynamic Internal Table for target client
FIELD-SYMBOLS <tab2> TYPE table.
FIELD-SYMBOLS <tab3> TYPE ANY.
FIELD-SYMBOLS: <l_mandt1>.
FIELD-SYMBOLS: <str_comp2> TYPE abap_compdescr,
<dyn_str2> TYPE ANY.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_table LIKE dd02l-tabname,
p_mdt_fm LIKE t000-mandt DEFAULT sy-mandt,
p_mdt_to LIKE t000-mandt DEFAULT '910'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON p_table.
lv_table_var1 = p_table+0(1).
*-- Validation for Standard tables
IF ( lv_table_var1 NE lc_z ) AND ( lv_table_var1 NE lc_y ).
MESSAGE e001(00) WITH text-002.
ENDIF.
*-- Start of Selection
START-OF-SELECTION.
--for source client--
DATA itab2 TYPE itab.
DATA t_ref1 TYPE REF TO data.
itab2-t_name = p_table.
--for target client--
DATA itab3 TYPE itab1.
DATA t_ref2 TYPE REF TO data.
itab3-t_name1 = p_table.
*-- Create Dynamic Internal table for source client
CREATE DATA itab2-t_ref TYPE TABLE OF (itab2-t_name) .
ASSIGN itab2-t_ref->* TO <tab>.
CREATE DATA t_ref1 LIKE LINE OF <tab>.
ASSIGN t_ref1->* TO <tab1>.
*-- Create Dynamic Internal table for target client
CREATE DATA itab3-t_ref1 TYPE TABLE OF (itab3-t_name1) .
ASSIGN itab3-t_ref1->* TO <tab2>.
CREATE DATA t_ref2 LIKE LINE OF <tab2>.
ASSIGN t_ref2->* TO <tab3>.
*-- get the number of entries in table
SELECT COUNT(*) FROM dd03l INTO lv_count
WHERE tabname = p_table
AND fieldname = 'MANDT'.
Check MANDT field the the table, if not exists through an error message
IF lv_count = 0.
MESSAGE i000(8i) WITH text-001 space space.
EXIT.
ELSE.
*-- Delete the Table Entries in the target system
DELETE FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_to.
COMMIT WORK.
*-- Open cursor
OPEN CURSOR WITH HOLD icursor FOR
SELECT * FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_fm.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH text-001.
ENDIF.
DO.
FETCH NEXT CURSOR icursor INTO TABLE <tab> PACKAGE SIZE 1000.
IF sy-subrc <> 0.
CLOSE CURSOR icursor.
EXIT.
ENDIF.
*-- Modify Field 'MANDT' with the Target Client no.
LOOP AT <tab> ASSIGNING <tab1>.
ASSIGN COMPONENT: 'MANDT' OF STRUCTURE <tab1> TO <l_mandt>.
<l_mandt> = p_mdt_to.
MODIFY <tab> FROM <tab1>.
lines = lines + 1.
ENDLOOP.
*-- Insert records into target table
INSERT (p_table) CLIENT SPECIFIED FROM TABLE <tab>.
*-- Close the cursor
CALL FUNCTION 'DB_COMMIT'.
ENDDO.
ENDIF.
for target client
*-- Open cursor
OPEN CURSOR WITH HOLD icursor FOR
SELECT * FROM (p_table) CLIENT SPECIFIED
WHERE mandt = p_mdt_to.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH text-001.
ENDIF.
DO.
FETCH NEXT CURSOR icursor INTO TABLE <tab2> PACKAGE SIZE 1000.
IF sy-subrc <> 0.
CLOSE CURSOR icursor.
EXIT.
ENDIF.
*-- Close the cursor
CALL FUNCTION 'DB_COMMIT'.
ENDDO.
ENDIF.
CALL SCREEN 3000.
*& Module STATUS_3000 OUTPUT
text
MODULE status_3000 OUTPUT.
SET PF-STATUS 'ZTESTMENU'.
SET TITLEBAR 'xxx'.
For Source client
IF c_alv1 IS INITIAL.
CREATE OBJECT c_cont1
EXPORTING
container_name = 'CONTAINER_SOURCE'.
IF sy-subrc = 0.
CREATE OBJECT c_alv1
EXPORTING
i_parent = c_cont1.
ENDIF.
IF sy-subrc EQ 0.
PERFORM field_cat1.
ENDIF.
CALL METHOD c_alv1->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name =
is_variant =
i_save =
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 = <tab>
it_fieldcatalog = it_fieldcat1
it_sort =
it_filter =
EXCEPTIONS
valid_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.
ENDIF.
For Target client
IF c_alv2 IS INITIAL.
CREATE OBJECT c_cont2
EXPORTING
container_name = 'CONTAINER_TARGET'.
IF sy-subrc = 0.
CREATE OBJECT c_alv2
EXPORTING
i_parent = c_cont2.
ENDIF.
IF sy-subrc EQ 0.
PERFORM field_cat2.
ENDIF.
CALL METHOD c_alv2->set_table_for_first_display
EXPORTING
i_buffer_active =
i_bypassing_buffer =
i_consistency_check =
i_structure_name =
is_variant =
i_save =
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 = <tab2>
it_fieldcatalog = it_fieldcat2
it_sort =
it_filter =
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.
ENDIF.
ENDMODULE. " STATUS_3000 OUTPUT
*& Module USER_COMMAND_3000 INPUT
text
MODULE user_command_3000 INPUT.
CASE ok_code.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_3000 INPUT
*& Form field_cat1
text
--> p1 text
<-- p2 text
FORM field_cat1 .
Dynamic creation of a structure
CREATE DATA l_structure1 TYPE (p_table).
ASSIGN l_structure1->* TO <dyn_str1>.
Fields Structure
struc_desc1 ?= cl_abap_typedescr=>describe_by_data( <dyn_str1> ).
LOOP AT struc_desc1->components ASSIGNING <str_comp1>.
Build Fieldcatalog
ty_fieldcat1-fieldname = <str_comp1>-name.
ty_fieldcat1-ref_table = p_table.
CLEAR: l_pos.
*l_pos = l_pos + 1.
*ty_fieldcat1-seltext = 'CHECK'.
*ty_fieldcat1-fieldname = 'CHECK'.
*ty_fieldcat1-tabname = 'ITAB'.
*ty_fieldcat1-col_pos = l_pos.
*ty_fieldcat1-checkbox = 'X'.
*ty_fieldcat1-edit = 'X'.
*ty_fieldcat1-outputlen = '5'.
APPEND ty_fieldcat1 TO it_fieldcat1.
Build Fieldcatalog
ls_fieldcatalogue1-fieldname = <str_comp1>-name.
ls_fieldcatalogue1-ref_tabname = p_table.
APPEND ls_fieldcatalogue1 TO lt_fieldcatalogue1.
ENDLOOP.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table =
it_fieldcatalog = it_fieldcat1
i_length_in_byte =
IMPORTING
ep_table = l_table1
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.
ASSIGN l_table1->* TO <tab>.
Read data from the table selected.
SELECT * FROM (p_table)
CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE <tab>
WHERE mandt = p_mdt_fm.
ENDFORM. " field_cat1
*& Form field_cat2
text
--> p1 text
<-- p2 text
FORM field_cat2 .
CREATE DATA l_structure2 TYPE (p_table).
ASSIGN l_structure2->* TO <dyn_str2>.
Fields Structure
struc_desc2 ?= cl_abap_typedescr=>describe_by_data( <dyn_str2> ).
LOOP AT struc_desc2->components ASSIGNING <str_comp2>.
Build Fieldcatalog
ty_fieldcat2-fieldname = <str_comp2>-name.
ty_fieldcat2-ref_table = p_table.
APPEND ty_fieldcat2 TO it_fieldcat2.
Build Fieldcatalog
ls_fieldcatalogue2-fieldname = <str_comp2>-name.
ls_fieldcatalogue2-ref_tabname = p_table.
APPEND ls_fieldcatalogue2 TO lt_fieldcatalogue2.
ENDLOOP.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
i_style_table =
it_fieldcatalog = it_fieldcat2
i_length_in_byte =
IMPORTING
ep_table = l_table2
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.
ASSIGN l_table2->* TO <tab2>.
Read data from the table selected.
SELECT * FROM (p_table) CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE <tab2>
WHERE mandt = p_mdt_to.
ENDFORM. " field_cat2
*FOR THE ABOVE CODE I NEED CHECKBOXES IN THE FIRST LIST AND I HAVE TRIED MANY WAYS BUT I HAVENT GOT THE SOLUTION. SO, PLZ CAN U EXPLAIN BY MENTIONING THE PIECE OF CODE IN ABOVE CODE.
PLZ DO THE NEED FUL.
thanks in advance. -
How do I build a dynamic business service URL in OSB 11g?
Hello,
I am used to using the business service endpoint URIs that we configure on the Transport tab of our business services in OSB 11.1.1.6. We can add multiple static entries here for load balancing, and we can overwrite these with a Customization File as we migrate through DEV, TEST, PROD. Everything's just fine there.
I now need to start consuming RESTful services with dynamic URLs such as:
http://host:port/customer/{customerId}
that would result in HTTP calls to values like:
http://host:port/customer/12345678
and
http://host:port/customer/55555555
I see that I can build the URI using the Routing Options action in our proxy message flow and throw in all of those variable values at runtime. This is working in DEV just fine. And, effectively, I've overridden the business service endpoint URIs that we configured in the Transport.
But now I want to:
1) Use multiple endpoint URIs for our cluster
2) Deploy to TEST
What is the proper way to do this? I would guess in the business service endpoint URIs in the customization file, but I don't know how to parameterize those. I would also guess customization file find/replace functionality to change the host:port in my Routing Options action, but then that would still be just a single-node endpoint and not a pointer to multiple servers in our cluster.
Can someone please advise the best way to configure these dynamic URLs at runtime while still allowing for clustered endpoints and for customization files to be applied as we promote through our environments?
Thank you,
MichaelFound some old code.
I think you need to do
property_text = "#"^variable_text
then you can do the following
property_list[1][property_text]
That seemed to work. -
How do you build a group contact list in your contacts?
I need help setting up a group contact list. I have a Imac Pro. Ive tried going to settings, right clicking on the icon and everything else but I can not set up a group contact. Please help!
Imac Pro
No such thing. Please say what Mac you have and what version of OS X. -
I'm trying to insert a dynamicly generated form list/menu dropdown item.
Everything works but the list always shows me the last record from the database as the first item in the list (ASC or DESC).
I want to put a dummy label as the first item in the list like: Select from list
How can i do this, because even if i put a static value in the value list items, it still shows the last item from the recordset first instead of the static value.
Does anybody have an idea how i can create a dynamic pulldown list in my form with the first item listed to be a statich dummy tekst or label like "Select from list etc"
Thanks,I created a normal recordset with Dreamweaver getting tea
m_id and team_names out of the database. Then i list the teamnames in a form list/
menu (dropdown) to show all the available teams. Again it shows me the last record from the
recordset as the first list item and i want a standard "select this" text or something default.
The form code below is generated by dreamweaver itself. I already tried to also put one static value in the value list property but i get the same result. To me it looks like the while loop is overriding whatever you put as static text.
<form id="form1" name="form1" method="post" action="">
<label for="list_teams">Teams:</label>
<select name="list_teams" id="list_teams">
<?php
do {
?>
<option value="<?php echo $row_Teams['team_id']?>"<?php if (!(strcmp($row_Teams['team_id'], $row_Teams['team_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Teams['team_name']?></option>
<?php
} while ($row_Teams = mysql_fetch_assoc($Teams));
$rows = mysql_num_rows($Teams);
if($rows > 0) {
mysql_data_seek($Teams, 0);
$row_Teams = mysql_fetch_assoc($Teams);
?>
</select>
</form> -
Hide Dynamic Filters list criteria
Hello Dear Experts,
I would like to ask you whether it is possible and how can i hide the Dynamic Filters list criteria from a BW Portal (Web) report when exporting this or broadcasting this by email in pdf format???
I mean about the first page of the output report which includes the settings & dynamic filters & key figures used in the report.
Great Thanks in Advance...!!!!
Kind Regards
GeorgeHi George
There are two options:
1. The default template for portal display is 0ANALYSIS_PATTERN. In this, there is a web item Info field.
This causes the static, dynamic filters to appear on the report on a click on Print button.
The option is to copy 0ANALYSIS_PATTERN to a new web template. Change the new template for not displaying this on click of Print button using the command option. Then use the new template as default template in SPRO. This will make it applicable for all the queries run on portal directly. Remember, for changes to take affect J2EE engine should be restarted.
2. If this is only required for few queries, then the best approach is to create the template for each report and publish them.
However, if the look and feel should be similar to other reports, then copy 0ANALYSIS_PATTERN and make changes to print command. The default template need not be changed here.
Thanks
Sri -
Property Lists: How to insert a variable as a property?
Hi.
I am trying to insert a variable in place of a newly defined
property to be added to a poroperty list.
This would normally add a new a new property to a poroperty
list :
Database [#needtogetvariablehere] = typedPassword
-- 'Database' is the property list, 'needtogetvariablehere'
is the new poperty and 'typedPassword' is the new property's value
- thisall works fine.
I'd like to generate new property names dynamically using an
editable text box. How do I replace the new property name '
nedtogetvariablehere' with a variable?
I'm sure I've got to put some rounded brackets in somewhere
but everything I try spits out a syntax error.
eg:
myVariable = "blablabla"
Database [#(myVariable)] = typedPassword
Any ideas?
Thanks.I don't know of a way, despite the responses so far, to
convert a variable
name to a symbol then to use it as a property. You must hard
code it as you
have seen in the responses.
Craig
Craig Wollman
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com
"dbohea" <[email protected]> wrote in
message
news:e7e3p7$mb2$[email protected]..
> Hi.
>
> I am trying to insert a variable in place of a newly
defined property to
> be
> added to a poroperty list.
>
> This would normally add a new a new property to a
poroperty list :
>
> Database [#needtogetvariablehere] = typedPassword
>
> -- 'Database' is the property list,
'needtogetvariablehere' is the new
> poperty
> and 'typedPassword' is the new property's value -
thisall works fine.
>
> I'd like to generate new property names dynamically
using an editable text
> box. How do I replace the new property name '
nedtogetvariablehere' with
> a
> variable?
>
> I'm sure I've got to put some rounded brackets in
somewhere but everything
> I
> try spits out a syntax error.
>
> eg:
>
> myVariable = "blablabla"
>
> Database [#(myVariable)] = typedPassword
>
>
> Any ideas?
>
> Thanks.
> -
Command-TAB - How does this build the application list???
I have a need to enumerate the applications that have "windows", "icons", whether if they are minimized to the dock or not. I need basically the list of applications that Command-TAB brings you. How do you do this programmatically?
Everything I tried gave me everything, or just the applications that are NOT minimized. Drives me nuts. Tried CGWindowListCopyWindowInfo, NSArray *runningApps = [workspace launchedApplications], but I can't get to the filtering of the list I need - whatever Cmd-TAB brings you.
Help?Hello,
I cannot reproduce what you say using launchedApplication.
NSArray *launchedApps = [[NSWorkspace sharedWorkspace] launchedApplications];
for (NSDictionary *app in launchedApps)
printf("%s is launched
",[[app valueForKey:@"NSApplicationName"]UTF8String]);
This gives me all launched apps that I can see in the comd-tab shortcut. If I use runningApplications then I get much more results (any app running even in background).
I minimized all windows of two apps: Preview and MacSoup as one is Cocoa and the other is not (well I think Preview is Cocoa): they where listed as well
{quote}
Finder is launched
Terminal is launched
WebKit is launched
Xcode is launched
Property List Editor is launched
Mail is launched
Trousseau d’accès is launched
Aperçu is launched
MacSOUP is launched
iTunes is launched
ResKnife is launched
MacVim is launched
TextMate is launched
Préférences Système is launched
Interface Builder is launched
AppList is launched
{quote}
That is the exact list I can see using comd-tab at the moment .. -
Help with how to setup property list correctly
I am developing an iPhone application and I need a database to store data.
Since it's small amount of data I'll go for Property List.
But I have zero experience with it. I was hoping you could help me set it up.
It's an app based on karate techniques required for each belt.
Firstly I need the top category to be the belt. and a subcategory for EACH belt to be Requirements, Stances, Blocks, Hand Techniques, Foot Techniques, Kata and Kumite.
How do I do that?<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Rows</key>
<array>
<dict>
<key>Title</key>
<string>Belt 1</string>
<key>Children</key>
<array>
<dict>
<key>Title</key>
<string>B1 Requirements</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Stances</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Blocks</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Hand Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Foot Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Kata</string>
</dict>
<dict>
<key>Title</key>
<string>B1 Kumite</string>
</dict>
</array>
</dict>
<dict>
<key>Title</key>
<string>Belt 2</string>
<key>Children</key>
<array>
<dict>
<key>Title</key>
<string>B2 Requirements</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Stances</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Blocks</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Hand Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Foot Techniques</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Kata</string>
</dict>
<dict>
<key>Title</key>
<string>B2 Kumite</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
Use Xcode to copy/paste more belts. Rename belts as needed.
This is only the plist structure for drilling down and does not include details for each category beyond the items shown.
You can't be doing any of this if you have zero experience - you'll have questions for every tiny step and unless someone builds your app for you, you'll go ahead very, very slowly.
It is up to anyone with zero experience to spend time going thru the most basic hello world tutorials, as an example, and learn enough to be able to gain some traction on their own...this is not trivial stuff that you can just install a few tools and make what you want the next day, sorry.
See this post for beginner resources:
http://discussions.apple.com/thread.jspa?threadID=2218661
- come back when you've exhausted those and need specific help untangling something or if you get confused as you progress on your own...not just in over your head at the very beginning. -
How do I build an expression for a multi-element in-list?
How do I build an expression for a multi-element in-list? For example:
SELECT * FROM employees
WHERE (first_name, last_name, email) IN
(('Guy', 'Himuro', 'GHIMURO'),('Karen', 'Colmenares', 'KCOLMENA'))
Passing a Vector to Expression.in(Vector) where each element is a Vector of values itself will result in the appropriate expression for the values clause, but how to I get the columns to be considered together, that is, how do I get the "(first_name, last_name, email)" part?
SteveSteve,
I do not believe this is currently supported in the TopLink expression framework. Your best bet at this point will be to use custom SQL.
Doug -
How to create a dynamic property in JavaFX
public class Person() {
private SimpleStringProperty _Name = new SimpleStringProperty();
public final String NameGet() {
return this._Name.getValue();
public final void NameSet(String Name) {
this._Name.setValue(ColumnName);
public StringProperty NameProperty() {
return this._Name;
private SimpleStringProperty _SurName = new SimpleStringProperty();
public final String SurNameGet() {
return this._SurName.getValue();
public final void SurNameSet(String SurName) {
this._Name.setValue(ColumnName);
public StringProperty SurNameProperty() {
return this._SurName;
How to create a dynamic property in JavaFX ?
ObservableMap, ObservableMapValue, MapPropertyBase, MapProperty
Which one should I use. Can you give an example?I'm not sure what you mean by "dynamic property"; can you be more explicit?
Your code creates two properties that can be read, written, and observed for changes, though it's probably better to use the standard naming scheme for the methods (e.g they should be getName(), setName(...) and nameProperty()).
An ObservableMap is an extension of the java.util.Map interface that can be observed; i.e. you can register a listener that will be notified if a key-value pair is added or removed from the map.
ObservableMapValue is an interface that defines an observable reference to an ObservableMap; i.e. it has a get() method returning an ObservableMap and a set(...) method taking an ObservableMap. You can register a ChangeListener which is notified when the set(...) method is called. It additionally functions as an ObservableMap, so you can also register listeners that get notified when key-value pairs are added or removed from the underlying observable map.
MapProperty and MapPropertyBase are effectively partial implementations of ObservableMapValue. SimpleMapProperty is a full implementation.
If you just need a single ObservableMap (i.e. not an observable reference to one), then the FXCollections.observableHashMap() factory method will provide one. -
How to create a dynamic entry list for an input field in VC(ce 7.1)
Hello all,
I have an Input field, i need to create a Dynamic Entry List for it in VC(ce 7.1).
How can this be done.
Thanks in Advance.
Thanks and Regards,
Santhosh Guptha NHi Santhosh,
You can define Dynamic entry list for Drop down list and combo box but not for input field.
[Refer this|http://help.sap.com/saphelp_nwce10/helpdata/en/2a/28249060dd4dbc872f6266f4557364/frameset.htm] for defining entry list.
Let me know if it helped.
Regards,
Dharmi
Maybe you are looking for
-
BADI ME_PROCESS_PO_CUST for changing header data
Hello Experts, I'm using Method PROCESS_HEADER in Badi ME_PROCESS_PO_CUST in order to change some header data. I want to change header data depending on the partner data which are on header level. It works fine as long as there are data changed in th
-
Post-install of SSM 4.0 and client-copy
We finished the installation of Sol. Man. 4.0 on a linux/oracle platform. At what point in the post install do we do the client copy of client 000 for data and client 001 for users to a new client? Before, during or after all the img config in 000?
-
My track pad is unpredictably sensitive. Often it will highlight lots of items instead of the one I select the "feel" is different, not feeling like it has "clicked". Other times a selection box will appear for no apparent reason
-
MIGO 551 Error Deficit of BA Unrestr. prev ..
Hi MM expert I really need your help we are going to live the new company next week and i only found out these things to be done.. Im new in MM.. here is the scenario.. 1. on new company- our client do their testing there uploading initial stocks, GI
-
JSF: How to bind a CommandButton functionaity to an ENTER or ESCAPE key?
Hello! I use a JSF in my application. There are a lot of JSF Create - , Edit - and Delete - pages. All of this pages have to Command buttons: OK - which performs the action Cancel - which cancels the action. So, the problem is that it's necessary to