ABAP MAPPING : Getting An Error
hi all
i am using a scenario where i am sending data from r/3(prog)>xi>R/3(RFC).
in between i am using ABAP MAPPING
i am getting an error:
ERROR: "" MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7: com.sap.aii.af.rfc.afcommunication.RfcAFWException: java.lang.StringIndexOutOfBoundsException: String index out of range: -7""
the ABAP MAPPING which i am using:
METHOD IF_MAPPING~EXECUTE.
BREAK-POINT.
* initialize iXML
TYPE-POOLS: IXML.
TYPE-POOLS: IXML.
DATA: L_IXML TYPE REF TO IF_IXML.
*creating the Interface by calling the create method in class C_IXML
CALL METHOD CL_IXML=>CREATE
EXPORTING
TYPE = 0
RECEIVING
RVAL = L_IXML.
create stream factory
DATA: STREAMFACTORY TYPE REF TO IF_IXML_STREAM_FACTORY.
CALL METHOD L_IXML->CREATE_STREAM_FACTORY
RECEIVING
RVAL = STREAMFACTORY.
create input stream
DATA: ISTREAM TYPE REF TO IF_IXML_ISTREAM.
CALL METHOD STREAMFACTORY->CREATE_ISTREAM_XSTRING
EXPORTING
STRING = SOURCE
RECEIVING
RVAL = ISTREAM.
*This iXML factory can create an empty XML document object named IDOCUMENT.
initialize input document
DATA: IDOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
CALL METHOD L_IXML->CREATE_DOCUMENT
RECEIVING
RVAL = IDOCUMENT.
parse input document
DATA: IPARSER TYPE REF TO IF_IXML_PARSER.
CALL METHOD L_IXML->CREATE_PARSER
EXPORTING
DOCUMENT = IDOCUMENT
ISTREAM = ISTREAM
STREAM_FACTORY = STREAMFACTORY
RECEIVING
RVAL = IPARSER.
IPARSER->PARSE( ).
DATA: ROOT TYPE REF TO IF_IXML_ELEMENT.
get message content of tag
DATA: INCODE TYPE REF TO IF_IXML_NODE_COLLECTION,
INCODE1 TYPE REF TO IF_IXML_NODE_COLLECTION,
INCODE2 TYPE REF TO IF_IXML_NODE_COLLECTION,
INCODE0 TYPE REF TO IF_IXML_NODE_COLLECTION.
CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
EXPORTING
DEPTH = 0
NAME = 'MANDT'
NAMESPACE = ''
RECEIVING
RVAL = INCODE0 .
CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
EXPORTING
DEPTH = 0
NAME = 'EMPNO'
NAMESPACE = ''
RECEIVING
RVAL = INCODE.
CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
EXPORTING
DEPTH = 0
NAME = 'EMPNAME'
NAMESPACE = ''
RECEIVING
RVAL = INCODE1.
CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
EXPORTING
DEPTH = 0
NAME = 'DEPARTMENTNAME'
NAMESPACE = ''
RECEIVING
RVAL = INCODE2.
DATA: URI TYPE STRING.
URI = 'urn:sap-com:document:sap:rfc:functions'.
* build up output document =============================================
create output document
DATA: ODOCUMENT TYPE REF TO IF_IXML_DOCUMENT.
CALL METHOD L_IXML->CREATE_DOCUMENT
RECEIVING
RVAL = ODOCUMENT.
DATA: RET_VALUE TYPE I.
*At this point you can add the nodes (elements, attributes) into the document. First you have to declare the root element node.
DATA: L_ELEMENT_ROOT TYPE REF TO IF_IXML_ELEMENT.
CALL METHOD ODOCUMENT->CREATE_ELEMENT_NS
EXPORTING
NAME = 'ZTEST1'
PREFIX = 'ns1'
URI = 'urn:sap-com:document:sap:rfc:functions'
RECEIVING
RVAL = L_ELEMENT_ROOT.
DATA: L_ELEMENT_NODE TYPE REF TO IF_IXML_ELEMENT.
CALL METHOD ODOCUMENT->CREATE_SIMPLE_ELEMENT
EXPORTING
NAME = 'ZTEST1'
NAMESPACE = 'xmlns ns1 urn:sap-com:document:sap:rfc:functions'
PARENT = ODOCUMENT
VALUE = '?xml version="1.0" encoding="UTF-8"?'
RECEIVING
RVAL = L_ELEMENT_ROOT.
DATA: ATTRIBUTE TYPE REF TO IF_IXML_ATTRIBUTE.
CALL METHOD ODOCUMENT->CREATE_ATTRIBUTE_NS
EXPORTING
NAME = 'ZTEST1'
PREFIX = 'xmlns'" ns1="urn:sap-com:document:sap:rfc:functions"'
URI = 'urn:sap-com:document:sap:rfc:functions'
RECEIVING
RVAL = ATTRIBUTE.
RET_VALUE = ODOCUMENT->SET_NAMESPACE_PREFIX(
PREFIX = 'ns1').
CALL METHOD ATTRIBUTE->SET_VALUE
EXPORTING
VALUE = URI
RECEIVING
RVAL = RET_VALUE.
CALL METHOD L_ELEMENT_ROOT->SET_ATTRIBUTE_NODE_NS
EXPORTING
NEW_ATTR = ATTRIBUTE
RECEIVING
RVAL = RET_VALUE.
DATA: NODE_LIST_COLLECTION TYPE REF TO IF_IXML_NODE_COLLECTION.
add node to the output document
DATA: OUTCODE0 TYPE REF TO IF_IXML_NODE.
DATA: OUTCODE TYPE REF TO IF_IXML_NODE.
DATA: OUTCODE1 TYPE REF TO IF_IXML_NODE.
DATA: OUTCODE2 TYPE REF TO IF_IXML_NODE.
DATA: INDEX1 TYPE SY-INDEX.
DATA: INDEX TYPE SY-INDEX.
DATA IRC TYPE I.
CALL METHOD IDOCUMENT->GET_ELEMENTS_BY_TAG_NAME
EXPORTING
DEPTH = 0
NAME = 'MANDT'
NAMESPACE = ''
RECEIVING
RVAL = NODE_LIST_COLLECTION.
DATA: LENGTH TYPE I.
CALL METHOD NODE_LIST_COLLECTION->GET_LENGTH
RECEIVING
RVAL = LENGTH.
WHILE INDEX < LENGTH.
CALL METHOD IDOCUMENT->CREATE_SIMPLE_ELEMENT
EXPORTING
NAME = 'DATA'
NAMESPACE = ''
PARENT = L_ELEMENT_ROOT
VALUE =
RECEIVING
RVAL = L_ELEMENT_NODE .
CALL METHOD INCODE0->GET_ITEM
EXPORTING
INDEX = INDEX
RECEIVING
RVAL = OUTCODE0.
CALL METHOD INCODE->GET_ITEM
EXPORTING
INDEX = INDEX
RECEIVING
RVAL = OUTCODE.
CALL METHOD INCODE1->GET_ITEM
EXPORTING
INDEX = INDEX
RECEIVING
RVAL = OUTCODE1.
CALL METHOD INCODE2->GET_ITEM
EXPORTING
INDEX = INDEX
RECEIVING
RVAL = OUTCODE2.
CALL METHOD L_ELEMENT_NODE->APPEND_CHILD
EXPORTING
NEW_CHILD = OUTCODE0
RECEIVING
RVAL = IRC.
CALL METHOD L_ELEMENT_NODE->APPEND_CHILD
EXPORTING
NEW_CHILD = OUTCODE
RECEIVING
RVAL = IRC.
CALL METHOD L_ELEMENT_NODE->APPEND_CHILD
EXPORTING
NEW_CHILD = OUTCODE1
RECEIVING
RVAL = IRC.
CALL METHOD L_ELEMENT_NODE->APPEND_CHILD
EXPORTING
NEW_CHILD = OUTCODE2
RECEIVING
RVAL = IRC.
ADD 1 TO INDEX.
ENDWHILE.
render document ======================================================
create output stream
DATA: OSTREAM TYPE REF TO IF_IXML_OSTREAM.
CALL METHOD STREAMFACTORY->CREATE_OSTREAM_XSTRING
EXPORTING
STRING = RESULT
RECEIVING
RVAL = OSTREAM.
DATA: IPARSER TYPE REF TO IF_IXML_PARSER.
CALL METHOD L_IXML->CREATE_PARSER
EXPORTING
DOCUMENT = ODOCUMENT
ISTREAM = ISTREAM
STREAM_FACTORY = STREAMFACTORY
RECEIVING
RVAL = IPARSER.
IPARSER->PARSE( ).
create renderer
DATA: RENDERER TYPE REF TO IF_IXML_RENDERER.
CALL METHOD L_IXML->CREATE_RENDERER
EXPORTING
DOCUMENT = ODOCUMENT
OSTREAM = OSTREAM
RECEIVING
RVAL = RENDERER.
IRC = RENDERER->RENDER( ).
ENDMETHOD.
plz help me out ASAP
thnks
kalyan
hi
all
now the situation is that i am able to send the data to R/3,
But in RWB-->MessageMonitoring ->version>Message Contents i am getting a error :
*XML Parsing Error: not well-formed
Location: http://aipid:50000/mdt/messagecontentservlet?attachment=0
Line Number 1, Column 176:*
<?xml version="1.0"?><ns1:ZTEST1 xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><DATA><MANDT>210</MANDT><EMPNO>000000000023</EMPNO><EMPNAME>C</EMPNAME></DATA></ns1:ZTEST1 xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
it is not converted into XML ,the underline is the error which it is showing.
it would be great if any one can figure it out what might be the cause of this error
thanks
kalyan
Similar Messages
-
IDOC-XI-FILE Scenario: Error in ABAP Mapping
Dear All,
I am working on IDOC-XI-Flat FIle scenario in which I am using ABAP Mapping as per document "How To Convert an IDoc-XML
structure to a flat file and vice versa in XI 3.0".
I created one customized Idoc for this. The Idoc is reacing XI but its flat file is not getting created. Its giving me following error:
<SAP:Stack>Error in mapping program Z_ABAP_MAPPING_PACKING_LIST (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference.</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
I have also gone thru threads posted for the same topic earlier but still I am not been to resolve this error.
Please help me out in resolving this error.
Regards,
N.JainHI,
Log saying that, u have problem in the mapping program.
i.e Z_ABAP_MAPPING_PACKING_LIST
the problem is due declaration of data.
i hope that, you have some methods.
those are declared under intialization section in mapping program.
please use start of selection before the method.
other wise, it will come under intilization section.
warm regards
mahesh. -
Error in ABAP Mapping (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION)
Hi ,
Scenario: Manually Purchase Order is created, automatically Sales Order should be created in the Target System through PI,
I have used Message Mapping which is working fine for single Customer and Vendor,
For Multiple Customers and Vendors i am using one ZTABLE, Only Message Mapping is not sufficient to my requirement.
Now i am using both Message Mapping and ABAP Mapping at a time in Interface Mapping. I created the class and done the development., whene i run the scenario i am getting the error as below,
*<SAP:Stack>Error in mapping program ZCL_SD_IDTO_POSO (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference</SAP:Stack>*
*<SAP:Retry>M</SAP:Retry>*
*</SAP:Error>*
Please let me know.
Best Regards
VamsiHave u seen the ABAP mapping guide?
Refer this series to the ABAP mapping section.https:///people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
It will be very handy and useful. -
ABAP Mapping for Error handling in Proxy to JDBC
Hi All,
I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
I am following the below steps,
step 1 - In message mapping a UDF is created to catch errors and store them in a variable using dynamic configuration
step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
<SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
<SAP:P2>001</SAP:P2/>
<SAP:P3>Mandatory field is missing[BUKRS] </SAP:P3>
<SAP:AdditionalText />
<SAP:Stack>No receiver could be determined</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I have written the following ABAP code to achieve this:
method IF_MAPPING~EXECUTE.
DATA l_record type mpp_dynamic.
DATA error type String.
getting dynamic configuration value
filled in by any previous mapping
CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
EXPORTING
NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
NAME = 'ERROR'
RECEIVING
RECORD = l_record.
error = l_record-value.
*raising exception with our message
RAISE EXCEPTION TYPE CX_MAPPING_FAULT
EXPORTING
TEXTID =
PREVIOUS =
ERROR_CODE = '001'
ERROR_TEXT = error .
RAISE EXCEPTION TYPE CX_MAPPING_FAULT
EXPORTING
TEXTID =
PREVIOUS =
ERROR_CODE = '003'
ERROR_TEXT = error .
endmethod.
I am gettign the following message for our code:
SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>No receiver could be determined</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Could you please help in finding the solution for getting currect error message from ABAP class?
Edited by: SwethaC on Jan 21, 2011 8:18 AMThe error is due to RFC Call fail from PI system to your ECC Application System.
Check your RFC Destination for ECC System type 3 in PI System.
When you are receiving data from ECC System using Proxies & again you are going to ECC System for Validation.
Why you are not doing this validation on ECC System only in your proxy code ?
In your proxy code, it will be much better for performance to check your data there on same system. -
Abap Mapping: error in accessing to DynamicConfiguration.
Hi All,
I have been trying to put a value into Dynamic Configuration repository with the following abap code.
DATA: l_record TYPE MPP_DYNAMIC.
l_record-namespace = 'http://name1/ca/result1'.
l_record-name = 'FileName'.
l_record-value = '/mydir/dir1/File01.xml'.
CALL METHOD dynamic_configuration->add_record
EXPORTING
record = l_record.
I receive the following dump.
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED_NO
Except. CX_SY_REF_IS_INITIAL
Date and Time 25.03.2009 11:06:10
Short text
Access using a 'ZERO' object reference is not possible.
What happened?
Error in the ABAP application program.
The current ABAP program "Z_XI_MAPPING_TEST_03==========CP" had to be
interrupted because it contains
a statement that cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was n
caught in
procedure "IF_MAPPING~EXECUTE" "(METHOD)", nor was it propagated by a R
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
An attempt was made to access a component with a 'ZERO' object
reference (points to 'nothing').
An object reference must point to an object (an instance of a class)
before it can be used to access a component.
Either the reference has not yet been set or it was set to 'ZERO' using
a CLEAR statement.
I am executing my test outside PI, by launching the report Z_MAPPING_TEST as explained in a blog.
In java evironment it is necessary to create an istance of a object for saving the value of the variable 'FileName' inside the Dynamic Configuration repository.
I do not know if it is necessary to create (before) an istance of the Dynamic Configuration in abap mapping or if the method add_record do this.
The meaning of my test is to get the name file from the Dynamic Configuration repository set in a previous step in a flow where the abap mapping will be launched.
Any suggestion will be well appreciated.
Many thanks in advance for your kind cooperation.
Regard,
GiovanniHi,
in your ABAP mapping code, instead of l_record-namespace = 'http://name1/ca/result1' use below:
l_record-namespace = 'http://sap.com/xi/XI/System'.
Then re-run your scenario.
Regards,
Rajeev Gupta -
Hi ,
i am using the following ABAP mapping program
method if_mapping~execute .
data: t_edidc type table of edi_dc40,
ls_edidc type edi_dc40,
ls_edidc_h type edi_dc40,
t_edidd type table of edi_dd40,
ls_edidd_h type edi_dd40,
ls_idx_xmb type idx_xmb,
t_result type string,
t_resultc type string,
t_resultd type string.
data: ls_idx1 type idxporsm59.
data: t_segtyp type table of edilsegtyp,
el_segtyp type edilsegtyp,
el_released type segdefrel,
el_error_text type string.
=======================
0. parse input document
=======================
initialize iXML
type-pools: ixml.
break-point.
class cl_ixml definition load.
create main factory
data: ixmlfactory type ref to if_ixml.
break-point.
ixmlfactory = cl_ixml=>create( ).
create stream factory
data: streamfactory type ref to if_ixml_stream_factory.
streamfactory = ixmlfactory->create_stream_factory( ).
create input stream
data: istream type ref to if_ixml_istream.
istream = streamfactory->create_istream_xstring( source ).
initialize input document
data: idocument type ref to if_ixml_document.
idocument = ixmlfactory->create_document( ).
parse input document
data: iparser type ref to if_ixml_parser.
iparser = ixmlfactory->create_parser( stream_factory = streamfactory
istream = istream
document = idocument ).
iparser->parse( ).
=================================================
1. get IDoc header data and connection parameters
=================================================
data: el_message_id type sxmsguid.
el_message_id = param->get( if_mapping_param=>message_id ).
data: el_element type ref to if_ixml_element.
el_element = idocument->find_from_name( 'TABNAM' ).
ls_edidc-tabnam = el_element->get_value( ).
el_element = idocument->find_from_name( 'MANDT' ).
ls_edidc-mandt = el_element->get_value( ).
el_element = idocument->find_from_name( 'DOCNUM' ).
ls_edidc-docnum = el_element->get_value( ).
el_element = idocument->find_from_name( 'STATUS' ).
ls_edidc-status = el_element->get_value( ).
el_element = idocument->find_from_name( 'OUTMOD' ).
ls_edidc-outmod = el_element->get_value( ).
el_element = idocument->find_from_name( 'TEST' ).
if not el_element is initial.
ls_edidc-test = el_element->get_value( ).
endif.
el_element = idocument->find_from_name( 'IDOCTYP' ).
ls_edidc-idoctyp = el_element->get_value( ).
el_element = idocument->find_from_name( 'CIMTYP' ).
if not el_element is initial.
ls_edidc-cimtyp = el_element->get_value( ).
endif.
el_element = idocument->find_from_name( 'MESTYP' ).
ls_edidc-mestyp = el_element->get_value( ).
el_element = idocument->find_from_name( 'STDVRS' ).
if not el_element is initial.
ls_edidc-stdvrs = el_element->get_value( ).
endif.
el_element = idocument->find_from_name( 'STD' ).
if not el_element is initial.
ls_edidc-std = el_element->get_value( ).
endif.
el_element = idocument->find_from_name( 'STDMES' ).
ls_edidc-stdmes = el_element->get_value( ).
el_element = idocument->find_from_name( 'SNDPOR' ).
ls_edidc-sndpor = el_element->get_value( ).
el_element = idocument->find_from_name( 'SNDPRT' ).
ls_edidc-sndprt = el_element->get_value( ).
el_element = idocument->find_from_name( 'SNDPRN' ).
ls_edidc-sndprn = el_element->get_value( ).
el_element = idocument->find_from_name( 'RCVPOR' ).
ls_edidc-rcvpor = el_element->get_value( ).
el_element = idocument->find_from_name( 'RCVPRT' ).
ls_edidc-rcvprt = el_element->get_value( ).
el_element = idocument->find_from_name( 'RCVPRN' ).
ls_edidc-rcvprn = el_element->get_value( ).
el_element = idocument->find_from_name( 'CREDAT' ).
ls_edidc-credat = el_element->get_value( ).
el_element = idocument->find_from_name( 'CRETIM' ).
ls_edidc-cretim = el_element->get_value( ).
el_element = idocument->find_from_name( 'SERIAL' ).
ls_edidc-serial = el_element->get_value( ).
ls_edidc-direct = '2'.
move-corresponding ls_edidc to ls_idx_xmb.
Connection data to application system to get IDoc metadata
select single * from idxporsm59 into ls_idx1
where port = ls_edidc-sndpor
and client = ls_edidc-mandt.
ls_idx_xmb-port = ls_edidc-sndpor.
ls_idx_xmb-rfcdest = 'NONE'. "not necessary
Get DOCREL and SAPREL
el_element = idocument->find_from_name( 'DOCREL' ).
if not el_element is initial.
ls_edidc-docrel = el_element->get_value( ).
else.
select segtyp into table t_segtyp from idxidocsyn
where port = ls_edidc-sndpor
and idoctyp = ls_edidc-idoctyp
and cimtyp = ls_edidc-cimtyp.
loop at t_segtyp into el_segtyp.
select released into el_released from idxedisdef
where port = ls_edidc-sndpor
and segtyp = el_segtyp
and actrelease = 'X'.
endselect.
if el_released gt ls_edidc-docrel.
ls_edidc-docrel = el_released.
endif.
endloop.
endif.
======================================
2. convert XML to IDoc table structure
======================================
break-point.
call function 'IDX_XML_TO_IDOC'
exporting
xml_data = source
guid = el_message_id
edidc40 = ls_edidc
idx_xmb = ls_idx_xmb
typ_def = 'X'
tables
idoc_control_40 = t_edidc
idoc_data_40 = t_edidd
exceptions
unknown_xml = 1
customizing_error = 2
no_data_found = 3
syntax_error = 4
others = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
To keep the original DOCNUM uncomment the following 8 lines of coding
Otherwise a new DOCNUM will be created
LOOP AT t_edidc into ls_edidc_h.
ls_edidc_h-DOCNUM = ls_edidc-DOCNUM.
modify t_edidc from ls_edidc_h.
ENDLOOP.
LOOP AT t_edidd into ls_edidd_h.
ls_edidd_h-DOCNUM = ls_edidc-DOCNUM.
modify t_edidd from ls_edidd_h.
ENDLOOP.
=========================================
3. convert IDoc table structure to string
=========================================
call function 'ZSOTR_SERV_TABLE_TO_STRING'
EXPORTING
FLAG_NO_LINE_BREAKS = ' '
LINE_LENGTH = 0
LANGU = SY-LANGU
importing
text = t_resultc
tables
text_tab = t_edidc.
convert IDoc table structure to string
call function 'ZSOTR_SERV_TABLE_TO_STRING'
EXPORTING
FLAG_NO_LINE_BREAKS = ' '
LINE_LENGTH = 0
LANGU = SY-LANGU
importing
text = t_resultd
tables
text_tab = t_edidd.
concatenate t_resultc t_resultd into t_result.
convert string to xstring
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = t_result
MIMETYPE = ' '
ENCODING =
importing
buffer = result.
EXCEPTIONS
FAILED = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmethod.
<b> i am getting the following parse error in FM IDX_XML_TO_IDOC :
" unexpected symbol; expected '<', '</', entity reference, character data, CDATA section, processing instruction or comment "
can anybody help
points will be given
Regards</b>HI,
is it possible that you have to use "-" instead of "=" in this [ixmlfactory = cl_ixml=>create( ).] line ?
regards,
gordon -
Hi,
My system is running on XI 3.0 SP9, I am using abap mapping for conversion idoc xml structure to flat file structure. But I am getting the error as shown below.
Appreciate for your response.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">APPLICATION_PROGRAM_ERROR</SAP:Code>
<SAP:P1>ZCL_ABAP_MAPPING4X</SAP:P1>
<SAP:P2>R3_ABAP</SAP:P2>
<SAP:P3>UNCAUGHT_EXCEPTION</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error in mapping program ZCL_ABAP_MAPPING4X (type R3_ABAP, kernel error ID UNCAUGHT_EXCEPTION)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Regardsm
Mallikarjun.MHave u seen the ABAP mapping guide?
Refer this series to the ABAP mapping section.https:///people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
It will be very handy and useful. -
Abap mapping - Error in Control Framework
Hi Gurus,
Scenario: IDOC - -- XI -
Http (post)
i am using ABAP mapping for IDOC to XML. I am able to test it using sxi_mapping_test which gives me output XML. But, when i test the scenario from RWB, it fails with "SYSFAIL" error in inbound queue as per moni.
error - "Error in Control Framework".
Looks like it did not even go to message mapping pipeline step.
Please help.
Thank you,
mkHI,
Hope you have done all the necessary pre-requisites for ABAP mapping
This may help u- http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
just cross verify with this guide-
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
Please also try to debug as follows...
put a break point inside your class/method....
goto tcode SXI_MAPPING_TEST....give in the configuation details of your scenario...and when you execute, give the IDOC-XML, copy it from SXMB_MONI where you are getting the error....
when you execute, it shoudl stop at the break point that you had set in your class....continue debugging using 'F6' function key, and check where you are hitting this error...
The chances are that the FM that converts IDOC-XML to flat file format might not have been executed correctly...
Thanks
Swarup -
Error the class for ABAP mapping doesnt exist
hi PI gurus,
i faced a probleme when i was trying to call a second Mapping which type is ABAp after another one which type is Message Mapping, why i m doing that because i was trying to folow the step by step of michal :
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID0279207250DB01347930475897169967End?blog=/pub/wlg/6398
but the problem is i get the error that the class doesnt exist but i m sure that the class exist and i cheked in se24.
do you have any idea ????
<SAP:Stack>Error in mapping program Z_ABAP_MAPPING_EXCEPTION_RS (type SAP-ABAP, kernel error ID CREATE_OBJECT_CLASS_NOT_FOUND) The object could not be created: The class Z_ABAP_MAPPING_EXCEPTION_RS does not exist.</SAP:Stack>
thanx.Check this thread
[Re: SOP Confituration- Maintain Copy Profiles version A00 not maintained |SOP Confituration- Maintain Copy Profiles version A00 not maintained;
thanks
G. Lakshmipathi -
ABAP Mapping Programm error Urgent
I am getting mapping error in ABAP Mapping programm. plz help me how to solve
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--
Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">APPLICATION_PROGRAM_ERROR</SAP:Code>
<SAP:P1>Z_HBS_PAYROLL_MAPPING</SAP:P1>
<SAP:P2>SAP-ABAP</SAP:P2>
<SAP:P3>UNCAUGHT_EXCEPTION</SAP:P3>
<SAP:P4>Program Z_HBS_PAYROLL_MAPPING=========CP Include Z_HBS_PAYROLL_MAPPING=========CM001 Line 1</SAP:P4>
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error in mapping program Z_HBS_PAYROLL_MAPPING (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>Hi,
I think this exception you need to catch it in the ABAP..
This may help u- http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
just cross verify with this guide-
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
Regards,
moorthy -
I followied the how to guids "How To convert an IDoc-XML structure to a flat file and vice versa in XI 3.0" and "How to Use ABAP-Mapping in XI 3.0".
After I built created the ABAP-OO class Z_ABAP_MAPPING_IDOC_TO_FLAT and implemented every thing, during the testing, I got the error "Exception CX_SY_NO_HANDLER triggered, An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handl".
Please help.
Thanks!Please debug as follows...
put a break point inside your class/method....
goto tcode SXI_MAPPING_TEST....give in the configuation details of your scenario...and when you execute, give the IDOC-XML, copy it from SXMB_MONI where you are getting the error....
when you execute, it shoudl stop at the break point that you had set in your class....continue debugging using 'F6' function key, and check where you are hitting this error...
The chances are that the FM that converts IDOC-XML to flat file format might not have been executed correctly...
Thanks. -
Getting an error when i am execution a BI query using ABAP.
Hi Expert,
I am getting an error when i am execution a BI query using ABAP. Its Giving me this Error "The Info Provider properties for GHRGPDM12 are not the same as the system default" and in the error analysis it saying as bellow.
Property Data Integrity has been set differently to the system default.
Current setting: 0 for GHRGPDM12
System default: u2019 7 u2018
As I am very new to BI and have very limited knowledge, so I am not able to understand this problem. Can any one help me to resolving this issue. Previously it as working fine, I am getting this error last 2 days.
when i am debugging , I am getting error from
create instance of cl_rsr_request
CREATE OBJECT r_request
EXPORTING
i_genuniid = p_genuniid.
this FM. Its not able to create the object. Can any one please help me out.
Thanks in advance.
Regards
SatrajitHi,
I am able to solve this problem
Regards
Satrajit -
In message mapping testing i'm getting this Error
hi,
in message mapping testing i'm getting this error.. can u plz explain what is this error.. and how can i solve this error..
12:27:47 Start of test
Source code has syntax error: D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:72: illegal start of expression </textarea> ^ D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:73: ';' expected } ^ 2 errors Source code has syntax error: D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:72: illegal start of expression </textarea> ^ D:/usr/sap/XID/DVEBMGS10/j2ee/cluster/server0/./temp/classpath_resolver/Mapf3292850763411dcbfab0013726698e1/source/com/sap/xi/tf/_TRNG_TEST_4_IM_RECEIVERS_.java:73: ';' expected } ^ 2 errors
12:27:48 End of test
thanks
BabuBABU,
In your message mapping correct the UDF code.
There is a problem in your textarea and you have missed to place semi colon ";".
Regards,
Sarvesh -
Error text missing in raising exception (In ABAP mapping)
Hi,
iam using ABAP Mapping for 1 interface.
Based on some condition i am raising exception with error text. When i executed this in SXI_Mapping_test it's showing the Error text. But when i execute the interface directly error text is missing in the Error details.
can any one figure out y its not coming..
regards
KishoreHi,
I think you need to write the error to mapping trace.
http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
Regards
Vijaya -
How to get ABAP mapping option in Interface Mapping
Hi
experts
How to get ABAP mapping option in Interface Mapping . i need to do abap mapping . i didnt find the option
plz help meHi,
If u2018ABAP-classu2019 and u2018XSL(ABAP ENGINE)u2019 does not appear under the u2018Mapping Program Typeu2019 in Interface Mapping, one has to make an additional entry in the Exchange Profile.
Only a user with the J2EE security role (administrator) can make the following settings in the Exchange Profile.
It is achieved in the following manner:
1) Open http://<host>:<port>/exchangeProfile/index.html
2)Choose IntegrationBuilder ->IntegrationBuilder.Repository -> com.sap.aii.repository.mapping.additionaltypes
Add: R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine)
To check whether the data has been successfully read from the exchange profile:
1- Open http://<host>:<port>/rep/support/admin/index.html
2- Choose Administration of Properties -> All Properties
3- If the value associated to parameter com.sap.aii.repository.mapping.additionaltypes is not visible, press REFRESH button
After doing above check in IR, if still don't find the option for ABAP mapping then refresh the cache.
Award points if useful.
Maybe you are looking for
-
Safari won't open and I can't update my OS
Date/Time: 2007-04-28 16:33:33.684 -0400 OS Version: 10.4.8 (Build 8L127) Report Version: 4 Command: Safari Path: /Applications/Safari.app/Contents/MacOS/Safari Parent: WindowServer [60] Version: 2.0.4 (419.3) Build Version: 1 Project Name: WebBrowse
-
see question
-
Copy/paste - how to assign a track? how to chose insert vs. overwrite?
i don't know how to choose the tracks on which i to paste a clip on the timeline. i seem to have no control on which track gets the clip... it is usually the first track but not always, and i don't know how to make it paste the clip on a different tr
-
Need to write query results to .xls file
Hi All, My requirement is ,when i run a query from sqlplus the results should be copied to a excel sheet.But i am not able to generate the file in the correct format.Could some body please help on this.. Thanks in advance Thanks [email protected]
-
Drilldown on Query not working for Transactions(SQ01--Report Assignments)
Hi ! I created for deliveries and through SQ01 -- Report assignment I added two transactions VL03n And VA03. When I execute the query and double click on the delievery number it takes me to the particular delivery clicked on in VL03n, but when I clci