Skip to Content
author's profile photo
Former Member

BAPI call from Java

Hi all,

I'm trying to execute a BAPI from Java called "BAPI_SERVICENOTIFICAT_CREATE".

It creates a Service Notification for a functional location.

This BAPI WORKS WELL if I execute it from SAP (trans. SE37), but it gives me an error message I think it's incorrect.

" E020 Functional location PROM-DIA does not exist"

The import parameters (from Java and from SAP) are:

Structure "NOTIF_HEADER":

Field NOTIF_TYPE: "S1"

Field FUNCLOC: "PROM-DIA"Â Â Â Â (Of course, IT EXISTS...)

Field CONTACT: "0000000000"

Field DESCRIPT: "Do it from Java"

Any ideas?

Thanks,

Roger

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Dec 09, 2003 at 06:11 PM

    Roger,

    Seems like you are not setting the proper values in the BAPI, you cpould do onething, take out each and every data you set it in the BAPI and take these valid values and compare it with the ones you are passing to your JCO.Function.

    JCO.Function has a method writeToHTML or writeHTML(file name), before executing the function put this statement and after executing also put this statement

    functionname.writeHTML(filename)

    client.execute(functionname)

    functionname.writeHTML(afterexecution_filename)

    See the returnerd values in both the cases and compare it with your valid values.

    Seems like BAPI is getting executed properly there is a problem in setting the values.

    Thanks

    Senthil

    Add comment
    10|10000 characters needed characters exceeded