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: 

Updating printer device attributes using RFC

Former Member
0 Kudos

Hello all,

I'm a new entrant to the SAP world and still finding my feet. I think the term newbie can be applied freely.

My pilot involves using the NW RFC libraries to update printer attributes. So far I think RSPO_ functions seem to be the appropriate choice for dealing with printing. I can get the list of printers by using either ADS_GET_PRINTER_LIST or RSPO_ADM_DEVICES_GET. They both seem to return the same data, though the ADS version has far more detail. I've discovered these APIs mainly by trial/error and searching the forums/google/...

However I cannot seem to find the functions for updating the attributes.

RSPO_DEVICE_UPDATE and RSPO_ADM_DEVICE_UPDATE looked promising, but they cannot be called remotely.

My questions/doubts:

1. Is what I'm trying to do possible and supported?

2. Are RSPO_ family the correct functions for dealing with device updates, or is there another set of functions?

3. If the DEVICE_UPDATE is indeed the correct function, what are the workarounds for accessing it remotely; so far I can think of using a think ABAP wrapper which is exposed remotely, using the web services SOAP call.

I've been trying to find the canonical reference documentation for dealing with printers at an API level, but with no success. Any pointers to docs/references would be much appreciated!

I understand these are very entry level questions, and do beg everyones' pardon.

regards

3 REPLIES 3

mohammed_anzys
Contributor
0 Kudos

Hi Sood,

I hope you are doing an implementation in the customer namespcae . In this case , you could create your own function modules in the Z* namespace and make them RFC enabled and internally call the specified FMs.

Regards

Anzy

PritiSAC
Advisor
Advisor
0 Kudos

Hi,

There seem to be couple of RFCs in this direction. You would have to try testing it :

RSPO_SXOMS_I_UPDATE_PRINTER - Assuming that you want to update printer as in device.And SPCPC_I_BUILD_DEVICE. Although the later didn't talk about update, there is delete and insert type of RFCs in the respective funtion group.

As a thumb rule, you should always try to utilize the available RFCs or BAPIs for your function, updating a table by writing z-RFC could always be risky for a customer anyway.

Additionally If your intention is print the jobs remotely (refer to SP01 transaction that does priniting based on the jobs) , then the related remote APIs are part of funtion group SPRR.

Regards,

Priti

Former Member
0 Kudos

Thank you Anzy and Priti, we're much further ahead now due to your help.

Priti, we do want to update the output device attributes. Specifically device type and driver. I cannot find RSPO_SXOMS_I_UPDATE_PRINTER function defined in the customer SAP test instance. I'll post the exact version numbers and configuration tomorrow, once I again have access to the server.

Anzy, I've started writing a Z_ wrapper over RSPO_ADM_DEVICE_UPDATE for the time being. Thanks for the pointer.

It seems that all the RSPO_ RFCs are view and read only. The update/create APIs are non-remote. I wanted to find the design/security documentation for understanding these decisions. Does SAP documentation have a technical/security architecture overview? Or perhaps a specific forum?

Once again, thank you both from me and the Idea Device engineers.