2015 Mar 27 8:04 AM
Hi SAP GURU'S
I did below steps for extension of ORDCHG Message type
1. WE31 - Created A segment(YTEST) with additional fields.
2. WE20 - Created the Extension(ZORDERS05) for the given Basic type ORDERS05.
2.1 added the custom segment(YTEST) as the child segment to the segment ( E1EDP01)
3. Released the custom segment (YTEST) and the Extension (ZORDERS05).
4. WE82 - Assigned Basic type to extension / messages( For Both messages ORDCHG&ORDERS)
5. WE30 - Checked and Transported IDoc extension
5.1 Given the Extension Name(ZORDERS05)
5.2 In the menu Path : Development Object -- >Check (Ensure that there are no errors or warnings)
6. WE20 - Now in the Partner Profile added the Extension(ZORDERS05) in the Message control data and Saved it(For Both messages ORDCHG&ORDERS).
I added code In BADI (IDOC_DATA_INSERT) for YTEST Segment .
case control-direct.
when '1'. " Outbound
case control-rcvprn .
when 'XXXXX'. " Partenr
case control-mestyp.
when 'ORDERS' or 'ORDCHG'. " Message type
If Control-cimtyp = 'ZORDERS05.
loop at data into ls_data where segnam = 'E1EDP01'.
ls_seg_num-segnum = ls_data-segnum.
append ls_seg_num to lt_seg_num .
endloop .
lv_count = 1.
loop at lt_ekpo into ls_ekpo.
read table lt_seg_num into ls_seg_num index lv_count.
* filling Maximo PR field name and value
ls_y1mm_maximo_pr-item = ls_ekpo-bnfpo.
ls_y1mm_maximo_pr-bednr = ls_ekpo-bednr.
ls_y1mm_maximo_pr-banfn = ls_ekpo-banfn.
clear ls_new_segment1.
* Data inserting into zsegments
ls_new_segment1-segnam = lco_zsegment1.
ls_new_segment1-counter = '000' .
ls_new_segment1-sdata = ls_y1mm_maximo_pr.
ls_new_segment1-segnum = ls_seg_num-segnum.
if ls_new_segment1 is not initial.
have_to_change = 'X'.
append ls_new_segment1 to new_entries.
endif.
clear : ls_y1mm_maximo_pr.
lv_count = lv_count + 1.
endloop.
Endif.
Endcase.
Note : This is working for PO Creation( ORDERS Msg) , I can See the "Control-cimtyp = 'ZORDERS05'" , But it is n
ot working for ORDCHG Msg type , I did the above config for both message types .
When ever PO change I could nt see the extension Idoc( ZORDERS05) , Even in WE05 Tcode , But Idoc is tiggering with out adding adding additional segment(YTEST) .
Please kindly help me out .,
Thanks in advance,
Krishna Kothaluru.
2016 Apr 10 9:34 AM
Hi,
I also facing the same issue and waiting for a solution, Did you solve this issue??
Any body have any idea on this, please post here.
Kind Regards,
Karthik.S