2012 May 30 12:40 AM
Hi,
I am trying to create asset outbound IDOC from AS01 tcode and done the below settings, but asset outbound IDOC not created in source system.
1) Create Port 'TEST' using WE21
2) Created partner profiles using WE20 :
Message Type : FIXEDASSET_CREATEFROMDATA1
Basic Type : FIXEDASSET_CREATEFROMDATA102
Reciever Port: TEST
Checked Transfer idoc immediately check box
3) Assigned FM to logical Messge and IDoc Type ( WE57)
Function moduel: ALE_FIXEDASSET_CRETAE1
Functiuon Type: F
BASIC TYPE: FIXEDASEET_CREATEFROMDATA102
Message Type: FIXEDASEET_CREATEFROMDATA1
Object type : BUS1022
Direction : Outbound
4) Distibution model BD64 :
Created disticbution model and seelcted add BAPI
Object name: FuxedAsset
Method name: CreateFromData1
Generated partner priofile succefull and model distrubuted.
Created Asset from AS01 tcode , but IDOC is not created as expected .
Please let me know if i am doing anything wrong here.
Thanks
Siri
2012 May 30 1:35 AM
The BOR object and the Method "CreateFromData1" that you are using is for Inbound processing and not meant for Outbound.
If your requirement is to replicate an Asset (via an IDoc) immediately after an Asset is created in the source system then you need a Method similar to BOR object BUS2075 (Internal Order) Method "SaveReplica". Unfortunately there is no such method available for BOR 1022 (Fixed Asset).
So, you will need to create one yourself. We had a similar problem where we wanted to replicate Funds Center but the related BOR object BUS0033 had no standard method to trigger/replicate this.
So we copied BUS0033 into ZBUS0033 and added a new Method "SaveReplica" into the BOR then used this in the ALE Distribution Model to replicate outbound IDocs from the source system.
Other Z FMs, Z BAPI (for the BOR Method "SaveReplica) and some wrapper FMs were developed as necessary which were then linked to the ALE customizing. Finally, the wrapper FM, which was designed as an Update Module, was called (synchronously of course) in an User-Exit of the application at the time of any change to the Fund Center. I would think you will need to design and implement something very similar.
Cheers,
Sougata.
Sougata,
'
Thanks for your reply,
When i go to Tcode BDBG ->
Object Type :BUS1022
Method CreateFromData1 ->select category ->Object Type-> Display Interface
Here I can see
Function Module for Outbound ALE ALE_FIXEDASSET_CREATE1
is there any way i can create a Asset outbound idoc using function module ALE_FIXEDASSET_CREATE1 when i create Asset using AS01 ?
Thanks
Siri
2012 May 30 1:35 AM
The BOR object and the Method "CreateFromData1" that you are using is for Inbound processing and not meant for Outbound.
If your requirement is to replicate an Asset (via an IDoc) immediately after an Asset is created in the source system then you need a Method similar to BOR object BUS2075 (Internal Order) Method "SaveReplica". Unfortunately there is no such method available for BOR 1022 (Fixed Asset).
So, you will need to create one yourself. We had a similar problem where we wanted to replicate Funds Center but the related BOR object BUS0033 had no standard method to trigger/replicate this.
So we copied BUS0033 into ZBUS0033 and added a new Method "SaveReplica" into the BOR then used this in the ALE Distribution Model to replicate outbound IDocs from the source system.
Other Z FMs, Z BAPI (for the BOR Method "SaveReplica) and some wrapper FMs were developed as necessary which were then linked to the ALE customizing. Finally, the wrapper FM, which was designed as an Update Module, was called (synchronously of course) in an User-Exit of the application at the time of any change to the Fund Center. I would think you will need to design and implement something very similar.
Cheers,
Sougata.
2012 May 30 4:45 AM
Sougata,
'
Thanks for your reply,
When i go to Tcode BDBG ->
Object Type :BUS1022
Method CreateFromData1 ->select category ->Object Type-> Display Interface
Here I can see
Function Module for Outbound ALE ALE_FIXEDASSET_CREATE1
is there any way i can create a Asset outbound idoc using function module ALE_FIXEDASSET_CREATE1 when i create Asset using AS01 ?
Thanks
Siri
2012 May 30 6:45 AM
That's great news because that means you do not have to develop the custom ALE FMs to populate the IDoc - so half of your problem is already solved!
For the other half, I would identify the appropriate User-Exit or BAdI which is called everytime as Asset is created/changed etc. Then I would call FM "ALE_FIXEDASSET_CREATE1" in Update Task within the User-Exit to create the IDoc - the mappings already exists in this FM. I had a quick look at SMOD - Enhancement "AINT0001" looks good but I'm not sure if it will be called everytime - you'll have to implement it and see if it breaks on save at AS01, 02 etc.
The Distribution Model which you have already customized can stay the same if you have used Message Type "FIXEDASSET_CREATEFROMDATA1" and added it as an outbound parameter for the target LS (Logical System).
Hope this solves the issue.
Cheers,
Sougata.
2012 May 30 7:46 AM
Sougata Chatterjee wrote:
The Distribution Model which you have already customized can stay the same if you have used Message Type "FIXEDASSET_CREATEFROMDATA1" and added it as an outbound parameter for the target LS (Logical System).
Hope this solves the issue.
Cheers,
Sougata.
Ok, I correct myself - You first need to delete the entry in the Distribution Model (BD64) for the BAPI which you had added earlier. In the Partner Profile (WE20), also delete the entry which the Distr.Model generated before. Then choose the target Logical System from the left hand side and add the Message Type "FIXEDASSET_CREATEFROMDATA1" as an outbound parameter and save.
Also remember, in the User-Exit, before you call FM "ALE_FIXEDASSET_CREATE1" in Update Mode, you would need to read the Asset master data (for the particular Asset number) and fill up the various Import & Tables Parameters of this FM as per your requirement so that then this FM can populate the appropriate segments of the IDoc. It will not do this by itself because it does not know which segments you require or you don't.
Cheers,
Sougata.
2023 Dec 27 1:41 PM
Is this Solution Implemented . How it is done. [removed by moderator]
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |