Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem in user exit: USEREXIT_SAVE_DOCUMENT_PREPARE

Hi All,

I have included some code in USEREXIT_SAVE_DOCUMENT_PREPARE .

LOOP AT XVBAP.
      clear v_vkorg.

      select single vkorg from vbak
        into v_vkorg
        where vbeln = xvbap-vbeln.

      IF sy-subrc = 0.
        IF ( xvbap-matnr CS '_ET' and  xvbap-spart = 'P1' )
                                  OR
          ( xvbap-matnr CS '_ET' and  xvbap-spart = 'M1' and v_vkorg = 'GB01' ).

          xvbap-kztlf = 'A'.
          MODIFY xvbap.
        ENDIF.
      ENDIF.
    ENDLOOP.

The table xvbap is properly modified.

but the problem is, the kztlf(partial delivery field) in "VA02" is not populated with 'A'.

I debug the code, from xvbap, the db table vbap is properly updated with the value.

Strange thing is, in one of the enhancement points, the entire tables have been getting refreshed(enhancement point is of standard)

If this is the case, then what is the use of USER-EXIT.

Pls help me how to resolve the above issue.

Thank you,

Priya

Former Member
Not what you were looking for? View more on this topic or Ask a question