Skip to Content

how to submit RSNAST00 and get variables from smartform FM

hello ,

I'm trying to submit program RSNAST00 in my Z program to get value of a variable from SF FM .. I already got the variable name .

this variable only know in the scope of SF function module so submitting RSNAST00 -> driver program --> SF FM (which will have my variable ) .

now my problem is : I'm getting this message from RSNAST00

"0 outputs were processed in total (0 success 0 incorrectly"

I have seen this QA https://archive.sap.com/discussions/thread/1314222
but I want to avoid changing processing mode .. is there is anyway to get around changing the processing mode so I can execute output types within my Z program ?

     SUBMIT rsnast00 WITH s_kappl EQ wa_TNAPR-kappl " Print Output

                        WITH s_objky EQ P_objky

                        WITH s_kschl EQ wa_TNAPR-KSCHL

                        WITH s_nacha EQ wa_TNAPR-nacha

                        WITH p_sort  EQ '01'

                        WITH p_again EQ 'X'

                        exporting list to memory

                        AND RETURN.





 call function 'LIST_FROM_MEMORY'

    tables

      listobject       = t_list

    exceptions

     not_found        = 1

     others           = 2.



  if sy-subrc <> 0.

    message 'Unable to get list from memory'

      type 'E'.

  endif.



  call function 'WRITE_LIST'

*   EXPORTING

*     WRITE_ONLY       = 'X'

    tables

      listobject       = t_list

   EXCEPTIONS

     EMPTY_LIST       = 1

     OTHERS           = 2

            .

  if sy-subrc <> 0.

    message 'Unable to write list'

      type 'E'.

  endif.



import (lv_source_line) from MEMORY ID 'Cline' . " lv_source_line will have the variable name in SF FM
Add comment
10|10000 characters needed characters exceeded

  • Why do you need that variable? What's the business requirement?

    Sorry, this seems like a very bad idea. But without understanding the actual need it's hard to suggest an alternative.

  • Get RSS Feed

0 Answers