on 09-19-2012 12:15 PM
Hi Gurus,
We are creating a process where, after some events, we would like to update the sales order, so from that moment for a specific item, the user won't be able to modify anything of it. If it was possible to don't allow the deletion of that item, it would be even better. We want something similar to what the Overall Status of the item level offers when it is "Complete", but also we want to be able to bill that item (no delivery is needed).
Do you know if that is possible? Is there any FM that can help us?
Thank you in advance.
Hi Abel,
Yes, You have following options to achieve your requirement:
USEREXIT_SAVE_DOCUMENT_PREPARE
USEREXIT_CHECK_VBAP
BADI_SD_SALES_ITEM
I hope, it will help you.
Regards
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abel,
I can give you some brief guidelines on user status configuration:
You can search more about it on sap help or Google it. you will find a lot of threads for the same.
I hope, its clear to you now.
Regards
Ankur
Thank you Ankur, but I think this solution it's not good for us. We don't want to allow or lock business transactions, we want to make the item of the sales order non editable. And I don't know if we can solve it through item status...
The user, after a certain process, should not be able to modify the item of a specific sales order. Not changing quantities or any other field. And this is where I am now. I know how to create a status profile, but all my attemps to make non editable the item are not working.
Hi Abel,
I am sure that you can control it through status. Kindly check the below given screen shots and try it in your system:
Secondly, if you are not comfortable with setting up user status then you have to take the help of ABAPer to prepare a logic and subsequently writing a program to make changes in SODS line items or its subsequent fields. Here, I am giving you a program through which I made fields of material code, quantity and WBS fields un editable. You can prepare your own by modifying the same logic and altering a few fields or tables in the program:
if sy-tcode = 'VA02' .
DATA return type table of BAPIRET2 .
REFRESH return[].
IF ( screen-GROUP2 = 'LOO' ) AND ( screen-name = 'RV45A-KWMENG' OR screen-name = 'VBAP-VRKME' OR screen-name = 'VBAP-PS_PSP_PNR' ).
IF vbap-vbeln is NOT INITIAL AND vbap-PS_PSP_PNR is INITIAL.
CALL FUNCTION 'ZSD_FM_CHECK_VALIDATION'
EXPORTING
vbeln = vbap-vbeln
posnr = vbap-POSNR
PS_PSP_PNR = vbap-PS_PSP_PNR
tables
return = return
.
IF return[] IS NOT initial.
CASE screen-name.
WHEN 'RV45A-KWMENG' OR 'VBAP-VRKME' OR 'VBAP-PS_PSP_PNR'.
screen-input = 0.
ENDCASE.
ENDIF.
endif.
IF vbap-vbeln is not initial AND vbap-PS_PSP_PNR is not INITIAL.
CALL FUNCTION 'ZSD_FM_CHECK_VALIDATION'
EXPORTING
vbeln = vbap-vbeln
posnr = vbap-POSNR
PS_PSP_PNR = vbap-PS_PSP_PNR
tables
return = return .
IF return[] IS NOT initial.
CASE screen-name.
WHEN 'RV45A-KWMENG' OR 'VBAP-VRKME' OR 'VBAP-PS_PSP_PNR'.
screen-input = 0.
ENDCASE.
ENDIF.
endif.
endif.
endif.
There is one more option of "Maintaining System Status through t-code BS22" but i won't suggest that option.
However, you can test all the above mentioned processes in your testing server and decide which one suits you the best.
Good Luck!!
Regards
Ankur
Hi Abel,
In T-code OK02/BS02 while creating status profile take object types Operation of process order & PP/PM: order header in addition to what you have already selected (Sales order header & Sales order item ) -> Then, while creating a new status and adding new entries for transaction control under Business Transaction, you will find the field "Change" now.Here, you do the same as mentioned above i.e. forbid->allow.
Now,come to IMG(SPRO)->Sales & Disribution-> Sales-> Define & Assign Status profile ->Assign order types/status profiles (VOV8)->Here, assign your status profile under parameters of 'Transaction Flow'
Again, IMG(SPRO)->Sales & Disribution-> Sales-> Define & Assign Status profile ->Allocate status profile to item categories->Here again, assign your status profile under parameters of 'Transaction Flow'
Check it again.
Hope it will work now.
Regards
Ankur
Hi Abel,
That is very much possible with Status profile at the item level. YOu can disable the changing functionality of a line item for a particular status of the line item. You can easily enable this in standard SAP.
Just check the statuses and statuses profile little bit, explore them, you can do wonders with them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.