Skip to Content
avatar image
Former Member

Web based Orders getting incomplete and not to create PR as well as PO

Dear experts ,

Need your assistance

My sales Process Orders are getting created .Purchase requisition is getting created and based on PR PO is getting created.

All my Sales Orders are Web based one. No control in SAP for creation. Only from VA02 I can check the data in side sales order.

Currently if my Sales Orders are incomplete we are able to Save the Sales Orders(because Web based Orders). And PR is getting created and PO is getting created and from their Data is moving to 3rd party system.

If my Sales Order is incomplete It should not allow us to Save. Because of Web based Orders they are getting created even though if the sales order is incomplete. Once sales Order is created PR will get create and PO is getting created.

Is there any trace I can keep if my sales Order are incomplete it should not created PR as well as PO?

My incompletion logic is working correct. I cannot control through this. Because of web orders .

Can I use any user exist to control not to create PR and PO from Sales Order unless incompletion is filled with required data. I guess I can use USEREXIT_SAVE_Document_Prepare. but required little bit assistance can someone please through some inputs

Regards,

Seegal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 25, 2011 at 12:51 AM

    You can't do this in USEREXIT_SAVE_DOCUMENT_PREPARE as VA0n coding doesn't set the incompletion status into the VBUK-UVALL (overall incompletion status) variable by then.

    You need to use USEREXIT_SAVE_DOCUMENT in MV45AFZZ that is called before COMMIT.

    We have done similar coding that goes like

    *---------------------------------------------------------------------*
    *       FORM USEREXIT_SAVE_DOCUMENT                                   *
    *---------------------------------------------------------------------*
    *       This userexit can be used to save data in additional tables   *
    *       when a document is saved.                                     *
    *                                                                     *
    *       If field T180-TRTYP contents 'H', the document will be        *
    *       created, else it will be changed.                             *
    *                                                                     *
    *       This form is called at from form BELEG_SICHERN, before COMMIT *
    *                                                                     *
    *---------------------------------------------------------------------*
    FORM userexit_save_document.
      IF order is weborder.
        IF vbuk-uvall <> 'C'.
          ROLLBACK WORK.
          MESSAGE TYPE 'E' ....
        ENDIF.
      ENDIF.
    
    ......
    ENDFORM.

    It is a good idea to create a separate include for your coding and include it in the above user exit as MV45AFZZ is a common object that may be required by other project.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Raga,

      I would like add smiler point to Mr. Sri vishnu view, write the logic like this

      If the XUBUK - UVALL is not equals to C system should not generate the no in XVBEP - BANFN it should remain blank until the

      status turned to C.

      Check and revet

      Regards

      Ram

  • avatar image
    Former Member
    Nov 24, 2011 at 09:44 AM

    Hi

    Check with an ABAPer on this. This requirement of havign an error message can only be achieved through a user exit. The one which you chose seems to be the correct one. The table for incompletion log is TVUV , check if correct entries populate in the internal table for this table. As this is all runtime generation probably external debugging would help.

    Regards

    Manas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 24, 2011 at 06:25 PM

    HI Seegal,

    We are also face same issue for one of our client for third party sales, its automatically creating PR for Web based Orders, for that we use Status profile at sales order header level ( All our sales orders is third party sales ) to block not to create PR automatically once status has to release it will create RR automatically.

    Regards

    Nishad

    Add comment
    10|10000 characters needed characters exceeded