cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Thank you Sri Vishnu,

In my Case Incomplete Orders should be created and saved . but PR should not be triggered if its an incomplete Order.

I am thinking i need to apply logic at schedule line level . even though if the sales order is incomplete and saved PR should not get created.

Thx,

Seegal

Edited by: Raga on Nov 30, 2011 8:24 AM

Edited by: Raga on Nov 30, 2011 8:25 AM

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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