Application Development 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: 

Submit....Exporting.....not working after SP11 upgrade

Former Member
0 Kudos

Hi friends ,

the following code not working after SP11 upgrade -

SUBMIT zrsusr002

USING SELECTION-SCREEN 1000

WITH tcode = 'ZCIDDCM'

WITH listmark = 'X'

EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_abaplist

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

RAISE not_found.

ENDIF.

What we are trying -

The code will find out all the valid users for specified transactions and stores the generated ALV report in memory. The LIST FROM MEMORY function will recall this exported data back into listobject (of type structure ABAPLIST).

Being a standard code, the code should work fine and retrieve the ALV list into listobject. However, it fails when it try to import the list output back from memory. To be noted that, the same code was working fine before SP11 upgrade.

I raised OSS Note and got the reply - to use "Submit....to spool" instead of "Exporting LIST to memory" . I tried the following -

SUBMIT rsusr002

USING SELECTION-SCREEN 1000

WITH tcode = 'SE38'

WITH listmark = 'X'

TO SAP-SPOOL

SPOOL PARAMETERS pri_params

WITHOUT SPOOL DYNPRO

AND RETURN.

But it is generating the spool and i want all the user list in a table. Not able to get exact systax which can work . PLEAS HELP. Thanks in advance

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

sap key word documentation says that

for <b>EXPORTING LIST TO MEMORY</b> "<i>The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed.</i>"

make sure that , this is not the case in your program.

use using selection-screen when you have more that one screen number in the program.

after execution of FM 'LIST_FROM_MEMORY' what is the sy-subrc value?

Regards

Raja

16 REPLIES 16

athavanraja
Active Contributor
0 Kudos

sap key word documentation says that

for <b>EXPORTING LIST TO MEMORY</b> "<i>The addition can only work provided the function key Enter is not linked to a function code in the GUI status last defined for the program accessed.</i>"

make sure that , this is not the case in your program.

use using selection-screen when you have more that one screen number in the program.

after execution of FM 'LIST_FROM_MEMORY' what is the sy-subrc value?

Regards

Raja

0 Kudos

Thanks Raja ,

FM 'LIST_FROM_MEMORY' returns sy-subrc as 1.

I'm checking for your suggetion. Thanks again for your kind help .

Regards

Nand Kishor

0 Kudos

also check with the given selections in the submit "zrsusr002" - does the program really generates a list at all.

Regards

Raja

Since you are new to SDN forums, have a look at the following weblog to understand about SDN way of saying thanks.

/people/mark.finnern/blog/2004/08/10/spread-the-love

0 Kudos

Hi Raja ,

submit "zrsusr002" gives the ALV output. Here i'm writting the contents which i got from SAP -

+++++++++++++++++++++++++++++++++++++++++++++++++++++

I have logged into the system and confirmed that the report

"RSUSR002" uses ALV Grid Control for the display.

the ABAP List Viewer (ALV) use a total different technology for the

output as normal ABAP lists. Such ALV lists cannot be exported to the

SAP memory. So this hasn't been supported since earlier releases.

(Although it works in some releases)

Please use 'submit ... to spool' instead of 'exporting list to

memory'.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Sorry for not saying you Thanks in SDN way....this time i'm doing it .

0 Kudos

No dont feel sorry, i just introduced you to that because you are new to SDN and may not know about it.

Another point is , give 10 points only if it solves your problem.

the points go like this

2 - helpful

6 - very helpful

10 - solved the problem.

with regard to the actual question, after reading the note from SAP it makes some sense, any how i am trying to simulate the problem by writing a sample. give me sometime i will post my findings.

Regards

Raja

0 Kudos

since you submitted the report with listmark = 'X', the result will be a ALV list , that means it can be exported to memory and read by list_from_memory.

to prove it i have created a sample program. Run the program in your system and see it yourself.

run BCALV_FULLSCREEN_DEMO_CLASSIC separately and then run ytest in debug mode and see.


report ytest.
data: listobject type table of abaplist.

submit BCALV_FULLSCREEN_DEMO_CLASSIC and return exporting list to memory.


CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject       = listobject
 EXCEPTIONS
   NOT_FOUND        = 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.

Regards

Raja

0 Kudos

Hi Raja ,

My purpose is to get the valid users for a perticular transaction ( Not the ALV output ) for further processing . Please suggest me how can i get that....

Thanks & Regards

Nand Kishor

0 Kudos

Hi Raja ,

My purpose is to get the valid users for a perticular transaction ( Not the ALV output ) for further processing . rsusr002 is a standard program which does the same,but u know the what problem i'm facing in that.

Please suggest me how can i get that....

Thanks & Regards

Nand Kishor

0 Kudos

i was only trying the prove that ALV list can be used for export to memory.

for you requirement debug the program rsusr002 to see how they are fetching the values.

It shouldnt be very difficult.

Regards

Raja

0 Kudos

Hi Raja,

I debug the program and found that it is not sending the list to memory.I have saved as the prg rsusr002 to zrsusr002 and written Export...in it after generating the list...it works, but client dont want modification in standard prg. please suggest.

thanks

NK

0 Kudos

dont modify the standard program. just create a z program and use only the logic for building your report.

Regards

Raja

0 Kudos

Even saving as z prg not allowed....

I think i'm disturbing u lott...but i'm sorry for that i have to complete is by tomm . May i know some thing about you ..like in which company u r working ? any contact no. ? ( If u dont mind )

Thanks * regards

NK

0 Kudos

Oh are you saying that this should work from the standard program?

i am trying to find how we can handle, wait for sometime please.

details about me can be viewed from the following link

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=2t...

Regards

Raja

athavanraja
Active Contributor
0 Kudos

ok got it , i think it should work.

just follow following code sample.

data: su10_mode(1) .

move: 'X' to su10_mode .

EXPORT SU10_MODE TO MEMORY ID 'SU10_MODE' .

SUBMIT zrsusr002

USING SELECTION-SCREEN 1000

WITH tcode = 'ZCIDDCM'

WITH listmark = 'X'

EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_abaplist

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

RAISE not_found.

ENDIF.

and let me know how it goes.

Regards

Raja

0 Kudos

Hi Raja ,

Its working now ...:) . One thing i want to know that how you found "su10_mode" ?? what is the approach to find this ? Thanks once again .

Regards

Nand Kishor

0 Kudos

<u><b>DEBUGGING</b></u>

i found in the debugging that the program imports su10_mode and if its blank it is calling GRID display (which wont work for your case ) and if it is X then the progoam calls list display function (which will work for your case)

Debug it, you will see it yourself.

Regards

Raja