Skip to Content

IDoc MATMAS_BAPI03 - Field VAL_TYPE empty impossible?

Dear all,

I try to change an LSMW using Direct input by IDoc process using type MATMAS_BAPI03 in order to change document for all material updated by this LSMW.

The difficulty is that valuation type is empty for all our materials. When I generate IDoc then this field is never taken into account and IDoc are in error...

In segment MBEW field VAL_TYPE is empty and is not visible (not taken into account).

In segment MBEWX I set field VAL_TYPE to constant X.

How to process by this way?

Thanks for your help.


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Feb 13 at 07:45 AM


    Using LSMW SAP by default complete X structure with a condition IF NOT field IS INITIAL / ELSE / ENDIF. Even if SAP wants primary key values which is incorrect. Primary key from X structure must have same values than no X structure.

    In my case:


    • Val_area: 1000
    • Val_key: [empty]

    MBEWX (using SAP menu Exras @ Complete X Structure) [INCORRECT]:

    • Val_area: IF NOT mbew-val_area IS INITIAL. mbewx-val_area = 'X'. ELSE. mbewx-val_area = ''. ENDIF.
    • Val_key: IF NOT mbew-val_key IS INITIAL. mbewx-val_key = 'X'. ELSE. mbewx-val_key = ''. ENDIF.

    Must be MBEWX [CORRECT]:

    • Val_area: 1000
    • Val_key: [empty]
    Add comment
    10|10000 characters needed characters exceeded