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

module pool

Former Member
0 Likes
1,403

Hi Guys,

i have a small requirement where in a module pool i have to carry a varialable value from one screen to other. i am told i can use export/import buffer functionality in ABAP but i am getting a dump on importing. Pls advice how can use this.

Pls advice if it is correct else suggest an alternate way.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,371

Hi Priya,

YOu can declare the variable globally right?

Declare it in the top include, so that you can use it in any screen.

Regards,

Ravi

16 REPLIES 16
Read only

Former Member
0 Likes
1,372

Hi Priya,

YOu can declare the variable globally right?

Declare it in the top include, so that you can use it in any screen.

Regards,

Ravi

Read only

0 Likes
1,371

No i will not be able to declaare as a global variant...that is constraint...

Read only

0 Likes
1,371

Can you post your code for exporting and importing?

Read only

0 Likes
1,371

Hi Ravi,

my export code is

DATA: b_code type xstring,

l_s_code type c length 54.

l_s_code = 'some field'

export l_s_code from l_s_code to data buffer b_code.

my import code:

DATA: b_code type xstring,

l_s_code type c length 54.

import l_s_code from data buffer b_code.

i dont if i am correct.

Read only

0 Likes
1,371

What does the dump say?

did you pass some value to b_code before using it in export?

Regards,

Ravi

Read only

0 Likes
1,371

Hi Ravi,

yes i am export the field l_s_code to buffer.

the dump says

This is probably due to an error in the ABAP program.

No space created for data in the IMPORT/EXPORT table.

and sumps at the import statement. pls advice if my usage of the export/import is correct.

Read only

0 Likes
1,371

DATA: b_code type xstring <b>value <some hex value></b>,

l_s_code type c length 54.

l_s_code = 'some field'

export l_s_code from l_s_code to data buffer b_code.

my import code:

DATA: b_code type xstring <b>value <some hex value></b>,

l_s_code type c length 54.

import l_s_code from data buffer b_code.

do the highlighted changes.

Regards,

Ravi

Read only

0 Likes
1,371

Hi Ravi,

i did not understnd u were say abt some hex value. can u pls reply.

Read only

0 Likes
1,371

Try

DATA: b_code type xstring value '0A0B',

l_s_code type c length 54.

l_s_code = 'some field'

export l_s_code from l_s_code to data buffer b_code.

my import code:

DATA: b_code type xstring value '0A0B',

l_s_code type c length 54.

import l_s_code from data buffer b_code.

nOT SURE IF IT WORKS THOUGH.

giVE IT A TRY.

Regards,

Ravi

Read only

0 Likes
1,371

Hi Ravi,

no it says

' You cann assign as initial value to xstring,internal table,reference as syntax error.

Read only

0 Likes
1,371

Can you try with

EXPORT.....TO MEMORY ID 'text'.

IMPORT.....FROM MEMORY ID 'text'

Regds

Manohar

Read only

0 Likes
1,371

Hi Priya,

Try this way:

DATA: b_code type xstring,

l_s_code type c length 54.

b_code = '0A0B'.

l_s_code = 'some field'.

export l_s_code from l_s_code to data buffer b_code.

Regards,

Ravi

Read only

0 Likes
1,371

DATA: b_code type xstring,

l_s_code type c length 54.

b_code = '0A0B'.

l_s_code = 'some field'.

export l_s_code from l_s_code to data buffer b_code.

clear l_s_code.

import l_s_code to l_s_code from data buffer b_code.

write: l_s_code.

This code works fine for me.

Regards,

Ravi

Read only

0 Likes
1,371

Thanks a lot.. it works

Read only

0 Likes
1,371

Hi Manohar ,

Thanks this also works.

Read only

Former Member
0 Likes
1,371

Hi,

Are screens belong to same program

if yes then

declare global variable for passing data from one screen to another .