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

Problem with Submit statement

Former Member
0 Likes
728

Hi Everyone,

The below statement is working fine with normal list output

SUBMIT ztest_list AND RETURN EXPORTING LIST TO MEMORY

WITH p_kunnr = p_kunnr .

But I am using the above statement to submit a program which is displaying the output in ALV grid.

I don't want the output to be displayed.

I only want the list to be exported to the memory.

Other wise I want the output internal table to be uploaded to a memory without displaying any output.

Edited by: Srinivasu Reddy on Jul 15, 2008 2:03 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

data : txtlines(2048) TYPE c OCCURS 0 WITH HEADER LINE.

SUBMIT ztest_list WITH p_kunnr = p_kunnr

exporting list to memory

and return.

call function 'LIST_FROM_MEMORY'

tables

listobject = list

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.

call function 'LIST_TO_ASCI'

tables

listasci = txtlines

listobject = list

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.

else.

*---Free the memory

call function 'LIST_FREE_MEMORY'.

if sy-subrc <> 0.

endif.

endif.

data will be in txtlines.

6 REPLIES 6
Read only

Former Member
0 Likes
699

data : txtlines(2048) TYPE c OCCURS 0 WITH HEADER LINE.

SUBMIT ztest_list WITH p_kunnr = p_kunnr

exporting list to memory

and return.

call function 'LIST_FROM_MEMORY'

tables

listobject = list

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.

call function 'LIST_TO_ASCI'

tables

listasci = txtlines

listobject = list

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.

else.

*---Free the memory

call function 'LIST_FREE_MEMORY'.

if sy-subrc <> 0.

endif.

endif.

data will be in txtlines.

Read only

Former Member
0 Likes
698

hiii

you can only use SUBMIT statement with EXPORT addition for this purpose...

SUBMIT ztest_list WITH p_kunnr = p_kunnr

exporting list to memory...

regards

twinkal

Read only

Former Member
0 Likes
698

Hi,

I am afraid that this is not possible through Submit. A Submit command will leave the current program and the control goes to the called program which means whatever code written in the target program will get executed.

Why can't call the corresponding Subroutine which is doing the calculation in the target program and get back the result.

eg . PERFORM calculate(ztest_list) tables..

using ...

Cheers

Kothand

Read only

Former Member
0 Likes
698

Kothand

we have develop more than 10 reports using SUBMIT + LIST_FROM_MEMORY + LIST_TO_ASCI + LIST_FREE_MEMORY functions.

LET srini speaks.

Read only

0 Likes
698

Hi Raj,

We can use submit statement with Exporting to memory for normal list displays. it is not working for ALV Grid.

My requirement is from one program I need to submit another program, for this program I will get the output internal table and then process this table.

For this I need the output internal table without displaying any output.

Read only

Former Member
0 Likes
698

u r right srini this functions will work for LIST display only. for ALV output i think we have to study SLIS.