Skip to Content

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

Quotation approval Status Modification

Hi,

I need to do quotation approval based on some conditions, where i can write the code for quotation approval.

if possible tell me the code.

Thanks

Tags:
Former Member
Former Member replied

If you looking for VA21

check this include MV45AFZZ.

write in below routine

USEREXIT_SAVE_DOCUMENT

to read the status of APPROVALS

CALL FUNCTION 'STATUS_READ'

EXPORTING

CLIENT = SY-MANDT

objnr = V_OBJNR

  • ONLY_ACTIVE = ' '

IMPORTING

  • OBTYP =

  • STSMA =

STONR = V_STONR

  • TABLES

  • STATUS =

EXCEPTIONS

OBJECT_NOT_FOUND = 1

OTHERS = 2.

change the status.

CALL FUNCTION 'STATUS_CHANGE_EXTERN'

EXPORTING

client = sy-mandt

objnr = V_OBJNR

user_status = 'E0001'

SET_CHGKZ = 'X'

EXCEPTIONS

OBJECT_NOT_FOUND = 1

STATUS_INCONSISTENT = 2

STATUS_NOT_ALLOWED = 3

OTHERS = 4.

IF SY-SUBRC = 0.

COMMIT WORK.

ENDIF.

I hope these two function module will work for your case

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question