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: 

help to move data to one field in structre

Former Member
0 Kudos

Hallow

I have a interface program that I have to send a many(50) different structre but in all stuctre I have 5 fields that is requirement in all stuctre .I heard that I can do a strucre with the requirement fields and one field type char 255 that I move for him all the data from other fields that i find.

How can I do that?

Example

Pernr

Persno

i.d

date

Name

<b>irec</b>

Instead of

Pernr

Persno

i.d

date

Name

<b>Date of bearth

Country

Religion

adress....</b>

And many fields…..

Regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please explain in detail.

Regards,

Mukul

5 REPLIES 5

Former Member
0 Kudos

Hi,

Please explain in detail.

Regards,

Mukul

0 Kudos

hi Mukul R. Kulkarni

i doing a interface from sap to other system. i take field that change in sap(hr)and move it to other system in his structre, but in my program i have lot of internal table that i append the requirement fields and fields that change ,i thihk that insted of buield 50 difrent internal table i buield one internal table with requirement and onter field (irec)

and to this field i move the field that change in log.

i dont now what is the best way to do that

regards

former_member583013
Active Contributor
0 Kudos

Something like this maybe...


TYPES: BEGIN OF IREC,
Date of bearth
Country 
Religion
address
...
END OF IREC.

TYPES: BEGIN OF TY_DATA,
Pernr 
Persno
id
date
Name.
INCLUDE STRUCTURE IREC.
TYPES: END OF TY_DATA.

DATA: T_DATA TYPE STANDARD TABLE OF TY_DATA WITH HEADER LINE,

That way, you got IREC inside T_DATA -:)

Greetings,

Blag.

0 Kudos

hi Alvaro Tejada Galindo

i thihk u write but

sorry if its stupid qustion maybe u can give me example how i happend the data(from difrent 2 structre) to my internal table.

regards

Former Member
0 Kudos

You can define one structure with those 5 fields in your program and then use it in your other internal tables and structures as follows.



DATA: BEGIN OF s_my5fields,
         field1,
         field2,
         field3,
         field4,
         field5.
DATA: END OF s_my5fields.

DATA: BEGIN OF my_structure1,
        fld1,
        fld2,
        fld3,
        fld4.
        INCLUDE STRUCTURE s_my5fields.
DATA: END OF my_structure1.

my_structure1-field1 = 'X'.