2008 May 17 11:55 AM
Hi Friends,
I need to Pass data records to Function Module
MASTER_IDOC_DISTRIBUTE for Creating Outbound IDOCs
I am Collecting all the Data Records and Passing into the Structure EDIDC.
Here my problem is
For one Route there are Multiple Customer records.
so my First Parent Segment is ZROUTE
i am passing the Datarecord for this Segment.
and for the Customer Segment , I have 5 Customers,
so i am passing the 5 Data records to SDATA .
Loop at gt_route into gw_route.
Pass the Route data into the Data record SDATA
gw_idocdata-sdata = gw_route_header.
gw_idocdata-segnam = lc_route_header.
gw_idocdata-hlevel = lc_4.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_route_header, gw_idocdata.
Loop at gt_customer into gw_customer
where anlage = gw_route-anlage.
Pass the Customer data into the Data record SDATA
gw_idocdata-sdata = gw_customer.
gw_idocdata-segnam = lc_customer.
gw_idocdata-hlevel = lc_5.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_customer, gw_idocdata.
ENDLOOP
ENDLOOP.
So this customer segment is comming 5 times in my IDOC
Can any one suggest me whether i am going in correct way or not.
I am Getting the IDOC status 26.
Error during syntax check of IDoc (outbound)
I think it is because the IDOC is not yet SET RELEASE.
But i am having the Dought in Passing the data to SDATA fied
of the EDIDC Structure.
Can any one Suggest me.
Thanks in Advance,
Ganesh
Hi Friends,
I need to Pass data records to Function Module
MASTER_IDOC_DISTRIBUTE for Creating Outbound IDOCs
I am Collecting all the Data Records and Passing into the Structure EDIDC.
Here my problem is
For one Route there are Multiple Customer records.
so my First Parent Segment is ZROUTE
i am passing the Datarecord for this Segment.
and for the Customer Segment , I have 5 Customers,
so i am passing the 5 Data records to SDATA .
Loop at gt_route into gw_route.
Pass the Route data into the Data record SDATA
gw_idocdata-sdata = gw_route_header.
gw_idocdata-segnam = lc_route_header.
gw_idocdata-hlevel = lc_4.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_route_header, gw_idocdata.
Loop at gt_customer into gw_customer
where anlage = gw_route-anlage.
Pass the Customer data into the Data record SDATA
gw_idocdata-sdata = gw_customer.
gw_idocdata-segnam = lc_customer.
gw_idocdata-hlevel = lc_5.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_customer, gw_idocdata.
ENDLOOP
ENDLOOP.
So this customer segment is comming 5 times in my IDOC
Can any one suggest me whether i am going in correct way or not.
I am Getting the IDOC status 26.
Error during syntax check of IDoc (outbound)
I think it is because the IDOC is not yet SET RELEASE.
But i am having the Dought in Passing the data to SDATA fied
of the EDIDC Structure.
Can any one Suggest me.
Thanks in Advance,
Ganesh
2008 May 17 3:08 PM
Hi,
First of all EDIDC is the control record, EDID4 is the data record. When collecting customer record into idoc_data you need to insert customer's parent segment number.
Eg.
route1, segnum 1.
child 1, segnum 2 and parent segnum = 1
child 2, segnum 3 and parent segnum = 1
child 3, segnum 4 and parent segnum = 1
route 2, segnum 5
child 1, segnum 6 and parent segnum = 5
child 2, segnum 7 and parent segnum = 5
child 3, segnum 8 and parent segnum = 5
...
Cheers.
...Reward if useful.
2008 May 18 1:04 PM
HI dude,
Check in you are creating all mandatory segments, folow all rule in Idoc like number of times a segment can exist in an Idoc, order in while you can have segments.
hope this answers your question.
Reagrds
Srikanth M
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |