on 11-24-2011 5:35 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.