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 to a structure

Former Member
0 Kudos

Hi Friends,

I am working on sales order-VA01.

Once i fill the VA01 Transction all the input parameters should go to an external database system and get the freight rate back. However the external system can read data only in structure CHAR format or STRING format.

My Apporach for this was i created a structure in SE11 with all the input parameters in VA01. However when i created the structure i had to create data element and domain for some of the fields as CHAR format. So when i input all the parameters in VA01 how would the structure recognize that a particular input is for a particular fiels in sturture.

Eg - When i input the shipping date in VA01 it is in DATS format. However in the structure the field is Delivery date with CHAR format.

So the date that i enter in VA01 should get into the structure in CHAR format.

SO do i need to move all the values i input into structure from VA01.

If so how can i do this.

Any help on thsi will be highly Appericiated.

Thanks in advance.

Shejal.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi !

What you can do is the following:

- create an new structure using the SE11 and combine the

fields of VBAK and VBAP that you need for the

external system

- use the same names as VBAK/VBAP but only character

types

- fill the structure using the MOVE-CORRESPONDING command

This command transports the values to name identical

fields and it should do a type conversion.

Just check it out...

Regards

Rainer

Some points would be nice if that helped a bit

4 REPLIES 4

Former Member
0 Kudos

HI

AS PER YOUR REQUIREMENT YOU HAVE TO CREATE A STRUCTRE AND THE DATAELEMENT AND DOMAIN SHOULD BE SAME AS THE FIEID OF VA01, OTHERWISE IT WILL GIVE THE ERROR.IF YOU ACCEPTING DAT VALUE IN THA VA01 SCREEN FOR THAT YOU CANT CREATE A CHARACTER FIELD IN YOUR STRUCTURE.

THANKS

MRUTYUN

0 Kudos

Hi,

one way would be to create a structure which is in the same data element format as the VA01 and then moving it into the structure required by the External system.

Regards

Vijaya

Former Member
0 Kudos

Hi !

What you can do is the following:

- create an new structure using the SE11 and combine the

fields of VBAK and VBAP that you need for the

external system

- use the same names as VBAK/VBAP but only character

types

- fill the structure using the MOVE-CORRESPONDING command

This command transports the values to name identical

fields and it should do a type conversion.

Just check it out...

Regards

Rainer

Some points would be nice if that helped a bit

0 Kudos

HI Rainer,

Thanks a lot for the reply. This is what i was looking for but i am not sure as how to code it. Do you have a sample code which i can use for reference.

Thanks again for your help.

Shejal.