cancel
Showing results for 
Search instead for 
Did you mean: 

W-2 Form in ESS

ravishankar_reddy2
Active Participant
0 Kudos

Hi,

We have an Requirement that we need to display the W-2 form in ESS. I have gone through the Forum there it was mentioned in one the sceneario that it is a 2 step process.

1) Submit Job RPCTRSU0 to create a PDF Spool for particulr User from Portal

2) Use Function module FPCOMP_CREATE_PDF_FROM_SPOOL to read PDF formatted spool it returns Binary data

How Can i use this, Is it helpful in achieving this W-2 form in ESS without using work flow.

If any one has gone through this w-2 form custom development, Please let me know the steps how to achieve this.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In my DO_REQUEST class for my ESS BSP, after I get the pdf_xstring value returned from the spool, I


    CALL METHOD query->create_url
      EXPORTING
        pdf_xstring     = l_pdf_xstring
      IMPORTING
        cached_response = cached_response
        guid            = guid.

    CONCATENATE runtime->application_url '/' guid '.pdf'
    INTO me->query->display_url.

    cl_http_server=>server_cache_upload(
                    url      = me->query->display_url
                          scope    = ihttp_inv_global
                         response = cached_response ).

Then I display the query->display_url in my BSP view within an iframe.

Right now I am having problems getting more than one page of a multi-page W-2. It appears that the i_partnum parameter of function FPCOMP_CREATE_PDF_FROM_SPOOL tells the function which page to return. At least it seems that way. If I send a partnum of 1, I get the first page, and if I send partnum of 2, I get the second page. I don't know how to get multiple pages. If anyone knows, I would very much like to find out. I am getting an XSTRING returned and cannot concatenate multiple strings.