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

submit EXPORTING LIST TO MEMORY and return

Former Member
0 Likes
6,030

We have a requirement to use submit to run ME59N (RM06BB30) Transaction by passing plant and Tracking number

to the selection screen of ME59N, when I use this

SUBMIT RM06BB30 WITH SELECTION-TABLE i_rspar

EXPORTING LIST TO MEMORY

AND RETURN.

The output results were not getting exported to memory, since the standard program returns an ALV,

My problem is: when I use the above SUBMIT, the out is displaying immediately after SUBMIT was executed.

It does not came back to called program, If I press BACK button to come back to my screen, I need to move the output of this program into a internal table and display after my program is executed.

Please suggest me what to do.

Thanks & regards

Frank

We have a requirement to use submit to run ME59N (RM06BB30) Transaction by passing plant and Tracking number

to the selection screen of ME59N, when I use this

SUBMIT RM06BB30 WITH SELECTION-TABLE i_rspar

EXPORTING LIST TO MEMORY

AND RETURN.

The output results were not getting exported to memory, since the standard program returns an ALV,

My problem is: when I use the above SUBMIT, the out is displaying immediately after SUBMIT was executed.

It does not came back to called program, If I press BACK button to come back to my screen, I need to move the output of this program into a internal table and display after my program is executed.

Please suggest me what to do.

Thanks & regards

Frank

6 REPLIES 6
Read only

former_member186741
Active Contributor
0 Likes
2,397

I have used this option successfully, the only difference I can see between yours and mine is that I passed parameter values and you use a selection table. The program I submitted was a custom one but is an ALV report and it worked fine.

Here's a code fragment:

  • run the FertTerms+ Signup report

SUBMIT zsdr0007

EXPORTING LIST TO MEMORY

WITH s_kunnr IN r_kunnr

WITH s_udate IN s_udate

WITH s_agent EQ us_work-kunn2 SIGN 'I'

WITH s_dtaws CP '*' SIGN 'I'

WITH p_varint = '/CONFIRM'

WITH p_latest = 'X'

AND RETURN.

  • import the list from memory and store it in table l_listobject

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = l_listobject

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE e000

WITH 'fatal error with LIST_FROM_MEMORY. SY-SUBRC=' sy-subrc.

ENDIF.

  • free memory

CALL FUNCTION 'LIST_FREE_MEMORY'

TABLES

listobject = l_listobject

EXCEPTIONS

OTHERS = 1.

IF sy-subrc <> 0.

MESSAGE e000

WITH 'fatal error with LIST_FREE_MEMORY. SY-SUBRC=' sy-subrc.

ENDIF.

  • it's always necessary to compress the table.

  • SAPconnect will decompress it

CALL FUNCTION 'TABLE_COMPRESS'

TABLES

in = l_listobject

out = l_contents_hex

EXCEPTIONS

compress_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE e000

WITH 'fatal error with TABLE_COMPRESS. SY-SUBRC=' sy-subrc.

ENDIF.

Read only

0 Likes
2,397

Hi Neil,

Still I did not solved this problem.

I dont know why it is not working could you please give any ideas?

I tried to use Call Transaction also,

CALL TRANSACTION 'ME59N' USING i_bdcdata MODE 'N' MESSAGES INTO i_message.

But It is not giving me the proper message in i_message Table.

Any Ideas..

Thanks & regards

Frank

Message was edited by: Frank Rex

Read only

0 Likes
2,397

Hi Frank,

have you tried running your program (the one which submits RM06BB30) as a batch job? If you have been running it online it may always try to show you the report.

Read only

0 Likes
2,397

hi,

i have this problem.

when

i use this FM it's nothing is getting in to listindex....

REPORT  ZSHAN_SUBMIT1.

DATA: begin of pernr_qttrans,
         pernr type pernr-pernr,
         cname type p0002-cname,
         SNAME type P0001-SNAME,
         gdate  type pc2bl-gdate,
         qtext type t556b-ktext,
         qtype  type pc2bl-qtype,
         lvnum  type pc2bl-lvnum,
         untext type t538t-etext,
         quoun  TYPE ptquoded-quoun,
       end of pernr_qttrans.

DATA: itab_qttrans LIKE TABLE OF pernr_qttrans,
       wa_itab_qttrans LIKE pernr_qttrans.

SUBMIT rptqta10
       EXPORTING LIST TO MEMORY
       WITH PNPPERNR-LOW = 102
       AND RETURN.

DATA: listobject1 like table of ABAPLIST,
      l_contents_hex like table of ABAPLIST.


CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    LISTOBJECT       = listobject1
 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.
*message id e000 WITH 'fatal error with LIST_FROM_MEMORY. SY-SUBRC=' sy-subrc.
ENDIF.

write: 'list'.

CALL FUNCTION 'LIST_FREE_MEMORY'
 TABLES
   LISTOBJECT       = listobject1
          .

write: 'free'.

CALL FUNCTION 'TABLE_COMPRESS'
* IMPORTING
*   COMPRESSED_SIZE       =
  TABLES
    IN                    = listobject1
    OUT                   = l_contents_hex
 EXCEPTIONS
   COMPRESS_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.

write: 'compress'.

I am trying to get the itab QTTRANS of RPTQTA10 into this program.

Regards,

Shankar.

Read only

Former Member
0 Likes
2,397

Hi !

There is still the "old" one in the system "ME59".

It's the RM06BB20.

Since it is not deactivated in the system you may be use this report but do some tests to se if it gives you the same results als the ME59N !

Please give me some reward points if that helps you...

Regards

Rainer

Read only

0 Likes
2,397

Hi,

We need to make use of BADI, 'MD_PURREQ_CHANGE'.

Old transaction ME59 can not make use of this BADI,

and ME59n and ME59 has the same functionality.

Still this problem is not solved.

Could you please give me any idea?

Thanks & regards

Frank

Message was edited by: Frank Rex