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

Please urgent

Former Member
0 Likes
996

Hi all,

iam unable to see the value of v_netwr.

data : v_netwr like vbak-netwr,

v_netwr1 like vbak-netwr.

if vbak-netwr is not initial.

v_netwr1 = vbak-netwr.

export v_netwr1 to memory id 'ZNETWR'.

import v_netwr from memory id 'ZNETWR'.

endif.

we are writing code in user exit. iam exporting value to memory id, but unable to import the value. it is shoing value zero.

pls urgernt

Hi all,

iam unable to see the value of v_netwr.

data : v_netwr like vbak-netwr,

v_netwr1 like vbak-netwr.

if vbak-netwr is not initial.

v_netwr1 = vbak-netwr.

export v_netwr1 to memory id 'ZNETWR'.

import v_netwr from memory id 'ZNETWR'.

endif.

we are writing code in user exit. iam exporting value to memory id, but unable to import the value. it is shoing value zero.

pls urgernt

7 REPLIES 7
Read only

Former Member
0 Likes
960

HI,

See the below code and change accordingly ....

data : v_netwr like vbak-netwr,
v_netwr1 like vbak-netwr.

if not vbak-netwr is initial.     " NOT should be in proper place
v_netwr1 = vbak-netwr.

export v_netwr1 to memory id 'znetwr'.    " make this Small

import v_netwr from memory id 'znetwr'.   " make this Small

endif.

Regards

Sudheer

Read only

Former Member
0 Likes
960

Give the same name for v_netwr while exporting and importing...I mean declare varible names as same in both ur programs

export v_netwr to memory id 'ZNETWR'.

import v_netwr from memory id 'ZNETWR'.

Read only

Former Member
0 Likes
960

HI,

Just check in debug whether value exists or not..

Even for me there was a problem in using export import..

You can use set and get parameter ..

regards,

nazeer

Read only

former_member673464
Active Contributor
0 Likes
960

hiii..

You have to give same variable name for memory id for import and export.If the name is differed the value will nort transferred.

regards,

veeresh

Read only

Former Member
0 Likes
960

export v_netwr1 to memory id <b>'znetwr'</b>.

import v_netwr from memory id <b>'znetwr'</b>.

make the field value to small characters

Read only

Former Member
0 Likes
960

Try doing something like this

DATA : v_netwr TYPE vbak-netwr,

v_netwr1 TYPE vbak-netwr,

v_netwr_c_1(21) TYPE c ,

v_netwr_c_2(21) TYPE c .

  • Assigning a value to v_netwr. You will probably do this using a select statement

v_netwr = 10.

  • Assign to a character field of the same length. Numerical values cannot be *passed

v_netwr_c_1 = v_netwr.

  • Pass the value to SAP memory

SET PARAMETER ID 'ZNETWR' FIELD v_netwr_c_1.

  • Get the value back from SAP memory. I assume this statement is in another user-exit. The field in which you import should also be a character field

GET PARAMETER ID 'ZNETWR' FIELD v_netwr_c_2.

  • Assign the data from the character variable to the numeric variable

v_netwr1 = v_netwr_c_2.

  • This statement is used only for testing this logic. It will not form part of your code

WRITE:/ v_netwr1.

Let me know if this helped you.

Read only

Former Member
0 Likes
960

Hai Just write outside of the if ...endif so that irrespective of initial or not you get the value into v_netwr.Better to use the variable same type.

data : v_netwr like vbak-netwr,

v_netwr1 like vbak-netwr.

if vbak-netwr is not initial.

v_netwr1 = vbak-netwr.

export v_netwr1 to memory id 'ZNETWR'.

endif.

<b>import v_netwr from memory id 'ZNETWR'.</b>

Hope this solves your problem.

Regards,

Rama.Pammi