cancel
Showing results for 
Search instead for 
Did you mean: 

Reading elements from SAP Business workplace

partha_kar2
Active Participant
0 Kudos

Hi,

I wish to read the elements from the Businsess Workplace, which is from the inbox. Is there any FM or Db tables to do so?

Regards

Partha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Partha ,

Please Refer the thread [;

partha_kar2
Active Participant
0 Kudos

Hi Prasath,

i wish to read the documents folder, can u tell me the possible input values that are to be passed to the FMs:

SO_USER_READ_API1

SO_OBJECT_READ

SO_INBOX_COUNTER_READ

Regards

partha

Former Member
0 Kudos

Hi ,

Please refer the standard program RSSOAPIV .

partha_kar2
Active Participant
0 Kudos

Hi Prasath,

I wish to read the inbox for all users by logging into any user, which FM can provide me that. I guess the read functionality must be possible atleast.

Regards

Partha

Former Member
0 Kudos

Hi Partha ,

report RSSOAPIV serves the same functionality you required. It is used to retrieve the inbox of the user who logged in. Please refer the same.


 ** FM 'SO_USER_READ_API1' is used to read the current user and Folder information. 
DATA: USER_DATA LIKE SOUDATAI1.

CALL FUNCTION 'SO_USER_READ_API1'
     IMPORTING
          USER_DATA = USER_DATA
     EXCEPTIONS
          USER_NOT_EXIST            = 34
          PARAMETER_ERROR           = 23
          OTHERS                    = 1000.
if sy-subrc <> 0.

Endif.

* To get the Folder content we are passing Folder ID here
CALL FUNCTION 'SO_FOLDER_READ_API1'
     EXPORTING
          FOLDER_ID      = USER_DATA-INBOXFOL " this variable holds the inbox Folder id
     TABLES
          FOLDER_CONTENT = FOL_CONT   " it has Folder Contents
     EXCEPTIONS
          FOLDER_NOT_EXIST           = 6
          OPERATION_NO_AUTHORIZATION = 21
          OTHERS                     = 1000.
IF SY-SUBRC <> 0.
Endif.

CALL FUNCTION 'SO_DOCUMENT_READ_API1'
     EXPORTING
          DOCUMENT_ID     = FOL_CONT-DOC_ID   " here we are passing the Doc ID to get DOC details
          FILTER          = FILTER
     IMPORTING
          DOCUMENT_DATA   = DOC_DATA
     TABLES
          OBJECT_HEADER   = OBJHEAD
          OBJECT_CONTENT  = OBJCONT
          OBJECT_PARA     = OBJPARA
          OBJECT_PARB     = OBJPARB
          ATTACHMENT_LIST = ATTLIST
          RECEIVER_LIST   = RECLIST
     EXCEPTIONS
          DOCUMENT_ID_NOT_EXIST      = 99
          OPERATION_NO_AUTHORIZATION = 21
          OTHERS                     = 1000.
IF SY-SUBRC <> 0.

ENDIF.

Edited by: Prasath Arivazhagan on Apr 8, 2010 9:38 AM

partha_kar2
Active Participant
0 Kudos

i have checked this report, i need to read the inbox for all the users in the sap system.. Are you aware of any fm that can do that? i guess even the DB tables SOOD and SOFM is not of help, can u suggest some other tables or objects that can fetch the same?

Regards

Partha

Former Member
0 Kudos

Hi Partha,

I could not find any Standard FM for reading inbox of all users.

i Found , some of tables and views used in Business work place. Please check whether it could be useful for you.

TABLES: SOOD, SOFM, SOOS, SORS, SOFA, SODM, SOC3, SOPR, SOUI, SOUD, SOUB, SOUC

SADR3, SADR5, SADR7, SADR8, SADRF, SADRU, SADR, SADRP, SOES,

SADR2, ADRC, ADRP, ADCP, SZAD_FIELD.

View : V_SOIC, V_SOFC, V_SOIC_P, V_SOFC_P, V_SOOS_P.

V_SOUDADRP, V_SOUCADRP, V_SOUBADRP, V_SOUIADRP, V_SOUSRADR.

V_SOFMSOFD, V_SORDSOOD, V_SORDOD_P, V_SOUDADCP, V_SOUCADCP.

There is one FM SO_FOLDER_READ used for Folder reading for a single user , please check whether you can use this by doing simple modification.

partha_kar2
Active Participant
0 Kudos

HI prasath,

Your answers have been of great help to me, however now i also would like to know if i can retrieve the inbox documents and workflow items from inbox by giving the user id? Which FM can fetch me the workflow items and documents from the business workplace using the userid or something else?

Regards

Partha

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor
0 Kudos

I had done it a few weeks ago in a SAP 7.0.

1) copy program RSWL_INBOX_VIEW_CREATE and class CL_WF_INBOX_01

2) add P_UNAME to selection-screen

3) in the class, at call of SIN_GRID_READ_WF_I (in method FEED_DATA), replace parameter SY-UNAME with P_UNAME (transmit it as you can)

4) Add the following lines right after call to SIN_GRID_READ_WF_I:


data ls_inbox_view type HRWFUSER_V.
data lt_inbox_view type table of HRWFUSER_V.
data ls_wi_head type SWWWLHEAD.
data lt_wi_head type TABLE OF SWWWLHEAD.
data ls_alv type SWLWP1.
ls_inbox_view-otype = 'US'.
ls_inbox_view-objid = p_uname.
append ls_inbox_view to lt_inbox_view.
CALL FUNCTION 'RH_INBOX_VIEW_CREATE'
 TABLES
   INBOX_VIEW                = lt_INBOX_VIEW
   WI_HEAD                   = LT_wi_head
 EXCEPTIONS
   OTHERS                    = 5.
refresh alv_outtab.
loop at lt_wi_head into ls_wi_head.
  move-CORRESPONDING ls_wi_head to ls_alv.
  append ls_alv to ALV_OUTTAB.
endloop.

Edited by: Sandra Rossi on Apr 8, 2010 10:53 PM

partha_kar2
Active Participant
0 Kudos

Hi Sandra,

I would like to know if there is any FM or DB table which would fetch me the Inbox document (not workitem) mail message (message contents meaning the body of the message.).

Regards

Partha

Sandra_Rossi
Active Contributor
0 Kudos

Partha, you're right (it's because we use only workflow at my client, I forgot that you want only mails/documents).

About your question, I don't understand why you can't use the other answers above: you may transmit the user ID to SO_USER_READ_API1, and you have the list of users in USR01 table, so what's the problem?

partha_kar2
Active Participant
0 Kudos

Thanks Sandra, job is done.

sony_jose4
Explorer
0 Kudos

Hi, Can you please tell me how did you fix this issue? I have the same requirements.

Thanks,

Jose.