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

Inbound IDoc user exit

Former Member
0 Likes
2,546

I am attempting to write my first user exit for an Inbound IDoc. Outbound seems easy by comparison. I am going to add a date to VBAK-MAHDT from and extended ORDERS03 segment. My extended segment is pretty much like E1EDK03.

I'm working with enhancement VEDA0001. For include ZXVEDU03 of component EXIT_SAPLVEDA_001 I have this so far:

DATA:

w_z1edk03 LIKE z1edk03,

w_vbak LIKE vbak.

CASE segment-segnam.

WHEN 'Z1EDK03'.

IF segment-sdata(3) = 'Z01'.

w_z1edk03 = segment-sdata.

MOVE dxvbak TO w_vbak.

w_vbak-mahdt = w_z1edk03-datum.

MOVE w_vbak TO dxvbak.

ENDIF.

WHEN OTHERS.

ENDCASE.

Am I on the right track? Isn't there something else that I need for include ZXVEDU04 of EXIT_SAPLVEDA_002?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,883

Yes Sir. You are on the right path.

Good Luck.

Cheers.

I am attempting to write my first user exit for an Inbound IDoc. Outbound seems easy by comparison. I am going to add a date to VBAK-MAHDT from and extended ORDERS03 segment. My extended segment is pretty much like E1EDK03.

I'm working with enhancement VEDA0001. For include ZXVEDU03 of component EXIT_SAPLVEDA_001 I have this so far:

DATA:

w_z1edk03 LIKE z1edk03,

w_vbak LIKE vbak.

CASE segment-segnam.

WHEN 'Z1EDK03'.

IF segment-sdata(3) = 'Z01'.

w_z1edk03 = segment-sdata.

MOVE dxvbak TO w_vbak.

w_vbak-mahdt = w_z1edk03-datum.

MOVE w_vbak TO dxvbak.

ENDIF.

WHEN OTHERS.

ENDCASE.

Am I on the right track? Isn't there something else that I need for include ZXVEDU04 of EXIT_SAPLVEDA_002?

6 REPLIES 6
Read only

Former Member
0 Likes
1,884

Yes Sir. You are on the right path.

Good Luck.

Cheers.

Read only

Former Member
0 Likes
1,883

This user exit is generic. Better if you add a condition for your code. So that it will executed for your Idoc Type, Message Type.

Mahendra

Read only

0 Likes
1,883

Are there CHECK statements I can use or that?

Read only

0 Likes
1,883

I went ahead and added:

IF contrl-mestyp = 'ORDERS' AND

contrl-idoctp = 'Z_EK_ORDERS03'.

for that check Mahendra.

I am trying to figure out how to update dxbdcdata correctly to add my data to the screen in EXIT_SAPLVEDA_002 include ZXVEDU04. With the debugger I see updates in dxbdcdata for screens '4002' and '4003' but not for '4001' where I believe my data should be added. Do I just append the records for '4001' myself and does it matter what order it is in?

Read only

0 Likes
1,883

It should be CONTRL-DOCTYP = 'Z_EK_ORDERS03' and

CONTROL-MESTYP = 'ORDERS'.

Then insert records to dxbdcdata.

Before this make sure the program name & Screen Number are correct. Which you can confirm in the transaction.

Please let me know if you have any queries.

Thanks & Regards

Mahendra

Read only

0 Likes
1,883

I started a new thread on this since having problems with my code in ZXVEDU04.