cancel
Showing results for 
Search instead for 
Did you mean: 

Set field value to initial in Idoc

Former Member
0 Kudos

I had to transfer material master via message type MATMAS from one R/3-system to an other and change some field values via SALE - "Converting Data between Sender and Receiver". How can I set some field values (DISKZ, LMINB, LGPBE, ...) to the initial value (Blank) ? I've tried it with the constant "/", but NoData means, that the data in the target system will not be overwritten. But I have to overwrite it with blank (or initial value).

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think that is not allowed in standard code.

This is the standard MATMAS handing code for LGPBE in the target system, with function module IDOC_INPUT_MATMAS01.

if i_d-LGPBE = c_nodata.

clear i_d-LGPBE.

else.

MARD-LGPBE = i_d-LGPBE.

if MARD-LGPBE is initial.

i_m-fname = 'MARD-LGPBE'.

append i_m to t_m.

endif.

endif.

To achieve this, you can use the user exit EXIT_SAPLMV02_002 in the Enhancement project MGV00001 (transaction SMOD).

Alternately, you can also implement the BAdi BADI_MATMAS_ALE_IN for this.

Hope this helps,

Bhanu

Former Member
0 Kudos

Hi Bhanu,

thank you for your help. I've found an other way without coding. In the data conversation I set a constant value "#" to this field. It set the receiver filed to it's initialize value.

Former Member
0 Kudos

Dear Bernhard,

thank you for that hint. Even your post is quite old your solution helped me very much.

With best regards...

...Hans