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

Stand alone ALE Programming.

Former Member
0 Likes
343

Hi,

I am working on ALE/IDOC's .Please let me know how can i develope SE38 program for creating an IDOC (both in Sender and Receiver ) .I know how to create Segments ,IDOC Msg Type . I need only SE38 Program . And My Internal Table Consist of only 5 fields .

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
311

Hi Pavan,

First u declare two internal tables of structure

1>EDIDD 2>EDIDC as(i_edidd,i_edidc)

Then get all the data from data base table ans place it into another internal table.

suppose the internal table whcih contains data is ITAB.

create a work area like the segment(wa_segment type ZSEGMENT)

Loop at ITAB INTO WA_ITAB.

Move : wa_itab-field1 to wa_segment-zfield1

wa_itab2-field2 to wa_segment-zfield2.

move : <Give the segment name for example ZSEGMENT> to wa_edidd-segnam,

wa_segment to wa_edidd-sdata.

append wa_edidd to i_edidd.

endloop.

now fill the control record.

wa_edidc-rcvpor = <give receiver port>

wa_edidc-rcvprt = <give receiver partner (LS)

wa_edidc-rcvprn = <give receiver partner number>

wa_edidc-direct = 1.

wa_edidc-msetyp = <give the message type>

wa_edidc-idoctp = <give the basic type>

append i_edidc from wa_edidc.

now call the FM

MASTER_IDOC_DISTRIBUTE

EXPORTING

MASTER_IDOC_CONTROL = WA_EDIDC.

TABLES

COMMUNICATION_IDOC_CONTROL = I_EDIDC

MASTER IDOCDATA = I_EDIDD

Thats all

Regards,

nagaraj

1 REPLY 1
Read only

former_member404244
Active Contributor
0 Likes
312

Hi Pavan,

First u declare two internal tables of structure

1>EDIDD 2>EDIDC as(i_edidd,i_edidc)

Then get all the data from data base table ans place it into another internal table.

suppose the internal table whcih contains data is ITAB.

create a work area like the segment(wa_segment type ZSEGMENT)

Loop at ITAB INTO WA_ITAB.

Move : wa_itab-field1 to wa_segment-zfield1

wa_itab2-field2 to wa_segment-zfield2.

move : <Give the segment name for example ZSEGMENT> to wa_edidd-segnam,

wa_segment to wa_edidd-sdata.

append wa_edidd to i_edidd.

endloop.

now fill the control record.

wa_edidc-rcvpor = <give receiver port>

wa_edidc-rcvprt = <give receiver partner (LS)

wa_edidc-rcvprn = <give receiver partner number>

wa_edidc-direct = 1.

wa_edidc-msetyp = <give the message type>

wa_edidc-idoctp = <give the basic type>

append i_edidc from wa_edidc.

now call the FM

MASTER_IDOC_DISTRIBUTE

EXPORTING

MASTER_IDOC_CONTROL = WA_EDIDC.

TABLES

COMMUNICATION_IDOC_CONTROL = I_EDIDC

MASTER IDOCDATA = I_EDIDD

Thats all

Regards,

nagaraj