How to read table of records from RFC
Hi,
My requirement is to read multiple records(800) from RFC 1 and pass the same records to RFC 2 as input(AbstractList).
Please suggest how to achieve this ??
Thanks,
vijay.
Hi,
I'll share the code for RFC 1 & RFC 2
Code for RFC 1
Zbapi_event_name input= new Zbapi_event_name();
input.setUser("name");
wdContext.nodeZbapi_event_name().bind(input);
// we use the normal execute statement over here
wdContext.nodeZbapi_event_name.nodeOutput().nodeResult_Objec1(); // returns all table records
code for RFC 2
Zbapi_event_data data= new Zbapi_event_data();
data.setUser("ss");
data.addPerners(Object); // we have a method accepts argument as Object
data.setPerners(Abstractlist); // we have a method which accepts the argument as Abstractlist
// we are stuck at this step , how to transform the data from RFC 1 to RFC 2
wdContext.nodeZbapi_event_data().bind(data);
// we use the normal execute statement over here
Please suggest.......
Thanks
vijay
Similar Messages
-
How to read a particular record from BRF+ table in ABAP
hi all,
I have a requirement where a particular record has to be read based on certain value for a set of columns from BRFplus Decision table to Delete/Update. I tried many methods of CL_FDT* but could not find any right one.
Could anyone please help me?
Thanks,
DeepikaHi Deepika,
There is one solution from my side.
1. Include the Decision table in a BRF+ function.
2. Set the input and result of the function.
3. Call the function in the ABAP.
4. Get the record from result.
Please find the call function logic in ABAP as below.
Data:
lo_admin_data TYPE REF TO if_fdt_admin_data,
lo_function TYPE REF TO if_fdt_function,
lo_context TYPE REF TO if_fdt_context,
lo_result TYPE REF TO if_fdt_result.
cl_fdt_factory=>get_instance_generic( EXPORTING iv_id = "functon id in general tab"
IMPORTING eo_instance = lo_admin_data ).
lo_function ?= lo_admin_data.
*Set input parameter
lo_context ?= lo_function->get_process_context( ).
lo_context->set_value( iv_name = "parameter name" ia_value ="parameter value" ).
lo_function->process( EXPORTING io_context = lo_context
IMPORTING eo_result = lo_result ).
lo_result->get_value( IMPORTING ea_value = "Result" ).
Best Regards
Clark Huang -
How to read tables and fields from a transaction screen.
hi all,
i am having problem in reading fields and tables from a screen, could any one help me in mapping tables from a structure as well.
it will be very help full if u had any documentation.
Thanking u
kiranHi,
In classical debug mode from CALL STACK tab try to find out the structures holding the screen values .
Capture the values from transaction using FIELD SYMBOLS .
See the below code.
DATA : l_prog_val(50) TYPE c VALUE '(SAPLCTMS)WI[]'.
**To get the (SAPLCTMS)WI value in this program from call stack.
FIELD-SYMBOLS: <wi> TYPE ANY.
*Assign the structure (SAPLCTMS)WI to field symbol
ASSIGN (l_prog_val) TO <wi>.
IF sy-subrc NE 0.
EXIT.
*Assign the structure (SAPLCTMS)WI to internal table
ELSE.
it_wi[] = <wi>.
ENDIF.
Sastry. -
How to handle the failed records from the table when using DB Adapter
Hi,
I am reading some records from table using DB Adapter inside my synchronous BPEL process. Say like reading 100 records from table in between after successful reading of 90 records an error occured in 91st record due some various reasons(like DB down, Connection interrupted etc.). Then how to handle this situation, whether i have to read all the records from the begining and is there any option to continue from where it stopped reading.
Can please anybody help me out in the regard?
Thanks in advance
Regards,
Aejazwe had the same requirement some time ago and had two option:
1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
this option was however refused, due to huge data volume after a while
2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
M. -
How can distribute 5 lakhs records from sap R/3 setup tables ?
How can distribute 5 lakhs records from sap R/3 setup tables in to multiple requests in sap BI?
Hello,
what is "lakhs" ?
Please use plain English words on a world wide forum...
Regards,
Olivier -
Table of records from a stored procedure
Hi
Where could I find an example or documentation about how to retrive a table of records from a Stored Procedure ??
ThanksTry:
CREATE OR REPLACE TYPE scott.MYRECORDTYPE as object
(a int, b varchar2(40), c date, d number(10));
CREATE OR REPLACE TYPE scott.MYTABLETYPE is table of myrecordtype;
CREATE OR REPLACE PACKAGE BODY scott.MYPACKAGE
as
type number_collection is table of number(38) index by binary_integer;
type varchar2_collection is table of varchar2(4000) index by binary_integer;
type date_collection is table of date index by binary_integer;
g_data myTableType;
empno_col number_collection;
ename_col varchar2_collection;
hiredate_col date_collection;
mgr_col number_collection;
function my_function return myTableType
is
begin
select empno, ename, hiredate, mgr
bulk collect into empno_col, ename_col, hiredate_col, mgr_col
from emp
order by empno; -- Get some data
g_data := myTableType(); -- Initialize
for i in empno_col.first .. empno_col.last loop
g_data.extend; -- Write something in the array
g_data(i) := myRecordtype(empno_col(i), ename_col(i), hiredate_col(i), mgr_col(i));
end loop;
return g_data;
end;
end;
-- Demonstration-View
CREATE OR REPLACE VIEW scott.myview
AS
select a,b,c,d
from table(cast(myPackage.my_function() as mytabletype)); -
Creating BOM using BDC :How to display no of records from flat file under
Hi,
How to display no of records from flat file under one (Alternative BOM) vertically.
When i execute, the records are replacing one by one.
Here my coding:
report ZBOM1
no standard page heading line-size 255.
*include bdcrecx1.
DATA: BEGIN OF bdc OCCURS 0,
matnr(18),
werks(4),
stlan(1),
END OF BDC.
DATA: BEGIN OF BDC1 OCCURS 0,
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
END OF bdc1.
DATA: BEGIN OF BDCDATA OCCURS 0,
matnr(18),
werks(4),
stlan(1),
idnrk(18),
MENGE(18),
MEINS(3),
postp(1),
posnr(4),
END OF BDCDATA.
data: ibdcdata type standard table of bdcdata WITH HEADER LINE.
*start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ','
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = BDCDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
loop at bdcdata.
perform bdc_dynpro using 'SAPLCSDI' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RC29N-STLAN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29N-MATNR'
'SOFTDRINKS'.
perform bdc_field using 'RC29N-WERKS'
'WIND'.
perform bdc_field using 'RC29N-STLAN'
'1'.
perform bdc_field using 'RC29N-DATUV'
'16.09.2008'.
perform bdc_dynpro using 'SAPLCSDI' '0110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29K-BMENG'
'1'.
perform bdc_field using 'RC29K-STLST'
'1'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-EXSTL'.
perform bdc_dynpro using 'SAPLCSDI' '0111'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-LABOR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSTP(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FCBU'.
perform bdc_field using 'RC29P-IDNRK(01)'
BDCDATA-IDNRK.
perform bdc_field using 'RC29P-MENGE(01)'
BDCDATA-MENGE.
perform bdc_field using 'RC29P-MEINS(01)'
BDCDATA-MEINS.
perform bdc_field using 'RC29P-POSTP(01)'
BDCDATA-POSTP.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
BDCDATA-POSNR. "'0010'.
perform bdc_field using 'RC29P-IDNRK'
BDCDATA-IDNRK. "'15'.
perform bdc_field using 'RC29P-MENGE'
BDCDATA-MENGE. "'1'.
perform bdc_field using 'RC29P-MEINS'
BDCDATA-MEINS. "'ml'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
*perform bdc_transaction using 'CS01'.
*perform close_group.
CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
REFRESH IBDCDATA.
endloop.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR iBDCDATA.
iBDCDATA-PROGRAM = PROGRAM.
iBDCDATA-DYNPRO = DYNPRO.
iBDCDATA-DYNBEGIN = 'X'.
APPEND ibDCDATA .
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR iBDCDATA.
iBDCDATA-FNAM = FNAM.
iBDCDATA-FVAL = FVAL.
APPEND iBDCDATA .
ENDIF.
ENDFORM.Hi,
the BDCDATA structure must be fnam, fval,dynbegin,dynpro,program.
You have to declare like this and pass this in your CALL TRANSACTION statement.
Please give some other table name for BDCDATA you declared for and also for IBDCDATA. -
How to read table fields form a table having length of 7 characters
HI all,
could you please tell me how to read table fields from a table having length 7 characters, i have requirement that in my ztable i have 30 fields out of which 20 fields are location fields, i want to select 20 fields which have 7 characters length.
please could any body suggest me on this issue.
thanks,
sre.hi,
try like this
create a data variable of type i as
data: len type i.
create internal table for 20 fields as
data:begin of itab,
fld 1 type .......
end of itab.
data:itab type itab1 occurs 0 with header line.
loop at itab2. // original internal table which all fields.
read table itab2 with index sy-tabix.
len = strlen (itab2-fld).
if len eq 7.
move itab2 itab1.
append itab1.
endif.
endloop.
if helpful reward some points.
with regards,
Suresh.A -
Export tables and records from oracle 8i to oracle 10g
hi,
i had installed oracle 10g, but i want to export my tables and record from oracle 8i to oracle 10g.
can you tell mePlease have a look to Using Different Releases and Versions of Export in Utilities document.
-
Code for how to read an integer array from the command prompt...
hello,
Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..If you are using a recent version of Java (5 or later) you can use Scanner:
http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
That page has some example code on it, too. -
How to Read a CAB File from JAVA?
Hi,
Anyone knows how to read a CAB File from java. I need to read a property file of txt file that is packaged in CAB file & then based on that, I have to do processing. Is there anyway to do it.
I had tried using java.util.zip.ZipFile Class, but it does work for JAR, but not for CAB.
siva.Perhaps there's something in the Cabinet SDK that will help:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp -
How to read a text file from other machine???
I have a text file located in local machine. I use th e code below to retrieve data from that particular text file.
String realPath = (String)getServletContext().getRealPath("");
BufferedReader holsFile = new BufferedReader(new FileReader(realPath + "/webpages/holidays.txt"));My question is , how could I retrieve the records from the tsxt file if the file is located in another machine or webserver?
Thanks for advanced.It's ok to be new.
The answer is yes. (But I'll let you look in the javadoc to see which package it's in).
Also it may be worth understanding that there is no such thing as a "function" in java, operations are termed "methods". To go further, you should realise that URL is a class not a "function" or method. The parentheses mean you're calling the constructor.
HTH
/k1 -
How to write jsp select record from Oracle divide per page , about 50 reco
Dear Expert,
How to write jsp select record from Oracle divide per page , about 50 record per page.
Thank you very much.I wish I could, but there is no single sign on module available for Fusion, also, so called Fusion is yet another Word With Big Letters, behind it there is yet another OC4J ( now Oracle switched to Weblogic though) container with bunsh of Oracle apps residing in it.
Generally speaking, neither Fusion nor Oracle Apps user database does not have any single authentication module available out of the box to integrate user database.
It's a long sad story running straight from Oracle Apps 11.0.5.
That's why I've created JAAS single sign on login module and used it ever since at OC4J 10.2 and onwards at OC4J 10.3
Back to the topic: to develop Apps and test them externally using the session bean I've isted above, one need to copy certain libraries from Oracle Apps server, then add them as libraries for JDeveloper project.
Here is the complete list:
oracle.apps.fnd.cache
oracle.apps.fnd.cache
oracle.apps.fnd.common
oracle.apps.fnd.functionSecurity
oracle.apps.fnd.metadata
oracle.apps.fnd.security
oracle.apps.fnd.util
oracle.apps.jtf.cache
oracle.apps.jtf.security
Edited by: Faceless on Nov 26, 2009 3:04 AM -
How to read line number text from PDF using plugin?
Hi, I would like to know how to read line number text from PDF using plugin?
Thanks in advance.Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated. -
Reading Last line(record) from a txt file ina java
Hi,
I want to retrive the last line from a txt file.Can anybody help me??
Thanx in advanceIn order to read the last line you must read all the lines before it. To read lines you can use the BufferedReader and LineNumberReader classes.
Here's an example of how to read lines of text from a file:
http://javaalmanac.com/egs/java.io/ReadLinesFromFile.html
Maybe you are looking for
-
When trying to sign in to the iTunes store I get the following message, "We could not complete your iTunes Store request. An unknown error occurred (5002). There was an error in the iTunes store. Please try again later." How do you resolve this? Ha
-
Because my Photoshop Elements 7 (previously 5 and 3 and 1) catalog outlasted multiple computers, I've "restored" the catalog multiple times. When I've done so, I've wanted to keep my picture file structure, so I selected that option in the restore. H
-
Can Apple TV stream from TV to Mac?
Will it be possible to do a reversed job with the new Apple TV? I have a digital sat receiver that records too. I`d like to have a device that streams my recordings to my Mac Pro. Til now I always have to unplug the receiver and drag it through the h
-
When starting up Mail app it only load the inboxed and the preview message. When selecting the mail it wont show the entire mail in the large window. Also it freezes up after som seconds, and I cant click other inboxes.
-
Can't use properly "Save as..."
I just got a new macbook pro form work and I noticed that I can't use "Save as..." to directly save pdf or images. If I use "save as.." on a pdf link I simply get the name "url" while if I try on images I get "imgres". I'm pretty sure I've already se