Skip to Content
avatar image
Former Member

Help with SAP JCo usage

Hi people,

I'm new in this community and I'm asking here this after weeks of investigation on the web. I've found some articles that allowed me to understand some of the basics principles of working with SAP and using the SAP Java Connector library, but I've not reached full understanding of some functions, methods, classes, etc.

This is the situation:

I've to develop a Java App that could run as a Windows Service (already solved this with Java Service Wrapper), and act as a Middleware between SAP and an Access Control System (ACS).
This app should:

  • Get the absenteeism stored in SAP (Justified Absenteeism or Disciplinarian Measure) and send it to the ACS in order to block employee Clock In register in that cases.
  • Get the Clock In and Clock Out data from the ACS and send it to SAP.

I have doubts about using a BAPI or an IDOC for the first item.
I know I have to use a BAPI for the second one, but I don't know how to create the Business Specific Object and passing it as a parameter to the BAPI.

Could you guide me to achieve these functionalities?

Thanks a lot!

P.S: Sorry for the mistakes but English is not my native language...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 12, 2013 at 08:22 AM

    Hello,

    I would suggest you have a look at JCO guide

    service.sap.com/connectors

    SAP Java Connector

    Tools & Services

    SAP JCo 3.0 Documentation

    Best Regards,

    Yong Luo

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yong, I've obtained the documentation you suggest but it isn't different from what I've found in internet or in the SAP JCo library itself.

      I've been making progress with this issue and found that I need to use a Z-function named "ZARHR_CC1_UPLOAD_TIMEEVENT", with the same parameters as "BAPI_CC1_UPLOAD_TIMEEVENT".

      This BAPI has a table called "TIMEEVENT" with all the fields representing Infotype 2011 - TimeEvent (http://www.consolut.com/en/s/sap-ides-access/d/s/doc/F-BAPI_CC1_UPLOAD_TIMEEVENT~~~~~TIMEEVENTS)

      Now I should guess how to fill these fields and execute the function.

      Once I've achieved this, should I execute another BAPI like BAPI_TRANSACTION_COMMIT or something like that?

      Thanks!

  • avatar image
    Former Member
    Aug 14, 2013 at 08:29 PM

    Hi Bruno... if your Java application isn´t in a WAS Java...maybe you might expose your BAPIs are Web Service and consume them from your application, otherwise you might use JCA connector, take a look tto the next guide.

    http://help.sap.com/saphelp_nw73/helpdata/en/4a/5fd52b16bc0451e10000000a421937/frameset.htm

    Hope it helps

    Add comment
    10|10000 characters needed characters exceeded