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

SHARED MEMORY AND DATABASE MEMORY giving problem.

Former Member
0 Likes
919

Hello Friends,

I am facing problem with EXPORT MEMORY and IMPORT MEMORY.

I have developed one program which will EXPORT the internal table and some variables to the memory.This program will call another program via background job. IMPORT memory used in another program to get the first program data.

This IMPORT command is working perfect in foreground. But it is not working in background.

So, I have reviewed couple of forums and I tried both SHARED MEMORY AND DATABASE MEMORY. But no use. Still background is giving problem.

When I remove VIA JOB parameter in the SUBMIT statement it is working. But i need to execute this program in background via background job. Please help me . what should I do?

pls find the below code of mine.

  • option1

EXPORT TAB = ITAB

TO DATABASE indx(Z1)

FROM w_indx

CLIENT sy-mandt

ID 'XYZ'.

  • option2

EXPORT ITAB FROM ITAB

TO SHARED MEMORY indx(Z1)

FROM w_indx

CLIENT sy-mandt

ID 'XYZ'.

SUBMIT ZPROG2 TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

*_VIA JOB name NUMBER number*_

AND RETURN.

===

Hope every bidy understood the problem.

my sincere request is ... pls post only relavent answer. do not post dummy answer for points.

Thanks

Raghu

4 REPLIES 4
Read only

Former Member
0 Likes
535

Hi.

You can not exchange data between your programs using ABAP memory, because this memory is shared between objects within the same internal session.

When you call your report using VIA JOB, a new session is created.

Instead of using EXPORT and IMPORT to memory, put both programs into the same Function Group, and use global data objects of the _TOP include to exchange data.

Another option, is to use SPA/GPA parameters (SET PARAMETER ID / GET PARAMETER ID), because SAP memory it is available between all open sessions. Of course, it depends on wich type of data you want to export.

Hope it was helpful,

Kind regards.

F.S.A.

Read only

0 Likes
535

Hi Federico Alvarez,

Thanks for your quick reply. still my issue was not solved, eventhough we decalre related variables and tables in common include program.

How can we assign two programs under same function group.

===

Hello Friends,

Could you pls answer for my first question.

Thanks in advance

Raghu

Read only

Former Member
0 Likes
535

Duplicate posts:

/thread/1113622 [original link is broken]

Read only

matt
Active Contributor
0 Likes
535

Duplicate deleted. Looks accidental.