cancel
Showing results for 
Search instead for 
Did you mean: 

Need a BAPI/RFC in SRM

Former Member
0 Kudos

Hello All,

I would require your help in this issue:

Need a BAPI/FM which takes input as Purchase Order number and Output as the URL

which Buyer will use this URL and clicks to login into Buyer portal.Here Opentext is third party system.

The Business requirement is:

  • In the case of invoice settlements, OpenText will send an email to the buyer with a link that takes them to the purchase order requires changes.  The link should allow the user to login and take them directly to the purchase order without the need to navigate through the SRM menus and search for the purchase order manually.
  • Generate a link that will take a user to an SRM login screen.  Once the user is logged in the user should be automatically directed to the purchase, where it can be updated.

Can anyone throw some light on this issue like how this can be technically done.

Thanks,

Chitra

Accepted Solutions (1)

Accepted Solutions (1)

former_member184111
Active Contributor
0 Kudos

Hi,

Try the below code:

DATA:  url           TYPE string,

           it_url_params     TYPE bbpt_url_params,

           ls_url_param   LIKE LINE OF it_url_params.

      ls_url_param-paramname  = 'SAPSRM_BOID'.

      ls_url_param-paramvalue = 'GUID_OF_BO'    <--GUID of PO in your case

     

APPEND ls_url_param TO it_url_params.

CALL METHOD /sapsrm/cl_url_service=>get_url

       EXPORTING

         iv_bo_type    = 'BUS2201'   <-- BUS type of BO  

         iv_url_scope  = 'INT'       <--Link is for internal / external users can be INT or EXT

         it_url_params = it_url_params

       RECEIVING

         rv_url        = url.

Thanks,

Anubhav





Former Member
0 Kudos

Thanks Anubhav..:)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

have a closer look at Report /SAPSRM/OFFLINEAPPROVALSEND.

It does something similar to your requirement though it's for sending offline approval E-Mails.

You will have to find the part of code where the link to SRM System an the corresponding Purchasing document is created.

Regards

Stephan

robin_janke
Contributor
0 Kudos

Hi,

Play around a bit with the following class: /SAPSRM/CL_URL_SERVICE. This class will generate a URL for you, providing you give the correct attributes such as SAPSRM_BOID (PO number) and some additional variables as well (interface /SAPSRM/IF_CH_WD_URL_PARAM_C gives all possible parameters).

You just need to generate the link to the po you need to change. If a user clicks on the link automatically a logon page is displayed (if there is no single sign on active).

Regards,

Robin

Former Member
0 Kudos

Thanks Robin..

konstantin_anikeev
Active Contributor
0 Kudos

Hi Chitra,

there is no BAPI/Function for that, You will need to develope it.

Best Regards

Konstantin