on 06-12-2007 7:08 AM
Hi Experts,
I have a requirement in my scenario where I want to store IDOC segments number & it's higher segment number.
For example these are the segment's and it's number.
<b>.</b>E1COGH -
> segment1
E1COGHT -
> segment2
E1COGHR -
> segment3
<b>.</b>E1COGS----
> segment4
<b>.</b>E1COGSR----
> segment5
here E1COGHT number is 2 and it's higher segment is E1COGH so obviously it's E1COGHT higher segment number is 1,
similarly E1COGS number is 2 and it's higher segment is E1COGH so m E1COGHT higher segment number is 1.
I want these details for mapping.
Now when I do mapping through graphical mapping I want to map segment number it's corresponding higher segment needs to map with target message type.
Can any body suggest me how to get these details
Thanks,
Murthy.
Hi Murthy,
I am not sure whether we can view segment number in IR.
Just refer the documentation in we63 and map it in IR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Murthy,
You need to use ABAP maping & need to call FM 'EDI_SEGMENTS_GET_ALL in it which will connect to sender R/3 system with doc no & will give the IDOC detail. You can also use table IDXIDOCSYN but I doubt that it will contail all the info required.
Regards
Sushil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Hope I understand u'r requirements correctly.
Try the following function:
CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
EXPORTING
DOCUMENT_NUMBER = I_EDIDC-DOCNUM
TABLES
IDOC_CONTAINERS = I_EDIDD
EXCEPTIONS
DOCUMENT_NUMBER_INVALID = 1
END_OF_DOCUMENT = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
This comes from the template funciton OWN_FUNCTION which is used for ABAP-PI Ports in handling IDocs.
Given an IDoc number, it returns all segments within this IDoc,
Check the fields in the returned structure I_EDIDD:
- SEGNUM (Segment Number)
- PSGNUM (Number of superior parent segment)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Narasimha,
you can use index standard node function to get required output.but becareful with node context when you are using this node function.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi narasimha,
could you please tell me which IDOC type you are using. and also target message structure,in that you want to map segment occurrence to which element in target.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Source Message Target Message
COGRP01 indsp_mt
IDOC Statement
BEGIN COGRP_TMP_PROC_1
 EDI_DC40 action
SEGMENT IDOCNUMBER
TABNAME -------
-------
 E1COGH E1COGH_NUMBER
SEGMENT E1COGH_HIGHERNUMBER
MSGFN -------------------- E1COGH_MSGFN
------ --------
 E1COGHT E1COGHT_NUMBER
SEGMENT E1COGHT_HIGHERNUMBER
LANGU ------------------ E1COGHT_LANGU
As shown in above target structure I want to store E1COGH segment number in E1COGH_NUMBER & it's Parent Segment number in E1COGH_HIGHERNUMBER.
Similarly i want to store E1COGHT segment number in E1COGHT_NUMBER & it's parent segment number (E1COGH in this case) in E1COGHT_HIGHERNUMBER.
Can you tell me how to do this.....
Thanks
Murthy
Hi Narasimha,
i am not clear with your requirement,could you please tell me what is the meaning of segment number?
is it segment occurrence?
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
U can check the details of your IDoc using the transaction WE63.
There u give your IDoc type in basic type and press F8 to see the documentation of the IDoc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.