on 09-02-2010 7:28 PM
Hi SD Experts,
How do I add PO line item to incomplete log procedure for VA02? Is that possible through configuration and/or code? if it is done by code, what userexit or BAdI I need to implement?
Thanks,
Duy
Duy
Do you mean customer's PO Line Item number which can be seen in the Order Data tab for the sales order item?
If so it can be done by config. T code OVA2
For the relevant Item Incompletion procedure, add new entry
Table VBAP; Field POSEX, Screen PBES, others as you like.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Duy
It was Kris who talked about a flag as one of the alternatives. I think you can work without it. So just maintain the list in Z-table and the logic is simple:
"If the order Sold-to Partner is from the Z-table and If item PO line item # ( XVBAP-POSEX) is blank, set incompletion status (VBUP-UVALL) for the item."
Hope this works for you.
Thank you all for reply!
Two things:
- Configuration through OVA2? do I have to add POSEX to the incompletion log procedure?
- If I have to do the code in the userexit MV45AFZB, subroutine: USEREXIT_CHECK_VBAP. how the system realize that the filed POSEX is incomplete?
Can I achieve it completely through code? or by both configuration and code?
Another idea is I will add incomplete log to the sale order type, from userexit I will check the customer / sale order type in the Z* table. if it is not there I will not mark it as incompleted. If this is the case How do I do that from code?
Thanks,
Duy
Duy
You don't need config (check for POSEX) as it would affect everyone of your customers.
User exit would suffice. System realizes it because you are setting the status via the code after you checked for existence of Item PO number and if the customer is from the Z table.
You can do it via the 'other idea' which is essentially the reverse way of doing it. Same Z table and same user exits will work. Logic is just a you described. Here also I don't think you need the config.
Hi Chandrasekhar,
Did you ever try this before? I tried the following code and it didn't work
if xvbak-kunnr = '1000' " for testing
loop at xvbap assigning <f_xvbap>.
if <f_xvbap>-posex <> space." check PO line item #
continue.
endif.
read table xvbup assigning <f_xvbup>
with key vbeln = <f_xvbap>-vbeln
posnr = <f_xvbap>-posnr.
if sy-subrc = 0.
<f_xvbup>-uvall = space. " I tried with 'A' and 'B' also
endif.
endloop.
endif.
Please advice!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Duy,
You need to go to SD > Basic functions > log of incomplete items > define incomplete procedure > select group A (sales header) > procedures > select 11 (Sales order) > fields tab and add PO number incompletion fields as below:
table---field namedescriptionscreen--status--warning
VBKD---BSTKDPO number-KBES -
0----
X
Finally, you should assign your incompletion procedures to your sales doc. typ.
I hope these will work.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use USEREXIT_CHECK_VBAP, This is called in include MV45AFZB.
I think you may need a ZTABLE with list of customer, or a flag from Customer master record which says for this material PO is reuqired.
Thank you
Kri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.