on 03-01-2012 1:06 PM
Hi Gurus,
I am presently working on Credit management and work flow.Can anyone help me where can i locate CMGST field in the sales document type.I have checked the table VBUK and was able to find cmgst filed but it is defined as Sales order Administrative data.How to find this field while configuring the sales document type.How do we control it?
Thanks in advance,
Ramesh.
Hi
From a technical point of view, you control it with function module SD_ORDER_CREDIT_CHECK, that it's called from the SO in include MV45AFST_CREDITCHECK. This behavior is ruled by the parameters in tcode OVA8. See that in the interface for this function module you have
*" VALUE(RKVBUK) LIKE KVBUK STRUCTURE KVBUK
As constants you have defined at include LVKMPTOP
con_cmgst_initial like vbuk-cmgst value ' ',
con_cmgst_ok like vbuk-cmgst value 'A',
con_cmgst_nok like vbuk-cmgst value 'B',
con_cmgst_released like vbuk-cmgst value 'D',
con_cmgst_partrel like vbuk-cmgst value 'C',
See how after call the function module at MV45AFST_CREDITCHECK you have the coding:
move kvbuk to c_kvbuk.
where C_KVBUK is in the interface of the subroutine.
See also 1464839 - How to customize credit control in transaction OVA8 using checks USER 1, USER 2 and USER 3.
I hope this helps you
Regards
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The question is that you handle it with ABAP coding (as all things). The relation with ABAP for this issue is in the settings of OVA8. For instance, if you set an static check at OVA8 and you do a debugging session, you can see as this subroutine is called in function module SD_ORDER_CREDIT_CHECK.
* static check
IF no_check IS INITIAL AND
bypass-static_limit IS INITIAL.
CLEAR rkvbuk-cmpsa.
IF t691f-cmpaa EQ true
AND
( update EQ true OR
t691f-cecki EQ true OR
t691f-strea CA con_error ).
PERFORM static_credit_check USING update
xvbak-kkber
xvbak-knkli
flg_order
flg_delivery
CHANGING
rc_check_a rc_check rc_warning
rc_error rc_status_set
rkvbuk-cmpsa.
ENDIF.
ENDIF.
If the standard methods don't satisfy your requirements you have the option to define them via ABAP in the userexits, as note 1464839 says. For instance, userexit1 (at OVA8) is called here
* user credit check 1
IF no_check IS INITIAL AND
bypass-user1 IS INITIAL.
CLEAR rkvbuk-cmps0.
IF t691f-usrpr0 EQ true
AND
( update EQ true OR
t691f-cecki EQ true OR
t691f-usr0rea CA con_error ).
PERFORM user_credit_check1 USING update
xvbak-kkber
xvbak-knkli
flg_order
flg_delivery
CHANGING
rc_check_0.
PERFORM indicators_set USING update rc_check_0 t691f-usr0set
t691f-usr0rea
CHANGING rc_check rc_warning
rc_error rc_status_set
rkvbuk-cmps0.
ENDIF.
ENDIF.
and if you do double clic on USER_CREDIT_CHECK1 it goes to LVKMPFZ1. It's a twister reasoning, I agree, but after I have used the userexits is as I remember that it works. Usually to define the userexit other subroutines (for instance include LVKMPF0A for static check is used as a template) are used, always the more similar to the requirements.
Futhermore, I suggest you to do a debugging session with an ABAPer (if you don't know ABAP), set breakpoints before this FM and after, and check the values for Y* and X* tables (YXBUK and XVBUK) where Y is before modifications and X after.
I hope that it is understandable and that I understand properly your question, perhaps I'm in a mistake.
Regards
Eduardo
Not sure what exactly you were trying to do. For information, data in the said field will get stored in the following tables also apart from VBUK.
a) VAKCR - Tcode VKM3
b) SHP_IDX_CRED - Tcode VKM5
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
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.