‎2006 Jun 30 4:11 PM
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.
‎2006 Jun 30 4:12 PM
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
‎2006 Jun 30 4:12 PM
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
‎2006 Jun 30 4:13 PM
No i will not be able to declaare as a global variant...that is constraint...
‎2006 Jun 30 4:14 PM
‎2006 Jun 30 4:19 PM
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.
‎2006 Jun 30 4:26 PM
What does the dump say?
did you pass some value to b_code before using it in export?
Regards,
Ravi
‎2006 Jun 30 4:32 PM
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.
‎2006 Jun 30 4:37 PM
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
‎2006 Jun 30 4:53 PM
Hi Ravi,
i did not understnd u were say abt some hex value. can u pls reply.
‎2006 Jun 30 4:59 PM
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
‎2006 Jun 30 5:02 PM
Hi Ravi,
no it says
' You cann assign as initial value to xstring,internal table,reference as syntax error.
‎2006 Jun 30 5:03 PM
Can you try with
EXPORT.....TO MEMORY ID 'text'.
IMPORT.....FROM MEMORY ID 'text'
Regds
Manohar
‎2006 Jun 30 5:08 PM
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
‎2006 Jun 30 5:11 PM
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
‎2006 Jun 30 5:15 PM
‎2006 Jun 30 5:25 PM
‎2006 Jun 30 4:14 PM
Hi,
Are screens belong to same program
if yes then
declare global variable for passing data from one screen to another .