07-02-2007 8:59 PM
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
07-02-2007 9:03 PM
07-02-2007 9:03 PM
07-02-2007 9:13 PM
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
07-02-2007 9:13 PM
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.
07-02-2007 9:18 PM
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
07-02-2007 9:19 PM
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'.