Referencing Field Values in Region Heading
Is there a simple way to refer to more than one field value in a region heading? I have added the '&P1_YEAR.' to the end of a region name and it will display the contents of that field in the heading.
How can you display more than one filed in the heading. For example if you wanted to add 'Year' and 'Model' to the heading 'Vehicle' so that it displayed
'Vehicle Ford 2008'
Kind Regards,
Steve Welch
Steve:
You can simply concatenate the fields whose values you want displayed
&P1_YEAR. &P1_MODEL.
varad
Similar Messages
-
Hi friends,
I make one header alv ok I want and take one variable count in my program so I want to display its value in ALV HEADER
Total Target Qty:
Total EMP. Efficiency
Total Machine Effi.
I take may header like this and pass thre text here.ok Now I want to display value of this three.
Total Trget Qty: 2.23 like that.
CLEAR st_line.
st_line-typ = 'S'.
CONCATENATE 'Total Target Qty: ' count ' ' INTO st_line-info.
APPEND st_line TO t_list_top_of_page.
So I took like this in header count is my variable in which I take value.
So how can we pass the value in ALV Header please tell me.
its urgent so.
Thnaks in Advance.
Prashant.HI DHWANI,
*& Report ZPP_RE_EMP_DETAILS
*& This Report is used to check the Employee Performance And Used Machine Quantity
*& Rqueirement By Santhosh
*& Developed By Prashant On Date 01.02.2008
*& Created By: Prashant Brahmbhatt
*& Creation Date: 20080201
*& Module: PP (Production & Plannig)
*& Changed By Changed Date Reason
REPORT zpp_re_emp_details.
TABLES:zpplan.
TYPE-POOLS:slis.
DATA:BEGIN OF itab OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF itab.
DATA:BEGIN OF temp OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF temp.
DATA:BEGIN OF itab_t OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF itab_t.
DATA:BEGIN OF itab1 OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
act_prod LIKE zpplan-act_prod,
quaty LIKE zpplan-quaty,
planned LIKE zpplan-planned,
iserh LIKE zpplan-iserh,
temp TYPE c,
tar_qty TYPE p DECIMALS 2,
ach_qty TYPE p DECIMALS 2,
mch_eff TYPE p DECIMALS 2,
END OF itab1.
DATA: wa LIKE itab1.
DATA:BEGIN OF itab2 OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
act_prod LIKE zpplan-act_prod,
quaty LIKE zpplan-quaty,
planned LIKE zpplan-planned,
iserh LIKE zpplan-iserh,
temp TYPE c,
tar_qty(10) TYPE p DECIMALS 2,
ach_qty(10) TYPE p DECIMALS 2,
mch_eff(10) TYPE p DECIMALS 2,
count(10) TYPE c,
END OF itab2.
DATA: a(10) TYPE c,
b(10) TYPE c,
count(10) TYPE c,
count1(10) TYPE c.
c(2) TYPE p DECIMALS 2.
DATA:t_fcat TYPE slis_t_fieldcat_alv,
t_events TYPE slis_t_event,
t_list_top_of_page TYPE slis_t_listheader,
t_list_end_of_page TYPE slis_t_listheader.
CONSTANTS:c_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
CONSTANTS:c_formname_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE'.
DATA: st_line TYPE slis_listheader.
SELECTION-SCREEN
SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
*PARAMETERS:shftin LIKE zpplan-shftin.
SELECT-OPTIONS:date FOR zpplan-zdate,
shftin FOR zpplan-shftin,
werks FOR zpplan-werks.
SELECTION-SCREEN:END OF BLOCK blk1.
ALV CALL
INITIALIZATION.
PERFORM build_fieldcatalog USING t_fcat .
PERFORM event_call.
PERFORM head_built USING t_events.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM display_alv.
*& Form build_fieldcatalog
text
-->P_T_FCAT text
FORM build_fieldcatalog USING temp_fcat TYPE slis_t_fieldcat_alv.
DATA:w_fcat TYPE slis_fieldcat_alv.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'MNAME'.
w_fcat-seltext_m = 'Machine Name'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'SHFTIN'.
w_fcat-seltext_m = 'Emp No'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ZDATE'.
w_fcat-seltext_m = 'Pos Date'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'QUATY'.
w_fcat-seltext_m = 'Quantity'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ACT_PROD'.
w_fcat-seltext_m = 'Actual Quantity'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ISERH'.
w_fcat-seltext_m = 'Down Time'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'TAR_QTY'.
w_fcat-seltext_m = 'Target Qty.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ACH_QTY'.
w_fcat-seltext_m = 'EMP Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'MCH_EFF'.
w_fcat-seltext_m = 'Machine Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'COUNT'.
w_fcat-seltext_m = 'Machine Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
ENDFORM. " build_fieldcatalog
*& Form event_call
text
--> p1 text
<-- p2 text
FORM event_call .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = t_events
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.
ENDFORM. " event_call
*& Form data_retrieval
text
--> p1 text
<-- p2 text
FORM data_retrieval .
IF shftin <> ''.
SELECT zdate werks mname shftin INTO CORRESPONDING FIELDS OF TABLE
temp FROM zpplan
WHERE shftin IN shftin
AND zdate IN date
AND werks IN werks.
ELSE.
SELECT zdate werks mname INTO CORRESPONDING FIELDS OF TABLE
temp FROM zpplan
WHERE zdate IN date
AND werks IN werks.
ENDIF.
SORT temp BY mname zdate shftin.
DELETE ADJACENT DUPLICATES FROM temp.
SORT temp BY mname shftin zdate.
DELETE ADJACENT DUPLICATES FROM temp.
APPEND temp.
LOOP AT temp.
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab_t
WHERE mname = temp-mname
AND zdate = temp-zdate
AND werks = temp-werks.
LOOP AT itab_t.
MOVE-CORRESPONDING itab_t TO itab.
APPEND itab.
ENDLOOP.
ENDLOOP.
*******************************************8
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
FOR ALL ENTRIES IN temp
WHERE zdate = temp-zdate AND
werks = temp-werks
AND mname = temp-mname.
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
WHERE zdate IN date AND
werks IN werks AND
shftin = shftin.
SORT itab BY mname zdate.
DELETE ADJACENT DUPLICATES FROM itab.
LOOP AT itab.
MOVE-CORRESPONDING itab TO itab1.
COLLECT itab1.
ENDLOOP.
LOOP AT itab1.
itab1-tar_qty = itab1-tar_qty + ( itab1-quaty / 3 ).
IF ( itab1-tar_qty NE 0 ).
itab1-ach_qty = ( itab1-ach_qty + itab1-act_prod / itab1-tar_qty ) * 100.
ELSE.
itab1-ach_qty = 0 * 100.
ENDIF.
itab1-mch_eff = ( ( 8 - itab1-iserh ) / 8 ) * 100.
MODIFY itab1 TRANSPORTING tar_qty ach_qty mch_eff.
ENDLOOP.
LOOP AT itab1.
READ TABLE itab1 INDEX 1 INTO wa.
IF itab1-mname = wa-mname.
itab1-zdate = wa-zdate.
itab2-shftin = itab1-shftin.
itab2-mname = itab1-mname.
itab2-zdate = itab1-zdate.
itab2-quaty = itab2-quaty + itab1-quaty.
itab2-act_prod = itab2-act_prod + itab1-act_prod.
itab2-iserh = itab2-iserh + itab1-iserh.
itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
ELSE.
APPEND itab2.
CLEAR itab2.
MOVE-CORRESPONDING itab1 TO wa.
itab2-shftin = itab1-shftin.
itab2-mname = itab1-mname.
itab2-zdate = itab1-zdate.
itab2-quaty = itab2-quaty + itab1-quaty.
itab2-act_prod = itab2-act_prod + itab1-act_prod.
itab2-iserh = itab2-iserh + itab1-iserh.
itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
ENDIF.
ENDLOOP.
APPEND itab2.
LOOP AT itab2.
IF ( itab2-tar_qty NE 0 ).
itab2-ach_qty = ( itab2-ach_qty + itab2-act_prod / itab2-tar_qty(10) ) * 100.
ELSE.
itab2-ach_qty = 0 * 100.
ENDIF.
itab2-mch_eff = ( ( 8 - itab2-iserh ) / 8 ) * 100.
MODIFY itab2 TRANSPORTING tar_qty ach_qty mch_eff.
ENDLOOP.
APPEND itab2.
LOOP AT itab2.
count = sy-tfill.
a = a + itab2-tar_qty.
b = b + itab2-ach_qty.
ENDLOOP.
CLEAR itab2.
itab2-tar_qty = a.
itab2-ach_qty = b.
APPEND itab2.
CLEAR itab2.
count = a / sy-tfill.
count1 = b / sy-tfill.
itab2-tar_qty = count.
itab2-ach_qty = count1.
itab2-tar_qty = count.
APPEND itab2.
ENDFORM. " data_retrieval
*& Form head_built
text
-->P_T_EVE text
FORM head_built USING p_t_eve TYPE slis_t_event.
count = a / sy-tfill.
DATA: ls_event TYPE slis_alv_event.
REFRESH t_list_top_of_page.
READ TABLE p_t_eve WITH KEY name = slis_ev_top_of_page INTO ls_event.
IF sy-subrc = 0.
MOVE c_formname_top_of_page TO ls_event-form.
MODIFY p_t_eve FROM ls_event INDEX sy-tabix.
ENDIF.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Total Target Qty: '.
st_line-info = count.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-info = count.
CONCATENATE 'Avg Target Qty.' count ' ' INTO st_line-info.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Avg.EMP Efficiency: '.
st_line-info = count1.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Avg. Machine Efficincy: '.
st_line-info = count.
APPEND st_line TO t_list_top_of_page.
REFRESH t_list_end_of_page.
READ TABLE p_t_eve WITH KEY name = slis_ev_end_of_list INTO ls_event.
IF sy-subrc = 0.
MOVE c_formname_end_of_page TO ls_event-form.
MODIFY p_t_eve FROM ls_event INDEX sy-tabix.
ENDIF.
CLEAR st_line.
st_line-typ = 'S'.
CONCATENATE 'END OF PAGE' ' ' INTO st_line-info.
APPEND st_line TO t_list_end_of_page.
ENDFORM. " head_built
*& Form top-of-page
text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_list_top_of_page
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "top-of-page
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = 'ZPP_RE_EMP_DETAILS'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'EMP Information'
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = t_fcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = t_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab2
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " display_alv -
Concatenate text to field value in report header
I'm trying to concatenate text to field value in a textbox in the report header but am getting an error. Here's how I'm doing it:
=First(Fields!Pp_Name.Value, "dsProspect") & "Prospect"
and the error says the report definition is invalid. An unexpected error occurred while compiling expressions. Native compiler return value '[BC30179] class 'Textbox.....
any idea why this wont compile?
Thank you.Hi moondaddy,
Generally, the error message always occurred when there are two distinct text boxes with the same name that only differ in their name by casing in report. When Reporting Services generates VB code for these textboxes during report publishing, the compilation
fails because VB class names are considered case-insensitive.
So this issue is not related to the expression (the format is correct) you post, it related to the Textbox name that the error message said. In order to fix this issue, please rename one of the textboxes.
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click here.
Katherine Xiong
TechNet Community Support -
In BO 4.0,how to convert field values into column heading.
Currently Product Codes are represented in "Code" and "Value" fields.
Please retain the code and value fields, so that if the user adds another code and immediately needs to report on them they can through this functionality.
Current:
Fund Code
Code
Value
ABC1
Embassy Series
XYZ123
ABC1
FMI
19837
ABC1
Gladis Short Name
FUJHAT
Required:
Fund Code
Embassy Series
FMI
Gladis Short Name
ABC1
XYZ123
19837
FUJHATHi Archana,
I think you need to use a Cross Tab on your report but also you will need to apply Sections on the Fund Code dimension.
ie
Section 1 - ABC1
Crosstab
Section 2 - ABC2
Crosstab
Section 3 - ABC3
Crosstab
With regards
Gill -
Content Conversion without key field value
Hi all,
I want to do a content conversion which includes a record structure Header,1,Detail,*
I dont have any key field value in the header nor in the detail. Can this be achived using FCC or should i go for Java.
Rgds
AdityaHi Aditya,
I think if u having multiple records then one shud hav key fields,
pls check 4th point in this guide
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/troubleshooting%2bthe%2bfile%2badapter
Also check this discussion::File Content Conversion(SenderFileadapter) fields parameters
Thanks, -
How to show header value in each page same as Page field value.
Hi there
It would be very helpful if anyone could tell us how to set header value based on the page field.
To make it more clear.. i have a field in my Rtf (which is basically a group by) so in each page it'll differ.. My Header should reflect the same as field value.
what my understanding is header wont change for each page. but ,my requirement is something like i have to show the header which is same as one of my filed value..
for eg:
HEADER: ABC page-1
Field - ABC
HEADER:XYZ page-2
Field - XYZ
Regards - Vijay
Edited by: Vijay Santhanam on 23-Oct-2008 3:51 PMHi Haiye ,
The Pointer you gave would keep Header ABC through out all the pages in report right, actually i had tried this and got same header for all pages,
but what i need is my first page Header should be based on one of the field of Page 1, second pge Header again based on the same field, but the value may differ... (coz the page field is group by ).
Would appreciate your help on this issue!!
Regards - Vijay -
How to Add Values in INVOICE SUB-TYPE field at the Invoice Header Forms
Hello,
Does any body knows how could I add/modify values in the INVOICE SUB-TYPE field at the Invoice Header Forms?. This values are related to the Globalization, in this case for the Chilean Localizations.
Thanks,
Alejandro R.It gives any error or just does nothing?
Have you tried making another simple form with just one block and one or two items?
You can do this type of testing in these conditions.
Which version of forms are you using? -
When I try to access iTunes or safari, I get the following message:The procedure entry point QTCF_CFHTTP message set header field value could not be located in the dynamic link library QTCF.dll I uninstalled and reinstalled.same result HELP!
Taken at face value, you're having trouble with a QuickTime program file there.
Let's try something relatively simple first. Restart the PC. Now head into your Uninstall a program control panel, select "QuickTime" and then click "Repair".
Does the repair go through okay? If so, are you able to launch iTunes and/or Safari now? -
Change field value in CRM complaint header
Dear All,
We are trying to find a way to update the ref. field in the complaint header with external data from R/3 online.
please help!!!!!!!!!!!!!!
Thanks,
NataliHello Natali,
Could you give us more details?
When do you want to do this update? During a complaint process in transaction CRMD_ORDER or in background?
Regards,
Frédéric -
How to display field value in header text?
Hi Experts,
In va03, the client wants some number in the header text which is stored in vbak. Please tell me:
1. Which method should I use in BADI?
2. How to display in header text?
Regards
ManiHi Kiran,
Thanks for the prompt reply. How can I display some hard code like 'Test' in the header text in va03.
Text name = 0000001252
Language = EN
Text ID = Z001
Text object = VBBK
READ_TEXT is used to get the values from the header text, but how to set the values?
Regards
Mani -
Referencing form field values in javascript
I am attempting to call a report from a button on a form in Portal. I have been successful in calling a report from a OnClick JavaScript event handler, but I also need to send a parameter to the report based on the value in a field on the form.
I have been unable to find any information on how to do this. Does someone know how to do this? Thanks.
Bruce Cable
Kids123.comPerhaps this technote below may be of help:
Addressing field values in forms
For forms all of the form field values are kept in the "session storage", which is an internal
data structure object
and has some methods to access the data
to access them you must have following information:
1. Block name
- DEFAULT for forms on tables
- MASTER_BLOCK for the master section of MD form
- DETAIL_BLOCK for the detail section of MD form
2. Attribute name (is the column name plus 'A_' prefix)
3. Column datatype (NUMBER, VARCHAR2, DATE)
Example:
declare
my_empno number;
begin
my_empno := p_session.get_value_as_NUMBER(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_EMPNO');
end;
In case of MD form, there are 2 blocks - MASTER_BLOCK for master section of the form
and DETAIL_BLOCK for the detail section. Since there is more that 1 record in detail section
you must specify a row index for the detail row
Example:
declare
my_empno number;
begin
my_empno := p_session.get_value_as_NUMBER(
p_block_name => 'DETAIL_BLOCK',
p_attribute_name => 'A_EMPNO'
p_index => 5);
end;
Writing custom buttons code
Every event handler has p_session argument, for any event handler it is a reference to the
session storage object, by calling
appropriate methods you can get and set values of the fields in the form.
Attribute names are create by adding 'A_' to your table's column names, so DEPTNO becomes
A_DEPTNO
Note, if you add a button to detail section of the form for each detail row then you'll have to
examine p_instance value which will be set to a number indicating for which row button has been
pressed. (1 for the first detail record, 2, 3, etc.)
Example:
bold - generated part
italic - custom code
procedure WWV_DETAIL_GENSYS_99
p_block_name in varchar2,
p_object_name in varchar2,
p_instance in integer,
p_event_type in varchar2,
p_user_args in varchar2,
p_session in out DNONKIN.wwa_api_module_session
is
begin
declare
my_action varchar2(4000);
var1 integer;
var2 varchar2(4000);
begin
my_action := p_session.get_value_as_varchar2(
p_block_name => p_block_name,
p_attribute_name => '_DETAIL_ACTION',
p_index => p_instance
if my_action = 'DELETE' then
var1:=p_session.get_value_as_NUMBER(
p_block_name => p_block_name,
p_attribute_name => 'A_EMPNO',
p_index => p_instance
var2:=p_session.get_value_as_VARCHAR2(
p_block_name => p_block_name,
p_attribute_name => 'A_ENAME',
p_index => p_instance
--- Add a record to my log table
insert into my_log values (var1,var2);
end if;
exception when others then
my_error_handler_if_any;
raise;
end;
end WWV_DETAIL_GENSYS_99;
null -
Duplicate content of region fields in the region and keep some fields
duplicate content of region fields in the region and keep some fields displayed in this region and some not.
Our customer wants to duplicate the content of the region fields and 3 fields of this region (one of them is the key from the table ) have to be shown empty and have to be recreated when he does the next commit. The other 25 fields have to be filled with the content before. (I have to do a commit before I show the region again without these three fields)
What I did:
When I have a botton with request CHANGE then APEX does the change without emptying the fields. I tried to make processes on this request which should empty my three fields, but the processes never fire (I see it in the debug and I don't know why, I putted them on every process point for testing)
The second try:
On my button with request CHANGE , I filled the 'set these items ' with my three fields and the 'with these items' with 2 commas ,, to set these items null.
I do no claer cache, but APEX empties the hole region.
Can you help me??
Thanks UtaHi Uta,
OK - This is what I did:
1 - Page 15
On the EMPNO column, I have a link to page 18. I set P18_EMPNO to #EMPNO#. I assume that you already have this functionality to link from the report page to the form page. There are no changes required to this page.
2 - Page 18
I have created a hidden field called "P18_EMPNO_COPY". There are no special settings for this item - I've just put it at the bottom of the region containing all of the other items
I have created a button called "P18_COPY". This has a Conditional Display set with a Condition Type of Value of Item in Expression 1 IS NOT NULL and Expression 1 of P18_EMPNO. This has an Option URL Redirect set for it with the following settings:
Target is a - Page
Page - 18
Set These Items - P18_EMPNO,P18_EMPNO_COPY
With These Values - ,&P18_EMPNO.
I have created a Process to run "On Load - After Header". The PL/SQL code for this is:
DECLARE
emp_rec EMP%ROWTYPE;
BEGIN
SELECT * INTO emp_rec FROM EMP WHERE EMPNO = :P18_EMPNO_COPY;
:P18_EMPNO := NULL;
:P18_JOB := emp_rec.JOB;
:P18_MGR := emp_rec.MGR;
:P18_SAL := emp_rec.SAL;
:P18_DEPTNO := emp_rec.DEPTNO;
END;
This has a Conditional Processing Condition Type of "Value of Item in Expression 1 is NOT NULL" and Expression 1 shows P18_EMPNO_COPY
Finally, for each field, I have added in a Default Value that points to itself (For example, the P18_JOB field has a Default Value of :P18_JOB) with a Default Value Type of PL/SQL Expression.
Obviously you will need to replace the field and item names with those for your table and form.
This process does the following:
1 - The user clicks the link in the report on page 15. P18_EMPNO gets populated with the EMPNO value of the item select.
2 - Page 18 is loaded with the data relating to the record with the ID found in P18_EMPNO
3 - The Copy button is displayed only if P18_EMPNO contains a value
4 - The user clicks the Copy button
5 - The P18_EMPNO value is copied into P18_EMPNO_COPY and P18_EMPNO is blanked out
6 - The page is submitted with these changes. When it reloads, the new process kicks in
7 - This process will:
(A) Create a variable based on the record structure for the EMP table
(B) Fill this variable with the data in the table for the ID that's now in P18_EMPNO_COPY
(C) Set the session state values for the fields that need to be repopulated with the data now retrieved into the variable
(D) Clear the P18_EMPNO session state value
8 - When the page starts to load the form, it will see that there is no P18_EMPNO value and, therefore, will not bring in any information from the table. However, as we have now set the Default Value settings for each field, this will force it to retrieve the values we've stored using the new process and display these values in the form.
I think I've detailed everything - if this doesn't work, please let me know!
Regards
Andy -
Virtual directory in region header background-image not working
I created a region with a region header that needs the background image to repeat vertical as well as horizontal, so the class was changed to include repeat instead of repeat-x.
So i replaced class t20RegionHeader with this:
.t20RegionHeader {
vertical-align: center;
font-weight: normal;
font-size: 9pt;
font-weight: bold;
color: #343434;
background-image: url(/i/hdingBar-BG.gif) ;
background-repeat: repeat;
text-align: left;
padding: 1px 8px;
white-space: nowrap;
border: 1px solid #a3bed8
I put "/i/" in the background-image's url bacause I am referencing an image in the virtual directory but it didn't work. Please help!!
I have it on APEX.ORACLE.COM:
Workspace: RGWORK
User: TESTER
Password: test123
Application: 41237 CreativeTest
Page: 11
APEX: Application Express 4.0.2.00.07
DB: Oracle 10.2.0.4
Robert
http://apexjscss.blogspot.comsect55 wrote:
I created a region with a region header that needs the background image to repeat vertical as well as horizontal, so the class was changed to include repeat instead of repeat-x.
So i replaced class t20RegionHeader with this:
.t20RegionHeader {
vertical-align: center;
font-weight: normal;
font-size: 9pt;
font-weight: bold;
color: #343434;
background-image: url(/i/hdingBar-BG.gif) ;
background-repeat: repeat;
text-align: left;
padding: 1px 8px;
white-space: nowrap;
border: 1px solid #a3bed8
<tt>center</tt> is not a valid value for <tt>vertical-align</tt>: should be <tt>middle</tt>.
Firebug reports "Failed to load the given URL" for <tt>/i/hdingBar-BG.gif</tt>. Does this image exist at that location? (Are you talking about apex.oracle.com or your local environment? If it's the latter, check that the <tt>hdingBar-BG.gif</tt> image file exists at the location specified by the virtual directory <tt>/i/</tt> and that the permissions are set to make it readable.) -
How to clear input field value on back
Hi All,
I have developed an application, in which user put sales order on first page and press a button then its detail display on second page using restAPI. Now when I press back button on second page then it takes me to first page with holding previous sales order value in input field. And when I change its value and press that button again then it shows me previous sales order detail.
Please suggest me, how to refresh cache and input fields value on back button?
Thanks & Regards
ShubhanshuHi Viren,
My code is,
First view
sap.ui.jsview("uitest2.first", {
getControllerName : function() {
return "uitest2.first";
createContent : function(oController) {
var text = new sap.m.Label({
text: 'Dealer Code',
layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center })
var input = new sap.m.Input("CUSTOMER",{
type: sap.m.InputType.Text,
placeholder: 'Enter Dealer code...',
layoutData: new sap.m.FlexItemData({growFactor: 1, alignSelf: sap.m.FlexAlignSelf.Center})
var Dealer = new sap.m.HBox({
items:[ text,input
// new sap.m.Label({
// text: 'Dealer Code'
// new sap.m.Input("CUSTOMER",{
// type: sap.m.InputType.Text,
// placeholder: 'Enter Dealer code...'
height : "6em"
var button = new sap.m.Button({
text: "Submit",
press: function(oEvent) {
oController.loadData();
app = sap.ui.getCore().byId("myApp");
app.to("idsecond1");//, sap.ui.getCore().byId("CUSTOMER").getValue());
layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center})
return new sap.m.Page({
title: "Sales Dealer Info",
content: [ Dealer,button
First controller
sap.ui.controller("uitest2.first", {
loadData: function() {
var oParameters = ({
"CUSTOMER" : sap.ui.getCore().getElementById('CUSTOMER').getValue(),
console.log(oParameters);
var url = "http://###########:8000/sap/bc/zrst_customer?sap-client=800/";
var oModel = new sap.ui.model.json.JSONModel();
$.ajax({
url : url ,
dataType : "jsonp",
type : "POST",
data: oParameters,
success: function(data,textStatus,jqXHR) {
data = JSON.parse(data);
console.log(data);
oModel.setData(data);
sap.ui.getCore().setModel(oModel);
Second View
sap.ui.jsview("uitest2.second", {
getControllerName : function() {
return "uitest2.second";
createContent : function(oController) {
var oTable = new sap.m.Table("table",{
headerText: "Dealer data",
columns: [
new sap.m.Column({
header: new sap.m.Label({text: "NAME"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "CITY"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "COUNTRY"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "COUNTRYISO"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "STREET"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "PST_CODE"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "TELEPHONE"}),
demandPopin : true,
minScreenWidth : "Tablet",
new sap.m.Column({
header: new sap.m.Label({text: "EMAIL"}),
demandPopin : true,
minScreenWidth : "Tablet",
items: {
path: "/KEY",
template: new sap.m.ColumnListItem({
cells: [
new sap.m.Text({ //new sap.m.ObjectIdentifier
text: "{NAME}"
new sap.m.Text({
text: "{CITY}"
new sap.m.Text({
text: "{COUNTRY}"
new sap.m.Text({
text: "{COUNTRYISO}"
new sap.m.Text({
text: "{STREET}"
new sap.m.Text({
text: "{PST_CODE}"
new sap.m.Text({
text: "{TELPHONE}"
new sap.m.Text({
text: "{EMAIL}"
return new sap.m.Page({
title: "Dealer Info",
showNavButton: true,
navButtonTap:function(){
app = sap.ui.getCore().byId("myApp");
app.to("idfirst1");
sap.ui.getCore().getElementById('CUSTOMER').setValue("");
oModel.refresh();
content: [ oTable
Index.htm
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
<script>
sap.ui.localResources("uitest2");
var app = new sap.m.App("myApp",{initialPage:"idfirst1"});
var page = sap.ui.view({id:"idfirst1", viewName:"uitest2.first", type:sap.ui.core.mvc.ViewType.JS});
var page1 = sap.ui.view({id:"idsecond1", viewName:"uitest2.second", type:sap.ui.core.mvc.ViewType.JS});
app.addPage(page).addPage(page1);
app.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
Thanks
Shubhanshu -
Need to display a value before the header based on a user parameter.
I have a select on the user parameter list of values.
SELECT DISTINCT GROUP_ROWID, STR_GROUP_NAME
FROM TBL_COMPANY_GROUP;
I select the option hide the first column in order to show only a list of values and not the row_ids.
I need to display the str_group_name within the header as a title. I insert a field in the header and in source select the name of the parameter p_groupid but the only thing that I get is the row_id value not the name. I use the row_id to pass it on my queries but I need the name value in the header. Any ideas? Please help.
Thanks.create a parameter called p_header.
in the after parameter form trigger
select str_group_name into :p_header
from tbl_company_group
where group_id = :p_groupid;Have the header field source be p_header.
Maybe you are looking for
-
I made one phone call this morning and after hanging up i went to the contacts library and all my contacts were gone. I have unfortunately not got a backup (this isn't my phone its for a friend) and so I have no backup of my contacts. I have already
-
i cannot get my iphone to sync to my iphone 5 and i have tried updating my itunes on my computer but it wont let me load it as it is a 35 bite or something and i cannot find a verson for new itunes for 64?? PLEASE HELP CANT SYNC MY IPHONE TO MY ITUNE
-
Hello, Is there ant t.code on PO list with below data? (I tried ME2L, ME2M ) Period: Date of the request, who made it, who approved. Purchase order: Date, Order Number, who made it. Status: closed or open.
-
N96 Firmware Upgrade over NSU.
i just did an upgrade over NSU and the first attempt failed and came up with an error. but i've figured the trick is to keep 'retrying' and after abt 2 tries all goes well. Just a lil tip i thought i'd share. Cheers! BE THE CHANGE YOU WISH TO SEE IN
-
Trouble printing webpage designed in DW using CSS
I'm using CSS for the first time to design a website in Dreamweaver MX 2004. I'm using a stylesheet for all of the styling, but when I preview the document in the browser, and try to view it in print preview, the printer continuously spools more and