Skip to Content

Hi All,

Couple of years ago, I had a requirement to have all the Project Details available as present in Transaction Solar01.

Well, I had to debug the standard coading for a long hectic time to get the Standard Code and the Classes which could accomplish my purpose.

These days I got a numbers of friends asking for the details to download the Project Data from Solar01, so I just thought of uploading the procedure over here.

I am providing the exact code, rather just the Classes and the methods to get the Project Data,

1. Create an Object of Class CL_SPROJECT_SOLAR_BASE_REPORT, by passing the Project Name and other Parameters.

2. Invoke Method GET_DATA_CONTAINER of the above object.

3. Use FM SPROJECT_CHECK_GROUP_ID_EXIT to get Group Id.

4. Pass Group Id to FM SPROJECT_GET_PROJECT_BY_GROUPB to get all the Projects.

5. Use Method SET_PROJ_RANGE of Class CL_SPROJECT_SOLAR_BASE_REPORT to set Range for all the desired projects.

6. Invoke Method set_struktur_ids_of_project of Class CL_SPROJECT_SOLAR_BASE_REPORT.

7. For each entry in Atrribute A_T_TOBJECTP of Class CL_SPROJECT_SOLAR_BASE_REPORT, invoke Method GET_PROJ_STRUCTURE.

8. Now, invoke methods CREATE_STRUCTURE_TABLE and GET_PROJECT_DATA of Class CL_SPROJECT_SOLAR_BASE_REPORT.

9. Call A_O_PROJECT_DATA->ASSIGN_CONTENT of Class CL_SPROJECT_SOLAR_BASE_REPORT.

10. Now, your Project Data is available in Attribute A_T_PROJECT_DATA of Class CL_SPROJECT_SOLAR_REPORT_DATA, the object that you have got in Step 2.

11. Now, you can Use the details as per you requirement.

I believe it will certainly help the fellow abapers to get the required details.

Please put the comments, if I some more effort is required from my end for this post.

Thanking You All.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

    1. Ankit Sharma Post author

      Hi Dominic,

      I am not in the the same team now, so it will be a bit tough for me to share the code.

      Please start the task and keep on posting the issues, together we will solve it ..!!


      Thanking You All..!!

      (0) 
      1. Dominic Stolz

        Hi Ankit,

        at first, thank you for your offer to help me. I will try to describe my Problem and post the code i have for now. Also i have to say that i am no ABAP professional, i just need the data for a BRFplus Application.

        So i especially need the values from the Customer Attributes of a business process in a known project  inside the SOLAR01. I tried a lot, but I always need the business object for methods or table operations. So i followed your steps to get the relevant Data. Until Step 6 there occur no problems, but at step 7 i don´t know what i have to do.

        That is my code for your described steps, maybe you can describe the next steps a little more detailed and detect any failures in my coding.

        DATA:         

                 data_container TYPE REF TO cl_sproject_solar_report_data,

                 group_id TYPE sgroupid,

                 project_list TYPE projectlist,


                 project_range TYPE spro_proj_range,

                 project_range_line LIKE LINE OF project_range,


                 r_solar_base_class TYPE REF TO cl_sproject_solar_base_report.

        CREATE OBJECT r_solar_base_class

             EXPORTING

               project_id      = i_project_id  “the Signature ID of the Project

        *     reptype         =

        *     variant         =

        *     variant_program =

        *     roadmap         =

        *     rep_variant     =

             .

           CALL METHOD r_solar_base_class->get_data_container

             CHANGING

               i_o_data_container = data_container.

        CALL FUNCTION ‘SPROJECT_CHECK_GROUP_ID_EXIT’

        * EXPORTING

        *   WITH_DIALOG                       =

          IMPORTING

        *   ACTIVE                            =

            GROUP_ID                          = group_id

        * EXCEPTIONS

        *   FUNCTIONALITY_NOT_AVAILABLE       = 1

        *   NO_GROUP_ID_ENTERED               = 2

        *   OTHERS                            = 3

                   .

        IF sysubrc <> 0.

        * Implement suitable error handling here

        ENDIF.

        CALL FUNCTION ‘SPROJECT_GET_PROJECT_BY_GROUPB’

          EXPORTING

            GROUP_ID           = group_id

          IMPORTING

            PROJECTS           = project_list

        * EXCEPTIONS

        *   NOT_RELEVANT       = 1

        *   OTHERS             = 2

                   .

        IF sysubrc <> 0.

        * Implement suitable error handling here

        ENDIF.

           project_range_linesign   = ‘I’.

           project_range_lineoption = ‘EQ’.

           project_range_linelow    = i_project_id.

           APPEND project_range_line TO project_range.

           CALL METHOD r_solar_base_class->set_proj_range

             EXPORTING

               i_proj_range = project_range.

           CALL METHOD r_solar_base_class->set_struktur_ids_of_project.

        I´m on vacation the next week. So i will probably answer you after that days. Thanks again for your spent time.

        Greetings

        Dominic

        (0) 
  1. Dominic Stolz

    Hi Ankit,

    the solution of the problem hasn`t very high priority, but is still on my agenda and I still need your assistance.

    Greetings

    Dominic

    (0) 

Leave a Reply