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

Issue with import/export statement

Former Member
0 Likes
3,236

Hi All,

Issue with using memory id, i have common function module(update mode) which is being used in many t-codes and programs,

those t-code are being called in different progams using call transation or submit program in background task.

i am calling these t-codes(using call traction) in batch process, from calling program i am passing some value to memory id using export statement and imported in common function

module, in this case simple export/import statement is not working no value getting imported when i use import/export with shared buffer it's working.

Issues is when multiple runs happen at a time value getting over written some times, so unique value is not getting imported to represent calling program.

for example.

program1 exports value1

program2 exports value2

program3 exports value3

program4 exports value4

Every program generates batch id automatically for each run, that is input for common FM as a standard process. 

when programs 1 to 5 are executed some means in back ground common function module will be triggered. 

i need to link batch id of each run/program to that of imported value.

how to use import/export statement effectively? 

i want to import the value in common FM which is exported from calling program uniquely.

Thanks,

5 REPLIES 5
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,792

Hello,

You must be aware that IMPORT/EXPORT statements deal with ABAP memory. But if your Update function is getting executed in a separate update work process i don't think ABAP memory is going to work

There are 2 ways of doing so -

  1. Run the update module in a local update - SET UPDATE TASK LOCAL,
  2. Use INDX-like tables and/or Shared memory (SHM)

Anyway why are you using the IMPORT/EXPORT technique to pass the data to the update FM? Can you not add a param to the FM and pass the value?

BR,

Suhas

Read only

Former Member
0 Likes
1,792

Hi,

Thanks for reply, i am passing values from custom program to standard function so there is no way to pass the value other than import/export. when i use shared memory it's over writing when multiple run happens at a time. receiving side FM will be trigger from different sources.

Regards,

Read only

Former Member
0 Likes
1,792

Hi Venkata,

The import/export statements works only for particular session. It you are using background process or update process, then these memory ( ABAP Memory ) wont be available because these process will run in different work processes, there is no way you can use import/export statements in for this kind of processes.

According to my knowledge the SAP memory will also be able to solve your problem.

ABAP and SAP memory are related only to presentation layers ( UI Layer ). ABAP memory is local memory where memory is shared within a single session. SAP memory is global memory where memory is shared between different sessions.

So what I suggest is better to use INDX tables for sharing the value between two different work processes.

Read only

0 Likes
1,792

Hi Satish,

Thanks for your reply, i tried to use indx table with shared memory/buffer, my worry is exported values are overlapped by subsequent runs when multiple programs or same program from different users export a values at a time.

Regards,

Read only

0 Likes
1,792

Hi,

Of course it should get replaced when you run the same report with the new values. Can you explain bit more.