How to create a function with ref_cursor as parameter in OWB 10.1
Hi,
Can any one help me how to create a function with ref_cursor as parameter in OWB 10.1.?
Its urgent. Please help me.
Thanks,
Siv
Hi David,
Thanks for your reply.
Before going for this function, I need to create a package in transformation node in owb module.
My package is as follows,
Create or replace package 123
type xxx is RECORD ( parameters);
type yyy is RECORD (parameters);
type aaa is table of yyy;
type bbb is REF CURSOR return xxx;
type ccc is record (parameters);
type ddd is ref cursor return eee;
END;
How can I create the above kind of package manually in OWB 10.1 (Should not to import the package)
Please help me its urgent.
Thanks,
Siv
Similar Messages
-
How to create a method with an interface parameter?
Hi there.
I would create a method with an interface parameter. I mean this:
public interface MyInt {
public void method(int i);
public class SubClass implements MyInt {
public void method(int i) {
System.out.println("The number is: " + i);
public class MainClass {
public MainClass(MyInt inter) {
inter.method(10);
public static void main(String[] args) {
(*) new MainClass(new SubClass());
}I tried to compile this but do not work (incompatible types on (*)) . Is it possible to do something like that or not?I compiled and runned this code on my machine and it works fine.
How did you did to compile and run this code ?
Did you put each code on its own file or all codes in the same file ?
I did like this:
I put each code in its own file and put all in the same dir, after I did:
javac -classpath . MainClass.java
After that, I did:
java -classpath . MainClass
I hope this help you
Lucas -
How to call a function with generic table parameter
Hi everybody
I need to call function module RSAR_ODS_API_GET (from BW). It recive an internal table with request ids and should return in E_T_DATA "unstructured" data from the psa and in E_T_RSFIELDTXT the description of the data structure, I guess
from sap help only thing I have reggarding how to use the function module is :
"You can call up the function module RSAR_ODS_API_GET with the list of request IDs given by the function module RSSM_API_REQUEST_GET. The function module RSAR_ODS_API_GET no longer recognizes InfoSources on the interface, rather it recognizes the request IDs instead. With the parameter I_T_SELECTIONS, you can restrict reading data records in the PSA table with reference to the fields of the transfer structure. In your program, the selections are filled and transferred to the parameter I_T_SELECTIONS.
The import parameter causes the function module to output the data records in the parameter E_T_DATA. Data output is unstructured, since the function module RSAR_ODS_API_GET works generically, and therefore does not recognize the specific structure of the PSA. You can find information on the field in the PSA table using the parameter E_T_RSFIELDTXT."
unfortunately I when running de report bellow, I get a dump which says:
Function parameter "E_DATA" is unknown
in the definition of the interface E_DATA has no type, which means it can recive any table type, right?
So I have two questions?
1) How to get the code working
2) How do I use the parameter E_T_RSFIELDTXT to parse the data returned in E_DATA
by debuging RSSM_API_REQUEST_GET for this code I found it try to put an internal table with the struct of the database table /BIC/B0000151000 in E_DATA
Thanks a lot for any help
rgds
my test report is:
REPORT ZTEST_PSA_API.
TABLES: /BIC/B0000151000 .
TYPE-POOLS: RSSM.
TYPES: BEGIN OF STC_REQ_LINE,
sign(1),
option(2),
low TYPE rsa_request,
high TYPE rsa_request,
END OF STC_REQ_LINE,
IT_REQUEST TYPE STC_REQ_LINE OCCURS 0.
DATA: lit_request TYPE RSSM_T_API_REQUEST_GET WITH HEADER LINE,
lc_system TYPE RSSM_T_API_LOGSYS,
lit_request1 TYPE IT_REQUEST WITH HEADER LINE.
DATA: lc_dtarget_name TYPE RSA_ODSNAME,
lit_meta_data TYPE RSARC_T_RSFIELDTXT.
DATA: lt_psa_data LIKE /BIC/B0000151000 OCCURS 0.
CALL FUNCTION 'RSSM_API_REQUEST_GET'
EXPORTING
I_SOURCE = '2LIS_13_VDITM'
I_TYP = 'D'
I_DATEFROM = '20060627'
IMPORTING
E_T_REQUEST = lit_request[]
E_T_LOGSYS = lc_system
EXCEPTIONS = 1.
READ TABLE lit_request.
lit_request1-sign = 'I'.
lit_request1-option = 'EQ'.
lit_request1-low = lit_request-request .
APPEND lit_request1 .
break-point .
CALL FUNCTION 'RSAR_ODS_API_GET'
EXPORTING
I_T_REQUEST = lit_request1[]
IMPORTING
E_ODSNAME = lc_dtarget_name
E_T_RSFIELDTXT = lit_meta_data
TABLES
E_DATA = lt_psa_data
EXCEPTIONS
NO_DATA_FOUND = 1
PARAMETER_FAILURE = 2
REQUEST_NOT_AVAILABLE = 3
NO_REQUEST_FOUND = 4
NO_FIELDS_TO_ODS = 5
NO_ODS_FOUND = 6
PACKAGE_LOCKED_BY_LOADING = 7 .Try to pass table parameter without "[]" :
CALL FUNCTION 'RSAR_ODS_API_GET'
EXPORTING
I_T_REQUEST = lit_request1
IMPORTING
E_ODSNAME = lc_dtarget_name
E_T_RSFIELDTXT = lit_meta_data
TABLES
E_DATA = lt_psa_data -
How to create a function with dynamic sql or any better way to achieve this?
Hello,
I have created below SQL query which works fine however when scalar function created ,it
throws an error "Only functions and extended stored procedures can be executed from within a
function.". In below code First cursor reads all client database names and second cursor
reads client locations.
DECLARE @clientLocation nvarchar(100),@locationClientPath nvarchar(Max);
DECLARE @ItemID int;
SET @locationClientPath = char(0);
SET @ItemID = 67480;
--building dynamic sql to replace database name at runtime
DECLARE @strSQL nvarchar(Max);
DECLARE @DatabaseName nvarchar(100);
DECLARE @localClientPath nvarchar(MAX) ;
Declare databaselist_cursor Cursor for select [DBName] from [DataBase].[dbo].
[tblOrganization]
OPEN databaselist_cursor
FETCH NEXT FROM databaselist_cursor INTO @DatabaseName
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Processing DATABASE: ' + @DatabaseName;
SET @strSQL = 'DECLARE organizationlist_cursor CURSOR
FOR SELECT '+ @DatabaseName +'.[dbo].[usGetLocationPathByRID]
([LocationRID])
FROM '+ @DatabaseName +'.[dbo].[tblItemLocationDetailOrg] where
ItemId = '+ cast(@ItemID as nvarchar(20)) ;
EXEC sp_executesql @strSQL;
-- Open the cursor
OPEN organizationlist_cursor
SET @localClientPath = '';
-- go through each Location path and return the
FETCH NEXT FROM organizationlist_cursor into @clientLocation
WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @localClientPath = @clientLocation;
SELECT @locationClientPath =
@locationClientPath + @clientLocation + ','
FETCH NEXT FROM organizationlist_cursor INTO
@clientLocation
END
PRINT 'current databse client location'+ @localClientPath;
-- Close the Cursor
CLOSE organizationlist_cursor;
DEALLOCATE organizationlist_cursor;
FETCH NEXT FROM databaselist_cursor INTO @DatabaseName
END
CLOSE databaselist_cursor;
DEALLOCATE databaselist_cursor;
-- Trim the last comma from the string
SELECT @locationClientPath = SUBSTRING(@locationClientPath,1,LEN(@locationClientPath)- 1);
PRINT @locationClientPath;
I would like to create above query in function so that return value would be used in
another query select statement and I am using SQL 2005.
I would like to know if there is a way to make this work as a function or any better way
to achieve this?
Thanks,This very simple: We cannot use dynamic SQL from used-defined functions written in T-SQL. This is because you are not permitted do anything in a UDF that could change the database state (as the UDF may be invoked as part of a query). Since you can
do anything from dynamic SQL, including updates, it is obvious why dynamic SQL is not permitted as per the microsoft..
In SQL 2005 and later, we could implement your function as a CLR function. Recall that all data access from the CLR is dynamic SQL. (here you are safe-guarded, so that if you perform an update operation from your function, you will get caught.) A word of warning
though: data access from scalar UDFs can often give performance problems and its not recommended too..
Raju Rasagounder Sr MSSQL DBA
Hi Raju,
Can you help me writing CLR for my above function? I am newbie to SQL CLR programming.
Thanks in advance!
Satya
-
How to define a function with table type parameter
Hello All,
Here is the requirement ..
cursor c is select first_name, last_name , ssn from employee ;
TYPE employee_type IS TABLE OF c%rowtype;
tbl_employee_type employee_type;
I want to pass the parameter to a function the ssn -: tbl_employee_type(1).ssn
how the formal parameter should be declared
===========================
function chk_notnull_blank ( ? ) return boolean is
BEGIN
if ( colname is NOT NULL and colname in ( -8E14, -7E14, -6E14, -5E14, -4E14, -3E14, -2E14, -1E14, -1E9 )) then
RETURN TRUE ;
else
RETURN FALSE ;
end if;
END chk_notnull_blank;
======================
pls advice
thanks/kumarYou cannot define a generic argument in a function,
but you can overload several funtions with the same name and different types of arguments in a package,
in this way (not tested):
create table employees as
select employee_id ssn, first_name, last_name from hr.employees;
create or replace
PACKAGE chk
IS
cursor c is select first_name, last_name , ssn from employees ;
TYPE employee_type IS TABLE OF c%rowtype;
TYPE employee_ssn_type IS TABLE OF employees.ssn%TYPE;
TYPE employee_num_type IS TABLE OF number;
FUNCTION chk_notnull_blank ( colname employees.ssn%TYPE) RETURN boolean;
FUNCTION chk_notnull_blank ( colnames employee_type) RETURN boolean;
FUNCTION chk_notnull_blank ( colnames employee_ssn_type) RETURN boolean;
FUNCTION chk_notnull_blank ( colnames employee_num_type) RETURN boolean;
END chk;
create or replace
PACKAGE BODY chk
IS
FUNCTION chk_notnull_blank ( colname employees.ssn%TYPE) RETURN boolean IS
BEGIN
if ( colname is NOT NULL and colname in ( -8E14, -7E14, -6E14, -5E14, -4E14, -3E14, -2E14, -1E14, -1E9 )) then
RETURN TRUE ;
else
RETURN FALSE ;
END IF;
END chk_notnull_blank;
FUNCTION chk_notnull_blank ( colnames employee_type) RETURN boolean IS
BEGIN
FOR i IN colnames.FIRST .. colnames.LAST LOOP
IF NOT chk_notnull_blank( colnames( i ).ssn )
THEN
RETURN FALSE;
END IF;
END LOOP;
RETURN true;
END chk_notnull_blank;
FUNCTION chk_notnull_blank ( colnames employee_ssn_type) RETURN boolean
IS
BEGIN
FOR i IN colnames.FIRST .. colnames.LAST LOOP
IF NOT chk_notnull_blank( colnames( i ) )
THEN
RETURN FALSE;
END IF;
END LOOP;
RETURN TRUE;
END chk_notnull_blank;
FUNCTION chk_notnull_blank ( colnames employee_num_type) RETURN boolean
IS
BEGIN
FOR i IN colnames.FIRST .. colnames.LAST LOOP
IF NOT chk_notnull_blank( colnames( i ) )
THEN
RETURN FALSE;
END IF;
END LOOP;
RETURN TRUE;
END chk_notnull_blank;
END chk;I assumed in this example that if the argument of the function chk_notnull_blank is of the table (collection) type,
then the function returns true if all table elements pass the check, otherwise it returns false. -
How can I Create function with an out Parameter
how all
how can I Create function with an out Parameter
I try to create it it sucess but how can I CALL it , it give me error
please I want A simple example
thanks3rd post on same question by same user :
Re: how can I Create function with an out Parameter
how can I Create function with an out Parameter -
How to Create a Functiona Query
Dear all,
Could any body detail me how to create a functional query. Please give me step by step procedure to create a query.
I would appreciate if you can give me a material with screen shots. Your help will be highly appreciated.
Thank you
Raghu RamHi Raghu,
Go through this document it may help you,
SAP Query
Step 1: Create User Group SQ03
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
a) In the User Group: Initial Screen -
Enter User Group Code (self named)
Click on Create
b) In the User Group (Code): Create or Change pop-up window -
Enter the User Group Description
Click on Save
c) In the Create Object Directory Entry pop-up window -
Ö Click on Local Object button
Ö The User Group Created is saved
Step 2: Create User Group SQ02
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Infosets
a) In the Infoset: Initial screen -
Ö Enter Infoset Code (self named)
Ö Click on Create button
b) In the Infoset: Title & Database Screen -
Ö Enter Description of Infoset in the Name field
Ö In the Data Source selection: Select appropriate Data Source by clicking
the radio button
· Source the data can either be multiple tables OR single table. There are 4
options for the user to select from
Ö Click on Continue (Enter)
Ö Selected Table gets displayed in the Infoset : Initial Screen
c) In the Infoset: Initial Screen -
Ö Click on Insert Table button
d) In the Add Table Screen -
Ö Enter the Table Name that is to be inserted
Ö Click Continue (Enter)
e) In the Infoset: Initial Screen -
Ö Click on Back button
f) In the Field Group Defaults pop-up Screen -
Ö Select Appropriate Field Group Option by clicking on the radio button
· there are 3 options to select from. User can select Empty Field Group
option and then select the data fields in the steps explained further.
Alternatively, User can select an option which clubs all the data fields
From all the tables selected
Ö Click Continue (Enter)
g) In the Change Infoset Screen -
· the left side lists the Tables that the user has selected in step b, c & d
· In the right side, system creates field groups, one for each table listed in the
left part. Initially, the Field Groups are empty
Ö In the Left Side, Click on the arror next to the table name and expand and
display all the data fields in the table
Ö Select a Data Field from the expanded Table view, which is to be added to
the Field Group on the right.
Ö Select a Field Group on the right side, in which Data Field selected above
has to be added
Ö Right click on the Data Field selected and click on Add Field to Field Group
Ö The selected Data Field gets added to the selected Field Group, which is
indicated by an arrow next to the Field Group.
Ö Carry out the steps above to add the required Data Fields to the respective
Field Groups
Ö After transferring Data Fields to Field Groups click on Generate button
h) In the Create Object Directory Entry Screen -
Ö Click on Logical Object button to generate the infoset
i) In the Change Infoset Screen -
Ö Click on the Back button
j) User is taken back to the Infoset: Initial Screen which displays the
created Infoset record.
Step 3: Assigning User Group to Infoset SQ03
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > User Groups
a) In the User Groups: Initial screen -
Ö Enter the User Group for which Infoset is to be assigned
Ö Click on Assign Users & Infosets button
b) In the User Group: Assign Users Screen -
Ö Click on Assign Infosets button
c) In the next screen, select the Infoset, which needs to be attached to the
User Group selected
d) Click on the Back button
Step 4: Creating Query SQ00 & SQ01
Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities > SAP Query > Queries
a) In the Query from User Group: Initial Screen -
Ö Click on Other User Groups button
Ö In the pop-up screen, User Groups, select the User Group for which the
Query has to created. The pop-up screen closes.
Ö Enter the Query Code in the Query field
Ö Click on Create button
b) A pop-up screen Restrict Value Range shows the list of Infosets assigned to
the User Group
Ö Select the Infoset for which Query has to be created
c) In the new screen Create Query: Title, Format -
Ö Enter the Description of the Query in the Title field
Ö Click on the Next Screen button
d) In the Select Field Group screen
Ö Select the Field Groups from which Data Fields have to be selected for the
Output
Ö Click on the Next Screen button
e) In the Select Field screen -
Ö Select the Data Fields, which should appear in the output
Ö Click on the Next Screen button
f) In the Screen Selection -
Ö Select the Data Fields for the selection criteria
Ö Enter the sequence in which the selected fields would appear in the input
screen of the query.
Ö Define if the selection criteria should be Single Value or Multiple Value Range
by clicking in the appropriate check boxes
Ö Click on the Basic List button
g) In the screen Query Layout Design -
Ö Select the Output Fields from the Data Fields section by clicking the
appropriate check box
Ö Change the sequence of Data Field columns if required
Ö Click on the Test button to test the query created
h) On the Test Query screen click Continue
i) In the Query screen -
Ö Enter the selection criteria
Ö Click on Execute button
j) Save the Query created
Step 5: Running the Query SQ00
a) In the Query From User Group: Initial screen
b) Click on Other User Groups button to select the User Group
c) In the pop-up screen User Groups select the User Group
d) System lists all the queries created for the User Group
e) Select the appropriate Query
f) Click on Execute button
g) User is taken to the Selection screen
h) Enter the selection criteria and click on Execute button
i) System runs the query and gives the output
Regards,
Murali. -
I need your expert opinion on how to create a map with multiple conditions.
Hello.
I need your expert opinion on how to create a map with multiple conditions.
I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
How can i create a cursors within the map?
My function creates table and cursor.
Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
I would appreciate any help / advise on this.
Thank you very muchthanks a lot for your reply - i will look into this option :-)
it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
Anyway, thank you very much for your suggestion. -
How two create UPDATE FUNCTION MODULE
Hi,
I have 2 tables to update one after the other...
I have geard it is advisable to use update function module for this..
can any1 tell me how to create and work with update function modules...
Answers will be rewarded....Abhay,
How an update function module works is, the execution of the FM is delayed to until when a COMMIT WORK statement is executed.
Hence if you have the data available for updating the two DB tables at the time of calling the FM, you can pass the tables to the same FM and program the DB update for both in the same FM.
However the COMMIT WORK should be outside the FM further down in the calling program.
This link is very good and easy to follow
http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm
Hope it helps
Aditya[url=http://help.sap.com/saphelp_erp2005vp/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm]
Message was edited by:
Aditya -
How to create search function (af:query) using method in java
hi All..:)
i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
anyone help me....
thx
agungdmtHi,
download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
Frank -
How to create a function group (step by step)?
I would like to know how to create a function group, step by step.
step 1 do....
step 2 do ...also,
Go to SE80 for creating a function group.
Also have a look at below link.
http://help.sap.com/saphelp_nw04/helpdata/en/d1/801ef5454211d189710000e8322d00/frameset.htm
i.e.
TCODE - SE80
Choose - Function Group ,it wil ask to create..
Create and then activate..give a name starting with Z .
Other way is go to tcode SE37.
In the menu,there is a option in sub menu for creating function group.
Just create it by clicking that and give names starting with z or y. -
How to create one portlet with more apps
Hi,
How to create 10 application with one portlet on OC4J? Anybody has experience? Care to share with me.
Thank you.Hi
If you are writing application logic using JPDK or PDK, you can implement the logic/code for 1 application or 100 applications/functionality in one portlet.
Where as if you have per application you have 1 portlet you can have modularity, can be added to Portal page's portlet region where ever you want to.portlet provider(Web provider or Pl/sql provider) can contain multiple portlets.
If you go with 100 applications rendering in one portlet you need to implement 100 applications logic/code in 1 portlet, you can parameterize the portelt to show which applications can be shown at run time, for this you need to implement parameterization logic in portlet code. I can say this approach is cumbersome
Thanks
Seshagiri.Rayala
http://soabpel.wordpress.com/ -
How can create a JTree with cellRender is checkbox realized multiple selec
How can create a JTree with cellRender is checkbox realized multiple selection function.thanks for every
one's help.Hi,
1. Create a value node in your context name Table and set its cardinality to 0:n
2. Create 2 value attributes within the Table node name value1 and value2
3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
you have created a table and binded its value to context
Table UI properties
4.Set Selection Mode to Multi
5.Set Visible Row Count to 5
6.ScrollableColCount to 5
In your implemetaion, you can add values to table as follow:
IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
ele.setValue1(<value>);
ele.setValue2(<value>);
wdContext.nodeTable().addElement(ele);
The above code will allow you to add elements to your table node.
Regards,
Murtuza -
How to create sap query with "or" relationship
dear experts,
I need a report to display the employee whoese WSR is
changed in the month for infotype 0007.
that is ,we want to search with selection
begda OR endda between 2008-01-01 and 2008-01-31.
how to create sap query with "or" relationship?hi use like this,
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = p_pernr
infty = '0007'
BEGDA = p_date1
ENDDA = p_date2
TABLES
infty_tab = itab .
hi use this by passing the pernr to fm and giving the dates low and high in the p_date1 and p_date2.
loop at itab where condition.
endloop.
may it helps u,
regards,
venkat. -
How to create a node with attributes at runtime in webdynpro for ABAP?
Hi Experts,
How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
Please help!
Thanks
GopalHi
I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
Note
The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
My code is like the following:
TYPES: BEGIN OF t_type,
CARRID TYPE sflight-carrid,
CONNID TYPE sflight-connid,
END OF t_type.
Data: i_struc type table of t_type,
dyn_node type ref to if_wd_context_node,
rootnode_info type ref to if_wd_context_node_info,
i_node_att type wdr_context_attr_info_map,
wa_node_att type line of wdr_context_attr_info_map.
wa_node_att-name = 'CARRID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
insert wa_node_att into table i_node_att.
wa_node_att-name = 'CONNID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
insert wa_node_att into table i_node_att.
clear i_struc. refresh i_struc.
select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
rootnode_info = wd_context->get_node_info( ).
rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
attributes = i_node_att
is_multiple = abap_true ).
dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
dyn_node->bind_table( i_struc ).
l_ref_interfacecontroller->set_data( dyn_node ).
I am trying to create a new node. That is
CONTEXT
- DYNFLIGHT
CARRID
CONNID
As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
Also I cannot define the structure in the ABAP dictionary because it changes based on condition
Message was edited by: gopalkrishna baliga
Maybe you are looking for
-
Why am i unable to enter data into an aarp crossword puzzle?
the crossword cell is ready to accept a character but a letter I enter does not show up in the cell
-
What has happened to pixel-polly in CS5.5? This may be well trodden ground but searches of this forum do not turn up hits on pixel polly. Google searchs seem to revolve around lots of non-english hits for the nefarious download sites that offer stuff
-
dear all i need to have a report in the following format for purchases made in a particular plant.this is required for filing tax returns.is there any standard report which match exactly or atleast to the nearest to my requirement.pl help me. 1.G.R N
-
hello, i've been having some troubles for a while and looking for any magical advice. i have a hosting/email package with godaddy that i'm happy with except their outgoing mail server which never works reliably for me (hit or miss). i have tried all
-
Microsoft DPM 2010 MMC Crash Recovery
I switched a protected workstation from a server backup to a client backup. Now when I go to the "Recovery" tab MMC crashes. If I remove the new protection group all works fine. I did tell it to retain the old data. This may be (Hostname) listed belo