Add an Approval Status object to a sales order header or line item in MV45AFZZ

Source: Internet
Author: User

Encounter a more perverted needs, to use the enhanced Add audit status, is to use code to generate Vbak-objnr or VBAP-OBJNR.

In the Userexit_save_document_prepare exit, create a temporary object number with Status_object_create,

For example ' TM0000000001VB ', the system will automatically generate the appropriate approval object and replace it with the formal objnr number.

The replacement function is Status_object_switch_number

        Pager FUNCTION 'status_object_create'        ExportingChgkz='X'*CLIENT = Sy-mandtObjnr ='TM0000000001VB'  "Temporary Object numberObtyp ='VBK'   "Object CategoryStsma = Stsma"Status Parameters*Ionra_imp =*I_objectkey =*only_e_status = ' '        ImportingObjnr= vbak-Objnr*Stonr =        EXCEPTIONSObtyp_invalid=1status_object_already_exists=2Stsma_invalid=3Stsma_obtyp_invalid=4OTHERS=5.

Add an Approval Status object to a sales order header or line item in MV45AFZZ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.