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

Information Regarding ALE

Former Member
0 Likes
728

hi folks...

i haev a requirement regarding ALE configuration...reqirement goes like this....once you create sales order in Va01, the daet should go to other SAP system through IDOCS automatically/....is it possible..if so can any one help me the configuration steps to acheive so.......if possible pls prvide me any step by step docs...thnx in advance...

santosh....

hi folks...

i haev a requirement regarding ALE configuration...reqirement goes like this....once you create sales order in Va01, the daet should go to other SAP system through IDOCS automatically/....is it possible..if so can any one help me the configuration steps to acheive so.......if possible pls prvide me any step by step docs...thnx in advance...

santosh....

5 REPLIES 5
Read only

Former Member
0 Likes
683

Hello,

IDOC Type - ORDERS01

Message Type - ORDERS / ORDCHG.

You have to setup ALE/EDI in output control in tcode NACE. Setup condition records for output type.

Then setup distribution model in BD64.

In WE20 add message control parameters for the partner for outbound mesage ORDERS/ ORDCHG.

Regards,

Deepu.K

Read only

Former Member
0 Likes
683

Hi,

Go thru thesee.......

ALE---IDOC Creation Steps

01 Error --> Idoc Added

30 Error --> Idoc ready for dispatch(ALE Service)

then goto SE38 --> Execute the Program RBDMIDOC

29 Error --> ALE Service Layer

then goto SE38 --> Execute the Program RSEOUT00

03 Error --> Data Passed to Port ok

then goto SE38 --> Execute the Program RBDMOIND

12 Error --> Dispatch ok

Inbound Status Codes

50 Error --> It will go for ALE Service Layer

56 Error --> Idoc with Errors added

51 Error --> Application Document not posted

65 Error --> Error in ALE Service Layer

for 51 or 56 Errors do the following steps

goto WE19 > give the IDOC Number and Execute>

Press on Inbound function Module

for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error

ALE IDOC

Sending System(Outbound ALE Process)

Tcode SALE ? for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 ? Create Model View

Tcode BD82 ? Generate partner Profiles & Create Ports

Tcode BD64 ? Distribute the Model view

Message Type MATMAS

Tcode BD10 ? Send Material Data

Tcode WE05 ? Idoc List for watching any Errors

Receiving System(Inbound ALE )

Tcode SALE ? for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 ? Check for Model view whether it has distributed or not

Tcode BD82 -- Generate partner Profiles & Create Ports

Tcode BD11 Getting Material Data

Tcode WE05 ? Idoc List for inbound status codes

ALE IDOC Steps

Sending System(Outbound ALE Process)

Tcode SALE ?3 for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 !V Create Model View

Tcode BD82 !V Generate partner Profiles & Create Ports

Tcode BD64 !V Distribute the Model view

This is Receiving system Settings

Receiving System(Inbound ALE )

Tcode SALE ?3 for

a) Define Logical System

b) Assign Client to Logical System

Tcode SM59-RFC Destination

Tcode BD64 !V Check for Model view whether it has distributed or not

Tcode BD82 -- Generate partner Profiles & Create Ports

Tcode BD11 Getting Material Data

Tcode WE05 !V Idoc List for inbound status codes

Message Type MATMAS

Tcode BD10 !V Send Material Data

Tcode WE05 !V Idoc List for watching any Errors

1)a Goto Tcode SALE

Click on Sending & Receiving Systems-->Select Logical Systems

Here Define Logical Systems---> Click on Execute Button

go for new entries

1) System Name : ERP000

Description : Sending System

2) System Name : ERP800

Description : Receiving System

press Enter & Save

it will ask Request

if you want new request create new Request orpress continue for transfering the objects

B) goto Tcode SALE

Select Assign Client to Logical Systems-->Execute

000--> Double click on this

Give the following Information

Client : ERP 000

City :

Logical System

Currency

Client role

Save this Data

Step 2) For RFC Creation

Goto Tcode SM59-->Select R/3 Connects

Click on Create Button

RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles

give the information for required fields

RFC Destination : ERP800

Connection type: 3

Description

Target Host : ERP000

System No:000

lan : EN

Client : 800

User : Login User Name

Password:

save this & Test it & RemortLogin

3)

Goto Tcode BD64 -- click on Change mode button

click on create moduleview

short text : xxxxxxxxxxxxxx

Technical Neme : MODEL_ALV

save this & Press ok

select your just created modelview Name :'MODEL_ALV'.

goto add message type

Model Name : MODEL_ALV

sender : ERP000

Receiver : ERP800

Message type :MATMAS

save & Press Enter

4) Goto Tcode BD82

Give Model View : MODEL_ALV

Partner system : ERP800

execute this by press F8 Button

it will gives you sending system port No :A000000015(Like)

5) Goto Tcode BD64

seelct the modelview

goto >edit>modelview-->distribute

press ok & Press enter

6)goto Tcode : BD10 for Material sending

Material : mat_001

Message Type : MATMAS

Logical System : ERP800

and Execute

7)goto Tcode : BD11 for Material Receiving

Material : mat_001

Message Type : MATMAS

and Execute --> 1 request idoc created for message type Matmas

press enter

Here Master Idoc set for Messge type MATMAS-->press Enter

1 Communication Idoc generated for Message Type

this is your IDOC

check the following Links

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://www.sapgenie.com/sapedi/idoc_abap.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

Reward if it helps..

regards,

Omkar.

Read only

Former Member
0 Likes
683

regarding ALE refer these links.

ALE/ IDOC

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://www.sapgenie.com/sapedi/idoc_abap.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sappoint.com/abap.html

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.allsaplinks.com/idoc_sample.html

<b>

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

</b>

regards,

srinivas

<b>*reward for useful answers*</b>

Read only

Former Member
0 Likes
683

Hi Santosh,

You have to create logical system tcode SALE

Assign logical system to client SCC4

Partner profile - we20.

Port we21

Customer distribution model - BD64

Regards

Arun

Read only

Former Member
0 Likes
683

Hi ,

1. Check any badi or userexit is exit for sales order.

2. In this exit or badi put the code which send idoc.

3. I have one program which send idoc ..i am sending purchase requistion idoc to other system.Check it.

&----


*& Report Z_ARIBA_PURC_REQ_PULL *

*& *

&----


*& *

*& *

&----


REPORT Z_ARIBA_PURC_REQ_PUL no standard page heading.

************************************************************************

**********************TABLE DECLARATION*******************************

TABLES : EBAN, EBKN, T024E.

***********************************************************************

*********************VARIABLE-DECLARATION****************************

                          • ---------> Segment Name <----------

CONSTANTS:

C_Z1APRHDR LIKE EDIDD-SEGNAM VALUE 'Z1APRHDR',

C_Z1APRITM LIKE EDIDD-SEGNAM VALUE 'Z1APRITM',

C_Z1APRSPT LIKE EDIDD-SEGNAM VALUE 'Z1APRSPT',

**************--


> Idoc Type <--


C_PR_IDOC_TYPE like EDIDC-IDOCTP value 'ZARIBAPR'.

************************************************************************

******************INPUT PARAMETERS DECLARATION************************

PARAMETERS : P_BANFN LIKE EBAN-BANFN,

P_MESTYP LIKE EDMSG-MSGTYP OBLIGATORY,

P_LOGSYS LIKE TBDLST-LOGSYS.

*----


  • Data declarations

*----


DATA: T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.

DATA: T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE.

DATA: T_CONTROL_RECORD LIKE EDIDC OCCURS 0 WITH HEADER LINE.

DATA: T_PR_HDR LIKE ZARPRHEADER,

T_PR_ITEM1 LIKE ZARPRITEM,

T_PR_SPLIT1 LIKE ZARPRSPLIT.

DATA : BEGIN OF T_PR_ITEM,

RQNUM TYPE BANFN,

BNFPO(5) TYPE C,

FLIEF TYPE FLIEF,

SUPLC TYPE FLIEF,

CONID TYPE FLIEF,

DELTA TYPE ERNAM,

LFDAT TYPE LFDAT,

MATKL TYPE MATKL,

MENGE(15) TYPE C,

PREIS(15) TYPE C,

WAERS(5) TYPE C,

MEINS(3) TYPE C,

WERKS TYPE WERKS_D,

MATNR TYPE MATNR,

TXZ02 TYPE MAKTX,

IDNLF TYPE IDNLF,

SUPAP(20) TYPE C,

EPSTP TYPE EPSTP,

KNTTP TYPE KNTTP,

EKGRP TYPE EKGRP,

STATU TYPE STATU,

BEDNR TYPE BEDNR,

END OF T_PR_ITEM.

DATA : BEGIN OF T_PR_SPLIT,

BANFN TYPE BANFN,

BNFPO(5) TYPE C,

ZEBKN(2) TYPE C,

VPROZ(3) TYPE C,

NETWR(18) TYPE C,

AMTCR(18) TYPE C,

MENGE(17) TYPE C,

KOSTL TYPE KOSTL,

SAKTO TYPE SAKTO,

ANLN1 TYPE ANLN1,

PS_PSP_PNR(8) TYPE C,

APLZL(40) TYPE C,

END OF T_PR_SPLIT.

DATA: COUNTER TYPE I.

*----


  • Internal tables

*----


DATA: IT_EBAN LIKE EBAN OCCURS 0 WITH HEADER LINE.

  • Spilt Accounting Internal Table

DATA : BEGIN OF IT_EBKN OCCURS 10,

BANFN LIKE EBKN-BANFN,

BNFPO LIKE EBKN-BNFPO,

ZEBKN LIKE EBKN-ZEBKN,

VPROZ LIKE EBKN-VPROZ,

SAKTO LIKE EBKN-SAKTO,

KOSTL LIKE EBKN-KOSTL,

ANLN1 LIKE EBKN-ANLN1,

PS_PSP_PNR LIKE EBKN-PS_PSP_PNR,

APLZL LIKE EBKN-APLZL,

VPTNR LIKE EBKN-VPTNR,

NETWR LIKE EBKN-NETWR,

END OF IT_EBKN.

*----


  • Program Logic

*----


START-OF-SELECTION.

SELECT *

INTO TABLE IT_EBAN

FROM EBAN

WHERE BANFN EQ P_BANFN

AND BSART EQ 'ZAR'.

IF SY-SUBRC NE 0.

EXIT.

ELSE.

DESCRIBE TABLE IT_EBAN LINES COUNTER.

IF COUNTER GT 0.

SELECT BANFN BNFPO ZEBKN VPROZ SAKTO KOSTL ANLN1 PS_PSP_PNR APLZL

VPTNR NETWR

INTO TABLE IT_EBKN FROM EBKN

FOR ALL ENTRIES IN IT_EBAN

WHERE BANFN EQ IT_EBAN-BANFN AND

BNFPO EQ IT_EBAN-BNFPO.

ENDIF.

PERFORM CONTROL_REC.

PERFORM DATA_POPULATE.

PERFORM IDOC_DISTRIBUTION.

ENDIF.

END-OF-SELECTION.

&----


*& Form CONTROL_REC

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM CONTROL_REC .

T_CONTROL_RECORD-mestyp = P_MESTYP.

T_CONTROL_RECORD-idoctp = C_PR_IDOC_TYPE.

T_CONTROL_RECORD-rcvprt = 'LS'.

T_CONTROL_RECORD-rcvprn = P_LOGSYS.

ENDFORM. " CONTROL_REC

************************************************************************

                                        • FORM DATA_POPULATE ************************

FORM DATA_POPULATE .

  • Purchase Requisition Header Information.

READ TABLE IT_EBAN WITH KEY BANFN = P_BANFN BINARY SEARCH.

IF SY-SUBRC EQ 0.

T_PR_HDR-RQNUM = IT_EBAN-BANFN.

T_PR_HDR-RQDATE = IT_EBAN-BADAT.

T_PR_HDR-RQNAM = IT_EBAN-ERNAM.

T_PR_HDR-WERKS = IT_EBAN-WERKS.

CLEAR T024E.

SELECT SINGLE *

FROM T024E

WHERE EKORG = IT_EBAN-EKORG.

T_PR_HDR-BUKRS = T024E-BUKRS.

T_PR_HDR-EKORG = IT_EBAN-EKORG.

T_PR_HDR-BADAT = IT_EBAN-BADAT.

T_PR_HDR-FRGDT = IT_EBAN-FRGDT.

  • Fill the administrative section of the data record

T_EDIDD-SEGNAM = C_Z1APRHDR.

T_EDIDD-SDATA = T_PR_HDR.

APPEND T_EDIDD.

CLEAR T_EDIDD.

ENDIF.

  • Purchase Requisition Item Information

LOOP AT IT_EBAN

WHERE BANFN = P_BANFN.

T_PR_ITEM-RQNUM = IT_EBAN-BANFN.

T_PR_ITEM-BNFPO = IT_EBAN-BNFPO.

T_PR_ITEM-FLIEF = IT_EBAN-FLIEF.

T_PR_ITEM-SUPLC = IT_EBAN-FLIEF.

T_PR_ITEM-CONID = IT_EBAN-FLIEF.

T_PR_ITEM-DELTA = 'ARIBASYSTEM'.

T_PR_ITEM-LFDAT = IT_EBAN-LFDAT.

T_PR_ITEM-MATKL = IT_EBAN-MATKL.

T_PR_ITEM-MENGE = IT_EBAN-MENGE.

T_PR_ITEM-PREIS = IT_EBAN-PREIS.

T_PR_ITEM-WAERS = IT_EBAN-WAERS.

T_PR_ITEM-MEINS = IT_EBAN-MEINS.

T_PR_ITEM-WERKS = IT_EBAN-WERKS.

  • T_PR_ITEM-DELTO = ' '.

T_PR_ITEM-MATNR = IT_EBAN-MATNR.

T_PR_ITEM-TXZ02 = IT_EBAN-TXZ01.

T_PR_ITEM-IDNLF = IT_EBAN-IDNLF.

T_PR_ITEM-SUPAP = ' '.

T_PR_ITEM-EPSTP = IT_EBAN-PSTYP..

T_PR_ITEM-KNTTP = IT_EBAN-KNTTP.

T_PR_ITEM-EKGRP = IT_EBAN-EKGRP.

T_PR_ITEM-STATU = IT_EBAN-STATU.

T_PR_ITEM-BEDNR = IT_EBAN-BEDNR.

  • Fill the administrative section of the data record

T_EDIDD-SEGNAM = C_Z1APRITM.

T_EDIDD-SDATA = T_PR_ITEM.

APPEND T_EDIDD.

CLEAR T_EDIDD.

  • Split Accounting Information

LOOP AT IT_EBKN

WHERE BANFN = IT_EBAN-BANFN

AND BNFPO = IT_EBAN-BNFPO.

T_PR_SPLIT-BANFN = IT_EBKN-BANFN.

T_PR_SPLIT-BNFPO = IT_EBKN-BNFPO.

T_PR_SPLIT-ZEBKN = IT_EBKN-ZEBKN.

IF IT_EBAN-VRTKZ IS INITIAL.

T_PR_SPLIT-VPROZ = '100'.

ELSE.

T_PR_SPLIT-VPROZ = IT_EBKN-VPROZ.

ENDIF.

T_PR_SPLIT-NETWR = ' '.

T_PR_SPLIT-AMTCR = ' '.

T_PR_SPLIT-MENGE = IT_EBAN-MENGE.

  • T_PR_SPLIT-VPTNR = ' '.

T_PR_SPLIT-KOSTL = IT_EBKN-KOSTL.

T_PR_SPLIT-SAKTO = IT_EBKN-SAKTO.

T_PR_SPLIT-ANLN1 = IT_EBKN-ANLN1.

T_PR_SPLIT-PS_PSP_PNR = IT_EBKN-PS_PSP_PNR.

T_PR_SPLIT-APLZL = IT_EBKN-APLZL.

  • Fill the administrative section of the data record

T_EDIDD-SEGNAM = C_Z1APRSPT.

T_EDIDD-SDATA = T_PR_SPLIT.

APPEND T_EDIDD.

ENDLOOP.

ENDLOOP.

ENDFORM. " DATA_POPULATE

************************************************************************

**********************Form IDOC_DISTRIBUTION*************************

FORM IDOC_DISTRIBUTION .

CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'

EXPORTING

MASTER_IDOC_CONTROL = T_CONTROL_RECORD

  • OBJ_TYPE = ''

  • CHNUM = ''

TABLES

COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC

MASTER_IDOC_DATA = T_EDIDD

EXCEPTIONS

ERROR_IN_IDOC_CONTROL = 1

ERROR_WRITING_IDOC_STATUS = 2

ERROR_IN_IDOC_DATA = 3

SENDING_LOGICAL_SYSTEM_UNKNOWN = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

  • MESSAGE E001 WITH R_BANFN.

ELSE.

LOOP AT T_COMM_IDOC.

WRITE:/ 'IDoc generated', T_COMM_IDOC-docnum.

ENDLOOP.

COMMIT WORK.

ENDIF.

ENDFORM.