0

I´m trying to call a Bapi with java-hibersap, the Bapi import/export looks like:

IMPORTING
 VALUE(IT_LAYOUT) TYPE  ZMM_T_RFC_LAYOUT
EXPORTING
 VALUE(ET_MENSAJES) TYPE  ZMM_T_RFC_RETURN
...

The Types are tables with table´slines which contains the elements of this complex parameters

I mapped the java class like:

@Bapi("ZMFMM_RFC_REPLICACION")
public class RFC_SEND_REPLICATION_Bapi
{
@Import
@Table
@Parameter("IT_LAYOUT")
private List<It_Layout> importReplication;

@Export
@Table
@Parameter("ET_MENSAJES")
private List<Et_Mensajes> exportReplication;
...

And It_Layout, Et_Mensajes classes whith BapiStructure annotation:

@BapiStructure
public class It_Layout
{
@Parameter("MARA_MATNR")
private String code;

@Parameter("MARA_MATKL")
private String groupItems;
...

When I execute the Bapi

rfc_SEND_REPLICATION_Bapi = new RFC_SEND_REPLICATION_Bapi();
rfc_SEND_REPLICATION_Bapi.setImportReplication(rfc_REPLICATION_Imports);
jcoSession.execute(rfc_SEND_REPLICATION_Bapi);

Throws an exception NullPointerException, I've tryed diferent ways to fill the import parameter but it doesn´t work yet.

aydinugur
  • 1,208
  • 2
  • 14
  • 21
  • What is the NullPointerException's message and its full stack trace? – Trixx Nov 05 '17 at 15:42
  • There was only "NullPointerException" as detail message, but I already solved the issue. I changed the anotations of imports and export, now looks like: `@Import @Parameter(value = "IT_LAYOUT", type = ParameterType.TABLE_STRUCTURE)` . That solved the problem :) – Leonardo Martinez Nov 06 '17 at 16:49

1 Answers1

1

I already solved the issue, the solution was change the annotations of imports and export, now looks like:

@Import 
@Parameter(value = "IT_LAYOUT", type = ParameterType.TABLE_STRUCTURE)

Without @Table annotation, That solved the problem.