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

Flat IDOC structure on adding Zsegment to ORDERS05

Former Member
0 Likes
1,126

Hello All,

My requirement is to extend outbound IDOC for ORDERS05 as follow

-->E1EDP01 (item level)

----------> under E1EDP01 segment add new custom segment.

In order to achieve this, I have completed the needful steps in WE30, WE31, partner profile maintenance, etc.

I have added below logic in EXIT_SAPLVEDC_002

IF int_edidd-segnam = 'E1EDP01'.

CLEAR int_edidd.

int_edidd-segnam = 'ZEX_ORDERS05'.

int_edidd-sdata = ls_orders05.

APPEND int_edidd.

ENDIF. " At this point, INT_EDIDD is appended with custom segment details.

However, when IDOC is generated, the structure is flat.

I have tried searching in the forum but none of the suggestion worked. Your help will be greatly appreciated and the right answer would be rewarded.

TIA.

Hello All,

My requirement is to extend outbound IDOC for ORDERS05 as follow

-->E1EDP01 (item level)

----------> under E1EDP01 segment add new custom segment.

In order to achieve this, I have completed the needful steps in WE30, WE31, partner profile maintenance, etc.

I have added below logic in EXIT_SAPLVEDC_002

IF int_edidd-segnam = 'E1EDP01'.

CLEAR int_edidd.

int_edidd-segnam = 'ZEX_ORDERS05'.

int_edidd-sdata = ls_orders05.

APPEND int_edidd.

ENDIF. " At this point, INT_EDIDD is appended with custom segment details.

However, when IDOC is generated, the structure is flat.

I have tried searching in the forum but none of the suggestion worked. Your help will be greatly appreciated and the right answer would be rewarded.

TIA.

2 REPLIES 2
Read only

dev_parbutteea
Active Contributor
0 Likes
972

Hi,

You are clearing the whole structure for int_edidd !!! You should clear only the field int_edidd-sdata which you are overwriting with whatever is in ls_orders05...

Dev.

Read only

Nawanandana
Active Contributor
0 Likes
972

Hi

I guess you will extend the IDOC using WE30.

CASE int_edidd-segnam.
WHEN 'E1EDP01'.
MOVE int_edidd-sdata TO e1edp01.
"your logic


MOVE e1edp01 TO int_edidd-sdata.
MODIFY int_edidd INDEX sy-tabix.
ENDCASE.

Regards,

Nawa