Error in FM tables parameters type.
Hi,
I am creating a BAPI FM with the tables parameters with a parameter as
i_ydrseg type MMCR_DRSEG.
This is similar to the type as defined in the FM MRM_INVOICE_READ as
T_DRSEG TYPE MMCR_TDRSEG.
I have declared the MMCR as types pools in the function group TOP include of the new BAPI. But still i get the error as " Type MMCR_DRSEG is unknown " .
How do i create a table parameter of the type as above ?
Pls help with your ideas.
Thanks,
Stock
Hi again,
1. just to make sure whether MMCR_DRSEG
is working fine or not,
and also the type pools is working fine in top include or not.
2. do not use the parameter in import/export/tables parameter.
3. Instead, for testing purpose,
4. declare this in the source code of the FM,
and check whehter it is giving error not.
regards,
amit m.
Similar Messages
-
Function moudule error - table parameters obsolete
Subject changed by moderator. Please use a meaningful subject in future
Hi SAP-ABAP experts,
can i get get the information for the following error.
when i was giving *structure* name in tables parameter and gave the 'TYPE' as type in function module screen i was getting the error like this,
TABLES parameters are obsolete.
in 4.7e the function module got activated but in ecc 6.0 i am getting the error like that. can u please clarify the issue
will the type declaration be chaged according to versions of SAP ABAP.
Thanks,
Kavitha.P
Edited by: Matt on Nov 26, 2008 8:09 AM1. Create a structure in SE11, this will include all the fields you want.
2. Create a Table type in SE11, referring the above structure as the row type.
3. Now, when you use this table type you would need to have a work area to process the data of the table. So, in the program declare a variable with ref to the structure created in Step 1.
Then you can use
LOOP AT T_ITAB INTO WA_ITAB.
ENDLOOP.
where T_ITAB is referring to table type and WA_ITAB is referring to structure.
Thanks
Saurabh -
Syntax Error with Table Parameter (type: ANY) when Creating Function Module
Hello experts,
I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."
Could anyone tell me what the wrong is? And how can I fix it?
Thanks,
ShelwinHi,
For table parameters, you can only pass
MSG_TABLE_ITM TYPE STANDARD TABLE
or
MSG_TABLE_ITM ( don't fill other columns TYPING ASSOCIATED TYPE ).
For reference check FM 'GUI_UPLOAD' - Table parameters
Regards,
DPM -
Reg: PLS-00418: array bind type must match PL/SQL table row type error
I am trying to access a table of records through JDBC OracleCallableStatement. I am able to do it fine for all mappings except for the ones below
TYPE CAT_CD_TYPE IS TABLE OF A.B %TYPE INDEX BY BINARY_INTEGER;
TYPE ORG_CD_TYPE IS TABLE OF C.D %TYPE INDEX BY BINARY_INTEGER;
Column B is CHAR(1) and Column D is CHAR(2). I am trying to register the out parameters of Oraclecallablestatement as
cstmt.registerIndexTableOutParameter(2, 2000, OracleTypes.CHAR, 0);
cstmt.registerIndexTableOutParameter(3, 2000, OracleTypes.CHAR, 0);
All the other mappings work fine. These two fail with the error
SQLException in invokeDBPackage() : ORA-06550: line 1, column 32:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 35:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I tried other OracleTypes mappings too but no luck so far.
Any advice on this would be greatly appreciated.Hi,
I'm not sure it's reasonable to expect someone to sift through that much stuff.
Which parameter is it having a problem with?
Can you modify the following to reproduce the behavior?
Thanks
Greg
create package mypack5 as
TYPE v2array is table of emp.ename%type index by BINARY_INTEGER;
PROCEDURE test_it(thearray IN v2array, numrecs out number);
END;
CREATE or replace PACKAGE BODY MYPACK5 AS
PROCEDURE test_it(thearray IN v2array, numrecs out number)
IS
begin
numrecs := thearray.count;
END;
END;
using System;
using System.Data;
using Oracle.DataAccess.Client;
public class indexby
public static void Main()
OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
con.Open();
OracleCommand cmd = new OracleCommand("mypack5.test_it", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Varchar2);
Param1.Direction = ParameterDirection.Input;
Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
Param1.Size = 3;
string[] vals = { "foo", "bar", "baz" };
Param1.Value = vals;
OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output);
cmd.ExecuteNonQuery();
Console.WriteLine("{0} records passed in", Param2.Value);
con.Close();
} -
Guyz,
Firstly despite the plant+storage location + warehouse no. assignments are done , my replenishment delivery (delivery for stock transport order between plants under same company code) is not picking up storage location and warehouse no and thus stopping me from doing picking and PGI (post goods issue).
However in VL02N when i'm trying to change storage location for line item, i'm getting following weird error
*Error while determining ref.mov.type for WM via Table 156S: 647/ / / /L/ /*
I found a SAP Note(133223) regarding this error and VL02 transaction but that note was specific to older versions. I'm on ECC 6.0
Any suggestions please ?
ThanksWarehouse managment has its own movement types, most identical to inventory management movement types.
These WM movement types are determined via reference movement types.
the error you have just looks like your customizing is not complete.
IMG > LE > WM > Interfaces > IM > define movement types. -
Error messag -'Error while determining ref.mov.type for WM via Table 156S:'
Hi Guys,
I am currently facing some issues with respect to the deliver creation.
The scenario is somthing like this.
I have assigned a FOC Item category to an Consignment Issue order type.
The system is able to determine the Item category successfully.
However when the delivery is created it throws an error message
'Error while determining ref.mov.type for WM via Table 156S: 903/X/X/W/L/X/'
Not sure why this occurs.
All the settings seem to be set.
If any one of you can help me out it would be great.
Thanks.
Regards,
PandiDear Pandiraj
The standard process is that consignment issue order should be created with reference to Proforma invoice. Having said that I dont understand why you have assigned a FOC item category to issue order. Not sure, whether this will work. Also I feel that you should explain in detail the process for which you are configuring this.
thanks
G. Lakshmipathi -
Error while determining ref.mov.type for WM via table 156S:601///
Hi SAP gurus
while doing delivery i am getting error like
Error while determining ref.mov.type for WM via table 156S:601///
please give me needful solution
regards
SarveshChk via
SPRO>LE>WM>Interfaces>IM>Define mvt>Assign MVt reference...and then LE-WM interface...
maintina the correspoding entries..
BR,
Krishna -
Associated table type of the Table parameters in function module
Hi,
If I want to select all the associated table types of the Table parameters used in a given function module in a report, how can that be done ?
Thanks.
Regards,
RajeshTry this.
report zrich_0001 .
data: import type table of rsimp with header line,
change type table of rscha with header line,
export type table of rsexp with header line,
tables type table of rstbl with header line,
except type table of rsexc with header line,
docume type table of rsfdo with header line,
source type table of rssource with header line.
parameters: p_func type rs38l-name.
call function 'RPY_FUNCTIONMODULE_READ'
exporting
functionname = p_func
tables
import_parameter = import
changing_parameter = change
export_parameter = export
tables_parameter = tables
exception_list = except
documentation = docume
source = source
exceptions
error_message = 1
function_not_found = 2
invalid_name = 3
others = 4.
loop at tables.
write:/ tables-parameter,
tables-dbstruct,
tables-types,
tables-optional,
tables-typ,
tables-class,
tables-ref_class,
tables-line_of,
tables-table_of.
endloop.
Regards,
Rich Heilman -
Are Data Table parameters an outdated data type?
In trying to establish "best practises" for coding PL/SQL stored procedures that will be called by .Net applications, I am considering the fact that the Data Table parameter type is intentionally not supported by some .Net Data providers and wondering whether this is a significant shortcoming. The best indicator I can think of is to get a feel for whether or not Data Table parameter types are a current recommended practise or an old practise that has been superceeded by something better. Can anyone provide any information about this?
Well, I have a found a program that does it, at least with the table I have, it is: "PDF Plain Text Extractor V4.0" Y ou can find it here:
http://www.retsinasoftware.com
It runs about $59, using the demo version I was able to convert the first page of my data into a format that Access could read. -
Problem with SP with table parameters
Hello, I have problem with stored procedure with paramater which is table type.
I have defined my own type
CREATE OR REPLACE TYPE STRING_LST AS TABLE OF VARCHAR2(80);
and i have stored procedure like this
PROCEDURE probe(outList OUT STRING_LST) IS BEGIN outList := STRING_LST(); outList.EXTEND(); outList(outList.LAST) := 'ONE'; outList.EXTEND(); outList(outList.LAST) := 'TWO'; outList.EXTEND(); outList(outList.LAST) := 'THREE'; END probe;
I have java class which connects to the database and calls this procedure
package mypackage; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Types; import java.sql.Array; public class DAO_Test { public static String toNormalString (String aa) { if (aa != null && aa.startsWith("0x")) { StringBuffer str = new StringBuffer(64); for (int i = 2; i < aa.length(); i += 2) { str.append((char) Integer.parseInt(aa.substring(i, i + 2), 16)); } return str.toString(); } else { return aa; } } public void probe ( ) { try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection("dbc:oracle:thin:@server_ip:database_name", "sa", "blahblah"); String sql = "{ CALL PROBE(?) }"; String sqlType = "STRING_LST"; CallableStatement cs = conn.prepareCall(sql); cs.registerOutParameter(1, Types.ARRAY, sqlType); cs.execute(); Array arr = cs.getArray(1); String[] values = (String[]) arr.getArray(); for (int i = 0; i < values.length; i++) { System.out.println("" + i + ": '" + toNormalString(values) + "'");
cs.close();
conn.close();
} catch (SQLException e) {
logger.error("SQLException", e);
} catch (Exception e) {
logger.error("Exception", e);
public static void main (String args[]) throws SQLException {
DAO_Test test = new DAO_Test();
test.probe();
Now...
When I run this class on my local machine the result is OK nad looks like
1: 'ONE'
2: 'TWO'
3: 'THREE'
But when I copy this class on the server and run it, the result is wrong
1: '???'
2: '???'
3: '???'
Here is my environment:
on local machine
eclipse 3.3.1
java 1.5 (java version compiler in eclipse is 1.4)
on server
oracle 9.2.0.6.0
java 1.4.2_08
Result from table parameters are always 3 question marks :|
What is the problem?
RafałHI,
I think i found the solution: nls_charset12.jar from page
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
I have copied this jar to server lib directory and it works fine :) -
External Table error: KUP-04043: table column not found in external source
I am trying to get the syntaxc correct for an external table.
I keep getting this error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04043: table column not found in external source: SITE
29913. 00000 - "error in executing %s callout"
*Cause: The execution of the specified callout caused an error.
*Action: Examine the error messages take appropriate action.
Data looks like: (some of one of many files, where the character field widths are variable)
ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
External table def I have:
CREATE TABLE MY_INPUT (
FIRST_CODE VARCHAR2(10),
SECOND_CODE VARCHAR2(20),
MY_NUMBER VARCHAR2(20),
THIRD_CODE VARCHAR2(20),
YEARMO VARCHAR2(6),
N NUMBER,
MEAN NUMBER,
SD NUMBER
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY INPUT_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY newline
BADFILE INPUT_LOGDIR:'bad.bad'
LOGFILE INPUT_LOGDIR:'log.log'
DISCARDFILE INPUT_LOGDIR:'discards.log'
fields terminated by ',' LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
( THIRD_CODE,N,MEAN,SD) )
LOCATION ( 'myfile.rpt')
NOPARALLEL
REJECT LIMIT UNLIMITED;
I have the directories INPUT_DIR and INPUT_LOGDIR defined, and read/write access granted to the user who creates the table and tried to query from it.
I have tried various combinations of VARCHAR2 lengths and NUMBER vs VARCHAR2 for some of the numeric fields.
I am not getting any Bad, Log or Discard files.
I can do a GET from the SQL prompt, and see the data:
SQL> GET 'C:\temp\input_dir'myfile.rpt'
and I see the data.
Windows 7
Oracle 11.2
I am not positive of the newline record delimiter - these files are generated by an automated system. Probably generated on a UNIX machine.
Any suggestions on what to try would be helpful.
KUP-04043 error message says to check the syntax .. .I am running out of thigns to check.
Thank you - KarenAnd the get ( I created the sanitized file, so we have a real working, failing, santiized example):
SQL> get c:\Inputfiles\myfile.rpt
1 ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
2 ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
3 ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
4 ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
5* ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
So the full series is:
CREATE DIRECTORY INPUT_DIR AS 'C:\InputFiles';
-- grant READ and WRITE
GRANT READ ON DIRECTORY INPUT_DIR TO ILQC;
GRANT WRITE ON DIRECTORY INPUT_DIR TO ILQC;
-- As SYS, create the bad/log/discard directory:
CREATE DIRECTORY LOGDIR AS 'C:\InputFiles\Logs';
-- grant READ and WRITE
GRANT READ ON DIRECTORY LOGDIR TO ILQC;
GRANT WRITE ON DIRECTORY LOGDIR TO ILQC;
CREATE TABLE MY_INPUT (
FIRST_CODE VARCHAR2(10),
SECOND_CODE VARCHAR2(20),
MY_NUMBER VARCHAR2(20),
THIRD_CODE VARCHAR2(20),
YEARMO VARCHAR2(6),
N NUMBER,
MEAN NUMBER,
SD NUMBER
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY INPUT_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY newline
BADFILE INPUT_LOGDIR:'bad.bad'
LOGFILE INPUT_LOGDIR:'log.log'
DISCARDFILE INPUT_LOGDIR:'discards.log'
fields terminated by ',' LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
( THIRD_CODE,N,MEAN,SD) )
LOCATION ( 'myfile.rpt')
NOPARALLEL
REJECT LIMIT UNLIMITED;
SELECT * FROM my_input;
and GET is as above. -
New in NW04s: FL069 TABLES parameters are obsolete (in function modules)
Can somebody explain what is the fundamental reason for this behaviour in NW04s?
In Netweaver 2004s system (like ERP2005 ) you get a warning message in SE37:
FL069 TABLES parameters are obsolete! when defining quite ordinary tables parameter using LIKE and reference to a structure in ddic.
I now speak normal function modules, not RFC enabled.
This example of tables parameter definition will cause the warning message:
return LIKE BAPIRET2
I of course looked the additional help provided by this message FL069. I understood it as following:
you should stop using TABLES parameter and more often use CHANGING parameter by referring a TABLE TYPE defined in dictionary.
if using CHANGING parameter and still want to pass the header line of your internal table you should use a separate parameter (EXPORT or CHANGING parameter)
Developers have too much used TABLES parameters for passing internal tables for reading (by value) rather than to be modified (by reference). As a consequence, fm could have change the header line without caller to know it.
in my opinion the message help is missleadingly telling that header line is no longer passed to function module if TABLES parameter is used. I made a small test program and fm (with TABLES paramerer), and everything worked as before.
The warning message can be ignored by pressing Enter a few times and your fm with TABLES parameter works as it had in older versions of Netweaver.
SAP is still using a lot of TABLES parameters in their own function modules. For example SD_SALES_HEADER_MAINTAIN.
So what is the point of this warning message while everything still works as it used to be and SAP uses this same "OBSOLETE" feature itself? Is there anything more fundamental behind this message? Like TABLES paremeters will no longer work in future versions of ABAP (or header line passing will be ignored in future versions) and therefore developers should switch to CHANGING/EXPORT parameters with TABLE TYPES as soon as possible??
Please understand that I don't need any assistance how to avoid this message, just interested to share your opinions what is the purpose of this warning message.
That is why I did not marked this thread as a question.
Br: KimmoHello,
This is the view under Tables tab in my function builder:
I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT
I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS
E_T_DATA LIKE SFLIGHT (which I change to YBWxxxx)
The moment I change to YBWxxxxx it gives me that error '"TABLES parameters are obsolete! "'
and unfortunately hitting enter several times is not helping either
Thanks! -
PLS-00418: array bind type must match PL/SQL table row type
If a PL/SQL table is indexed by CHAR and is a parameter
in a Stored Program, we are not able to call the stored
program from the Java code.
We get the following error code.
java.sql.SQLException: ORA-06550: line 1, column 62:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
But if we change the CHAR into VARCHAR2 then it works.
We are using Oracle9i Enterprise Edition Release 9.2.0.5.0 -64bit Production ,
JServer Release 9.2.0.5.0 - Production
and JDK1.4.
Thanks
Push..Hi,
I'm not sure it's reasonable to expect someone to sift through that much stuff.
Which parameter is it having a problem with?
Can you modify the following to reproduce the behavior?
Thanks
Greg
create package mypack5 as
TYPE v2array is table of emp.ename%type index by BINARY_INTEGER;
PROCEDURE test_it(thearray IN v2array, numrecs out number);
END;
CREATE or replace PACKAGE BODY MYPACK5 AS
PROCEDURE test_it(thearray IN v2array, numrecs out number)
IS
begin
numrecs := thearray.count;
END;
END;
using System;
using System.Data;
using Oracle.DataAccess.Client;
public class indexby
public static void Main()
OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
con.Open();
OracleCommand cmd = new OracleCommand("mypack5.test_it", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Varchar2);
Param1.Direction = ParameterDirection.Input;
Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
Param1.Size = 3;
string[] vals = { "foo", "bar", "baz" };
Param1.Value = vals;
OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output);
cmd.ExecuteNonQuery();
Console.WriteLine("{0} records passed in", Param2.Value);
con.Close();
} -
Table parameter Types for this Function module
I am using K_HIERARCHY_TABLES_READ to get the profit centers for a given profit center group.
I have the following declarations for the parameters of this FM:
TYPE-POOLS: gseth.
Declarations for Profit Center Group
DATA: g_pcgrp TYPE rgsbs-class,
g_setid TYPE rgsbs-setnr,
g_info TYPE grphinfo,
g_overwrite TYPE sy-datar.
DATA:
i_nodes TYPE STANDARD TABLE OF gseth_node_tab,
i_values TYPE STANDARD TABLE OF gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline.
When this is run, its taking me into a dump and it says:
The reason for the exception is:
The system tried to pass internal table "I_NODES" to the formal
parameter "T_NODES", but a type conflict occurred between the
formal and the actual parameter.
Pl help me to correct this dump and error.
Thanks
KiranDATA:
i_nodes TYPE STANDARD TABLE OF gseth_node_tab,
i_values TYPE STANDARD TABLE OF gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline.
change your declarations
to the below...
DATA:
i_nodes TYPE gseth_node_tab,
i_values TYPE gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline. -
Function Module TABLES parameters
Hi All,
I want to pass my internal table to a function module but when I try to access the componenbts of the table it is giving me syntax error. Is it required that I should create DDIC structure for this? Is there any other option?
I have declared the internal table using types. And in function module tables parameters just declared internal table.
Regards,
DilipHi
In the function
Say import parameter is TAB ( with no type definition )
From program you pass an internal table ITAB .
You don't need to define TAB in your function.
In the code you can diretcly use
LOOP AT TAB.
ENDLOOP.
( At runtime TAB will take the structure of ITAB from program )
Cheers
Maybe you are looking for
-
Hi all, We have a concern regarding the user source to be selected at UME level. At CUP level you can also set the user source for user details. Our questions here: 1) Is there any relationship between such user source configuration? 2) Which is the
-
Music distorted after creating disk image of iDVD file
I was getting encoding errors so I saved the DVD file as a disk image and then used Disk Utility to burn it. Everything worked except for the video is small and the music sounds like it's being over amplified to the point of distortion. If you have s
-
AIR-SAP1602I After convert to LAP, No radio interface
Hello, Our AIR-SAP1602I is running ap1g2-k9w7-tar.152-4.JB6.tar and working normally. Now, we covert AIR-SAP1602I from autonomous to lightweight which is running ap1g2-rcvk9w8-tar.152-4.JB6.tar to join C3850. (It will be joined then not-joined repea
-
My CC installed in a foreign language (not english).
Help. When I download CC from the internet -- it did so in a foreign language. What do I do?
-
Problem Viewing HTML coded website in design view
Hello, I've got a functional website I coded (using an html text editor) for a customer some time back that he wants to be able to edit. He doesn't know code, so we got Dreamweaver. The problem is, a lot of page elements simply won't show up in the D