Add a form (based on query) to a form (based on table)
I have a normal form based on a table. I want to put in a little form in a region of this first form that is based on a query. They have one field in common.
How can I do this?
Elsie
Hi Elsie,
Effectively, you want to end up with a single form and save the data back into two or more tables?
If so, you could base the entire form on a SQL view and use an INSTEAD OF trigger to update the underlying tables.
Regards
Andy
Similar Messages
-
[OIM] - Form Complex Lookup Query on child form
Hi all expert
I have two form, which is parent-child relationship.
I need to form a lookup query on child form's lookupfield to let user select the value but lookup query depens on the parent form on what user selecting..
Example as:
Parent form - Country Code - 100
Child Form - Department Code - Lookup query will be = Select DepartmentCode From DeparmentLookup where country ="100"
The "100" value depends on what user choice on CountryCode fro mparent form.
Can i do something like this ?
Thank in advanced
JohnThis happen for a property setting in the relation. try this..
Select all your relation in the form under Relation nodes (data block >> relation)
go to property or press F4 and set the following property to YES
Prevent Masterless Operations = Yescompile and check..
Hope this will works.. ;)
Hamid
Mark correct/helpful to help others to get right answer(s).* -
Displaying items based on Query record count (Forms 4.5)
I have a special requirement.
Assume col1 that I am selecting from table temp.
select col1 from temp;
Now if query fetches 9 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9
If query fetches 15 records.
Each column I want to show like this.
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15.
That means items displayed on screen chages based on output of
query.
Pls. suggest some solution.
nullWhen i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
What does the "key-preserved table" mean? -
How to popup form according to query by CFL for user defined tables?
Hi Experts!
Please write a simple code for adding CFL in UDO and popup the window according to query. suppose i want to execute query
"select code,name from [@WITM]". I want to add CFL in edittext which is on UDO. how can we add CFL in that Edittext by code.
Thanking You
vishwajit kumarHi Vishwajit,
Please response to your previous posting or close it first. Whatever the answer working or not, you need reply.
Thanks,
Gordon -
Forms based on query? Is it possible in Oracle Portal?
here is my code that i want to use
SELECT a.first, a.last, b.Position_CD, c.skill_cd, d.team_name, d.team_country, d.club, e.structure_name
FROM Roster a, Roster_position b, roster_skill c, team d, team_structure e
where (a.Roster_ID = b.roster_id (+) and (b.roster_id = c.roster_id (+) ) and (a.team_cd = d.team_cd(+)) and (a.team_structure_cd = e.team_structure_cd (+)))
order by a.roster_id;
Is it possible for oracle portal to support such a query in a form?
Oracle portal supports single tables or views...master-detal...and forms based on procedures.
Since the above query associates with moro then one table..how might one create a form based on that query? Is their a way in oracle portal to create a form and have its record source be based on such a complex query and be able to update and insert data? I know and have tested that it works in Ms Access and i can update and add data in that above query. Hopefully oracle supports this. (*cross fingers*)
If i cant do what i said above...what advice or suggestions you guys have for me? If i use master-detail it won't work right because i need to involve all 5 tables.
Any help or comments are greatly appreciated!When i made the above query a view and created an oracle portal form. I get this error when I try to retrieve all the records in that view i made above.
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
What does the "key-preserved table" mean? -
Form Filter Based On Query Results
How can I create a filter on a form based on the results of a query.
i.e. The Query [ESS_City] looks at the form's field [Current_User] and generate a list of cities [City_ID] that I want to use to match the form [ESS_QUEUE] field [City_ID]
Query Name: [ESS_City]
Query Field: [City_ID]
Form name: [ESS_Queue]
Form Field to filter with: [City_ID]
Thank you,
Mark MatzkeI use criteria in my queries instead of filters.
I would have a combo in the header of the form to select City_ID. Use that combo as criteria in the query that feeds the form. Have an AfterUpdate event to refresh the form.
Build a little, test a little -
For Update Query from ORACLE Forms
Hi
We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
We have checked the following properties in the database Block
*1) Locking Mode is set to Automatic*
*2) Update Changed Columns only is set to YES*
*3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.you can't dynamically add a query to the data model in reports.
You should look into the XML based customization of Oracle Reports. This will enable you to define a report dynamically by creating a definition in XML.
Also another option is to have the report with a query in it and use lexical parameters in reports to pass the query definition or just the where part of it.
Look at the reports online help for both of these solutions. -
Hey Everyone! First post ever, so bear with me:
I'm trying to create a streamlined method to use a form to let myself and others add information and select certain options to put together a custom table of contents. Basically, I would like to have a form with a series of text fill and single/multiple choice options that will automatically populate a table of contents based on the selections and will link to other .pdf files that are associated with the selections. I was hoping this would be possible with a form, but I'm relatively new to the function of the software as a whole and my research came up short. Any suggestions on how to start are more than welcome, and if I wasn't quite clear enough I would be happy to elaborate.
Thanks for your time!You would need to search for other PDF creation software that can accomplish what you desire.
There are many cheaper PDF creation alternatives other than Adobe's Acrobat Pro software.
Also, try doing a web search under these terms to see if you can find an app/software/solution that may work for you.
How to create table of contents in PDF files -
HOW TO ADD NEW COLUMN IN EXISTING QUERY
hi,
i m working on oracle reorts 10g. i have a multiple query based report. now i want to add a new column in query 1 and order by on that new column .
i added column in query but when i see that group i dont find that column in that group.wt do i need to do to visible that column in query1 group thats y the order by on that column is not working i think.
tell how to solve it ?
thanksHi,
The new column you have added might be in the least level group of that query.
Drag it to the desired group level, first postion and set the break order for that item in the property pallette..
(If still the item not coming, check whether you have put 'comma' in the select query after writing the column name)
Simply giving the column in the order-by clause will not work in report.
In Report, record display order is completely based on the break-order of the items given in query-groups
If you change accordingly it will work
Regards
Dora -
How to add join conditions in ABAP Query.
Hi,
I need a help on "ABAP Query".
How to add join conditions in ABAP Query.
Thanks in advance.
Thanks & Regards,
RamanaHi,
See below code,
*& Report ZRNP_ALV_SO
REPORT zrnp_alv_so MESSAGE-ID z7rnp .
INCLUDE zrnp_include .
*SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
s_auart FOR v_auart ,
s_vkorg FOR v_vkorg ,
s_spart FOR v_spart ,
s_kunnr FOR v_kunnr ,
s_matnr FOR v_matnr .
SELECTION-SCREEN END OF BLOCK blk1 .
*AT SELECTION SCREEN *
AT SELECTION-SCREEN.
SELECT SINGLE vbeln
FROM vbak INTO vbak-vbeln
WHERE vbeln IN s_vbeln.
IF sy-subrc <> 0.
MESSAGE e202.
ENDIF.
*START OF SELECTION *
START-OF-SELECTION .
PERFORM data_select.
PERFORM t_sort USING i_sort .
PERFORM event_cat USING i_event .
PERFORM fld_cat USING i_fldcat[] .
PERFORM t_layout USING i_layout .
PERFORM fld_cat2 USING i_fldcat2[] .
PERFORM call_alv.
* DATA SELECT *
*& Form DATA_SELECT
* text
* --> p1 text
* <-- p2 text
FORM data_select .
REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
BREAK-POINT.
*SELECT*
*a~vbeln*
*a~auart*
*a~vkorg*
*a~spart*
*a~kunnr*
*b~posnr*
*b~matnr*
*c~maktx*
*b~kwmeng*
*b~vrkme*
*INTO TABLE it_so1 FROM vbak AS a*
*INNER JOIN vbap AS b ON b~vbeln = a~vbeln*
*INNER JOIN makt AS c ON c~matnr = b~matnr*
*AND c~spras = sy-langu*
*WHERE a~vbeln IN s_vbeln .*
IF sy-subrc = 0.
SORT it_so1 BY vbeln.
DELETE ADJACENT DUPLICATES FROM it_so1.
ENDIF.
* COLURING DISPLAY *
DATA: ld_color(1) TYPE c .
* LOOP AT it_so1 INTO wa_so.
* Populate color variable with colour properties
* Char 1 = C (This is a color property)
* Char 2 = 3 (Color codes: 1 - 7)
* Char 3 = Intensified on/off ( 1 or 0 )
* Char 4 = Inverse display on/off ( 1 or 0 )
* i.e. wa_ekko-line_color = 'C410'
* ld_color = ld_color + 1.
* Only 7 colours so need to reset color value
* IF ld_color = 8.
* ld_color = 1.
* ENDIF.
* CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
** wa_ekko-line_color = 'C410'.
* MODIFY it_so1 FROM wa_so.
* ENDLOOP .
* IF sy-subrc = 0.
IF NOT it_so1[] IS INITIAL.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
INTO TABLE it_vbfa
FROM vbfa
FOR ALL ENTRIES IN it_so1
WHERE vbelv = it_so1-vbeln
AND posnn = it_so1-posnr
AND vbtyp_n ='J' .
IF sy-subrc = 0.
SELECT vbeln
posnr
matnr
werks
lgort
charg
lfimg
vrkme
FROM lips INTO TABLE it_del_ful
FOR ALL ENTRIES IN it_vbfa
WHERE vbeln = it_vbfa-vbeln
AND posnr = it_vbfa-posnn.
ENDIF.
ENDIF.
ENDFORM. " DATA_SELECT
**************** EVENT CATALOG ****************************************
*& Form EVENT_CAT
* text
* -->P_I_EVENT text
FORM event_cat USING p_i_event TYPE slis_t_event .
REFRESH p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
* EXPORTING
* I_LIST_TYPE = 0
IMPORTING
et_events = p_i_event
* EXCEPTIONS
* LIST_TYPE_WRONG = 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.
READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO t_event-form.
MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
CLEAR t_event .
ENDFORM. " EVENT_CAT
**********FORM FOR EVENT TOP_OF_PAGE**********************************
FORM top_of_page .
REFRESH i_listheader.
DATA: t_header TYPE slis_listheader.
DATA: v_text(50).
WRITE sy-datum TO v_text.
CLEAR t_header.
t_header-typ = 'S'.
t_header-key = "Date".
t_header-info = v_text.
APPEND t_header TO i_listheader.
CLEAR t_header.
CLEAR v_text.
WRITE: 'SALES ORDER & DELIVERY DETAILS REPORT ' TO v_text .
t_header-typ = 'S'.
t_header-key = 'TITLE'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader.
* I_LOGO = 'ALV_BACKGROUND'.
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
******** FIRST ALV GRID DISPLAY ***************************************
FORM call_alv .
* FORM TO MAKE THE CELL CONTENTS INVISIBLE.
* PERFORM INVISIBLE_CELL_CONTENTS. *
*EXCLUDE-DECLARATION.
CLEAR wa_exclude.
wa_exclude-fcode = '&VEXCEL'.
APPEND wa_exclude TO i_exclude.
*& Form CALL_ALV
* text
* --> p1 text
* <-- p2 text
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND1'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_background_id = 'ALV_BACKGROUND'
is_layout = i_layout
it_fieldcat = i_fldcat[]
it_excluding = i_exclude
it_sort = i_sort
it_events = i_event
TABLES
t_outtab = it_so1
* 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. " CALL_ALV
************** FIRST FIELDCATALOG *************************************
*& Form FLD_CAT
* text
* -->P_I_FLDCAT[] text
FORM fld_cat USING p_i_fldcat TYPE slis_t_fieldcat_alv.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES ORDER NO.'.
i_fldcat-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-hotspot = 'X'.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES DOC. TYPE'.
i_fldcat-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES ORG.'.
i_fldcat-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 12. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DIVISION'.
i_fldcat-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SOLD TO PARTY'.
i_fldcat-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES DOC. ITEM'.
i_fldcat-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 17. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'MATERIAL NO.'.
i_fldcat-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DESCRIPTION'.
i_fldcat-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'QUANTITY'.
i_fldcat-col_pos = 9. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-do_sum = 'X'. " For doing "SUM"
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES UNIT'.
i_fldcat-col_pos = 10. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
ENDFORM. " FLD_CAT
****************** ALV SORTING ***************************************
*& Form SORT
* text
* -->P_I_SORT text
FORM t_sort USING p_i_sort TYPE slis_t_sortinfo_alv .
DATA: i_sort TYPE slis_sortinfo_alv .
REFRESH p_i_sort .
CLEAR i_sort.
i_sort-spos = 1.
i_sort-tabname = 'IT_SO1'.
i_sort-fieldname = 'VBELN'.
i_sort-up = 'X'.
i_sort-subtot = 'X'.
i_sort-group = '*'.
APPEND i_sort TO p_i_sort.
ENDFORM. " SORT
*FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
* SET PF-STATUS 'ZSTANDARD'.
*ENDFORM. "Set_pf_status
***********FORM FOR EVENT USER_COMMAND1********************************
FORM user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*CASE R_UCOMM .
* WHEN '&IC1' .
* IF rs_selfield-FIELDNAME = 'VBELN' .
* ENDIF .
* WHEN OTHERS .
* ENDCASE .
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
AND posnv = wa_so-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = wa_vbfa-vbelv
posnr = wa_vbfa-posnn.
IF sy-subrc = 0.
CLEAR wa_del.
MOVE wa_it_del_ful TO wa_del.
APPEND wa_del TO it_del1.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
********* SECOND ALV GRID DISPLAY ***********************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND2'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_background_id = 'ALV_BACKGROUND'
it_fieldcat = i_fldcat2[]
it_sort = i_sort
TABLES
t_outtab = it_del_ful
* 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 . "USER_COMMAND1
********** FORM FOR EVENT USER_COMMAND 2 ******************************
FORM user_command2 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
* IF SY-SUBRC = 0.
* LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
* AND posnv = WA_SO-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = rs_selfield-value
" vbeln = wa_vbfa-vbeln
posnr = wa_vbfa-posnn.
IF rs_selfield-fieldname = 'VBELN'.
SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
ENDIF .
* ENDLOOP.
* ENDIF.
ENDIF.
ENDFORM . "USER_COMMAND2
********* SECOND FIELDCATALOG ******************************************
*& Form FLD_CAT2
* text
* -->P_I_FLDCAT2[] text
FORM fld_cat2 USING p_i_fldcat2 TYPE slis_t_fieldcat_alv .
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-tabname = 'IT_DEL_FUL'."TABLE NAME
i_fldcat2-seltext_m = 'DELIVERY NO.'.
i_fldcat2-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-hotspot = 'X'.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'DELIVERY ITEM'.
i_fldcat2-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'MATERIAL NO.'.
i_fldcat2-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'PLANT.'.
i_fldcat2-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ST. LOCATION'.
i_fldcat2-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'BATCH NO.'.
i_fldcat2-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ACT. DEL. QTY.'.
i_fldcat2-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'SALES UNIT.'.
i_fldcat2-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
ENDFORM. " FLD_CAT2
***************** ALV LAYOUT *******************************************
*& Form LAYOUT
* text
* -->P_I_LAYOUT text
FORM t_layout USING p_i_layout TYPE slis_layout_alv .
p_i_layout-zebra = 'X'.
p_i_layout-totals_text = 'GRAND TOTAL ='.
* p_i_layout-CONFIRMATION_PROMPT = 'X'.
* p_i_layout-DEF_STATUS = ' '.
p_i_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT -
Adding a custom meta data field which lists out content id based on query
How can we add a custom meta data filed which lists out content id based on query like dDocType <matches> `AssociatedProduct`?
Or other alternative would be to have a custom metadata field such that it allows selection of content id using link wizard which we typically use in site studio. It would be preferable to have this second option as it is user friendly. Can we do this on a check-in screen?
-PratapThanks for the reply Deepak.
We got it resolved. We did following changes in /ucm/custom/SiteStudio/resources/ss_custom_field_resources.htm file and it worked cleanly.
Added following section at the end before body tag
===================================================================================================
<@dynamichtml ss_parent_definition_field_entry@>
<$include super.std_edit_entry$>
<$if isQuery and isTrue(isQuery)$></td><td><$endif$>
<$include ss_contributor_base_scripts$>
<script type="text/javascript" src="<$HttpRelativeWebRoot$>resources/<$SSContributorSourceDir$>/sitestudio/wcm.contentserver.popup.js"></script>
<script language="JavaScript">
function OnSelectParentId()
var selectParentIdOptions = {};
selectParentIdOptions.httpCgiPath = '<$HttpCgiPath$>';
selectParentIdOptions.queryText = 'dDocType <matches> `Country`';
selectParentIdOptions.coreContentOnly = '<$if coreContentOnly and isTrue(coreContentOnly)$>1<$else$>0<$endif$>';
selectParentIdOptions.callback = function( returnParams )
returnParams = returnParams || {};
if( returnParams && returnParams['dDocName'] && ( returnParams.dDocName.length > 0 ) )
// Set the actual metadata value
<$if isQuery AND isTrue(isQuery)$>
for (var i=0; i < document.<$formName$>.elements.length; i++)
var elt=document.<$formName$>.elements;
if (elt.name=="<$fieldName$>")
elt.value = returnParams.dDocName;
<$else$>
document.<$formName$>.<$fieldName$>.value = returnParams.dDocName;
<$endif$>
WCM.ContentServerPopup.ChooseManagedDocument(selectParentIdOptions);
</script>
<input type="button" value="<$lc("wwBrowse")$>..." onclick="OnSelectParentId();">
<@end@>
======================================================================================
Then modified the section which show xWebsiteSection, xRegionDefinition etc to include my custom meta data defitnion as well ('xParentContentType')
===================================================================
<@dynamichtml std_edit_entry@>
<$if fieldName and ( fieldName like "xWebsites|xDontShowInListsForWebsites" )$>
<$include ss_website_query_text_field$>
<$elseif fieldName and strEquals( fieldName, "xWebsiteSection" )$>
<$include ss_website_section_field_entry$>
<$elseif fieldName and strEquals( fieldName, "xRegionDefinition" )$>
<$include ss_region_definition_field_entry$>
<$elseif fieldName and strEquals( fieldName, "xParentContentType" )$>
<$include ss_parent_definition_field_entry$>
<$else$>
<$include super.std_edit_entry$>
<$endif$>
<@end@>
====================================================================
This worked fine.
Regards,
Pratap -
How to execute immediately a query in a form
Hi,
I've got a form which opens another form on which I have created a data block based on a FROM clause query where the where clause has a column joined a GLOBAL variable initialized in the first form.
How can I get the second form execute immediately the FROM clause query when called from the first form?
I've tried to insert in the second form called a trigger WHEN-NEW-FORM-INSTANCE where I have the following code.
BEGIN
GO_BLOCK('my_block');
EXECUTE_QUERY;
END;
I thougth that the EXECUTE_QUERY executed by default the FROM clause query I've inserted in the Query Data Source Name of the Data Block but I don't see anything when the second form is called by the first form, just the message "FRM-50505 unable to perform query" I've tried to perform the query inserted in the Query Data Source Name executing it directly on the DB and it works
Thanks!
Edited by: Mark1970 on 30-mar-2012 3.07check from menu or display error to see why do you obtain an error
-
How to check the source query of tabular form ....
Hi All ,
is there any way to change the source query of tabular form ......
ya ... i could see it in the source but it is normal sql query ....
where as to generate the addrow functionality the sql query must be
Select empno , ADD_ITEM.TEXT(1,empno), ename ,ADD_ITEM.TEXT(2,ename)................
then where can i find this query .?
i could see that ADD button is calling ADDROW process and which inreturn calling ADD function ....
can any one tell me , where to see the code for this ADD function ....
as i checked it in db ..... it is not there at all.You can have a look here for the manual tabular forms:
http://apex.oracle.com/pls/otn/f?p=31517:170
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
------------------------------------------------------------------- -
How do I set form automatically in query mode
Hi !
I have to pass value of one field as parameter from one form to
another form and then execute the query on the next form based
on the passed value of the parameter. (all this should happen as
soon as I press one button on the first form).
My problem is that unless I put the second form in the enter
query mode before accepting the value of the field, whatever
value I pass on from the first form will not be of any use.
How do I set the mode of the form to query mode. Since
system.mode is the read only variable and no value can be
assigned to it, so how can I handle this situation ?
Thanks in advance,
Shobhit
nullHi Shobhit,
Try ENTER_QUERY command in the PRE-FORM trigger of second form.
EXECUTE_QUERY in WHEN-NEW-FORM-INSTANCE and set the parameter
values to the respective fields in PRE-QUERY trigger.
Lalit
Shobhit Kumar (guest) wrote:
: Hi Steve !
: Thanks for the answer. but I want a bit different
functionality.
: I have already tried using execute-query (built in) in the when-
: new-form-instance and passed the value of the parameter in the
: field. But all that is happening is that the value is just
: sitting in the field and query is not getting executed
: automatically. I am using forms 5.0 and to enter a query we
need
: to change the mode of the form in the query mode (by clicking
: the enter->query button) and then enter the values in the
fields
: that would be used to build the query and the as soon as I say
: execute query it executes the query and displays the results.
: What I want is that as soon as I press a button in a form,
value
: of one field should go to another field in a second form and
: then the query should get executed automatically in the second
: form and the results should be displayed in that form.
: Any suggestions ?
: Regards,
: Shobhit
: Steve (guest) wrote:
: : You might want to try placing the builtin EXECUTE_QUERY
: : in the WHEN-NEW-FORM-INSTANCE trigger to auto query the form.
: You
: : may also want to use the SET_BLOCK_PROPERTY(DEFAULT_WHERE,
: : '.......'); to restrict queried records or set :block.item
: values
: : in a PRE-QUERY Trigger.
: : Shobhit Kumar (guest) wrote:
: : : Hi !
: : : I have to pass value of one field as parameter from one
form
: to
: : : another form and then execute the query on the next form
: based
: : : on the passed value of the parameter. (all this should
: happen
: : as
: : : soon as I press one button on the first form).
: : : My problem is that unless I put the second form in the
enter
: : : query mode before accepting the value of the field,
whatever
: : : value I pass on from the first form will not be of any use.
: : : How do I set the mode of the form to query mode. Since
: : : system.mode is the read only variable and no value can be
: : : assigned to it, so how can I handle this situation ?
: : : Thanks in advance,
: : : Shobhit
null -
How to not display certain items based upon certain criteria (Edit Form)
I have a Edit form which was created from an interactive report I generated.
There are 10 item fields which are listed which can be changed.
Sometimes I want to see just 9 of the fields on the form based on what the value is of another field in the record.
When I display the fields on the Interactive report I can filter this out by using a case statement, but how
do I do this with the edit form as the query is not there.
Thanks for your time in advance,
AnonUse Conditions to control whether the item appears or not.
In the item definition is a Conditions section where a large number of different types of condition can be used to determine whether the item is rendered. These include comparisons of the value of the item, or another item, items being null, and a lot of other options. Conditions are widely used throughout APEX—sometimes in subtle or noninuitive ways—so it's worthwhile studying how they're used.
Maybe you are looking for
-
Yesterday I upgraded my MacBook Pro 13" (Early 2013) to 10.10.3. I immediately started having problems with it opening apps slowly. So I read and discovered it had replaced some of my apps with newer versions. I also restarted it 2 or 3 times. That s
-
How will the Macbook do in the long run ?
I will be buying a new Macbook when Leopard and iLife 07 are released. However, I have been increasingly hearing and reading negative feedback about the Intel GMA950 in the Macbook, so I've been looking to stretch my budget and get the low end 15" Ma
-
I have switched to a MBP from PC recently.
As mentiond in the title, I'm a MBP user now. I'm facing problem with my iPhone 4 (iOS 4.3.3) sync problem. Previously i sync all my data (contacts, calendar, apps, music, video) with my PC's iTunes. How can i sync my iPhone with my new MBP without e
-
Unexpected risks after rule update
I wanted to updat RAR rules in dev GRC as per Q2 2009 rule update provided by SAP. SAP recommendation for transaction FBV0 is: remove auth objects F_BKPF_KOA and add F_BKPF_BUK with actvt 01 or 02. As client wants to keep KOA active, I have done foll
-
User must change password at next logon?
Hello, We have an XMII / LDAP connection to AD. (Both read and write). But when ever we set a user in our AD to change password at next logon, they get block from logging into Xmii. The funny part about this is if we do the following: 1: User login i