I need to set values of 2 fields to 0 if the join condition is false
I'll try to explain what I need to do as clearly as possible . I have three sub queries in my data model . My layout is group left .
My first query :
SELECT ALL BOEPAY_HD.BPH_RECP_NO_,
BOE_PAY_HD.BPH_RECP_DATE, BOE_PAY_MODE.BPM_PAY_MODE, BOE_PAY_HD.BPH_ID,
BOE_PAY_HD.BPH_DEC_CODE, BOE_PAY_HD.BPH_NAME1, BOE_PAY_HD.BPH_IMP_EXP_CODE,
BOE_PAY_HD.BPH_SITE, BOE_PAY_HD.BPH_TOTAL, BOE_PAY_MODE.BPM_NUMBER
FROM BOE_PAY_HD, BOE_PAY_MODE
WHERE (BOE_PAY_HD.BPH_RECP_DATE BETWEEN TO_DATE(:st_date||' 00:00:00', 'dd/mm/yyyy hh24:mi:ss') AND TO_DATE(:en_date||' 23:59:59', 'dd/mm/yyyy hh24:mi:ss')
AND (BOE_PAY_HD.BPH_RECP_NO = BOE_PAY_MODE.BPM_RECP_NO)
Second query :
It is linked to the first query with the primary key BPO_RECP_NO
SELECT ALL BOE_PAY_OTH.BPO_AMT, BOE_PAY_OTH.BPO_DTX_CODE,
BOE_PAY_OTH.BPO_RECP_NO
FROM BOE_PAY_OTH
On my report I display fields BOE_PAY_OTH.BPO_AMT, BOE_PAY_OTH.BPO_DTX_CODE in a repeating frame .
The problem is when there is no data in table BOE_PAY_OTH for a particular BPO_RECP_NO , the second sub query is not executed.
Columns(Values) in my layout overlap with values from the third query .
I need to find a way to set values BOE_PAY_OTH.BPO_AMT, BOE_PAY_OTH.BPO_DTX_CODE to zero and display them so that there is no overlapping .
Is there a way for me to achieve this .
Please help . Thanks.
This overlapping is usually dealt with in the layout by putting a frame in the appropriate place rather than in the queries. The frame stops items from
moving up the page.
Dave
Similar Messages
-
Dynamic action with set value on date field
Hi,
I'm using APEX 4.02
I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
I've tried using the source value as is in a select statement :
select :P33_GEBOORTEDATUM from dual;
and also type casted based on the date format :
select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
but still no luck.
On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
Any suggestions would be greatly appreciated. If you need any extra info just let me know.
Cheers
Bas
b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
Edited by: user3338841 on 3-apr-2011 7:33Hi,
Create a dynamic action named "set age" with following values.
Event: Change
Selection Type: Item(s)
Item(s): P1_DATE_OF_BIRTH
Action: Set value
Fire on page load: TRUE
Set Type: PL/SQL Expression
PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
Page items to submit: P1_DATE_OF_BIRTH
Selection Type: Item(s)
Item(s): P1_AGE
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1 -
Setting value in 'FROM' field while replying the mail
Hi,
I am working on one issue, In component CRMCMP_CCS_EML, while replying the email, i need to read the 'TO' field and on the basis of that i need to set the value in 'From' field. How can I recognize that this is a reply and not a new email. Also, could anyone please describe me in detail as i never work on email component before.
Regards,
Kamesh BathlaThis issue has been resolved.
I got the message mode by using
message_mode = typed_context->mail->messagemode.
got all the options for from address using
lt_from_addresses[] = typed_context->mail->GT_DEFAULT_FROM_ADDRESSES[].
got the original email address using
lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( ).
CALL METHOD lr_gdc->get_entity
EXPORTING
name = c_currinboxitem
RECEIVING
value = lr_inbox_item.
CALL METHOD lr_inbox_item->get_property_as_value
EXPORTING
iv_attr_name = 'SOF_RCP_ADDR'
IMPORTING
ev_result = lv_original_mail -
Set value for textarea field in tabular report
Hi all,
I need some help setting textarea values in a tabular report. The tabular report is for users to be able to build their own ad hoc report, by specifying which columns should be included and filtered. Here are the example tables:
-- Table that holds all of the data for the report.
create table vehicle (
make varchar2(50),
model varchar2(50),
type varchar2(50),
year number);
insert into vehicle values ('Toyota','Camry','Sedan','2008');
insert into vehicle values ('Toyota','4Runner','SUV','2008');
insert into vehicle values ('Honda','Civic','Compact','2011');
insert into vehicle values ('Honda','Accord','Sedan','2010');
insert into vehicle values ('Ford','F150','Truck','2011');
-- Table that holds the columns that are available to be filtered in report.
create table vehicle_cols (
col_id varchar2(50),
col_label varchar2(50));
insert into vehicle_cols values ('make','Vehicle Make');
insert into vehicle_cols values ('model','Vehicle Model');
insert into vehicle_cols values ('type','Vehicle Type');
insert into vehicle_cols values ('year','Vehicle Year');
-- Table that holds filters saved by user.
create table vehicle_user_saved (
saved_rpt_name varchar2(50),
col_id varchar2(50),
col_value varchar2(50));
insert into vehicle_user_saved values ('Saved Report One','make','Toyota');
insert into vehicle_user_saved values ('Saved Report One','make','Honda');
insert into vehicle_user_saved values ('Saved Report One','model','Sedan');
insert into vehicle_user_saved values ('Saved Report Two','make','Honda');
insert into vehicle_user_saved values ('Saved Report Two','year',2010);And below is the source query for the region. The textarea value is initially set to null.
-- Region Source for specifying query parameters.
select
col_label,
apex_item.checkbox(1,'#ROWNUM#','CHECKED') as include_cols,
apex_item.hidden(2,col_id)
|| apex_item.textarea(3,null,2,100) as filter_cols
from
vehicle_cols;When a user clicks the button to load the parameters for a report they have previously saved, I'd like to change the values in the textarea field from null to the saved values from the vehicle_user_saved table so the user can see the parameters and run the report, or modify the parameters if necessary.
I thought I could run a PL/SQL process (After Footer) when the button is clicked to populate these textarea fields, but the test below doesn't do anything:
begin
apex_application.g_f03(1) := 'Hello';
end;For example, when a user selects to load "Saved Report One," the following parameters should be loaded into the textarea fields:
Column >> Filtered Columns
Vehicle Make >> Honda, Toyota
Vehicle Model >> Sedan
Vehicle Year >> Null
Vehicle Type >> NullCan someone help me out? I wouldn't think I need Ajax for this since it's ok to be processed after the button click. But if I do need to use Ajax, I definitely could use some help with it, as I've never used Ajax before. I've setup this example in my hosted account to help.
Site: http://apex.oracle.com
Workspace: MYHOSTACCT
Username: DEVUSER1
Password: MYDEVACCT
Application: report parameters
Thanks in advance!
Mark
APEX 4.1, Oracle 11gHi, thanks for your response.
I'm not adding any new rows, I'm just trying to change the values of the textarea fields in the tabular report when the user chooses to load his/her saved parameters. The default for the textarea field in all rows is null, because I assume users will want to start building the report from scratch. However, when the user clicks the button to load his/her saved values, I want to overwrite the null values with new values. How can I do that?
Thanks,
Mark -
Difficulty in setting value of a field at runtime
I have a form with input text fields. One of the fields is disabled and automatically filled by the system. I am having problem filling this field at runtime.
What I did was that I tried to set the value of the field during the save operation (that is when I clicked on the save button). The system sets the value of the field but it did not commit the value into the table. This is is the code that I used
public String SaveParameterRecord() {
this.codeTypeId.setValue("GB011");
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
Again I tried with with method call, but it gave me java.lang.NullPointerException at the point (this.codeTypeId.setValue("GB011"))
public String CheckParameterMethod() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
this.codeTypeId.setValue("GB011");
return null;hi Frank,
The issue I see is that by putting this.codeTypeId.setValue("GB011"); wont be updating the model, and that is why after your commit, the value comes null. Is that variable depending on any other value? If you really want to update the model at that stage you will need to do something like;
public static void setExpressionValue(String expression, Object newValue) {
FacesContext facesContext = getFacesContext();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
Object.class);
//Check that the input newValue can be cast to the property type
//expected by the managed bean.
//If the managed Bean expects a primitive we rely on Auto-Unboxing
Class bindClass = valueExp.getType(elContext);
if (bindClass.isPrimitive() || bindClass.isInstance(newValue)) {
valueExp.setValue(elContext, newValue);
And then instead using this.codeTypeId.setValue("GB011"); you will call setExpressionValue("#{bindings.yourVariable.inputValue}","GB011"). But then again I dont recommend you doing this.
If this variable depends on another variable, you can use a setPropertyListener and autoSubmit=true.
Regards -
With a custom code we set Duration9 in Project 2013.
After executing the code everything seems to be ok.
After saving and reopening the Project it shows a message "Invalid Duration", and the value is shown as estimated (Questionmark).
In VBA create following code:
Sub SetDuration()
Dim newVal As Long
newVal = 14400
Tasks(1).Duration9 = newVal
End Sub
Execute Code.
Close VBA.
Open the Project and you will get the same message box
The only way as far as I found out is to manually retype the Duration in that field. What is not exactly what I want.
Is this a bug in MSP or a hidden Feature? Does anyone has an idea?
Best Regards SteffenI was able to replicate what you saw. I can't explain it per se, but this code seems to get around the issue:
Sub TESTDUR()
Dim NewVal As String
NewVal = "30d"
ActiveProject.Tasks(1).Duration9 = NewVal
End Sub
Andrew Lavinsky [MVP] Blog: http://azlav.umtblog.com Twitter: @alavinsky -
How to set values of formula fields during runtime in crystal reports
Hello All,
Could any one help in letting me know how to set the values of a formula in the runtime.
I tried using the below systax in the formula field
Assume that I have 2 formula fields
1. format_count
2. format_display
my formula is like below:
in the formula field format_count i have
format_display=pagenumber
when checking for errors its throwing error stating "stamement is expected"
Could any one help in resolving this
ThanksHi Ranjeet,
Whenever you assign values to a variable, you need to use :=
Like this:
numbervar x := pagenumber
And what exactly are you trying to do anyway?
-Abhilash -
Need to set values in the configurator
Hi people,
Im a workflow consultant and need a bit of advice regarding updating the configurator values. I know about the function module "vc_i_get_configuration" gets the values in the configurator and the parameter for that would be cuobj. But is there any function module in place which updates the configurator with new values from a custom screen. This custom screen is going to be in the workflow.
Regards,
Sukumar.yes you can update values, you can use class CL_CBASE.
EXAMPLE PROGRAM:
TYPE-POOLS:
cucbt,
ibxx,
ibco2.
PARAMETERS : p_cuobj TYPE cuib_cuobj.
DATA: add_chr TYPE ibco2_value_tab,
l1_ind LIKE sy-tabix.
DATA: old_l TYPE i,
new_l TYPE i.
DATA: wa_chr LIKE ibvalue0,
wa_chr1 LIKE ibvalue0,
wa_con TYPE ibco2_instance_rec2.
DATA: l_obj TYPE REF TO cl_cbase.
CLEAR l_obj.
DATA: it_instances TYPE cuib_cuobj_tab.
DATA: l_head TYPE ibco2_ibase_rec,
l_config TYPE ibco2_instance_tab2.
DATA: wa_instances LIKE LINE OF it_instances.
CLEAR wa_instances.
APPEND wa_instances TO it_instances.
DATA: flg_invalid TYPE c.
CLEAR flg_invalid.
CALL METHOD cl_cbase=>get_current_cbase_by_instance
EXPORTING
iv_instance = p_coubj
iv_check_only_buffer = space
IMPORTING
eo_cbase = l_obj
ev_instance_is_invalid = flg_invalid.
CALL METHOD l_obj->get_configuration
IMPORTING
es_cbase_head = l_head
et_instances = l_config.
DATA: c_ind LIKE sy-tabix.
CLEAR add_chr.CLEAR l1_ind.CLEAR wa_chr.
LOOP AT l_config INTO wa_con.
l1_ind = sy-tabix.
add_chr = wa_con-values.
LOOP AT add_chr INTO wa_chr WHERE atinn EQ '0000000019'.
wa_chr-atwrt = '000000000000000504'.
MODIFY add_chr FROM wa_chr.
ENDLOOP.
wa_con-values = add_chr.
MODIFY l_config FROM wa_con INDEX l1_ind.
ENDLOOP.
DATA: lcfg_head TYPE ibibconf.
CLEAR lcfg_head.
CALL METHOD l_obj->get_head_of_cfg
IMPORTING
es_head_cfg = lcfg_head.
CALL METHOD l_obj->set_configuration
EXPORTING
is_head_cfg = lcfg_head
CHANGING
ct_instances = l_config.
CALL METHOD l_obj->set_mark_for_saving.
CALL METHOD l_obj->save_and_free.
COMMIT WORK AND WAIT.
MESSAGE e398(00) WITH 'Configuration Updated'.
WRITE:/ 'Detail of changes'.
SKIP.
LOOP AT add_chr INTO wa_chr.
WRITE:/ wa_chr-atinn, wa_chr-atwrt, wa_chr-atcod.
ENDLOOP.
Message was edited by: Sharath kumar R -
Set value in text field when checking checkbox
Hi,
I have a manual tabular form and when I check cb1 I want to set ben2 to Oracle.
Is there anyway I can do that?
Here you can see my very simple example:
http://apex.oracle.com/pls/otn/f?p=22968:3:4142231640027285:::::
My tabular form query:
select
to_char(dag,'day dd mon yyyy')||apex_ITEM.HIDDEN(1,pk) dag
, apex_item.text(2, ben1) ben1
, apex_item.text(3, ben2) ben2
, apex_item.text(4, ben3, null,null,null,'f04_'||rownum) ben3
, apex_item.text(5, ben4)||apex_item.hidden(6, cb1) ben4
, apex_item.checkbox(7, ROWNUM, 'onclick="test(this)"',DECODE (cb1, 'Y', ROWNUM)) cb1
from dummy
Regards DanielHi Anirban,
The sql-query for the report:
select
to_char(dag,'day dd mon yyyy')||apex_ITEM.HIDDEN(1,pk) dag
, apex_item.text(2, ben1) ben1
, apex_item.text(3, ben2) ben2
, apex_item.text(4, ben3, null,null,null,'f04_'||rownum) ben3
, apex_item.text(5, ben4)||apex_item.hidden(6, cb1) ben4
, apex_item.checkbox(7, ROWNUM, 'onclick="test(this)"',DECODE (cb1, 'Y', ROWNUM)) cb1
from dummy
On the region, Header and Footer -> Region Header
<script type="text/javascript">
function test(pThis)
if(pThis.checked)
{document.getElementById('f04_'+pThis.value).value = 'Checked';}
else
{document.getElementById('f04_'+pThis.value).value = 'Not Checked';}
</script>
That's all.....
/Daniel -
I first accessed my iTunes account using my wife's laptop. I then bought my own laptop and began using that for my iTunes account, so I am fine. However, I bought her an iPod which is effectively redundant because she can't seem to access her iTunes account using her own laptop - it just defaults to my iTunes account. I have tried de-authorising etc, and have even uninstalled and re-installed iTunes on her laptop to try to change the default settings, but none of this has worked. I can't believe it is that difficult to do this. She now has an iTunes account and an iPod which she doesn't use.
All I need to do is switch the default iTunes account for her laptop form mine to hers. Pls can anyone help? Thksi'm not quiet sure atm but should normally work like this:
connect to itunes store -> log out with ur account (upper right corner where ur apple id is displayed) -> sign in with ur wifes apple id -> activate computer (store->activate this computer)
normally it should work this way but ur wife wont be able to use apps or music within itunes library purchased with the other apple id -
Sorting an ArrayList based on the value of a field in one of the objects.
Hi,
I have the following problem:
A server app returns an array list of simple objects with a bunch of fields.
One of these fields is an int.
How do I go about sorting the list based on the size of the int?
Thanks in advance!Thanks a lot.
The Comparator solution is actually ridiculously simple.....
public class MyComparator implements Comparator {
public int compare(Object o1, Object o2) {
if (Integer.parseInt(((ZMData)o1).getAantalposts())>Integer.parseInt(((ZMData)o2).getAantalposts())) {
return 1;
if (Integer.parseInt(((ZMData)o1).getAantalposts())<Integer.parseInt(((ZMData)o2).getAantalposts())) {
return -1;
return 0;
}Thanks again. -
What are the measurements for 4:3?? I think its 720x940 but I'm not sure.
"Standard definition has always been a 4:3 aspect ratio with a pixel resolution of 640 × 480 pixels. Mini-DV, DVCAM, DV footage is recorded at 29.97 frames per second in this standard definition as seen on DV tapes"
-
How do I add a set value to a form field calculation?
I'm creating a form where I need a set value added to the sum of other editable fields - e.g. Field A + Field B +$125 = Sum
For the addition of Field A and B I've been using the pre-set functions in Adobe X, but I'm clueless as to how to add the $125 to the sum calculation. I'm absolutely new to Java, so I'd need something I can cut and paste.
Thanks!One last question:
I have existing code for a Submit by Email form that has a subject line and message content. I'm trying to add a second email to it but can't seem to figure out how.
this.mailDoc({
bUI: false,
cTo: "[email protected]",
cSubject: "Here is my Renovation Draw Request",
cMsg: "You will find my completed Renovation Draw Request attached. I’m excited to move forward, so please contact me as soon as possible." -
Setting the value of a field based on a dropdown list
I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
Alan -
To set HOTSPOT for a field in ALV-oops and when clecked should call transac
Hi,
I need to set HOTSPOT for a field in O/P list using ALV-oops and when clecked should take me to Transaction VA01. Please help....
Thanks,
PrabhuHi,
Please go through this code it may help u.
REPORT zcls_alv_oops MESSAGE-ID z1.
TABLES : mara.
Types Declaration..\
TYPES :
BEGIN OF t_mara,
matnr TYPE matnr,
mtart TYPE mtart,
maktx TYPE maktx,
END OF t_mara,
BEGIN OF t_marc,
matnr TYPE matnr,
werks TYPE werks_d,
mtart TYPE mtart,
maktx TYPE maktx,
END OF t_marc.
Internal Tables Declaration..\
DATA :
i_mara TYPE TABLE OF t_mara,
i_marc TYPE TABLE OF t_marc,
i_fcat1 TYPE lvc_t_fcat,
i_fcat2 TYPE lvc_t_fcat.
Constants Declaration..\
CONSTANTS :
c_cont1 TYPE scrfname VALUE 'CONT1',
c_cont2 TYPE scrfname VALUE 'CONT2'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS:
s_matnr FOR mara-matnr NO INTERVALS.
SELECTION-SCREEN SKIP 1.
PARAMETERS :
p_hotspt RADIOBUTTON GROUP r1 DEFAULT 'X',
p_bttn RADIOBUTTON GROUP r1.
SELECTION-SCREEN END OF BLOCK b1.
\* Class forward referncing.
CLASS lcl_rcvr_class DEFINITION DEFERRED.
\* Pointers Declaration..
DATA :
lp_rcvr TYPE REF TO lcl_rcvr_class,
lp_cont1 TYPE REF TO cl_gui_custom_container,
lp_cont2 TYPE REF TO cl_gui_custom_container,
lp_grid1 TYPE REF TO cl_gui_alv_grid,
lp_grid2 TYPE REF TO cl_gui_alv_grid.
\* Local Class Definiton.
CLASS lcl_rcvr_class DEFINITION.
PUBLIC SECTION.
METHODS :
hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id es_row_no,
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS.
\* Local Class Implementation.
CLASS lcl_rcvr_class IMPLEMENTATION.
METHOD hotspot_click.
DATA :
wa_mara TYPE t_mara,
wa_marc TYPE t_marc.
DATA :
l_index TYPE sy-tabix.
READ TABLE i_mara INTO wa_mara INDEX e_row_id-index.
IF sy-subrc EQ 0.
REFRESH i_marc.
SELECT matnr
werks
INTO TABLE i_marc
FROM marc
WHERE matnr EQ wa_mara-matnr.
IF sy-subrc EQ 0.
LOOP AT i_marc INTO wa_marc.
l_index = sy-tabix.
wa_marc-mtart = wa_mara-mtart.
wa_marc-maktx = wa_mara-maktx.
MODIFY i_marc FROM wa_marc INDEX l_index
TRANSPORTING mtart maktx.
ENDLOOP.
CALL SCREEN 200.
ELSE.
MESSAGE e121 WITH text-005 wa_mara-matnr.
ENDIF.
ENDIF.
ENDMETHOD.
METHOD handle_double_click.
DATA :
wa_mara TYPE t_mara,
wa_marc TYPE t_marc.
DATA :
l_index TYPE sy-tabix.
READ TABLE i_mara INTO wa_mara INDEX e_row-index.
IF sy-subrc EQ 0.
REFRESH i_marc.
SELECT matnr
werks
INTO TABLE i_marc
FROM marc
WHERE matnr EQ wa_mara-matnr.
IF sy-subrc EQ 0.
LOOP AT i_marc INTO wa_marc.
l_index = sy-tabix.
wa_marc-mtart = wa_mara-mtart.
wa_marc-maktx = wa_mara-maktx.
MODIFY i_marc FROM wa_marc INDEX l_index
TRANSPORTING mtart maktx.
ENDLOOP.
CALL SCREEN 200.
ELSE.
MESSAGE e121 WITH text-005 wa_mara-matnr.
ENDIF.
ENDIF.
ENDMETHOD.
ENDCLASS.
\* Start of Selection
START-OF-SELECTION.
\* Extract the Material Master data for the Input Material.
SELECT a~matnr
a~mtart
b~maktx
INTO TABLE i_mara
FROM mara AS a
INNER JOIN makt AS b
ON a~matnr EQ b~matnr
WHERE a~matnr IN s_matnr
AND b~spras EQ sy-langu.
END-OF-SELECTION.
IF NOT i_mara\[\] IS INITIAL.
\* Call Screen to display the Material Master data.
CALL SCREEN 100.
ELSE.
MESSAGE s121 WITH text-006.
ENDIF.
\*& Module DISP_GRID OUTPUT
\* text
MODULE disp_grid OUTPUT.
\* Build the Field catelog for Material Master data.
PERFORM build_fcat.
\* Display the Material Master data using ALV.
PERFORM disp_alv.
ENDMODULE. " DISP_GRID OUTPUT
\*& Module USER_COMMAND_0100 INPUT
\* text
MODULE user_command_0100 INPUT.
\*when exit or cancel is clicked program has to come out
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
\*& Form build_fcat
\* text
\* \--> p1 text
\* <-\- p2 text
FORM build_fcat.
DATA : ws_fcat TYPE lvc_s_fcat.
ws_fcat-fieldname = 'MATNR'.
ws_fcat-scrtext_m = text-001.
ws_fcat-tabname = 'I_MARA'.
IF p_hotspt EQ 'X'.
ws_fcat-hotspot = 'X'.
ENDIF.
APPEND ws_fcat TO i_fcat1.
CLEAR ws_fcat.
ws_fcat-fieldname = 'MTART'.
ws_fcat-scrtext_m = text-002.
ws_fcat-tabname = 'I_MARA'.
APPEND ws_fcat TO i_fcat1.
CLEAR ws_fcat.
ws_fcat-fieldname = 'MAKTX'.
ws_fcat-scrtext_m = text-003.
ws_fcat-tabname = 'I_MARA'.
APPEND ws_fcat TO i_fcat1.
CLEAR ws_fcat.
ENDFORM. " build_fcat
\*& Form disp_alv
\* text
\* \--> p1 text
\* <-\- p2 text
FORM disp_alv.
IF lp_cont1 IS INITIAL.
\* Create the Container Object of Material Master.
CREATE OBJECT lp_cont1
EXPORTING
container_name = c_cont1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6 .
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
\* Create the Object for Grid of Material Master.
CREATE OBJECT lp_grid1
EXPORTING
i_parent = lp_cont1
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
\* Dipslay Material Master data by calling method.
CALL METHOD lp_grid1->set_table_for_first_display
CHANGING
it_outtab = i_mara
it_fieldcatalog = i_fcat1
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
\* Set Handler for the Hot Spot Event.
CREATE OBJECT lp_rcvr.
IF p_hotspt EQ 'X'.
SET HANDLER lp_rcvr->hotspot_click FOR lp_grid1.
ELSE.
SET HANDLER lp_rcvr->handle_double_click FOR lp_grid1.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " disp_alv
\*& Module STATUS_0100 OUTPUT
\* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'MAIN_STAT'.
SET TITLEBAR 'T_100'.
ENDMODULE. " STATUS_0100 OUTPUT
\*& Module STATUS_0200 OUTPUT
\* text
MODULE status_0200 OUTPUT.
SET PF-STATUS 'PLANT_STAT'.
SET TITLEBAR 'T_200'.
ENDMODULE. " STATUS_0200 OUTPUT
\*& Module DISP_GRID_plant OUTPUT
\* text
MODULE disp_grid_plant OUTPUT.
\* Build the Field catelog for Material Plant data.
PERFORM build_fcat_plant.
\* Display the Material Master Plant data using ALV.
PERFORM disp_alv_plant.
ENDMODULE. " DISP_GRID_plant OUTPUT
\*& Module USER_COMMAND_0200 INPUT
\* text
MODULE user_command_0200 INPUT.
\*when exit or cancel is clicked program has to come out
CASE sy-ucomm.
WHEN 'EXIT' OR 'CANC'.
LEAVE PROGRAM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
\*& Form build_fcat_plant
\* text
\* \--> p1 text
\* <-\- p2 text
FORM build_fcat_plant.
DATA : ws_fcat TYPE lvc_s_fcat.
ws_fcat-fieldname = 'MATNR'.
ws_fcat-scrtext_m = text-001.
ws_fcat-tabname = 'I_MARC'.
APPEND ws_fcat TO i_fcat2.
CLEAR ws_fcat.
ws_fcat-fieldname = 'WERKS'.
ws_fcat-scrtext_m = text-004.
ws_fcat-tabname = 'I_MARC'.
APPEND ws_fcat TO i_fcat2.
CLEAR ws_fcat.
ws_fcat-fieldname = 'MTART'.
ws_fcat-scrtext_m = text-002.
ws_fcat-tabname = 'I_MARC'.
APPEND ws_fcat TO i_fcat2.
CLEAR ws_fcat.
ws_fcat-fieldname = 'MAKTX'.
ws_fcat-scrtext_m = text-003.
ws_fcat-tabname = 'I_MARC'.
APPEND ws_fcat TO i_fcat2.
CLEAR ws_fcat.
ENDFORM. " build_fcat_plant
\*& Form disp_alv_plant
\* text
\* \--> p1 text
\* <-\- p2 text
FORM disp_alv_plant.
IF lp_cont2 IS INITIAL.
\* Create the Container Object of Material Plant data.
CREATE OBJECT lp_cont2
EXPORTING
container_name = c_cont2
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
\* Create the Object for Grid of Material Plant data.
CREATE OBJECT lp_grid2
EXPORTING
i_parent = lp_cont2
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
\* Dipslay Material Plant data by calling method.
CALL METHOD lp_grid2->set_table_for_first_display
CHANGING
it_outtab = i_marc
it_fieldcatalog = i_fcat2
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDIF.
ELSE.
\* Call method 'REFRESH_TABLE_DISPLAY' to refresh the grid data.
CALL METHOD lp_grid2->refresh_table_display.
ENDIF.
ENDFORM. " disp_alv_plant
Maybe you are looking for
-
I have an iPod nano 6th generation and I downloaded 3 music videos but they won't play on my iPod. They only play on my laptop/iTunes. How can I get it to work? I know that my iPod should take music videos because there is a pre-made playlist called
-
Itunes 10.7 wont open in windows 7
Hi just downloaded 10.7 and when I double click on itunes icon both in start menu and desktop icon wont run I have deleted bonjour, reinstalled nothing working any help greatly appreciated
-
hi i recently bought nokia 3500 which is s40 3rd edition.... when i recieve a call or a msg the tone is very low... sumtimes itz really hard to hear it if ur standing in a place wid noises... so any1 can help me figure out how can i increase my tone
-
Quick Look / Preview issues
When I used "Quick Look" on a pdf file in Snow Leopard, the document would fill the entire screen from let to right, making it very easy to read scrolling up and down. Using Quick Look in Lion, I always get the full document on the screen and can't f
-
How to set up fire fox to confirm before deleting a bookmark
When I delete a bookmark, it disappear immediately. I want it to ask me if am sure I want to delete, to prevent deleting something I don't want to delete, by accident