8 Replies Latest reply: Nov 24, 2007 11:54 PM by Jurjen de Vries RSS

How to upload a document into Solution Manager via BSP?

Henry Stewart
Currently Being Moderated

I am trying to upload documents into Solution Manager using BSP. I have searched for similar topics without any luck. So if somebody could please explain to me the logic, function module, or anything related info to this issue would appreciated.

 

Any help will be rewarded.

 

Thanks

 

Henry

  • Re: How to upload a document into Solution Manager via BSP?
    Currently Being Moderated

    Hi,

     

    Actually the users who don't have access to solman use this procedure.

    Min Requirement:-

    You have installed the BSP application according to the SAP notes 699087 and 742691

    check the link:-

    http://help.sap.com/saphelp_nw04/helpdata/en/56/e6f3409ade8631e10000000a1550b0/content.htm

     

    Please reward points.

  • Re: How to upload a document into Solution Manager via BSP?
    Henry Stewart
    Currently Being Moderated

    I was thinking more on the lines of creating the (create, delete, display) functionality of t-code solar01 in a BSP, so that not every computer need SAP GUI when dealing with the documents.

     

    I have already create a FM to give me a list project_id for a given user,

                                                               list of documents for a given project_id,

                                                               and get a URL for a given document.

     

    the FM I wish to find or create is one to allow a BSP to upload a document to a given project structure/folder.

  • Re: How to upload a document into Solution Manager via BSP?
    Jurjen de Vries
    Currently Being Moderated

    Henry,

     

    If you are still watching this thread:

    Could you give me some details on how you retrieved all documents for a give project?

     

    Thanks,

     

    Jurjen

  • Re: How to upload a document into Solution Manager via BSP?
    Henry Stewart
    Currently Being Moderated

    well first you have to get the folder from a given project id

     

     

    FUNCTION Z_BSP_PROJECT_GET_FOLDERS.
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(PF_PROJECT_ID) TYPE  PROJECT_ID
    *"  TABLES
    *"      FOLDER_TABLE STRUCTURE  ZFOLDER_LAYOUT
    *"  EXCEPTIONS
    *"      FAILED
    *"----------------------------------------------------------------------
    
    Types: BEGIN OF SPRO_OBJECT_ID_STRUC,
            OBJECT_ID LIKE TOBJECTP-OBJECT_ID,
           END OF SPRO_OBJECT_ID_STRUC,
        SPRO_OBJECT_ID_TAB TYPE STANDARD TABLE OF SPRO_OBJECT_ID_STRUC WITH DEFAULT KEY.
    
    DATA: LT_OBJECT_ID       TYPE SPRO_OBJECT_ID_TAB,
          I_PROJECT_ROOT_ID  TYPE GUID_32,
          L_NODE_ID          TYPE TTREE-NODE_ID,
          L_MESSAGE          TYPE HIER_MESS,
          L_T_NODE           TYPE HIER_IFACE_T,
          wa_l_T_node        like line of L_t_node,
          L_TREE_ID          TYPE TTREE-ID,
          L_T_TEXT           TYPE HIER_TEXTS_T,
          wa_l_t_text        like line of l_t_text,
          line_count         type I,
          wa_FOLDER_TABLE like line of FOLDER_TABLE,
          temp like line of FOLDER_TABLE.
    
    FIELD-SYMBOLS <SCENARIO_ROOT>  TYPE HIER_IFACE.
    
    CONSTANTS: SAPPL_C_NODETYPE_REFH5    TYPE HIER_IFACE-NODE_TYPE VALUE 'RHI5'.
    
    CALL FUNCTION 'SPROJECT_GET_OBJECT'
      EXPORTING
        PROJECT_ID = PF_PROJECT_ID
        OBJ_TYPE   = 'CUST'   "#EC_NOTEXT
      TABLES
        OBJECT_ID  = LT_OBJECT_ID.
    
    *select NODE_ID from tpr_index into table lt_object_id
    *  where Project_id = PF_PROJECT_ID and
    *        Node_level = '01'.
    
    READ TABLE LT_OBJECT_ID INTO I_PROJECT_ROOT_ID INDEX 1.
    
    
    SELECT SINGLE NODE_ID FROM TTREE INTO L_NODE_ID WHERE ID = I_PROJECT_ROOT_ID.
    IF SY-SUBRC <> 0.
      RAISE FAILED.
    ENDIF.
    
    CALL FUNCTION 'SASAP_HIERARCHY_READ'
      EXPORTING
        STRUCTURE_ID                = I_PROJECT_ROOT_ID
        NODE_ID                     = L_NODE_ID
    *   FILTER_ID                   = ' '
        READ_TEXTS                  = SPACE
        READ_REFERENCES             = SPACE
        LANGUAGE                    = SY-LANGU
        INCLUDE_SUBSTRUCTURES       = 'X'
        TEXT_OF_REFERENCES          = SPACE
    *   START_LEVEL                 = '01'
    *   DISPLAY_MODE                = 'D'
    *   READ_TREE_ASSIGNMENTS       = ' '
       LEVELS                      = 1
     IMPORTING
        MESSAGE                     = L_MESSAGE
     TABLES
        LIST_OF_NODES               = L_T_NODE.
    
    READ TABLE L_T_NODE WITH KEY NODE_TYPE = SAPPL_C_NODETYPE_REFH5  ASSIGNING <SCENARIO_ROOT>.
    IF SY-SUBRC = 0.
      IF <SCENARIO_ROOT>-REFTREE_ID IS NOT INITIAL AND <SCENARIO_ROOT>-REFNODE_ID IS NOT INITIAL.
        L_TREE_ID = <SCENARIO_ROOT>-REFTREE_ID.
        L_NODE_ID = <SCENARIO_ROOT>-REFNODE_ID.
      ELSE.
        L_TREE_ID = <SCENARIO_ROOT>-TREE_ID.
        L_NODE_ID = <SCENARIO_ROOT>-NODE_ID.
      ENDIF.
    ELSE.
      RAISE FAILED.
    ENDIF.
    
    CLEAR  L_T_NODE.
    CALL FUNCTION 'SASAP_HIERARCHY_READ'
     EXPORTING
       STRUCTURE_ID                = L_TREE_ID
       NODE_ID                     = L_NODE_ID
    *   FILTER_ID                   = ' '
       READ_TEXTS                  = 'X'
       READ_REFERENCES             = SPACE
       LANGUAGE                    = SY-LANGU
       INCLUDE_SUBSTRUCTURES       = 'X'
       TEXT_OF_REFERENCES          = 'X'
    *   START_LEVEL                 = '01'
    *   DISPLAY_MODE                = 'D'
    *   READ_TREE_ASSIGNMENTS       = ' '
    *   LEVELS                      = 0
    IMPORTING
       MESSAGE                     = L_MESSAGE
    TABLES
       LIST_OF_NODES               = L_T_NODE
    *   LIST_OF_REFERENCES          =
       LIST_OF_TEXTS               = L_T_TEXT.
    
    loop at L_T_node into wa_l_t_node.
      wa_FOLDER_TABLE-node_ID = wa_l_t_node-node_id.
      DESCRIBE TABLE FOLDER_TABLE lines line_count.
      if line_count ne 0.
        READ TABLE FOLDER_TABLE into temp
        WITH KEY node_id = wa_l_t_node-parent_id.
    
        if sy-subrc ne 0.
          select NODE_ID from TPR_INDEX into wa_FOLDER_TABLE-parent_id
            where REFNODE_ID = wa_l_t_node-parent_id.
          ENDSELECT.
        else.
           wa_FOLDER_TABLE-parent_id = wa_l_t_node-parent_id.
        endif.
      endif.
      wa_FOLDER_TABLE-node_lvl = wa_l_t_node-node_level.
    
      READ TABLE l_t_text into wa_l_t_text
         WITH KEY node_id = wa_l_t_node-node_id.
    
      wa_FOLDER_TABLE-txt = wa_l_t_text-text.
    
      select SINGLE refnode_id from TPR_INDEX  into wa_FOLDER_TABLE-doc_folder_id
        where NODE_ID = wa_FOLDER_TABLE-node_ID.
      append wa_FOLDER_TABLE to FOLDER_TABLE.
      clear wa_FOLDER_TABLE.
    endloop.
    ENDFUNCTION.
    

    the custom table i created look like this:

    MANDT                  MANDT              CLNT     3

    NODE_ID                 CHAR32            CHAR           32

    PARENT_ID          CHAR32           CHAR         32

    NODE_LVL          SEU_LEVEL           NUMC       2

    DOC_FOLDER_ID     CHAR32              CHAR     32

    TXT                      CHAR77          CHAR         77

     

     

    after you this the user picks s folder. you must use the Doc_folder_id to get the doc from the folder. ( the doc_folder_id is a refnode_id in the table TPR_index)

     

    FUNCTION Z_BSP_PROJECT_GET_FOLDER_DOC .
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(FOLDER_ID) TYPE  TPR_INDEX-NODE_ID
    *"  TABLES
    *"      DOCUMENTS STRUCTURE  ZBE_DMS_PROPS
    *"----------------------------------------------------------------------
      DATA: BEGIN OF WA_IO,
               PROJECT_ID  LIKE TOBJECTP-PROJECT_ID,
               OBJECTKEY   LIKE TNOTFPR-OBJECTKEY,
             END OF WA_IO,
             LT_IO       LIKE TABLE OF WA_IO .
      DATA: WA_PROLIST   TYPE          TPROJECT,
            REFRANGE     TYPE RANGE OF HIER_RTYPE,
            WA_REFRANGE  LIKE LINE  OF REFRANGE,
            IT_PROJECT   LIKE TABLE OF TPROJECT,
            LT_SA01LOIO  TYPE TABLE OF SA01LOIO,
            WA_SA01LOIO  TYPE          SA01LOIO.
    
      DATA: TEMP        TYPE SDOKOBJECT,
            IT_PROPERTIES  LIKE TABLE OF  SDOKPROPTY,
            WA_PROPERTIES  LIKE SDOKPROPTY,
            WA_DOCUMENTS   TYPE ZBE_DMS_PROPS,
            IT_PRIOLIST  LIKE TABLE OF IWPROPSTXT,
            WA_PRIOLIST  LIKE IWPROPSTXT.
    
      DATA: OUPUT_DATE TYPE STRING.
    
      WA_REFRANGE-SIGN = 'I'.
      WA_REFRANGE-OPTION = 'EQ'.
      WA_REFRANGE-LOW = 'BMSD'.     " SAP Document
      APPEND WA_REFRANGE TO REFRANGE.
      WA_REFRANGE-SIGN = 'I'.
      WA_REFRANGE-OPTION = 'EQ'.
      WA_REFRANGE-LOW = 'BMCD'.        " CONFIG Document
      APPEND WA_REFRANGE TO REFRANGE.
      WA_REFRANGE-SIGN = 'I'.
      WA_REFRANGE-OPTION = 'EQ'.
      WA_REFRANGE-LOW = 'TMAT'.    " TRAINNING Document
      APPEND WA_REFRANGE TO REFRANGE.
      wa_refrange-sign = 'I'.
      wa_refrange-option = 'EQ'.
      wa_refrange-low = 'BMDD'.     " DEV Document
      APPEND wa_refrange TO refrange.
    
    * Projektdokumente: BMTNODE01R
      SELECT TPR_INDEX~PROJECT_ID TNOTFPR~OBJECTKEY
      APPENDING TABLE LT_IO
      FROM
      TPR_INDEX INNER JOIN BMTNODE01R
                ON TPR_INDEX~NODE_ID = BMTNODE01R~NODE_ID
                INNER JOIN TNOTFPR
                ON BMTNODE01R~REF_OBJECT = TNOTFPR~ID
      WHERE   BMTNODE01R~REF_TYPE = 'NOTE'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * Projektdokumente: DFTNODE01R
      SELECT TPR_INDEX~PROJECT_ID TNOTFPR~OBJECTKEY
      APPENDING TABLE LT_IO
      FROM
      TNOTFPR INNER JOIN DFTNODE01R
              ON TNOTFPR~ID = DFTNODE01R~REF_OBJECT
              INNER JOIN TPR_INDEX
              ON DFTNODE01R~NODE_ID = TPR_INDEX~NODE_ID
      WHERE   DFTNODE01R~REF_TYPE = 'NOTE'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * SAP Dokumente, CFG Dokumente, Schulungsmaterial: BMTNODE01R
      SELECT TPR_INDEX~PROJECT_ID BMTNODE01R~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      BMTNODE01R INNER JOIN TPR_INDEX
                 ON BMTNODE01R~NODE_ID = TPR_INDEX~NODE_ID
      WHERE   BMTNODE01R~REF_TYPE IN REFRANGE
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * SAP Dokumente, CFG Dokumente, Schulungsmaterial: DFTNODE01R
      SELECT TPR_INDEX~PROJECT_ID DFTNODE01R~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      DFTNODE01R INNER JOIN TPR_INDEX
                 ON DFTNODE01R~NODE_ID = TPR_INDEX~NODE_ID
      WHERE   DFTNODE01R~REF_TYPE IN REFRANGE
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * Test descriptions: BMTNODE01R
      SELECT TPR_INDEX~PROJECT_ID TNODE02R~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      TPR_INDEX INNER JOIN BMTNODE01R
                ON TPR_INDEX~NODE_ID = BMTNODE01R~NODE_ID
                INNER JOIN TNODE02
                ON BMTNODE01R~REF_OBJECT = TNODE02~TREE_ID
                INNER JOIN TNODE02R
                ON TNODE02~NODE_ID = TNODE02R~NODE_ID
      WHERE BMTNODE01R~REF_TYPE = 'TREE'
      AND TNODE02R~REF_TYPE = 'TWTD'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * Test descriptions: DFTNODE01R
      SELECT TPR_INDEX~PROJECT_ID TNODE02R~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      TPR_INDEX INNER JOIN DFTNODE01R
                ON TPR_INDEX~NODE_ID = DFTNODE01R~NODE_ID
                INNER JOIN TNODE02
                ON DFTNODE01R~REF_OBJECT = TNODE02~TREE_ID
                INNER JOIN TNODE02R
                ON TNODE02~NODE_ID = TNODE02R~NODE_ID
      WHERE DFTNODE01R~REF_TYPE = 'TREE'
      AND TNODE02R~REF_TYPE = 'TWTD'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * Development documents: BMTNODE01R
      SELECT TPR_INDEX~PROJECT_ID B~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      TPR_INDEX INNER JOIN BMTNODE01R AS A
                ON TPR_INDEX~NODE_ID = A~NODE_ID
                INNER JOIN BMTNODE01
                ON A~REF_OBJECT = BMTNODE01~TREE_ID
                INNER JOIN BMTNODE01R AS B
                ON BMTNODE01~NODE_ID = B~NODE_ID
      WHERE A~REF_TYPE = 'TREE'
      AND B~REF_TYPE = 'BMDD'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    * Development documents: DFTNODE01R
      SELECT TPR_INDEX~PROJECT_ID B~REF_OBJECT
      APPENDING TABLE LT_IO
      FROM
      TPR_INDEX INNER JOIN DFTNODE01R AS A
                ON TPR_INDEX~NODE_ID = A~NODE_ID
                INNER JOIN BMTNODE01
                ON A~REF_OBJECT = BMTNODE01~TREE_ID
                INNER JOIN BMTNODE01R AS B
                ON BMTNODE01~NODE_ID = B~NODE_ID
      WHERE A~REF_TYPE = 'TREE'
      AND B~REF_TYPE = 'BMDD'
      AND TPR_INDEX~NODE_ID = FOLDER_ID.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
    *  IF INCLUDE_FOLDER_LOIOS IS NOT INITIAL.
    *    CLEAR lt_sa01loio[].
    *
    *    CALL FUNCTION 'SA_KW_RFC_FOLDERS_LOIOS_GET'
    **    IMPORTING
    **      ERROR_MSG        =
    *      TABLES
    *        IT_PROJECT       = it_project
    *        ET_IO_PRO        = lt_sa01loio.
    *
    *    LOOP AT lt_sa01loio INTO wa_sa01loio.
    *      wa_io-project_id = wa_sa01loio-prop08.
    *      l_loio-class = 'SOLARGEN'.
    *      l_loio-objid = wa_sa01loio-loio_id.
    *      MOVE l_loio TO wa_io-objectkey.
    *      APPEND wa_io TO lt_io.
    *    ENDLOOP.
    *  ENDIF.
    
      SORT LT_IO.
      DELETE ADJACENT DUPLICATES FROM LT_IO.
    
      CALL FUNCTION 'SIW_PROPS_VALUES_GET'
      EXPORTING
        PROPERTY_NAME = 'IWB_SOLAR_PRIO'
        AREA          = 'IWBSOLAR'
        LANGUAGE      = SY-LANGU
        SUPPRESS_AUTHORITY_CHECK = 'X'
    *  IMPORTING
    *    ERROR_MSG
      TABLES
        PROPERTY_VALUES_TXT = IT_PRIOLIST
      .
    
      LOOP AT LT_IO INTO WA_IO.
        WA_DOCUMENTS-CLASSID = WA_IO-OBJECTKEY(10).
        WA_DOCUMENTS-OBJID = WA_IO-OBJECTKEY+10(32).
    
        TEMP-CLASS = WA_DOCUMENTS-CLASSID.
        TEMP-OBJID = WA_DOCUMENTS-OBJID.
    
        REFRESH IT_PROPERTIES.
        CALL FUNCTION 'SIW_INFO_OBJECT_PROPS_GET'
          EXPORTING
            INFO_OBJECT = TEMP
          TABLES
            PROPERTIES  = IT_PROPERTIES.
        IF IT_PROPERTIES IS NOT INITIAL.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'IWB_SOLAR_DOCUTYPE'.
    
          SELECT SINGLE TEXT FROM TNOTETPR INTO WA_DOCUMENTS-SOL_DOC_TYPE
             WHERE NOTETYPE = WA_PROPERTIES-VALUE.
    
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'IWB_SOLAR_PRIO'.
    
          READ TABLE IT_PRIOLIST
            INTO WA_PRIOLIST
            WITH KEY VALUE = WA_PROPERTIES-VALUE.
    
          WA_DOCUMENTS-SOL_PRIO = WA_PRIOLIST-DESCR.
    
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'IWB_STATE'.
          WA_DOCUMENTS-STATE = WA_PROPERTIES-VALUE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'LAST_CHANGED_AT'.
          PERFORM CONVERT_DATE USING WA_PROPERTIES-VALUE
                                OUPUT_DATE.
          WA_DOCUMENTS-LAST_CHANGED_AT = OUPUT_DATE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'LAST_CHANGED_BY'.
          WA_DOCUMENTS-LAST_CHANGED_BY = WA_PROPERTIES-VALUE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'CREATED_AT'.
          PERFORM CONVERT_DATE USING WA_PROPERTIES-VALUE
                                OUPUT_DATE.
          WA_DOCUMENTS-CREATED_AT = OUPUT_DATE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'CREATED_BY'.
          WA_DOCUMENTS-CREATED_BY = WA_PROPERTIES-VALUE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'DESCRIPTION'.
          WA_DOCUMENTS-DESCRIPTION = WA_PROPERTIES-VALUE.
          READ TABLE IT_PROPERTIES
            INTO WA_PROPERTIES
            WITH KEY NAME = 'DOCUMENT_FORMAT'.
          WA_DOCUMENTS-DOCUMENT_FORMAT = WA_PROPERTIES-VALUE.
     
          APPEND WA_DOCUMENTS TO DOCUMENTS.
    
        ENDIF.
      ENDLOOP.
    
    
    ENDFUNCTION.
    
    
    
    *&--------------------------------------------------------------------*
    *&      Form  convert_date
    *&--------------------------------------------------------------------*
    *       text
    *---------------------------------------------------------------------*
    *      -->DATE       text
    *      <--OUPUT_DATE text
    *---------------------------------------------------------------------*
    FORM CONVERT_DATE USING DATE
                            OUPUT_DATE.
    
      DATA:
        W_HOUR(2)   TYPE C,
        W_MIN(2) TYPE C,
        W_SEC(4)  TYPE C,
        W_DAY(2)   TYPE C,
        W_MONTH(2) TYPE C,
        W_YEAR(4)  TYPE C.
    
      IF DATE IS NOT INITIAL.
        W_YEAR  = DATE(4).
        W_MONTH = DATE+4(2).
        W_DAY = DATE+6(2).
        W_HOUR = DATE+8(2).
        W_MIN = DATE+10(2).
        W_SEC = DATE+12(2).
    
        CONCATENATE W_MONTH '/' W_DAY '/' W_YEAR'__' W_HOUR ':' W_MIN ':' W_SEC INTO OUPUT_DATE.
      ELSE.
        OUPUT_DATE = 'N/A'.
      ENDIF.
    ENDFORM.                    "convert_date
    

     

    ZBE_DMS_PROPS looks like this

    MANDT                 MANDT               CLNT     3

    OBJID                   SDOK_DOCID       CHAR        32

    CLASSID                 SDOK_CLASS      CHAR     10

    SOL_DOC_TYPE     CHAR40                CHAR     40

    SOL_PRIO           CHAR10              CHAR    10

     

     

    now that you have a list of documents for a given folder you need the document url for a user selected document.

     

     

    FUNCTION Z_BSP_PROJECT_GET_DOC.
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(OBJID) TYPE  SDOK_DOCID
    *"     VALUE(CLASSID) TYPE  SDOK_CLASS OPTIONAL
    *"  EXPORTING
    *"     VALUE(URL) TYPE  SAEURI
    *"----------------------------------------------------------------------
      DATA:
            DOC_OBJECT      TYPE REF TO CL_SA_DOC_FACTORY,
            WA              TYPE IWCONTEXT,
            CONTEXT_PARAMS  TYPE SDOKPROPTYS,
            ITAB_CONTEXT    TYPE SDOKPROPTYS,
            WA_CONTEXT      LIKE LINE OF ITAB_CONTEXT,
            WA_SA01PHIO     LIKE SA01PHIO.
    
      SELECT SINGLE PROP01 PROP03 PROP04  FROM SA01PHIO
          INTO CORRESPONDING FIELDS OF WA_SA01PHIO
          WHERE LOIO_ID = OBJID
          AND   LO_CLASS = CLASSID.
    
    
      WA_CONTEXT-NAME = 'LANGUAGE'.
      WA_CONTEXT-VALUE = WA_SA01PHIO-PROP04.
      APPEND WA_CONTEXT TO ITAB_CONTEXT.
      WA_CONTEXT-NAME = 'RELEASE'.
      WA_CONTEXT-VALUE = WA_SA01PHIO-PROP03.
      APPEND WA_CONTEXT TO ITAB_CONTEXT.
      WA_CONTEXT-NAME = 'IWB_INDUSTRY'.
      WA_CONTEXT-VALUE = WA_SA01PHIO-PROP01.
      APPEND WA_CONTEXT TO ITAB_CONTEXT.
    
      WA-LANGU = WA_SA01PHIO-PROP04.         "Language Key
      WA-RELEASE = WA_SA01PHIO-PROP03 .        "Release of SAP
    
      CALL FUNCTION 'SOLAR_DOCU_CONTEXT_GET_PARAMS'
        EXPORTING
          DOCU_CONTEXT   = WA
          TRY_OTHER_LANG = 'X'
        CHANGING
          CONTEXT_PARAMS = CONTEXT_PARAMS.
    
      READ TABLE CONTEXT_PARAMS
        INTO WA_CONTEXT
        WITH KEY NAME = 'TMP_IWB_TRY_OTHER_LANG'.
      APPEND WA_CONTEXT TO ITAB_CONTEXT.
    
      READ TABLE CONTEXT_PARAMS
        INTO WA_CONTEXT
        WITH KEY NAME = 'TMP_IWB_TRY_OTHER_IND'.
      APPEND WA_CONTEXT TO ITAB_CONTEXT.
    
      CREATE OBJECT DOC_OBJECT.
      CALL METHOD CL_SA_DOC_FACTORY=>GET_READ_URL
        EXPORTING
          I_CLASS     = CLASSID
          I_OBJID     = OBJID
          IT_CONTEXT  = ITAB_CONTEXT
        IMPORTING
          LOGICAL_URL = URL
        EXCEPTIONS
          ERROR       = 1
          OTHERS      = 2
              .
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    
    ENDFUNCTION.
    

     

    if you have any questions about the code i will be happy the answer them. i am almost done with how to upload documents to solman. then after that... being how i am abap programmer with no functional acknowledge i will have to figure out "what is solman used for in the first place." but right now there is no time to learn such trivial stuff

  • Re: How to upload a document into Solution Manager via BSP?
    Henry Stewart
    Currently Being Moderated

    i forgot............................

     

    the boss only wanted people to see the project they where involve in.... or he didn't want them to see the projects that they were not involve in. not sure which.... there are table to check to see if a person should view a folder but i was not told to look into that. i only been doing abap for 6 months, so if the code look ugly, sorry.

     

    FUNCTION Z_BSP_PROJECT_GET_USER_PROJECT.
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  TABLES
    *"      IT_OBJECT_ID STRUCTURE  TPROJECTT
    *"----------------------------------------------------------------------
    
    clear IT_OBJECT_ID.
    
    SELECT TRESSP~PROJECT_ID TPROJECTT~TITLE
       INTO CORRESPONDING FIELDS OF TABLE IT_OBJECT_ID
       FROM TRESSP INNER JOIN TPROJECTT
         ON TRESSP~PROJECT_ID = TPROJECTT~PROJECT_ID
       WHERE TRESSP~SAP_USER = sy-uname.
    
    ENDFUNCTION.
    

     

  • Re: How to upload a document into Solution Manager via BSP?
    Jurjen de Vries
    Currently Being Moderated

    GREAT!

    (Best answer I had so far on a question on sdn,... not my post though so unfortunately cannot assign points)

  • Re: How to upload a document into Solution Manager via BSP?
    Henry Stewart
    Currently Being Moderated

    Thanks, this is the first time i have posted an answer.... to bad it is my form. i still working on uploading doc to solman.

  • Re: How to upload a document into Solution Manager via BSP?
    Jurjen de Vries
    Currently Being Moderated

    Hi Henry,

     

    Have you figured out how to do the upload yet?

    I am running into problems there.

     

    I have a question open on this ABAP function to upload document in SOLAR01 in the same forum so if you have an answer I can reward you points.

Actions