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

How to use 'Submit' for Program rpsinfo (tcode:cn41n)

Former Member
0 Likes
874

Hi Friends,

CN41N is a Hierarchical report of PS Module. Which displays WBS, Network, Project details in Hierarchical view. I want to store the output of this report in internal table for further processing. For this i am using the following code .


 SUBMIT  rpsinfo
   WITH cn_pspnr-low EQ 'S-0018-01-01-01-01-001'
   EXPORTING LIST TO MEMORY AND RETURN .

  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = list_tab
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.
  DATA: BEGIN OF i_asci OCCURS 0,
       data1(5000) TYPE c,
       END OF i_asci.

  CALL FUNCTION 'LIST_TO_ASCI'
* EXPORTING
*   LIST_INDEX               = -1
*   WITH_LINE_BREAK          = ' '
* IMPORTING
*   LIST_STRING_ASCII        =
*   LIST_DYN_ASCII           =
   TABLES
     listasci                 = i_asci
     listobject               = list_tab
   EXCEPTIONS
     empty_list               = 1
     list_index_invalid       = 2
     OTHERS                   = 3
            .
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

The above code is not working. Output is not going to memory. But this is working with all other reports which are simple ALV Reports. I think since rpsinfo (tcode:cn41n) is hierarchical report it is not displaying output. Then how do i send the output to the memory. Please suggest the solution.

Thanks in Advance.

Mahender.

2 REPLIES 2
Read only

franois_henrotte
Active Contributor
0 Likes
658

if the hierarchical report is displayed using SAP Graphics, then you will never be able to get information from memory because the output is not stored into a SAP list

Read only

0 Likes
658

Thanks for your reply.

Then what may be the alternative tips to pick the output.

waiting for your answer.

Best Regards.

Mahender.