Application Development 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: 

Moving data from a transction to a structure.

Former Member
0 Kudos

Hi All,

I need to move data from VA01 Transction to a structure that I have created.

When the user enters data into VA01 transction some fields of VA01 transction has to be moved into a structure.

I guess i need to use some move commands but not sure of how would i do it.

A sample code on this would be very helful.

Thanks in Advance.

Shejal.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Shejal,

Can you elaborate your question? I didn't understand your question of moving data from transaction to a structure...When do you want to move this data? When you hit save?

Regards,

Vicky

6 REPLIES 6

Former Member
0 Kudos

Hi Shejal,

Can you elaborate your question? I didn't understand your question of moving data from transaction to a structure...When do you want to move this data? When you hit save?

Regards,

Vicky

0 Kudos

Hi Vicky,

In the userexit MV45AFZZ,

when the user hits save in VA01 Transction after entering the data in VA01 transction the data that the user enters has to be moved in the struture that i ahve created in Se11.

Let me know if you have any questions.

Shejal.

0 Kudos

Hi Shejal,

You can use move command "MOVE f TO g" as you want to move some fields only.

Regards,

Vicky

0 Kudos

Hi Vicky,

Thanks for the reply,

When i use move command do i need to specify the table name and the field name.

Eg

Move VBAK-ERDAT to Z_INPUT-ZERDAT,

where VBAK-ERDAT is the field that the user would enter in the transction and Z_INPUT-ZERDAT is the field which represents ERDAT in the structure that i have created.

Is this coreect Vicky or do i need to do something else.

Shejal.

0 Kudos

Hi Shejal,

You may declare the structure in the include as

TABLES: Z_INPUT

But VBAK-ERDAT represents data from database. I suppose you need to move data from internal table to the structure.

Move itab-ERDAT to Z_INPUT-ZERDAT

or

Z_INPUT-ZERDAT = itab-ERDAT

Hope this helps.

Regards,

Vicky

0 Kudos

Thanks Vicky i guess this should help. I will try this out.

Shejal.