How to change the insert allowed false dynamically based on some condition
Hi,
I have two data blcoks B1 and B2.
B1 is heade and B2 is detail.
B1 contain one filed PO number based on that user press the button.
Based on PO we get the some fileds in B2 from cursor.
In B2 filed contain total 5 fields. 4 fields come from cursor button. remaining one field user will enter.
My requirement is afte the getting the records from cursor. I need to not allowed to create new records.
Please do the needful.
902434 wrote:
Hi,
I have two data blcoks B1 and B2.
B1 is heade and B2 is detail.
B1 contain one filed PO number based on that user press the button.
Based on PO we get the some fileds in B2 from cursor.
In B2 filed contain total 5 fields. 4 fields come from cursor button. remaining one field user will enter.
My requirement is afte the getting the records from cursor. I need to not allowed to create new records.
Please do the needful.As per i understand you want on block b2 insert allowed false.
Try this
If your_condition then
SET_BLOCK_PROPERTY('block_name', INSERT_ALLOWED, PROPERTY_FALSE);
else
SET_BLOCK_PROPERTY('block_name', INSERT_ALLOWED, PROPERTY_TRUE);
end if;Hopes this helps..
Similar Messages
-
How to change the column header name dynamically based on sysdate
Post Author: senthi_gokul
CA Forum: WebIntelligence Reporting
Dear All,
i have designed some reports. i would like to change the column header dynamically based on sysdate. up to 24 months. can u help me, which add month function using the universe. i dont know if-then-else function is having the universe tool or not?Post Author: prasingh
CA Forum: WebIntelligence Reporting
Are you saying you are not able to create an object by value (select: statement) as sysdate and put it onto the headers of your report? You can use the add_months() function on the object to add the numbers of months you wish.
Please let me knnow for more.. You can get in touch with me on [email protected] for quick reply. -
How to change the label of a link based on a condition in a report.
Hi all,
I have a report, in which i created a link.
i want the the label of the link to change based on a column value.
for eg. i created report based on emp table which has a link on empno .
if the deptno of the employee is 10 i want the link to be displayed as "employee of deptno 10".
if the deptno of employee is 20 or 30 i want the link to be displayed as "others"
Thanks in advance.One way I've found to do this is to put the condition part into the select statement. Use a decode to determine which link text you want to display, e.g.,
select '<a href="yourlinkhere?employee=' || empno || '">' || decode(deptno,10,'employee of deptno 10','others') || '</a>' emplink from emp; -
How to change the text of label dynamically
Hi all,
I have done a dynpro program.It requires to implement the dynamically display the label text, for example: there is a label, sometimes, we want to display "Purchase Order" and sometimes we want to display "Sales Order". Can anyone tell me how to change the text of label according to my requirements? thanks in advance!Hi Wei,
AS of now you will not be able to change the Text Field ( Label ) dynamically or at runtime. This is a limitation.Refer to this link:
http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
But, there is a way around.
You can make a text field Visible / Invisible based on your program logic. So, based on what you want, you can process a module which will take care of that.
Have a look at these DEMO Code. You can have a good idea to implement the logic.
DEMO_DYNPRO_MODIFY_SCREEN - Demonstration of Dynamic Screen Modifications
Thanks,
Samantak. -
How to change the text in JTextField Dynamically
i am trying to change the contents of JTextField dynamically like this
textfield.setText();but it is giving error...........how can i do it....here is the code .....it is showing error in line 18 and 20 as identifier expected
their i am trying to make JTextField editable....
plz have a look
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.*;
import javax.swing.SwingUtilities.*;
import javax.swing.filechooser.FileFilter;
//import javax.swing.JEditorPane;
import java.net.URL;
public class tm extends JFrame implements ActionListener
public JTextField[] programtext = new JTextField[30];
public JTextField[] tapetext = new JTextField[30];
tapetext.setEditable(true);
public JTextField[] statetext = new JTextField[30];
statetext.setEditable(true);
int count =0;
public static void main (String arg[]){
tm m=new tm();
m.setSize(1000,500);
m.show();
JButton loadp, run, step,loadi,loads;
public tm()
Container c ;
c = getContentPane();
c.setLayout(new FlowLayout());
loadi = new JButton("LOAD INPUT STRING");
c.add(loadi);
loadi.addActionListener(this);
loadi.setBounds(200,25,100,50);
loadp = new JButton("LOAD PROGRAM");
c.add(loadp);
loadp.addActionListener(this);
loadp.setBounds(300,25,100,50);
run = new JButton("RUN");
c.add(run);
run.addActionListener (this);
run.setBounds(400,25,100,50);
step = new JButton("STEP");
c.add(step);
step.addActionListener(this);
step.setBounds(500,25,100,50);
loads = new JButton("LOAD STATES");
c.add(loads);
loads.addActionListener(this);
loads.setBounds(600,25,100,50);
JPanel prog = new JPanel();
prog.setLayout(new GridLayout(30,1));
for(int i=0;i<programtext.length;i++)
programtext= new JTextField(10);
prog.add(programtext[i]);
JPanel tape = new JPanel();
tape.setLayout(new GridLayout(30,1));
for(int i=0;i<tapetext.length;i++)
tapetext[i]= new JTextField(10);
tape.add(tapetext[i]);
JPanel state = new JPanel();
state.setLayout(new GridLayout(30,1));
for(int i=0;i<statetext.length;i++)
statetext[i]= new JTextField(10);
state.add(statetext[i]);
JPanel contentPane3 = new JPanel();
contentPane3.setBorder(BorderFactory.createEmptyBorder(50, 50, 50, 50));
contentPane3.setLayout(new BorderLayout());
contentPane3.add(state, BorderLayout.CENTER);
contentPane3.add(c, BorderLayout.NORTH);
contentPane3.add(prog, BorderLayout.WEST);
contentPane3.add(tape, BorderLayout.EAST);
setContentPane(contentPane3);
public void actionPerformed(ActionEvent e)
try{
if(e.getSource ()==loadp)
JFileChooser chooser=new JFileChooser();
int r= chooser.showOpenDialog(this);
if(r==JFileChooser.APPROVE_OPTION )
String name=chooser.getSelectedFile().getName();
File f=chooser.getSelectedFile();
FileInputStream filestream = new FileInputStream(f);
BufferedInputStream bufferstream = new BufferedInputStream(filestream);
DataInputStream datastream = new DataInputStream(bufferstream);
String record = null;
programtext[0].setText("");
try {
int i = 0;
while (true)
record=datastream.readLine();
if(record == null){
break;
programtext[i].setText(record);
i++;
count = count + 1;
System.out.println ("the no of lines of the program are"+ count);
catch (Exception p)
System.out.println(p);
else if(e.getSource()==loads)
JFileChooser chooser3=new JFileChooser();
int r3= chooser3.showOpenDialog(this);
if(r3==JFileChooser.APPROVE_OPTION)
String name=chooser3.getSelectedFile ().getName();
File f3=chooser3.getSelectedFile();
FileInputStream filestream3 = new FileInputStream(f3);
BufferedInputStream bufferstream3 = new BufferedInputStream(filestream3);
DataInputStream datastream3 = new DataInputStream(bufferstream3);
String record3 = null;
statetext[0].setText("");
try {
int i = 0;
while (true)
record3=datastream3.readLine();
if(record3 == null){
break;
statetext[i].setText(record3);
i++;
catch (Exception p3)
System.out.println(p3);
else if(e.getSource()==loadi)
JFileChooser chooser2=new JFileChooser();
int r2= chooser2.showOpenDialog(this);
if(r2==JFileChooser.APPROVE_OPTION )
String name=chooser2.getSelectedFile().getName();
File f2=chooser2.getSelectedFile();
FileInputStream filestream2 = new FileInputStream(f2);
BufferedInputStream bufferstream2 = new BufferedInputStream(filestream2);
DataInputStream datastream2 = new DataInputStream(bufferstream2);
String record2 = null;
tapetext[0].setText("");
try {
int i = 0;
while (true)
record2=datastream2.readLine();
if(record2 == null){
break;
tapetext[i].setText(record2);
i++;
catch (Exception p2)
System.out.println(p2);
else if(e.getSource ()==run)
String temp="";
String statetemp=" ";
String tapetemp=" ";
int l=0;
int tp=0;
String pars[][] = new String[50][5];
for(int m=0;m<count;m++){
temp = programtext[m].getText();
String str[]=temp.split(" ");
for(int k=0;k<5;k++){
pars[m][k] =str[k];
System.out.println(pars[m][k]);
statetemp = statetext[0].getText();
tapetemp = tapetext[l].getText();
while(pars[tp][0]==statetemp && pars[tp][1]==tapetemp && tp><count)
statetemp = pars[tp][2];
tapetemp = pars[tp][3];
statetext[0].setText() = statetemp;
tapetext[tp].setText() = tapetemp;
if(pars[tp][4]=="R")
l=l+1;
else{
l=l-1;
tp++;
else if(e.getSource()==step)
catch(Exception t)
System.out.println(t); -
How to change the Data base connection Dynamically
Hi
Hi create a crystal reports using crystal report 12.0 in this i use the standard wizard and local data base connection and create a dotnet programme for this .Now i want to change the database because because i want to instal it in client they use a different connection so i need to change the connection .How is it possible . PLzzzzz tell me it is urgen t
Addvance thnksHi
To change the database you can use DataSource Option that is present in the Menu Bar.
Go to Database
->Set Datasource Location
->Replace the current Data Source with the new Datasource.
Hope this helps
Shraddha -
How to change the colour of row in ALV depending on condition?
Hi All,
I want to change the color(from green to red )of perticular row in ALV depending on certain conditions like if amount in some field in row is more than 5000.
Can anybody please tell me how to do that?
expecting early reply.
Thanks in advance,
Rohini.Hi
Check this sample report
*& Report ZALVCOLOR *
REPORT ZALVCOLOR .
DATA : mara TYPE mara. " General Material Data
TYPE-POOLS: slis. " ALV Global types
FIELD-SYMBOLS :
<data> TYPE table. " Data to display
SELECT-OPTIONS :
s_matnr FOR mara-matnr. " Material number
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '50' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_1 = 'Maximum of lines to display'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
* Form f_read_data
FORM f_read_data.
FIELD-SYMBOLS :
<field> TYPE ANY,
<field2> TYPE ANY,
<header> TYPE ANY,
<header2> TYPE ANY,
<lt_data> TYPE table. " Data read from DB
DATA:
lp_struct TYPE REF TO data,
lp_struct2 TYPE REF TO data,
lp_table TYPE REF TO data, " Pointer to dynamic table
lp_table2 TYPE REF TO data, " Pointer to dynamic table
ls_lvc_cat TYPE lvc_s_fcat,
lt_lvc_cat TYPE lvc_t_fcat. " Field catalog
* First column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MATNR'.
ls_lvc_cat-ref_table = 'MARA'.
APPEND ls_lvc_cat TO lt_lvc_cat.
* 2nd column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MAKTX'.
ls_lvc_cat-ref_table = 'MAKT'.
APPEND ls_lvc_cat TO lt_lvc_cat.
* 3rd column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MATKL'.
ls_lvc_cat-ref_table = 'MARA'.
APPEND ls_lvc_cat TO lt_lvc_cat.
* Create 1st internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = lt_lvc_cat
IMPORTING ep_table = lp_table.
ASSIGN lp_table->* TO <lt_data>.
* Read data into 1st internal table
SELECT matnr maktx matkl
INTO TABLE <lt_data>
FROM v_matnr
UP TO p_max ROWS
WHERE matnr IN s_matnr.
* Create 2nd internal table
* Checkbox
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'CHECKBOX'.
APPEND ls_lvc_cat TO lt_lvc_cat.
* Table color
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'TABCOLOR'.
ls_lvc_cat-ref_table = 'CALENDAR_TYPE'.
ls_lvc_cat-ref_field = 'COLTAB'.
APPEND ls_lvc_cat TO lt_lvc_cat.
* Create 2nd internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = lt_lvc_cat
IMPORTING ep_table = lp_table2.
ASSIGN lp_table2->* TO <data>.
* Create structure = structure of the 1st internal table
CREATE DATA lp_struct LIKE LINE OF <lt_data>.
ASSIGN lp_struct->* TO <header>.
* Create structure = structure of the 2nd internal table
CREATE DATA lp_struct2 LIKE LINE OF <data>.
ASSIGN lp_struct2->* TO <header2>.
* Move data from 1st internal table --> 2nd internal table
LOOP AT <lt_data> ASSIGNING <header>.
DESCRIBE TABLE lt_lvc_cat.
CLEAR <header2>.
* Fill the internal to display <data>
DO sy-tfill TIMES.
READ TABLE lt_lvc_cat INTO ls_lvc_cat INDEX sy-index.
* For each field of lt_lvc_cat.
ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header>
TO <field>.
IF sy-subrc NE 0. EXIT .ENDIF.
ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header2>
TO <field2>.
IF sy-subrc NE 0. EXIT .ENDIF.
<field2> = <field>.
ENDDO.
* Modify color
ASSIGN COMPONENT 'TABCOLOR' OF STRUCTURE <header2>
TO <field2>.
IF sy-subrc EQ 0.
PERFORM f_modify_color USING 'MAKTX' <field2>.
PERFORM f_modify_color USING 'MATKL' <field2>.
ENDIF.
APPEND <header2> TO <data> .
ENDLOOP.
ENDFORM. " f_read_data
* Form F_DISPLAY_DATA
FORM f_display_data.
* Macro definition
DEFINE m_sort.
add 1 to ls_sort-spos.
ls_sort-fieldname = &1.
ls_sort-down = 'X'.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_layout TYPE slis_layout_alv,
lt_sort TYPE slis_t_sortinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv. " Field catalog
* Build Fieldcatalog - First column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MATNR'.
ls_fieldcat-ref_tabname = 'MARA'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO lt_fieldcat.
* Build Fieldcatalog - 2nd column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MAKTX'.
ls_fieldcat-ref_tabname = 'MAKT'.
APPEND ls_fieldcat TO lt_fieldcat.
* Build Fieldcatalog - 3rd column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MATKL'.
ls_fieldcat-ref_tabname = 'MARA'.
APPEND ls_fieldcat TO lt_fieldcat.
* Layout
ls_layout-zebra = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-box_fieldname = 'CHECKBOX'.
ls_layout-coltab_fieldname = 'TABCOLOR'.
m_sort 'MATNR'. " Sort by creation date
* Display data
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
TABLES
t_outtab = <data>.
ENDFORM. " F_DISPLAY_DATA
* Form F_modify_color
FORM f_modify_color USING u_fieldname TYPE lvc_fname
ut_tabcolor TYPE table.
DATA:
l_rnd_value TYPE datatype-integer2,
ls_tabcolor TYPE lvc_s_scol.
* Random value
CALL FUNCTION 'RANDOM_I2'
EXPORTING
rnd_min = 0
rnd_max = 3
IMPORTING
rnd_value = l_rnd_value.
CLEAR ls_tabcolor.
ls_tabcolor-fname = u_fieldname.
CASE l_rnd_value.
WHEN 0.
ls_tabcolor-color-col = 1. " Blue.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 1.
ls_tabcolor-color-col = 3. " Yellow.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 2.
ls_tabcolor-color-col = 5. " Green.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 3.
ls_tabcolor-color-col = 6. " Red.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
ENDCASE.
INSERT ls_tabcolor INTO TABLE ut_tabcolor.
ENDFORM. " F_MODIFY_COLOR
Reward all helpfull answers
Regards
Pavan -
How to change the values in an LOV based on values selected in another LOV
Hi,
I have a requirement in ADF where there are two LOVs. Based on the values that I select in the 1st LOV, the values in the second LOV should change dynamically.
Also, the 1st LOV accepts 3 values, for every value I select, a different query is executed to populate the 2nd LOV.
I have a rough thought that I can use 3 different read only view objects containing these 3 queries. And based on the value I select in the 1st LOV I can execute the corresponding View object from the backing bean. But my doubt is how to link the results of that query that is executed to populate the 2nd LOV.
Thanks in advance.
Edited by: 886591 on Sep 21, 2011 4:48 AMHi Brisk,
Thanks for your reply.
The link that you have provided explains how to disable and enable the other LOVs based on a parent LOV. But in my case there are two Select One Choice fields i.e. the dropdowns (sorry that I addressed it as LOV in my previous post which might be confusing). There are 3 static values in the parent dropdown where each of them are associated with a different query. for e.g if the three values in the drop down are A, B and C; if i select A, then query associated to A should be executed ; if i select B, then query associated to B should be executed and if I select C, query associated to C should be executed. Then the output attribute of that query should be populated in the child dropdown.
Please let me know about the solutions to this.
Thanks,
Kavitha -
How to change the values in custom profiles based on security group ??
Hi,
i am facing problem for my requirement, can anybody help me for below scenario...
i have custom check in profiles , there are content types and sub types. sub type nothing but a categories on for particular content type. For example i have News content type , same in the below subtypes drop down list are press release, events, articles etc.
what i want to do is, when i open custom checkin profile, subtype values need to be changed( some values in subtype should hide) based on security group changes .
In the Sub type listed values, some values need to hide only when i choose different security groups.. sub types values should display based on the particular security group only. when ever i change the security group, drop down Values in subtypes needs to change.
hope understand my requirement.
How to achieve this task. Any help would be greatly appreciated.
Thanks,
ytHi,
Thanks alot. its working fine
Can we configure DCL Relation two times in one information filed ??? i should not create not more than fields to this requirement.
Type -> subtype = DCL already existed
Now, i want to Create DCL to
Subtype ---> Security group
As per my requirement, if i change the security group in checkin form, values should be change in the SubType drop down list.
Created checkin profile there was DCL relation to " Type and "Sub Type" . now i want to map Relation ( DCL ) for subtype to security group.
i was trying do for DCL for subtype and security group. but there was already existing DCL created for subtype information field (Relation configuration done for content type). even though i was trying to do for DCL in Security group information field. but, i could not find security group information field in configuration manager.
Now what should i do ?? how to create DCL to subtype and security group ??
Help would be appreciated.
yt -
How to change the column postion in Dynamic Table
Folks,
I have an ess application which is creating dynamic table from dynamic node, I need to change one of the column position , please let me know how to do
Thanks,
Manishproblem solved
-
How to change the values of variant dynamically
hi
I am working on building a wrapper program which sets the background job for another transaction CFM1.
I have a small problem, the variant attributes for a particular field MATNR has been manually changed such that it picks up values from TVARVC. The variable name in TVARVC is MATERIAL.
If I want to programatically set the selection variable as 'T' and variable name as MATERIAL which table do I need to change.
please let me know <b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoHi,
If your problem is not solved try this.
For the particular variant.
Select the variable 'T' and the field , u call it, MATERIAL. In the code fill the value of this paritcular MATERIAL variable in the TVARVC table i.e the LOW field in the table.
Now pass the variant along with the program which u want to run in the background.
Hope this helps.
If you have tried any other way let me know.
Regards,
Anand Patil -
How to change the view element visibility Dynamically?
Hi,
Can any one please suggest that how can I make one of the viewUIElements from the view, visible on the whole screen? Basically i want to make the data in the table, available for printing. I want when user clicks on the print button, he should see only the data in the table on the whole screen and some icons, nothing else. Again when he clicks one back button icon on the screen, he should return to the previous view.
Thanks and Regards,
Smriti<b>Hi smriti Behl
I Think you can get something from the below explanation
Create one UI Element For example "Visible" and make the type as
com.sap.ide.webdynpro.uielementdefinitions.Visibility
Now bind this Context Value with the UI Elements ie UI elements which you want to make Not Visible When you click Print Button. You can write the Following Code inside the print button
wdContext.currentContextElement().setVisible(WDVisibility.NONE);
When you want to make the UI Elements Visble When Click Back Button Write Following code In side Back Buuton Method
wdContext.currentContextElement().setVisiblity(WDVisibility.VISIBLE);
May i Know Your Problem Solved ..............
Regards
Chandran S</b> -
Can you change the data model query dynamically based on its parent query
Hi
Question:
I have a data model query q1 and q2 is the child of q1
Say q1 returns 2 rows and and
for the first row
i want q2 to be select 1 from table1
for the second row
i want q2 to be select 1 from table2
Basically i want to build the q2 dynamically
for each row fetched in q1.
Can this be done?
If so where do i write the code to achieve this
Thanx in advance.
SureshOne simple (but not very realistic) example:
1. DATABASE TABLES AND DATA
CREATE TABLE dept_all (
deptno NUMBER (2),
dname VARCHAR2 (20),
in_usa CHAR (1) DEFAULT 'Y')
INSERT INTO dept_all VALUES (10, 'DEPT 10', 'Y');
INSERT INTO dept_all VALUES (20, 'DEPT 20', 'N');
INSERT INTO dept_all VALUES (30, 'DEPT 30', 'Y');
CREATE TABLE emp_usa (
empno NUMBER (4),
ename VARCHAR2 (20),
deptno NUMBER (2))
INSERT INTO emp_usa VALUES (1001, 'EMP 1001', 10);
INSERT INTO emp_usa VALUES (1002, 'EMP 1002', 10);
INSERT INTO emp_usa VALUES (3001, 'EMP 3001', 30);
INSERT INTO emp_usa VALUES (3002, 'EMP 3002', 30);
CREATE TABLE emp_non_usa (
empno NUMBER (4),
ename VARCHAR2 (20),
deptno NUMBER (2))
INSERT INTO emp_non_usa VALUES (2001, 'EMP 2001', 20);
INSERT INTO emp_non_usa VALUES (2002, 'EMP 2002', 20);
2. DATABASE PACKAGE
Note that Oracle Reports 3.0 / 6i needs 'static' ref cursor type for building Report Layout.
So, in package specification we must have both ref cursor types, static for Report Layout
and dynamic for ref cursor query.
CREATE OR REPLACE PACKAGE example IS
TYPE t_dept_static_rc IS REF CURSOR RETURN dept_all%ROWTYPE;
TYPE t_dept_rc IS REF CURSOR;
FUNCTION dept_query (p_where VARCHAR2) RETURN t_dept_rc;
TYPE t_emp_rec IS RECORD (
empno emp_usa.empno%TYPE,
ename emp_usa.ename%TYPE);
TYPE t_emp_static_rc IS REF CURSOR RETURN t_emp_rec;
TYPE t_emp_rc IS REF CURSOR;
FUNCTION emp_query (
p_in_usa dept_all.in_usa%TYPE,
p_deptno dept_all.deptno%TYPE)
RETURN t_emp_rc;
END;
CREATE OR REPLACE PACKAGE BODY example IS
FUNCTION dept_query (p_where VARCHAR2) RETURN t_dept_rc IS
l_dept_rc t_dept_rc;
BEGIN
OPEN l_dept_rc FOR
'SELECT * FROM dept_all WHERE ' || NVL (p_where, '1 = 1') || ' ORDER BY deptno';
RETURN l_dept_rc;
END;
FUNCTION emp_query (
p_in_usa dept_all.in_usa%TYPE,
p_deptno dept_all.deptno%TYPE)
RETURN t_emp_rc
IS
l_emp_rc t_emp_rc;
l_table VARCHAR2 (30);
BEGIN
IF p_in_usa = 'Y' THEN
l_table := 'emp_usa';
ELSE
l_table := 'emp_non_usa';
END IF;
OPEN l_emp_rc FOR
'SELECT * FROM ' || l_table || ' WHERE deptno = :p_deptno ORDER BY empno'
USING p_deptno;
RETURN l_emp_rc;
END;
END;
3. REPORT - QUERY FUNCTIONS AND DATA LINK
FUNCTION q_dept RETURN example.t_dept_static_rc IS
BEGIN
-- "p_where" is a User Parameter
RETURN example.dept_query (:p_where);
END;
FUNCTION q_emp RETURN example.t_emp_static_rc IS
BEGIN
-- "in_usa" and "deptno" are columns from Parent Group (G_DEPT)
RETURN example.emp_query (:in_usa, :deptno);
END;
Of course, we must create Data Link between Parent Group (G_DEPT) and Child Query (Q_EMP).
Regards
Zlatko Sirotic -
HOW to send the SPlitted files to multiple Receiver On some Condition ?
Hi all,
It's Urgent,
Aim of our scenario
the single file is splited according to company code and creates as separate file
previously it was sending to same server..
we have got the CHANGE REQUEST ON THIS SCENARIO that to route to TWO FTP servers which is splitting according to company code.
But we are not changing any objects in IR
we have only need to change in ID
as now we are using on BUSINESS SERVICE which we have created in ID itself we are not using the BUSINESS SYSTEM created in SLD
We are using ONLY one INBound interface , Interface MApping , Message MAPPing .(no cahnges in IR)
Sender XML Structure
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_FileEwadCompany occurence1-1
xmlns:ns1="http://bridgegcs.com/HR/EmployeeWorkforceAdminDataXI_IHR004">
<COMPANYEWADDATA> 0 -unbound occurence
<AUDIT_STAMP/>
<SEQNO/>
<SE_TYPE/>
<RECNAME_AUDIT/>
<FLD_NAME/>
<OLDVALUE/>
<NEWVALUE/>
<KEY1/>
<KEY2/>
<KEY3/>
<KEY4/>
<COMPANY/>
<SCE_PAYROLL_CODE/>
<ALTER_EMPLID/>
</COMPANYEWADDATA>
</ns1:MT_FileEwadCompany>
</ns0:Message1>
</ns0:Messages>
Receiver XML Structure
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_FileEwadCompany 0-to-unbound
xmlns:ns1="http://bridgegcs.com/HR/EmployeeWorkforceAdminDataXI_IHR004">
<COMPANYEWADDATA>0-unbound
<AUDIT_STAMP/>
<SEQNO/>
<SE_TYPE/>
<RECNAME_AUDIT/>
<FLD_NAME/>
<OLDVALUE/>
<NEWVALUE/>
<KEY1/>
<KEY2/>
<KEY3/>
<KEY4/>
<COMPANY/>
<SCE_PAYROLL_CODE/>
<ALTER_EMPLID/>
</COMPANYEWADDATA>
</ns1:MT_FileEwadCompany>
</ns0:Message1>
</ns0:Messages>
IN Integration Directory We have to route to 2 FTP servers based on Company code .
WE have used XPATH with particular company codes TO one target Business service which we have created in ID where we are using one FTP server(FTP server 1).
For all other company codes it has to send to second FTP server for Second business system which has been created in SLD .
previously they used INTERFACE DETERMINATION as ENHANCED TYPE
IF we change to STANDARD its not DISPLAYING INTERFACE MAPPING in pop up window.
As now we created now .
One receiver determination
Two Interface DETERMINATIONs(As enhanced type).
Two REceiver Agreements.
As now we have tested
it is sending all files to both servers.
But we need to send to specfied FTP servers on the basis of COmpany code which we declare in XPATH expression.
could any one can guide us
POINTS WILL BE REWARDED FOR BEST ANSWERS..It's urgent
THanks in ADvance
NandanHi nandan,
u said that u r using
1) business service for FTP1
2)business system for FTP2
u have given X-path condition in Rec determination...i.e depending upon the company code it will route to business service or business system .
so i guess there should be two reciver determination
2 interface dtermination
And also check ur Xpath....make sure that its like....
if (Comp code == 1)
go to FTP1
if (comp code == 2)
go to FTP2
regards
biplab -
Hi,
I have a ribbon (done using ribbon XML) with menu options. I need to remove few buttons from the menu dynamically based on some condition. Also, I want to change the label of another button. How to achieve this programmatically? (C#)
Thanks in advance.
Thanks PrasadHello Prasad,
Use callbacks for populating Ribbon controls such as menu, dropDown, gallery and etc. Then you can use the
Invalidate or
InvalidateControl methods of the
IRibbonUI interface to get your callbacks invoked when required. Thus, you will be able to delete the required item(s).
You will find the following articles in MSDN helpful:
Chapter 11: Creating Dynamic Ribbon Customizations (1 of 2)
Chapter 11: Creating Dynamic Ribbon Customizations (2 of 2)
To change the label of your controls at runtime you need to use the getLabel callback and call the Invalidate or InvalidateControl methods of the IRibbonUI interface. The following series of articles describe the Fluent UI in depth:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
Maybe you are looking for
-
How to connect apple TV with 2 Macs?
Hi! I have connected/linked Apple TV with the iTunes library from my iMac (wireless). ..... Now, I have also downloaded some movies from iTunes on my MacBook. So I connected the MacBook (wireless) with Apple TV, but when I open Apple TV in iTunes on
-
Was there an upgrade that blocks incoming email ?
i stopped receving emails yesterday afternoon. i've spoken with my ISP and its not a server problem. might be software related. i do not believe i have an action firewall (firewall is off under system preferences/sharing) but dont know what "Network
-
Sending PO as PDF attachment to Vendor
Hi Gurus I have requirement where, when PO is saved , a PDF attachment should be sent to Vendor email. Your help is appreciated. Regards, Gajanan
-
Had problem with disk burning this am, and now getting message that "The photo library was created with an unrreleased version of iPhoto. Tells me to please quit and upgrade this library by openiing it in iPhoto 2 or iPhoto 4. I have iLife 05 loaded
-
Some CS4 on XP-32bit Questions and Issues
Now that I have CS4 running on XP I'm trying to do some real work with it. First thing I do is disable tabbed windows and other new features as they have yet to prove themselves useful in my workflow. Perhaps I'll grow to appreciate them. But for now