How to implement reason for rejection step
Hi Friends,
I want to create a sales order approval and rejection steps using workflow. For this I have created User Decision Step where I have included approval and rejection decisions. When approver presses approve or rejection button, immediately he should get an option to enter the comments and after saving the same these comments should go as a mail to the initiators inbox. How to achieve this.
Regards,
Steve
hi steve
For getting iniatiator dynamically you have to code. It will not do automatically. For getting automatically you have to code to achieve that. Maintain a container get all the elements filled in the container. Use this container in the expression of the task. So that it will go to the iniatiator or to the next approver.
As for my view y do u want to get the initiator automatically. For one instance of workflow there will be only one initiator. So in the expression you can choose workflow initator. That is my option. Or go ahead with your logic as per your scenerio.
Regards
vijay
Similar Messages
-
How to put Reason for rejection to line item level?
Hi
I am updating the Sales order at line item and putting the reason for rejection but it didnt updates the database. Below is the code.
LOOP AT LT_VBUP1 INTO WA_VBUP1.
ON CHANGE OF WA_VBUP1-VBELN.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_TY_SOCLOSE.
IF SY-SUBRC EQ 0.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'Y'.
ELSE.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'N'.
ENDIF.
APPEND LT_TY_SOCLOSE.
ENDON.
CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
WA_ORDER_ITEM_IN-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
CLEAR WA_VBUP1.
ENDLOOP.
Correct me where I am putting wrong.
Regards
MohinderLOOP AT LT_VBUP1 INTO WA_VBUP1.
ON CHANGE OF WA_VBUP1-VBELN.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_TY_SOCLOSE.
IF SY-SUBRC EQ 0.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'Y'.
ELSE.
LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
LT_TY_SOCLOSE-STCLOSE = 'N'.
ENDIF.
APPEND LT_TY_SOCLOSE.
ENDON.
CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
WA_ORDER_ITEM_IN-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
***********************************************************************<<<<do this bit here
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBUP1-VBELN
ORDER_HEADER_INX = LV_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CLEAR WA_VBUP1.
ENDLOOP. -
Workflow : How to put condition on Reason for Rejection ( BUS2032 ).
Hi Experts,
The situation is :
I am trying to implement a condition on "Reason for Rejection" . If there is any change in the " Reason for Rejection " ( VA02 ) tab of a particular item , a mail should be sent to a particular person . How do I design a condition so that it would trigger a mail. What all information do I need. A clear suggestion would be very helpful.
Previously we created a workflow in the " BUS2032 " on " CHANGED " event. I tried to get item level information ( old and new ) from the same Bussiness Object. What do I need to do to get the information ( old and new ).
Thanks in advance,
Raghava Vakada.Hi Experts,
Please very very urgent,
It is very helpful to me,
<b>Please Please.......</b>
Thanks in advance,
Raghava Vakada -
Hello,
I want pass value in STATUS and Reason for rejection according to requirement when i am creating multiple lead using BAPI_LEAD_CREATEMULTI. Please help me how can i pass value. Please give some sample code that in which table i have to pass values and please also tell me INPUT_FIELDS values. Please help me
Regards,
Kshitij RathoreHello,
Please help me for solve this problem. I am trying to solve problem from last 4 days but i didn't get any solution.
Regards,
Kshitij Rathore -
How does the field ABGRU-Reason for Rejection get populated in routines
Hi All,
How does the field ABGRU-Reason for Rejection get populated in routines(VOFM)?
BELNR,KPOSN,etc...fields are populated through KOMK and KOMP structures, similar way what structure is used for ABGRU?
by the time the control from VA01 comes to routine the values of VBAK and VBAP are cleared, so these structures like KOMP and KOMK are used.
Thanks in advance.You need to add rejection reason field ABGRU as a new field to pricing field catalog (KOMG structure) through APPEND structure KOMPAZ. KOMG inherits new fields from KOMKAZ (for header level fields) or KOMPAZ (for item level fields) structures and it is not directly modified but through KOMKAZ and KOMPAZ structures
Since VBAP-ABGRU can vary from item to item, add it to item pricing communication structure KOMPAZ in SE11. Once KOMPAZ is added with new ABGRU field and activated it will automatically appear in pricing field catalog (KOMG)
Afterwards the ABGRU field will then start to appear in the field catalog where you can create condition table (V/03) including the ABGRU as a field. Once done the rest is assigning the condition table to access sequence which is in turn assigned to the relevant condition type that you want to price based on partner function (all under IMG -> SD -> Basic functions -> Pricing -> Pricing control)
In the pricing user exit userexit_pricing_prepare_tkomp in include MV45AFZZ, you will need a few lines of coding to fetch VBAP-ABGRU for the item and pass it to tkomp-abrug field. This will then be used by system to read the new condition table that you created.
tkomp-abgru= xvbap-abgru
So if you populate special pricing based on ABGRU (with possibly other conditions) in the condition table then that condition record will be read for the corresponding condition type.
You would of course need a developer to modify KOMPAZ structure and code the user exit for moving the rejection reason to tkomp
That is in short how you can achieve this -
How to add new tab after reason for rejection tab using tcode va01
Hello,
how to add new tab after reason for rejection tab using tcode va01.Hi,
You can check this link...
Hope it will be helpful to you.
[https://forums.sdn.sap.com/click.jspa?searchID=23016273&messageID=6825861]
[http://www.sapdevelopment.co.uk/enhance/fexits.htm]
-Maharshi
Edited by: Maharshi Vyas on Mar 3, 2009 12:45 PM -
How add new tab after reason for rejection tab using tcode va01
Hello,
How to add new tab after Reason for Rejection tab using tranzaction code VA01.
pls suggest solution.I don't think you can add a tab after reason for rejection tab. There are custom tab, which you can use for your convenient, given by SAP. You can look into the below details:
Program : SAPMV45A
Screen: 8459(Item) and 8309(Header).
Kuntal. -
How can I disable the Reason for Rejection field in VA02 line items
Hi,
I dont want the users to be able to change the reason for rejection field in the sales order line items. Can someone please suggest a tried and tested way of doing this
Thanks for reading.Set up an auth object for the field. In userexit field modification check the auth object and set the field to be grayed out if they don't have authority. Users can then not change the value of the field Sample code
IF screen-name = 'VBAP-ABGRU'.
AUTHORITY-CHECK OBJECT 'Z_BLK_REAS'
ID 'ABGRU' DUMMY.
IF sy-subrc EQ 0.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
ENDIF. -
How to enable field "reason for rejection" of view "status" in CRMD_ORDER
Hello Everyone
I need to activate/enable field "Reason for Rejection" in view "Status" of transaction CRMD_ORDER though a delivery document is created for the sales order.
Can some one pls let me know where do I need to code to make field "Reason for Rejection" enabled.
FYI, the same logic was applied for VA02 as well and the logic is written in userexit "USEREXIT_FIELD_MODIFICATION" which is working fine.
Apprecriate your quick response.
Thanks
DharmaHi Raj,
Usually we use function module CRM_STATUS_UPDATE to
change user status in document. But if you want to
trigger next process or change from certain user status to next status interactively by the system, you can
use Badi CRM_ORDER_STATUS (here you have after and before
method).
Hope this could help.
Rgds,
Gun. -
How to sets the Reason for Rejection of the Open Sales Order Lines
Hello gurus,
I want to set the Reason for Rejection of the Open Sales Order Lines, Case is like :
If current date is exeed the Auto Void Confirmed Back Order Days(for item level) + date (last responding from customer), then reason for rejection should be set, So i want the logic to find out the date is exceed or not.
Thanks
AnjanaHello anjana,
Actually your question is some confusing, but if u want to get eldest change as active sales order then logic is as follows:
1. On base of OBJNR u have to get UDATE from JCDS table
2. then write logic as:
SORT i_jcds BY objnr stat chgnr DESCENDING.
LOOP AT i_jcds INTO wa_jcds1.
CLEAR lv_stat.
lv_stat = wa_jcds1-stat.
AT NEW objnr.
AT NEW stat.
CLEAR: wa_tab.
wa_tab-objnr = wa_jcds1-objnr.
wa_tab-stat = lv_stat.
ENDAT.
ENDAT.
IF wa_jcds1-inact = 'X'.
CLEAR lv_tabix.
IF sy-tabix > 1.
lv_tabix = sy-tabix - 1.
ELSE.
lv_tabix = 1.
ENDIF.
READ TABLE i_jcds INTO wa_jcds2 INDEX lv_tabix.
IF sy-subrc = 0.
wa_tab-chgnr = wa_jcds2-chgnr.
wa_tab-udate = wa_jcds2-udate.
wa_tab-utime = wa_jcds2-utime.
APPEND wa_tab TO i_tab.
ENDIF.
CONTINUE.
ELSE.
wa_tab-chgnr = wa_jcds1-chgnr.
wa_tab-udate = wa_jcds1-udate.
wa_tab-utime = wa_jcds1-utime.
ENDIF.
AT END OF objnr .
AT END OF stat.
APPEND wa_tab TO i_tab.
ENDAT.
ENDAT.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr stat.
SORT i_tab BY objnr stat udate utime.
DELETE ADJACENT DUPLICATES FROM i_tab COMPARING objnr.
3. now in i_tab table u'll get eldest UDATE
Hope its work for u.
Thanks & Regards,
Sumit Joshi -
BAPI_SALESORDER_CHANGE to update reason for rejection of sales order item
Hi,
The FM BAPI_SALESORDER_CHANGE is not working properly as I am getting below error when try to update the reason for rejection at sales order item level.
The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010 ready for input"
Request your suggestions to avoid this error.
Thanks>
anikaushi wrote:
> Hi,
> The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
>
> error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010 ready for input"
>
>
> Thanks
Yes, Most likely.. You can confirm this by trying to change a order without delivery and see if it goes thru (to ensure that you have passed correct parameters)...
you may have to delete the delivery (and if billing document exist, cancel it), before you can reject the line item... it would be safer to raise an error message and let the users manually delete delivery document as long as you don't have large volumes of this scenario..
Please see the SDN thread for how you can avoid this error...
Re: Cancel Sale Order after Issued Billing -
Reason for rejection in Credit Memo
Hi gurus,
We have a Credit Memo Request with one position. This position is rejected (Reason for rejection) and document is blocked at head level (Billing block).
If we unblock Billing block from CR, we can create a bill of 0 price. We want system willn't create bills in this case, because the item level is rejected and a bill of 0 euros is not correct for us.
Thank you!!Hello,
When you reject the line item in the document the net value become 'Zero',
But when you reject with a 'reson for rejection' the order will get closed, it should not allow processing the billing again. How many line items you have in this credit memo request?
Check the status of the credit memo request in VA03 --> Environment --> Status Overview. Check whether the credit memo request is 'completed' or not??
Prase -
Reason for rejection For open line items
Hi Experts ..
I Have checked in Google and in scn But Not able to find exact one
How to achieve This Issue
Created sales order line item ---150 qnty Now delivered---100 qnty PGI As well as
Now Clint wants to give reason For rejection For 50 qnty
Now Generally what we are doing is Just changing the qnty in sales order change mode VA02 --100
But some times they have so many open line items are there and not possible to change in all line items exact number
So now i trying to give reason for rejection Line item For full 150 qnty Because Automatically 50 qnty Will be reduced in MD04
But when i am Giving reason For rejection To line item system is giving error msg that subsequent document is being processed
So any Enhancement shall we do To skip this
Thank a lotDear T.W Sir Thanks a lot For your replay
But I can not see that the excess qty (not delivered) is being deducted from MRP, when Reason for Rejection is set.
Sir we can see ...May be it will take 5 mnts time To be updated ( MD04)
By the By , sir you have any idea To control This pop-up Message ( In your case it may be information msg But some times We are getting Error Msg )
so Where we can control Warning to Error like this
or it is related to enhancement issue -
Reason for Rejection for blocking line item for delivery
Hi All,
I am working on this project where based on earlier configuration, by selection reason for rejection, delivery for line item is getting blocked.
I want to change this settings because reason for rejection should not be controlling the blockage it should be merely be the reason. Delivery should be blocked if it is blocked by selecting delivery block field in schedule line for the line item.
How can I change the settings for the reason for rejection?Dear ankit.k.agarwal
If you assign a reason for rejection system will block the particular sales order and that sales order shouldn't be used any longer.
This is the standard SAP behavior and the program was written like that.
Still if you want to do , you have to go for an enhancement to change the standard program(It is not suggestible)
In stead you add a new field in sales order(field exit) and convince your key/core users to maintain the reason for rejection in that field .
Co ordinate with your technical team
Thanks&Regards
Raghu.k -
Reason for rejection error message required
Dear all
When we do a reason for rejection for a configurable material or a sales order line item for which a sales order stock or production order exists,System doesn't throw a error message while trying to do reason for rejection for the line item in sales order.
How to bring error message for a line item in sales order when subsequent order like production order exists for that sales order(make to configure mateiral) or sales order stock exists..
Regards
SudhaHi
My issue is solved.
Have activated v4 -297 in message settings under SD
Maybe you are looking for
-
Tagging Artists /// Album Artist
Friends, happy new year everyone. I've never understood the difference between the tagging options artists and *album artists* which are listed in windows folder options. Apparently iTunes does not recognize any difference, since it uses the default
-
Hi, I am trying to insert a date in the format "mm/dd/yy" to the database. For this I need to convert the string in the above given format to a date object(as the column in the database is of the tyoe Date). I tried using SimpleDateFormat....but it a
-
Hi, I have around 240 audio files that are around 31 seconds each. I now want to create a 10-15 second version of each file and can't think of a quick and easy way to do this without bouncing down every file again. I want to trim each file at exactly
-
I upgraded my Iphone 4s to the very latest firmware with dire consequences. I have a 4 bar signal with Vodafone but I cant make or recieve calls. I called Vodafone on my landline and spen an hour talking to all sorts of people repeating myself cou
-
QT movie will not pre-load text track for chapters when streaming
We have been trying to stream quicktime files with chapters for some time and have followed every tutorial, message board advice and trick to get this to work but with no luck. I am unable to get the chapters to show up in QTplayer when the video is