Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_GET_PAYSLIP_PDF not remote enabled

kmoore007
Active Contributor
0 Kudos

Hey All,

I would like to use BAPI_GET_PAYSLIP_PDF through a web service, but the BAPI is not remote enabled. Anyone know why? I tried copying it to a 'Z' version and set the remote enabled option, but it still does not work when testing the web service.

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

>

> Hey All,

>

> I would like to use BAPI_GET_PAYSLIP_PDF through a web service, but the BAPI is not remote enabled. Anyone know why? I tried copying it to a 'Z' version and set the remote enabled option, but it still does not work when testing the web service.

B'coz the said function module has not yet been 'Released' to the public.. Pl check its attributes.. BTW, have you tried HRXSS_SPA_GET_PAYSLIP_PDF?

~Suresh

10 REPLIES 10

suresh_datti
Active Contributor
0 Kudos

>

> Hey All,

>

> I would like to use BAPI_GET_PAYSLIP_PDF through a web service, but the BAPI is not remote enabled. Anyone know why? I tried copying it to a 'Z' version and set the remote enabled option, but it still does not work when testing the web service.

B'coz the said function module has not yet been 'Released' to the public.. Pl check its attributes.. BTW, have you tried HRXSS_SPA_GET_PAYSLIP_PDF?

~Suresh

0 Kudos

Hey Suresh,

The function HRXSS_SPA_GET_PAYSLIP_PDF is also not released and not remote enabled. Please check the attributes. But thanks for the suggestion.

0 Kudos

HRXSS_SPA_GET_PAYSLIP_PDF is an Rfc on my system.. anyway your best bet would be to put a custom Rfc wrapper around 'CONVERT_PAYSLIP_TO_PDF'.

~Suresh

Former Member
0 Kudos

Why don't you build a wrapper FM and call the BAPI in your wrapper FM ?

A

0 Kudos

I did copy the BAPI to a 'Z' BAPI and remote enabled it, but it does not work through the web service. It times out. Both the BAPI and 'Z' versions work fine when testing within SAP. I have not tried "wrapping" it yet, so I might try that next. Thanks.

0 Kudos

Don't copy it. Create a wrapper like this and give it a try and don;t forget to make it REMOTE enabled.

FUNCTION zbapi_get_payslip_pdf.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(EMPLOYEENUMBER) LIKE  BAPI7004-PERNR
*"     VALUE(SEQUENCENUMBER) LIKE  BAPI7004_RL-SEQUENCENUMBER
*"     VALUE(PAYSLIPVARIANT) LIKE  BAPI7004-PAYSLIP_VARIANT
*"  EXPORTING
*"     VALUE(RETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
*"     VALUE(PAYSLIP) TYPE  XSTRING
*"     VALUE(PDF_FSIZE) TYPE  I
*"----------------------------------------------------------------------

  CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
    EXPORTING
      employeenumber = employeenumber
      sequencenumber = sequencenumber
      payslipvariant = payslipvariant
    IMPORTING
      return         = return
      payslip        = payslip
      pdf_fsize      = pdf_fsize.
ENDFUNCTION.

0 Kudos

OK, I created a "wrapper" like Amandeep and some others suggested. But when I test the web service, it times out. Seems to be something with the XSTRING parameter. The web service doesn't seem to like this parameter. But I am just guessing.

kmoore007
Active Contributor
0 Kudos

I was informed in another post that you cannot pass an XSTRING variable in a web service and that this is why the web service times out when I test it. Bummer.

Former Member
0 Kudos

Hi Kenneth,do you have any work around for this?

kmoore007
Active Contributor
0 Kudos

Joan,

We are trying the original payslip BAPI called BAPI_GET_PAYSLIP and the internet developer is transforming it to HTML/PDF via MS .NET. Don't ask me how he does this in .NET...I'm an ABAPer .