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 with internal table

Former Member
0 Likes
3,242

Hi.

I have a function module with a internal table. This internal table has 30 fields and i have to it to a program vis SUBMIT, furthemore this program will be executed inside a job. Im trying to pass tha internal table with export and import but it doesn´t go.

Anybody can help me???

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,009

Hi,

I think When you are executing the data from the program inside the background job the export and import will not work with memory as they are session based. Rather you need to export it to database INDX and import it from Database INDX.

Hope this helps.

12 REPLIES 12
Read only

Former Member
0 Likes
3,008

You can use IMPORT/EXPORT in the following manner :

REPORT REP1 NO STANDARD PAGE HEADING.

DATA: ITAB TYPE I OCCURS 10,

NUM TYPE I.

SUBMIT REP2 AND RETURN.

IMPORT ITAB FROM MEMORY ID 'HK'.

LOOP AT ITAB INTO NUM.

WRITE / NUM.

ENDLOOP.

TOP-OF-PAGE.

WRITE 'Report 1'.

ULINE.

Read only

0 Likes
3,008

This program calls the following executable program (report):

REPORT REP2 NO STANDARD PAGE HEADING.

DATA: NUMBER TYPE I,

ITAB TYPE I OCCURS 10.

SET PF-STATUS 'MYBACK'.

DO 5 TIMES.

NUMBER = SY-INDEX.

APPEND NUMBER TO ITAB.

WRITE / NUMBER.

ENDDO.

TOP-OF-PAGE.

WRITE 'Report 2'.

ULINE.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'MBCK'.

EXPORT ITAB TO MEMORY ID 'HK'.

LEAVE.

ENDCASE.

Read only

Former Member
0 Likes
3,008

Hi Jorge

Will try to answer basing on what i can understand

from you query.

I guess you have an internal table in your FM with

some data. You are submitting a program within the FM

and you need the data in the internal table to be used

in the program.

If my understanding is right, you can do it via

EXPORT/IMPORT statements.

EXPORT <int_tab> TO MEMORY ID 'MID'. --> In FM.

IMPORT <int_tab> FROM MEMORY ID 'MID". --> In Program

Note that the internal table declaration should be

the same in FM and Program like name of the internal

table, all field names, data type everything should be

the same.

Check if you are handling the same way.

Kind Regards

Eswar

Read only

Former Member
0 Likes
3,008

Hi jorge,

1. When u use memory id, make sure of the

following points.

a) The memory id is SAME as the variable name

b) Memory id should be in CAPITAL

c) When u want to import,

the variable name should be same as original one,

and should be declared in the same fashion only.

regards,

amit m.

Read only

0 Likes
3,008

Yes, all the syntax is correctly, the IMPORT statment is correctly but the IMPORT dosen´t go.

I don´t know why is the reason.

Read only

0 Likes
3,008

Please refer to the below post.

Kind Regards

Eswar

Message was edited by: Eswar Rao Boddeti

Read only

0 Likes
3,008

Can you post your code with the declarations, exporting,

importing and SUBMIT statements. Hope that can help to

propose a better solution.

Kind Regards

Eswar

Read only

Former Member
0 Likes
3,010

Hi,

I think When you are executing the data from the program inside the background job the export and import will not work with memory as they are session based. Rather you need to export it to database INDX and import it from Database INDX.

Hope this helps.

Read only

0 Likes
3,008

Yes I'have tried with this option and it's OK.

Thank you very much!!!

Read only

0 Likes
2,644

Hi,
Can u explain how you did that.

Read only

0 Likes
2,579

'Former User' are, as their name implies, no longuer active.

Better ask your own question or perform some search.

Read only

0 Likes
2,561

Thanks for your valuable  concern. Already did some searching; after that, I asked here and now got those answers. Thanks man.