cancel
Showing results for 
Search instead for 
Did you mean: 

Calling an web dynpro application from rfc?

former_member1052991
Active Participant
0 Kudos

Hi Experts,

As per requirement, the user will read the bar code(which ll have invoice number),

and the moment he reads invoice details should display in Website to approve it.

We are planning to do like barcode reader->vb script->calling rfc->call web dynpro application->display invoice details.

Is it possible to call web dynpro application from rfc?

Also please suggest me whether the above scenario will work or not?

Thanks in Advance.

Guna

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

You could call the Web Dynpro application using the url and pass the invoice number as parameter to tthe url. Refer this document for reading url parameters: http://scn.sap.com/docs/DOC-45729

And could you please provide more details about your requirement; if you are calling the web dynpro application from vb or the other way - The Web Dynpro application consumes proxy for reading invoice details? 

Regards,

Kiran

former_member1052991
Active Participant
0 Kudos

Hi Kiran,

Thanks for your reply and Will try it out with that reference link.

Planning to call web dynpro application from rfc, and rfc will be called by vb.

Thanks,

Guna

former_member1052991
Active Participant
0 Kudos

Hi Kiran,

I have tried with the link you have mentioned, its giving dump while calling url using method cl_gui_frontend_service. "Exception condition NOT_SUPPORTED_BY_GUI".

Regards,

Guna

harsha_jalakam
Active Contributor
0 Kudos

Hi Gunaseelan,

If you are intending to call a webdynpro application from a Function Module, with the barcode input, then better append the barcode input value as a application parameter value to webdynpro application URL and then launch the WebDynpro Application.

DATA: lv_url TYPE string.

  DATA: lv_host TYPE string,

        lv_port TYPE string,

        lv_out_protocol TYPE string.

CALL METHOD cl_http_server=>if_http_server~get_location

    IMPORTING

      host         = lv_host

      port         = lv_port

      out_protocol = lv_out_protocol.

CALL METHOD cl_wd_utilities=>construct_wd_url

    EXPORTING

      application_name = 'ZWD_APP_NAME'   // Webdynpro Application Name

      in_host          = lv_host

      in_port          = lv_port

      in_protocol      = lv_out_protocol

      namespace        = 'sap'

    IMPORTING

      out_absolute_url = lv_url.

call method cl_http_server=>append_field_url
   
exporting
      name  =
'BARCODE'
     
value = lv_value                     // Bar code input value
   
changing
      url   = lv_url.


CALL FUNCTION 'CALL_BROWSER'

EXPORTING

URL = lv_url.

Regards,

Harsha

former_member1052991
Active Participant
0 Kudos

Hi Harsha,

Thanks for your input.

How ever it calls the cl gui frontend services inside the fm call browser and gives same dump.

Since rfc is been calling from vb, cl gui frontend service will not work, I guess.

I tried with the other way that calling web dynpro application directly from vb, and it is working.

But the problem is data retrieval of invoice details and approver details.

Is there any other way we can do this scenario?

Thanks,

Guna

harsha_jalakam
Active Contributor
0 Kudos

Better append the barcode input values to wd url and try to fetch that in INIT method of component controller. Based on this input design the logic for data retrieval for invoice and approver details 

harsha_jalakam
Active Contributor
0 Kudos

where are you placing the code for call browser FM, is it in Webdynpro Application?

former_member1052991
Active Participant
0 Kudos

I am doing the same, passing invoice number to url and trying to get details in wda component.

called fm call browser inside rfc. barcode reader->vb(call rfc) -> rfc(call wda) but not working, so now trying with barcode reader -> vb(call rfc) -> rfc(construct url) -> vb(get n call url)

former_member1052991
Active Participant
0 Kudos

It works with the below method,

1.bar code reader will store the invoice number into a text file

2.vb script will read invoice number from text file and call rfc with the invoice no, userid, pwd of sap

3.rfc will construct url by giving component name & url with login details are send back to vb

4.web application is called by url from vb script

Thanks all for your support.

Regards,

Guna.

Answers (0)