Application Development and Automation 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: 
Read only

Finding foldername

AntonPierhagen
Active Participant
0 Likes
827

hi all!

With the help of classes  cl_send_request_bcs and cl_document_bcs we manage to send an email to an external email address outside our SAP system. When we add another email addres as reply email address instead of the name of the user which is sending the emailaddress

We cannot link the email object, which is created with the class CL_DOCUMENT_BCS, with another object.                                                                       

For example an Purchase Order.

With the methods:

    TRY.

        CALL METHOD cl_document_bcs->get_doctp

          RECEIVING

            result = lv_mess_key-doctp.


        CALL METHOD cl_document_bcs->get_docyr

          RECEIVING

            result = lv_mess_key-docyr.


        CALL METHOD cl_document_bcs->get_docno

          RECEIVING

            result = lv_mess_key-docno.

      CATCH cx_os_object_not_found .

    ENDTRY.

We can receive some masterdata of the email. But i don´t know a method which returns the master data of the folder where the email is put into.

How can we find this folder data?

Also in the table SOFM there are no records if we send the email with another reply email address instead of the email address of the sap user which is sending it. If the send it with the email adress of the user as reply address an record is created in the table SOFM.

kind regards

Anton Pierhagen

1 ACCEPTED SOLUTION
Read only

AntonPierhagen
Active Participant
0 Likes
777

Found the solution! In logic of the SOST transaction the table SOPR is being used to refer to an folder. If i use this folder within the binding of my email object to the sales order object, the linking works correctly.

So thanks for replying!

4 REPLIES 4
Read only

Juwin
Active Contributor
0 Likes
777

What I could find is Outbox folder is only updated, if in case the sending user has an outbox (check comments in CL_BCS_DISTRIBUTE=>PUT_INTO_OUTBOX). That must be the reason why SOFM is not updated in your scenario.

Thanks,

Juwin

Read only

Juwin
Active Contributor
0 Likes
777

I further found that, inorder to link the email to another object, you can use SOOD object. SOOD object doesn't require folder name information.

Thanks,

Juwin

Read only

AntonPierhagen
Active Participant
0 Likes
777

Hi Juwin

Unfortunately that is not the solution.

Do you know how i can find out which folder the email object is written to?

Read only

AntonPierhagen
Active Participant
0 Likes
778

Found the solution! In logic of the SOST transaction the table SOPR is being used to refer to an folder. If i use this folder within the binding of my email object to the sales order object, the linking works correctly.

So thanks for replying!