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

about SUBMIT

Former Member
0 Likes
559

Hi. I have a programm A, wich should call a programm B, passing to parameters.

The problem is that programm B has 3 interns tables like final result, and then those 3 tables are sending to call a Smartform.

What i wnato to do is call programm B, not shows its result, and capture the content of the 3 interns tables to use them in programm A.

How I can Do this??? maybe using SUBMIT, but i don't know how, and is very important that the program wich is called, doesn't show its result, only capture its data.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
525

Hi Jorge,

Do you have availability to change program B? If so you can simply ommit the call statement for smartform and use ABAP memory to send your tables' content back to program A.


"in program B
EXPORT tab FROM my_table1[] TO MEMORY ID 'TAB'.
 
"in program A
data: my_tab1 type ...
IMPORT tab TO my_tab1[] FROM MEMORY ID 'TAB'.   

If you program B uses screen to displlay the results you can suppress it with


EXPORT ...
SUPRESS DIALOG.  "screen won't be shown

If, on the other hand, you use simple write statements to display program's B results, you can do following:


"first submit program B in such mode
SUBMIT program_B EXPORTING TO LIST MEMORY. "now all your write statements won't be outputed on screen, instead it will be exported to memory

"now in the program A import it back from the memory using
DATA  BEGIN OF my_tab1 OCCURS 0.
        INCLUDE STRUCTURE abaplist.
DATA  END OF my_tab1.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = my_tab1.

For more information about the last one refer [this|http://www.sapdev.co.uk/reporting/rep_submit.htm].

Regards

Marcin

3 REPLIES 3
Read only

Former Member
0 Likes
525

Hi Jorge,

Check this link.

http://www.sap-img.com/ab020.htm

Try F1 on EXPORT also.

Regards,

Gilberto Li

Read only

former_member376453
Contributor
0 Likes
525

In SE38, write 'Submit' then press a F1.

Search the forum with key word 'Submit Program'

This are the basic steps need to be performed before posting in SDN.

Kuntal

Read only

MarcinPciak
Active Contributor
0 Likes
526

Hi Jorge,

Do you have availability to change program B? If so you can simply ommit the call statement for smartform and use ABAP memory to send your tables' content back to program A.


"in program B
EXPORT tab FROM my_table1[] TO MEMORY ID 'TAB'.
 
"in program A
data: my_tab1 type ...
IMPORT tab TO my_tab1[] FROM MEMORY ID 'TAB'.   

If you program B uses screen to displlay the results you can suppress it with


EXPORT ...
SUPRESS DIALOG.  "screen won't be shown

If, on the other hand, you use simple write statements to display program's B results, you can do following:


"first submit program B in such mode
SUBMIT program_B EXPORTING TO LIST MEMORY. "now all your write statements won't be outputed on screen, instead it will be exported to memory

"now in the program A import it back from the memory using
DATA  BEGIN OF my_tab1 OCCURS 0.
        INCLUDE STRUCTURE abaplist.
DATA  END OF my_tab1.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = my_tab1.

For more information about the last one refer [this|http://www.sapdev.co.uk/reporting/rep_submit.htm].

Regards

Marcin