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: 

IDOC working through WE19 but not directly

Former Member
0 Kudos
387

HI,

When i execute and idoc from we19 the logic works perfetly.

But by default the idoc do not update data properly when triggered from sneding server to reciving server.

I am modifying IDOC segment in inbound and this code of modifying of segment in inbound is not working at runtime but working through debugging from WE19.

Kindly guide.

Thanks.

Edited by: Sanjay_lnt on Oct 1, 2010 4:16 PM

Edited by: Sanjay_lnt on Oct 1, 2010 4:19 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos
250

I'm still not that skilled in reading people's mind. In fact, i can only read my own mind although in the weekend that's going to be a bit difficult (alchohol and stuff like that...).

So, how about posting some code?

8 REPLIES 8

Former Member
0 Kudos
251

I'm still not that skilled in reading people's mind. In fact, i can only read my own mind although in the weekend that's going to be a bit difficult (alchohol and stuff like that...).

So, how about posting some code?

0 Kudos
250

I will join with you for weekend after solving issue(-;

Here is code on inbound side-

WHEN 'E1MARDM'.

lv_line1 = sy-tabix.

wa_e1mardm = wa_idoc_data-sdata.

SELECT SINGLE * FROM mard INTO wa_mard WHERE matnr = wa_e1maram-matnr AND

werks = wa_e1marcm-werks AND

lgort = wa_e1mardm-lgort. "Taking values available in productio server

READ TABLE idoc_data INTO wa_idoc_data INDEX lv_line1.

wa_e1mardm = wa_idoc_data-sdata.

wa_e1mardm-lgpbe = wa_mard-lgpbe. "I need to retain this value available in production server

wa_idoc_data-sdata = wa_e1mardm.

MODIFY idoc_data FROM wa_idoc_data INDEX lv_line1.

CLEAR wa_idoc_data.

Edited by: Sanjay_lnt on Oct 1, 2010 4:34 PM

0 Kudos
250
  • hic *

No hard feelings but: I rather see my wife join me for the weekend.

Not sure why you're doing this READ since you're already processing that line.

READ TABLE idoc_data INTO wa_idoc_data INDEX lv_line1.

I'm pretty sure there's more coding involved: i see a number of workareas being used.

0 Kudos
250

Logic is working.Just that modify statement doesnt work in background ie when sent directly but works through we19.

can it be because am modifying table on which am logic.

The logic has worked earlier and is working for other segments with similar scenario and also modile on IDOC_DATA in loop.

Please guide.

Edited by: Sanjay_lnt on Oct 1, 2010 6:49 PM

Edited by: Sanjay_lnt on Oct 1, 2010 6:51 PM

0 Kudos
250

Hi,

Check for sy-subrc after a select / read statement before using the work area further.

Hope it helps.

Sujay

0 Kudos
250

No problem with sy-subrc.

I hardcoded wa_e1mardm-lgort = 'ABC'.This value was not modified at runtime by modify statement.

Through debuging the int table idoc_data gets modified with "ABC".

Kindly guide to resolve issue.

Edited by: Sanjay_lnt on Oct 1, 2010 7:40 PM

0 Kudos
250

what is the status of your idoc at runtime??

0 Kudos
250

Hi,

Status is 53 ie successful.

problem is idoc value in production is not retained and is overwritten by incoming idoc value as IDOC_DATA is not getting modified.