cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI -> RFC to JDBC ( error in moni )

sharprabs
Participant
0 Kudos

A small query. In the same RFC to JDBC scenario its working fine in Development server.

In Quality server this is giving an error in date format.


Format in RFC is structure Dats . Tried all transformation in date still working in development not in quality.

Checked  all date format related setting in ECC also,

<?xml version="1.0" encoding="UTF-8"?><rfc:ZBAPI_MM_GRR xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><BAPI_INPUT><SDATE>2014-01-01</SDATE><EDATE>0000-00-00</EDATE></BAPI_INPUT><RETURNMESSAGES></RETURNMESSAGES><XT_DISP><item><MBLNR>5004791288</MBLNR><EBELN>0000202087</EBELN><LIFNR>523   0000</LIFNR><XBLNR>864320130707BRAK</XBLNR><MATNR>PRING.PNO.06030960</MATNR><BUDAT>&#00;&#00;&#02;&#00;-&#12;&#00;-&#00;&#00;</BUDAT><MAKTX>D020226</MAKTX><QTYAD>0</QTYAD><QTYRC>0</QTYRC><QTYAC>0</QTYAC><QTYRJ>0</QTYRJ><MEINS></MEINS><WERKS></WERKS><LGORT></LGORT><REASON></REASON><S_FLAG></S_FLAG><ZEILE>0000</ZEILE></item><item><MBLNR>5004791288</MBLNR><EBELN>0000202087</EBELN><LIFNR>523   0000</LIFNR><XBLNR>3965201307070301</XBLNR><MATNR></MATNR><BUDAT>&#00;&#00;&#06;&#00;-&#12;&#00;-


&#00;&#00;&#02;&#00;-&#12;&#00;-&#00;&#00

- Date format is working wrongly. no conversion done here. Its working fine in development.



 


Regards



Sharada

Accepted Solutions (0)

Answers (5)

Answers (5)

sharprabs
Participant
0 Kudos

Had no choice so created using sproxy (changed the scenario) and solved this issue .

Updated jdbc created without RFC  and created inbound proxy.

raviteja_satuluri
Contributor
0 Kudos

Hi,

Check Your Input Data field size

You Should check if the it is greater than >9(dd-mm-yyyy) based on your date format

Just check for the length before the transform function.

i.e. If the length is > then do the transformation else send the blank value..

you can use the below logic before transformation

input --> map with default blank --> equals (blank) --> Not -> If without else --> map the input field and perform date transformation after then.

Regards,

Ravi

sharprabs
Participant
0 Kudos

Friends,

In sxmb_moni there a red flag and it says "Mapping general error" (Why only in quality!!!!)

Runtime exception occurred during application

mapping

com/sap/xi/tf/_View***~

com.sap.aii.utilxi.misc.api.BaseRuntimeException:C

haracter reference "&#00" is an invalid XML.

Manual transfer of  RFC not possible to Quality suman.

Cache refresh done yesterday ravi.

Regards

Sharada

raviteja_satuluri
Contributor
0 Kudos

Hi,

Ok Re Transport the IR Objects from Dev to Quality

Mapping Errors in General Occurs if any Mandatory fields does not Map with Target field.

But In Your Case it is Ok in Dev

So Do Re Transport Mapping Objects from Dev to Quality

And again Do Cache Refresh

I Hope then It will Works

Regards,

Ravi

iaki_vila
Active Contributor
0 Kudos

Hi Sharada,

Are getting the same XML in quality than i development environment?, the error seems to be in an illegal character, then  it's possible that you are getting a character that you don't retrieve in development. Have you installed the same languages in the two places?, is your system set as unicode?

Hope this helps.

Regards.

sharprabs
Participant
0 Kudos

Actually I tested the same in Development in Message mapping here also

the error comes as

       java.text.ParseException: Unparseable date: ""
It seems to be fishy but how come its working fine in development with all values and dates
in correct format.
Regards
Sharada
     


   

sharprabs
Participant
0 Kudos

Language and unicode  are set  .

raviteja_satuluri
Contributor
0 Kudos

Hi

Use the following UDF

public String convertDateTimeToUTC(String strDate, Container container) throws StreamTransformationException{

AbstractTrace trace = container.getTrace();

Date date=null;

SimpleDateFormat sdfSource = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");

try{

String dt = strDate;

date = sdfSource.parse(dt);

trace.addInfo("Local Date:"+date);

SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

strDate = sdfDestination.format(date);

}

catch(ParseException pe){

trace.addInfo("Parse Exception : " + pe);

}

return strDate;

Regards,

Ravi

Former Member
0 Kudos

Hello Sharada,

It seems like you have used the Transform Date function the filed mapping for this field and the input that you are getting from quality system is not providing the SADATE data.

That means, for the mapping you will have to handle empty values or NULL values when the RFC does not provide any data.

Regards,

Alka Panday.

raviteja_satuluri
Contributor
0 Kudos

Hi

Go through the following link

It May Helpful to You

SAPTechnical.COM - Date conversions in XI / PI

Ans specify Your Error if it is Matching with Your Error

Regards,

Ravi

sharprabs
Participant
0 Kudos

Error in function module. Can u help on what changes to be made as

With the same function hold good when the rfc is passed and dats in sender

and doc date as string in receiver.

raviteja_satuluri
Contributor
0 Kudos

Specify the Error as a Screen shot

Then I will try to do Changes as Good

Regards,

Ravi

raviteja_satuluri
Contributor
0 Kudos

Hi,

Can You Share Your Error Screenshot in Moni..

So that it is Good to Analyze..

Regards,

Ravi

raviteja_satuluri
Contributor
0 Kudos

Hi,

Check with the Payload in Moni and Take that Payload and Test in Message Mapping and Operation Mapping in IR

Then You Can get Idea...

And Compare what data is Coming in to PI in DEV and Quality..

Regards,

Ravi

raviteja_satuluri
Contributor
0 Kudos

Hi,

Do the Full Cache refreshment Also

http://host:50000/CPACache/refresh?mode=full

Regards,

Ravi

sharprabs
Participant
0 Kudos

Will rfc to jdbc work in IR ?

sharprabs
Participant
0 Kudos
Hi Ravi,
The payload gave this error. tnx any clues how to retify
     

        Unparseable date: ""
com.sap.aii.mappingtool.tf7.FunctionException:
        Unparseable date: ""
at         com.sap.aii.mappingtool.flib7.DateTransformer.convertDate(DateTransformer.java:75)
at         com.sap.aii.mappingtool.flib7.DateTransformer.getValue(DateTransformer.java:37)
at         com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:402)
at         com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:428)
at          com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:428)
     

   

Regards

Sharada

former_member240495
Discoverer
0 Kudos

Thanks, this worked for me on a PI 7.31 ... if anyone needs it... What I done is to check every RFC on ECC that pointed to PI and updated them to UNICODE... then the Full CPA cache refresh did the trick ... THANKS!!

suman_saha
Contributor
0 Kudos

Hi,

Have you debug the RFC in quality. It seems data is coming wrong into PI.

If you have debug access to ECC, check what data is sending to PI.

If the data coming out from ECC is proper, import the RFC into PI ESR manually.

Suman