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

Structure field

Former Member
0 Likes
741

hello gurus,

i have a field called stlal filled in mv45afzb (in the struture cstmat), I need to use this indicator in mv45afzz. because this is the only one i have to differentiate the alternatives bom's in creating sales order.

can u give me an idea how can i get the that value.....if u have give me some sample code too....

can i get the value by using export import concept ...if yes how???

can i get the value by using ASSING...how..??

Thanks in advance,

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
707

I would simply export it to memory and import it on the other side. It is easiest.

export field  to memory id 'MV45_MEM'.



import field from memory id 'MV45_MEM'.

Regards,

Rich Heilman

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
708

I would simply export it to memory and import it on the other side. It is easiest.

export field  to memory id 'MV45_MEM'.



import field from memory id 'MV45_MEM'.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
707

Hi,

Where do you see this field ( CSTMAT-STLAL) in MV5AFZB. I checked entire SAPMV45A with all of its include and neither this structure ( CSTMAT ) not this field (STLAL) is used or defined anywhere.

Plese clarify, where do you see this field and what exactly you want to do.

Regards,

RS

Read only

0 Likes
707

hi RS,

its not there..I DENIFED there because that is only the struture having the value of stlal.......if anything else is there tell me....according to me...that is only the one having value....so i used that one.....

thanks,

Read only

Former Member
0 Likes
707

Hi,

you can export the values in the structure CSTMAT using this command in MV45AFZB:

EXPORT CSTMAT TO MEMORY ID '$CSTMAT$'.

And you can import the values of this structure back into a workarea in MV45AFZZ using:

DATA: WA_CSTMAT TYPE CSTMAT. "Work area must of the same structure

IMPORT WA_CSTMAT FROM MEMORY ID '$CSTMATS'.

Hoep this helps,

Sumant.

Read only

Former Member
0 Likes
707

Hi Madhu,

<b>Q) can i get the value by using export import concept ...if yes how???</b>

A) <b>Yes,</b> and it is the best process to get the values to be peristent across sessions.

In the mv45afzb (in the struture cstmat), Afer getting the indicator value, use the EXPORT statement as follows::

<b>EXPORT FIELD TO MEMORY ID 'INDICATOR'</b>

Use the IMPORT statement in the mv45afzz to get the value for the indicator as follows::

<b>IMPORT FIELD FROM MEMORY ID 'INDICATOR'.</b>

<b>Q) can i get the value by using ASSING...how..??</b>

A) Its not possible using ASSIGN statement.

Thanks,

Vinay

Read only

ferry_lianto
Active Contributor
0 Likes
707

Hi,

Please try this.

In program MV45AFZB.


...
data: v_stlal like cstmat-stlal.

v_statl = cstmat-stlal.
export v_statl to memory id 'STLAL'.
... 

In program MV45AFZZ.


...
data: v_stlal like cstmat-stlal.

import v_stlal from memory id 'STLAL'.
...

Regards,

Ferry Lianto