07-20-2009 11:21 AM
Hi all,
i have problems on setting automatically the settlement rule by the transaction IW31.
In particular i have tried doing it by using the enhancement IWO10027 that as a function module for creating the settlment rule.
Its interface is defined as:
IMPORTING
REFERENCE(CAUFVD_IMP) LIKE CAUFVD STRUCTURE CAUFVD
TABLES
PMDFU_TAB STRUCTURE PMDFU OPTIONAL
RIWOL_TAB STRUCTURE RIWOL OPTIONAL
COMP_TAB STRUCTURE RESBDGET OPTIONAL
OPR_TAB STRUCTURE AFVGDGET OPTIONAL
CHANGING
REFERENCE(APROF) LIKE TKB1A-APROF OPTIONAL
EXCEPTIONS
DO_NOT_BUILD_SETTLEMENTRULE
To create the settlment rule, i assign a specified value to the exporting parameter APROF, but when i test if the changing are made, the next message appears:
"No default could be formed for the distribution rule".
If i save the order, the value assigned for the settlement rule is different by the one that i specified on the code written into the FM.
What i have to do?
Thanks
Lello
07-20-2009 1:45 PM
Hello,
to build a specific settlement rule, you could use the PMDFU_TAB in that exit ( just refer to the documentation of the exit).
If you specify the APROF-Parameter, then the settlement rule has to exist in table TKB1A.
Regards Wolfgang
07-20-2009 2:48 PM
Hi Wolfgang,
thanks for your answer.
i have done what you have suggested, but the next message will appear
" Receiver missing for distributioon rule "
Where i have to put that value? on the table PMDFU_TAB i can't specify it
Thanks,
Lello
07-20-2009 3:12 PM
Hello,
it's the field PMDFU_TAB-FDIND, that should contain the value of the receiver. So, if you have the KONTY = 'KS', it's the costcenter. If it's 'OR' , it's the ordernumber and so on. But always the internal value - with leading zero's.
Regards Wolfgang
07-20-2009 3:36 PM
Hi wolfgang,
thanks a lot for the answer, i have solved it!!!
Regards
Lello