cancel
Showing results for 
Search instead for 
Did you mean: 

Pass date(MM/dd/yyyy format) into importparams in JCA code(R/3 connection)?

Former Member
0 Kudos

Hi,

Using JCA I've connected to a R/3 system. I need to invoke a RFC with:

two import parameters, both being DATS 8(MM/dd/yyyy), and

an export parameter being a table structure.

I passed date as String

eg., IMPORTPARAMS.put(PARAM1-DATE, "10/28/2004");

When executed, a nullpointer exception is thrown, even though there are many rows in the export table structure.

What is the compatible data structure in Java that matches DATS of ABAP.

Can anyone help me in solving this problem?

Accepted Solutions (1)

Accepted Solutions (1)

former_member194198
Active Participant
0 Kudos

Hi Vijay,

From your sample code I assume that the RFC input parameter is called "PARAM1-DATE".

The code I've used in the past is :

String dateString = "20041029";

importParams.put("PARAM1-DATE", dateString);

If the field is a DATS in SAP then the field must be sent in the format yyyymmdd ( internal SAP format ). The other solution is to change the field type in SAP to CHAR length 10 and then send dd/mm/yyyy.

Cheers

Richard

Former Member
0 Kudos

Hi Richard,

It worked !!! Thank you very much.

Cheers to u too,

Vijay Kalyan.

Answers (0)