Application Development 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: 

user exit to update extended segment in idoc for va01

Former Member
0 Kudos

Hi Experts,

I am working on Outbound IDOC interface for VA02 and VA01

I am using ORDERS05 IDOC type

i want to create one custom segment

and i want to fill that custom segment

but i am not able to find user exit to update this custom segment

please help.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Check the available exits in function module IDOC_OUTPUT_ORDERS which will create the ORDERS Idoc.

In include ZXM06U02

DESCRIBE TABLE int_edidd LINES lines.

seg_indx = lines.

READ TABLE int_edidd INDEX lines.

check whether it is a PO or sales order and then do the following.

CASE int_edidd-segnam.

WHEN 'ZTEST'. "ZTEST is your custom segment name

ZTEST = int_edidd-sdata.

"Fill the fileds into segment then modify

ztest-f1 = xxxxxxxxx

ztest-f2 = xxxxxxxxxx

MODIFY int_edidd INDEX seg_indx.

Former Member
0 Kudos

Hello Akshay,

Here is the procedure which I came across successfully.

We have coded for the logic for reading additional data from Custom Idoc Segment in the User Exit EXIT_SAPLVEDA_001

The underlying SAP Enhancement is VEDA0001 - SD EDI Incoming Orders (Customer Extensions)

Also, refer to the SAP Note 753153 - Customer Functions in IDOC_INPUT_ORDERS

We have moved the Segment Data to corresponding additional fields in VBAK.

Hope this information helps you resolve the problem.

With Regards

VG

Former Member
0 Kudos

Оut of date but:

Try

Extension SDEDI001

FM EXIT_SAPLVEDC_002.

Sample:

  • Add necessary header data to selfmade segment

CHECK int_edidd-segnam = 'E1EDK01'.

CLEAR int_edidd.

int_edidd-segnam = 'ZCUSTSEG'.

MOVE-CORRESPONDING dxvbak TO zcustseg.

...

int_edidd-sdata = zcustseg.

APPEND int_edidd.

Former Member
0 Kudos

Akshay,

I think you want to send order response for the orders created via Va01 or edited by Va02

To do this steps are:-

1) Use FM IDOC_OUTPUT_ORDRSP to send order response (ORDERS05)

2) Find the function exits in this Fm using search string as " Call Customer-function".

3) Use include in the exits to write code to append new segments to the IDOC. Look for the Tables parameter in the Exits which are of structure type EDIDD. Insert new Segment details in this table and your IDOC will be generated with required values.

Hope this helps!!

Harry