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

IDOC CLFMAS set initial values

david_escofettrenado
Participant
0 Likes
2,044

Hi,

I am using IDOC CLFMAS02 to update values in material classification. I do not have problems with modify a normal value. But I want to set a date classification value to initial. If I inform with ' ' the value is showed as '00.00.0000', but I need that this value become initial.

I am trying to use field MSGFN = 003 (delete) on segment E1AUSPM but it does not running.

The FM that we use to input idoc is IDOC_INPUT_CLFMAS.

Any suggestion. Thanks¡¡¡¡

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,393

Hi!

Do you try remove date characteristic from E1AUSPM segment?

I guess that if dont send characteristic it set to default value.

look at code:


LCLA1F02:
*--- get validations to delete and mark them to delete
  loop at charact_values.
    read table e1auspm_tab with key
      atnam = charact_values-charact
      atwrt = charact_values-value
      atzis = charact_values-instance.

*... mark to delete if not imported
    if not sy-subrc is initial.
      values_to_maintain-charact  = charact_values-charact.
      values_to_maintain-value    = charact_values-value.
      values_to_maintain-instance = charact_values-instance.
     values_to_maintain-fldelete = c_mark.  "!!!
      append values_to_maintain.
    endif.
  endloop.                             " AT CHARACT_VALUES

3 REPLIES 3
Read only

Former Member
0 Likes
1,394

Hi!

Do you try remove date characteristic from E1AUSPM segment?

I guess that if dont send characteristic it set to default value.

look at code:


LCLA1F02:
*--- get validations to delete and mark them to delete
  loop at charact_values.
    read table e1auspm_tab with key
      atnam = charact_values-charact
      atwrt = charact_values-value
      atzis = charact_values-instance.

*... mark to delete if not imported
    if not sy-subrc is initial.
      values_to_maintain-charact  = charact_values-charact.
      values_to_maintain-value    = charact_values-value.
      values_to_maintain-instance = charact_values-instance.
     values_to_maintain-fldelete = c_mark.  "!!!
      append values_to_maintain.
    endif.
  endloop.                             " AT CHARACT_VALUES

Read only

0 Likes
1,393

Yes I try to remove date characteristic from E1AUSPM.

Also I try to set blank value.

Also I try with MSGFN value = 003.

I think that your code is only to delete values from multiple-values characteristics.

TEST 1 ( set blank)

Current Material characteristic value: 01.01.2011

Objective Material characteristic value: Blank

E1OCLFM 004MARA 00000XXXXXXXXXXXXX 001OMARA

E1KSSKM 004ZCLAS 1

E1AUSPM 004Z_CHARACTERISTIC

E1DATEM 004

Result Material characteristic value: 00.00.0000

TEST 2 (MSGFN 003)

E1OCLFM 004MARA 00000XXXXXXXXXXXXX 001OMARA

E1KSSKM 004ZCLAS 1

E1AUSPM 003Z_CHARACTERISTIC 01.01.2011

E1DATEM 004

OR

E1OCLFM 004MARA 00000XXXXXXXXXXXXX 001OMARA

E1KSSKM 004ZCLAS 1

E1AUSPM 003Z_CHARACTERISTIC

E1DATEM 004

OR

E1OCLFM 003MARA 00000XXXXXXXXXXXXX 001OMARA

E1KSSKM 003ZCLAS 1

E1AUSPM 003Z_CHARACTERISTIC 01.01.2011

E1DATEM 003

OR others...

The problem is that characteristic must be defined to DATE format and when I set blank value, inside code is converting to 00.00.0000

Read only

JL23
Active Contributor
0 Likes
1,393

Please try that manually and then compare the results.