Table handling in eCATT
Hi Experts,
Iam testing Function modules using eCATT, now i need to pass values to the import parameters of a FM where the import parameter is a table type, so i need to pass a table. I am able to pass a structure only.
Some one plz suggest me how to handle this table?
Thanks in advance.
Hi Vinay,
Thanx for the reply.
I am populating the structure in the ABAP...ENDABAP block and I am calling my interface using FUN command outside this block. In the parameters list its not taking the decalration of type TABLE rather it accepting only the STRUCTURE types. My problem is how can I traverse all the values into the table type and assign it to the Interface which is outside the Block (ABAP .... ENDABAP)
Please find the sample code snippet for your reference:
ABAP.
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'FILE'
IMPORTING
FILE_NAME = FILE_V-PATH.
FILE = FILE_V-PATH.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
i_tab_raw_data = it_type
i_filename = file
TABLES
i_tab_converted_data = l_tab_cnt_hdr[].
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
read table l_tab_cnt_hdr into l_str_cnt_hdr.
ENDABAP.
*my aim is to pass the _hdr TABLE values to this Inteface, but at declaration level its not taking the table type... in the Command Interface
FUN ( /MIGA/API_CNT_SET_SNG , API_CNT_SET_SNG_1 ).
Please suggest me in this regard.
Regards,
Mytri
Similar Messages
-
Is it possible to handle table control in eCATT?
instead of ECATT it is better to go for BDC as u need to upload transactional data.
-
Table Handling in XML Indesign Workflow
Hi all,
I have a question related to the table handling in XML workflow.
The XML file have been imported to indesign for pagination purpose. Once the XML file have been imported all the tables and figure are came in Text Streams as INLINE, to make the figures and tables as floats we are draging from the XML structure to make it as floating instead of Inline, this is working for Figure.
I am not able to drag the tables from the XML structure.
Please help us to make the table float, is there is any script to make the table float or any other way.......
kavyaHi Kavya,
You have to create a dummy parent tag, now you can drag the parent tag to the frame.
Regards,
sudar -
How to update the ztable by using table handling function
how to update the ztable by using table handling function
It is very urgent ...............................
thanks in advancesee the below code for the direct ztable update
Report ZUPDATE_PRPS.
tables: zprps.
parameter: p_wbs like zprps-pspnr,
p_value like zprps-fakkz default 'X'.
data: wa_fakkz type zprps-fakkz.
*START-OF_SELECTION
start-of-selection.
call function 'CONVERSION_EXIT_ABPSP_INPUT'
exporting
input = p_wbs
importing
output = p_wbs
exceptions
not_found = 1
others = 2.
select single fakkz
into wa_fakkz
from zprps
where pspnr eq p_wbs.
if sy-subrc eq 0.
update zprps set fakkz = p_value where PSPNR eq p_wbs.
if p_value is initial.
message i999(za) with 'Billing element field has been unchecked'.
else.
message i999(za) with 'Billing element field has been checked'.
endif.
else.
message i999(za) with 'WBS element not found'.
endif.
reward points if it is usefull .....
Girish -
Uploading multiple lines in a table control using ECATT
Hi,
I want to upload muliple lines in a table control using ECATT. When I tried to upload only the first line is getting filled.What I have to do for that. Please reply at the earliest.
With warm regards,
Biju K.GeorgeHello ,
To insert multiple lines into the table you have to record the transaction for one entry and loop the same step multiple times to create multiple entries in the table.
Thanks,
Ajay -
What is table handler error.. I am geeting it while running an API
set serveroutput on;
declare
p_tp_rec_type OZF_TRADE_PROFILE_PVT.TRADE_PROFILE_REC_TYPE;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_trade_profile_id NUMBER;
begin
p_tp_rec_type.trade_profile_id :=11;
p_tp_rec_type.object_version_number:=2;
p_tp_rec_type.last_update_date :=sysdate;
p_tp_rec_type.last_updated_by :=1191;
p_tp_rec_type.creation_date :=sysdate;
p_tp_rec_type.created_by :=1191;
p_tp_rec_type.last_update_login :=1191;
p_tp_rec_type.request_id :=null;
p_tp_rec_type.program_application_id :=null;
p_tp_rec_type.program_id:=null;
p_tp_rec_type.created_from :=null;
p_tp_rec_type.party_id :=25041;
p_tp_rec_type.site_use_id:= null;
p_tp_rec_type.autopay_flag :='T';
p_tp_rec_type.claim_threshold :=50;
p_tp_rec_type.claim_currency :='USD';
p_tp_rec_type.print_flag :='F';
p_tp_rec_type.internet_deal_view_flag :='F';
p_tp_rec_type.internet_claims_flag:=null;
p_tp_rec_type.autopay_periodicity :=1;
p_tp_rec_type.autopay_periodicity_type :='MONTH';
p_tp_rec_type.payment_method :='CHECK';
p_tp_rec_type.discount_type :=null;
p_tp_rec_type.cust_account_id :=8040;
p_tp_rec_type.cust_acct_site_id :=null;
p_tp_rec_type.vendor_id :=1001;
p_tp_rec_type.vendor_site_id :=1001;
p_tp_rec_type.vendor_site_code:=null;
p_tp_rec_type.context :=null;
p_tp_rec_type.attribute_category :=null;
p_tp_rec_type.attribute1 :=null;
p_tp_rec_type.attribute2 :=null;
p_tp_rec_type.attribute3 :=null;
p_tp_rec_type.attribute4 :=null;
p_tp_rec_type.attribute5 :=null;
p_tp_rec_type.attribute6 :=null;
p_tp_rec_type.attribute7 :=null;
p_tp_rec_type.attribute8 :=null;
p_tp_rec_type.attribute9 :=null;
p_tp_rec_type.attribute10 :=null;
p_tp_rec_type.attribute11 :=null;
p_tp_rec_type.attribute12 :=null;
p_tp_rec_type.attribute13 :=null;
p_tp_rec_type.attribute14 :=null;
p_tp_rec_type.attribute15 :=null;
p_tp_rec_type.org_id :=121;
p_tp_rec_type.days_due :=null;
p_tp_rec_type.pos_write_off_threshold :=null;
p_tp_rec_type.neg_write_off_threshold :=null;
p_tp_rec_type.un_earned_pay_allow_to :=null;
p_tp_rec_type.un_earned_pay_thold_type :=null;
p_tp_rec_type.un_earned_pay_threshold :=null;
p_tp_rec_type.un_earned_pay_thold_flag :='F';
p_tp_rec_type.header_tolerance_calc_code :=null;
p_tp_rec_type.header_tolerance_operand :=null;
p_tp_rec_type.line_tolerance_calc_code:=null;
p_tp_rec_type.line_tolerance_operand :=null;
OZF_TRADE_PROFILE_PVT.Create_Trade_Profile( 1, 'T', 'T', 1, x_return_status, x_msg_count, x_msg_data, p_tp_rec_type, x_trade_profile_id);
dbms_output.put_line('TRADE PROFILE '|| x_trade_profile_id);
dbms_output.put_line('x_return_status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('x_msg_count = '||TO_CHAR(x_msg_count));
dbms_output.put_line('x_msg_data = '|| SUBSTR (x_msg_data,1,255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count LOOP
dbms_output.put_line(I||'.'||SUBSTR(FND_MSG_PUB.Get(p_encoded=>
FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;
commit; -
External Table, Handling Delimited and Special Character in file
Hi ,
I have created one external table with these option
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY ***************************************
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
SKIP 0
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
MISSING FIELD VALUES ARE NULL
LOCATION
( 'test_feed.csv'
Now problem is these are coming as valid.
anupam|anupam2
anupam"test|anupam"test2
"anupam|test3"|test3
anupam""""test5|test5
anupam"|test7
but these are not coming as valid
"anupam"test4"|test4 --> Case when we have quotes in the filed but still have quotes in it. I guess in this case we can send the filed expect closing double quotes.
"anupam|test6 --> In case field is starting with double quotes then it's failing
"anupam"test8|test8"|test8 --> In case one filed contains both pipe ( |) and double quotes then we are sending it enclosed in double quotes. But thats failing the job.
Can you suggest what is the best way to handle such scenario? ( One restriction though. The file is used by other system - Netezza as well, which can't take more than one character long delimited :'( )One approach is to define the external table a ONE column table (with single field on the file). This way each line will come in as a row in the external table. Of course you have to build "parsing logic" on top of that.
DROP TABLE xtern_table;
CREATE TABLE xtern_table
c1 VARCHAR2(4000)
organization external
type ORACLE_LOADER DEFAULT directory xtern_data_dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY '~' ---- <<<<<<<< Use a field terminator as a character that is not found in the file
MISSING FIELD VALUES ARE NULL
( c1 CHAR(4000)
) location ('mycsv.csv')
> desc xtern_table
desc xtern_table
Name Null Type
C1 VARCHAR2(4000)
> column c1 format A40
> select * from xtern_table
C1
anupam|anupam2
anupam"test|anupam"test2
"anupam|test3"|test3
anupam""""test5|test5
anupam"|test7
"anupam"test4"|test4
"anupam|test6
"anupam"test8|test8"|test8
8 rows selected
Ideally, it will be good t have an incoming source file with predictable format.
Hope this helps. -
Reading Grid/Table contents using ECATT
Need to retrive the SAP table/grid column or all columns contents using SECATT, please provide the solution.
Thanks in ADVANCE.hi,
eCATT Links
From SAP Help
http://help.sap.com/saphelp_nw04/helpdata/en/1b/e81c3b84e65e7be10000000a11402f/frameset.htm
From SAP Service Marketplace
https://websmp204.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700003012112003E
THANKS,
sendil -
Delete a table record with eCATT-Script and parameter - PROBLEM
I will write a eCATT, witch can delete one record in the table. In this case
it will be a material. The material to delete will be my input parameter.
You can see on the picture how the structure of the ecatt after recording is.
<a href="http://www.carsdream.com/ecatt.jpg">Structure of the ecatt after recording....</a>
I have the following problem:
For example i will delete the "Material 6". I give as parameter the name of
this material. ( I don't know the ID.)
How can i automaticly find the index of the table RECENT, where the naterial
"Material 6" to find is ?
Important is, that by the test executing i don't know how many index the
table RECET have and i don't know under which index "the Material 6" can be
found.
If i find the index of this table, my problem will be solved.
If you can answer that, it will be for me very helpful!Helle,
thanks for your answer.
I coudn't find the place where i could read this note, but i have book about testig SAP-Solutions and you can find there that:
"With the basis release of Web AS 6.40, eCATT supports the direct testing of Web Dynpro-based applications. Both Web Dynpro for ABAP and for Java are supported."
Look the link to SAP-PRESS:
http://www.sap-press.de/katalog/buecher/htmlleseproben/gp/htmlprobID-58
So what's the fact ? It's supported or not?
My application work under Web Dynpro Java, but i think, that the solution of my problem should be similar to the solution for Web Dynpro ABAP, that way i ask the question on this forum.
I someone knows the solution of my problem, it will be very helpfull for me.
Thanks -
Hi All,
Is it possible to create a <b>TABLES</b> parameters in eCATT, if yes how?Hello Ratan
This can be done very easily. Simply type your local parameter like this:
LT_KNA1 => type KNA1[] " brackets !!!
Regards,
Uwe -
JClient and Table Handling?
In a scenario where you have a table and you want to process based upon the user's selection of a row, what's the best way to accomplish this? I've been looking at the events, and there doesn't seem to be one for a row selection. Does this mean that I'm in the wrong place to be looking for this, or do I have to code my own listener to handle when a row is selected? What's best practice for this? And, regardless of where/how you handle it, how do you get information about the database row selected?
Forgive my ignorance, but this is my first foray into the Swing side of JDev.
I don't see a double click event. What I've done is clicked on the jTable object to focus it in the property inspector, then clicked on the Events tab on the property inspector. I see a mouseClicked event, but nothing about a double click. Am I doing this in the wrong place? Or is the event called something I don't recognize? -
Determine of Tax Code for Country/Product Category - Table handling
Dear Experts,
in SRM 7.0, CS, i am facing the following requirement regarding tax codes:
We have users from different countries using SRM. These different countries have different tax codes that are to be used for legal reasons.
My question is, how i can achieve a system behaviour, by which in the shopping cart, the correct tax codes gets selected automatically, based on the country of the user, who is creating the shopping cart.
Question 1:
Is it correct to assume, that this requirement can be achieved by maintaining the "Determine of Tax Code for Country/Product Category" - Table?
Q2:
What is the purpose of the 1st column of the above mentioned table, "Domestic/International Indicator"? Can it be left blank?
Q3:
Is it possible to fill in the values for the field "Country" BUT to leave the field "Category ID" empty???The reason for asking it, that otherwise several hundreds entries would have to be maintaind manaully...
Q4:
From where in the shopping cart or ppoma settings is the system fetching the Country code, in order to be able to use it in the table? Is there any specific attribute maintenance that has to be taken care of, so the above mentioned table can be used (e.g. delivery address, including the country information)?
Thank you very much for your help in understanding the topic.Hi
Here are my responses to your questions:
Question 1:
Is it correct to assume, that this requirement can be achieved by maintaining the "Determine of Tax Code for Country/Product Category" - Table?
Answer - If you have a requirement where different countries have different tax codes, then you do need this confiugration. Otherwise Configuraiton in Enter Tax Code are sufficient.
Q2:
What is the purpose of the 1st column of the above mentioned table, "Domestic/International Indicator"? Can it be left blank?
Answer - Sometimes you have different codes for International and Domestic purchases for a product Category. IN those situations you can select Domestic/International field to differentiate btw tax codes. Otherwise this field can be left blank
Q3:
Is it possible to fill in the values for the field "Country" BUT to leave the field "Category ID" empty???The reason for asking it, that otherwise several hundreds entries would have to be maintaind manaully...
Answer - No, if you enter country, then Category Id field is mandatory. You may enter * in case you dont have multiple backend systems. otherwise you will ve to ve individual entries for each category and backend system.
Q4:
From where in the shopping cart or ppoma settings is the system fetching the Country code, in order to be able to use it in the table? Is there any specific attribute maintenance that has to be taken care of, so the above mentioned table can be used (e.g. delivery address, including the country information)?
Answer - It is picked up from the address of the user where is will receive goods. and Domestic/International will be decided based on Vendor address with reference to thta address.
I hope my responses clarify your doubts.
Regards
Virender Singh -
OLE2 with MS Word -- Table Handling
Dear All,
Im using forms 6i.
Im generating a word document from forms.
That word document is a template.
In that template im placing data at runtime..
My MS Word template has one table with 6 columns and 15 rows...
But at runtime i may get data more than 15 rows...
So whenever start printing 16th row im getting non-oracle exception.
How to overcome this...
Im writing data into table cells as followin
procedure SetCellText (DocumentHandle in OLE2.OBJ_TYPE,
ThisTable in PLS_INTEGER,
CellColumn in PLS_INTEGER,
CellRow in PLS_INTEGER,
Text in VARCHAR2) is
hCell OLE2.OBJ_TYPE;
hRange OLE2.OBJ_TYPE;
begin
hCell := GotoCell(DocumentHandle,ThisTable,CellColumn,CellRow);
hRange := OLE2.GET_OBJ_PROPERTY(hCell,'Range');
OLE2.SET_PROPERTY(hRange,'Text',Text);
OLE2.RELEASE_OBJ(hRange);
OLE2.RELEASE_OBJ(hCell);
end; SetCellText(hRange,1,1,v_row,runtimevalue); Is that possible to insert new row at the end of the table ?Thanks InoL.....
Your Hint Macro did the job...
I created a Macro In the word template to add new row dynamically...
Then i Run the Macro from my forms as following..
=============== Created Macro in word template========================
Sub AddNewRow1()
Dim oTable As Table
Dim oCell As Cell
Dim oPrevRow As Row, oNewRow As Row
Dim iColumn As Long
Set oTable = ActiveDocument.Tables(3)
Set oPrevRow = oTable.Rows(oTable.Rows.Count)
oTable.Rows.Add
Set oNewRow = oTable.Rows(oTable.Rows.Count)
End Sub
===========================================================
================ Executing Macro from forms==========================
ARGS := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'AddNewRow');
OLE2.INVOKE(application,'Run',args);
OLE2.DESTROY_ARGLIST(ARGS);
============================================================ -
For all entries table handled by Tables parameter of Subroutine!
Hi....
See my code...
Dont leave as it seems very big code... Actually its very small one...
In sourse code of function module...
data:itab1 type standard table of <local structure of top include> with header line,
itab2 type standrad table of knvp with header line.
perform routine_data tables itab1
using p_var
Subroutine code, saved in F include of that function group...
form routine_data tables itab1 type standard table
using p_var
select * from <db table>
into corresponding fields of table itab
where <keyfield> = p_var.
endform.
Back to source cod eof Function module..
if sy-subrc is = 0.
select parvw kunn2 kunnr from knvp
into corresponding fields of table itab2 for all entries in itab1
where kunnr = itab1-kunnr
and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
endif.
This code is working fine......
==================Now coming to my problem==========================
In source code of function module...
data:itab1 type standard table of <local structure of top include> with header line,
itab2 type standrad table of knvp with header line.
perform routine_data tables itab1
using p_var
Subroutine code, saved in F include of that function group...
form routine_data tables itab1 type standard table
using p_var
select * from <db table>
into corresponding fields of table itab
where <keyfield> = p_var.
endform.
Function module source code...
perform routine2_data tables itab1
itab2.
F include coding part for above subroutine....
form routine2_data tables itab1 type standard table
itab2 type standard table
select parvw kunn2 kunnr from knvp
into corresponding fields of table itab2 for all entries in itab1
where kunnr = itab1-kunnr <-----causing error
and ( parvw = 'WE' or parvw = 'RE' or parvw = 'RG').
endform.
Giving error message....
>>> The specified type has no structure and therefore no component called 'KUNNR".....
So here the problem is there is a incorrect way to declare parameters....
Plz remind that SUBROUTINES OF FUNCTION MODULES SAVING IN INCLUDE PROGRAMS, because they making some deffenrce with normal external subroutines...
also...
Here for all entries is mandatory!
And Two sub routines are mandatory!
Thanks for your attention...
Naveen Inuganti.Hi ,
Use the below syntax to pass the tables as parameters
*The below perform is in the source code of the F.M
PERFORM goods_movement_post TABLES itab1
itab2
itab3
USING ls_goodsmvt_header
g_mov_code.
suppose u are using the itab1 & itab2 tables data to get the itab3 Data
And The below code is in the Frms include
FORM goods_movement_post
TABLES
pt_itab1 STRUCTURE vbak
pt_itab2 STRUCTURE vbap
pt_itab3 STRUCTURE bapiret2
USING
p_ls_goodsmvt_header STRUCTURE bapi2017_gm_head_01
p_g_mov_code.
ENDFORM
Thanks & Reagrds
Mallikharjuna Reddy -
How can an external table handle data with line feed between delimiters?
I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
I have found that some of my VARCHAR fields have embeded line feeds.
Is it possible to have a definition that would remove any line feed characters between the delimiters?
Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
to also do this.
I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
Thanks for any help
Eric
CREATE TABLE table_ext
id NUMBER,
desc1 VARCHAR2(64 CHAR),
desc2 VARCHAR2(255 CHAR),
add_date DATE
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY data_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8ISO8859P1
BADFILE log_dir:'table_ext.bad'
DISCARDFILE log_dir:'table_ext.dis'
LOGFILE log_dir:'table_ext.log'
FIELDS TERMINATED BY '|' LDRTRIM
MISSING FIELD VALUES ARE NULL
id INTEGER EXTERNAL(38),
desc1 CHAR(64),
desc2 CHAR(255),
add_date CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
LOCATION( 'data.txt' )
PARALLEL
REJECT LIMIT UNLIMITED;
1|short desc|long desc|2001-01-01 00:00
2|short desc| long
desc |1999-03-03 23:23
3|short desc| long desc | 2011-02-02 02:02Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
Eric
Maybe you are looking for
-
How to set a specific time zone for time channel in DIADEM
Hi, I'd like to know how to autmatically set a specific time zone for time channels in DIADEM. For example, I have stored data with corresponding time channel in UTC time on a disk which was collected in another time zone. Now I want to analyze this
-
Hi Xperts, very simple, following query takes long time.......pls suggest alternative. SELECT * INTO TABLE IT_VBRK FROM VBRK WHERE ( FKDAT >= FIRST_DATE AND FKDAT <= LAST_DATE ) and VBTYP = 'M' AND FKSTO <> 'X'.
-
6 in 1 card Reader not found after installing Windows 8 - HP Pavillion Dv6
I am running a dv6874ca and after installing Windows 8 the 6 in 1 card reader no longer works - the system does not read any information. I cannot find the card reader in the device manager. Note: I am trying to view a Sony Pro Duo card which was po
-
How to use iTunes COM SDK to set Media Kind for tracks
There is no obvious function to set Media Kind of a track from iTunes COM SDK. Just curious if anyone knows how to do it programmatically?
-
CS5 Illustrator keeps crashing constantly
I use imac/ ver 10.6.7 Here is the error (can someone please help): Process: Adobe Illustrator [285] Path: /Applications/Adobe Illustrator CS5/Adobe Illustrator.app/Contents/MacOS/Adobe Illustrator Identifier: com.adobe.illust