No PSG in settlement rule (table COBRB)
Hi,
I have a Sales Order which had a settlement rule created to PSG and had been settled already. However, currently, the customer of that SO became invalid as well as contract type. So I tried to realign (KEND) this PSG, unfortunately, the current PSG has gone (no PSG no. in table COBRB), in settlement rule, there are some incompleted data left, such as customer, plant...
Now I would like to close this Sales Order (no balance in KVBI), however, since there is incompletion log regarding the incomplete PSG and settlement rule, it is unable to close the SO. In case I tried to end the old settlement rule and create a new one, it seems to be unable to create using the new customer with new mapping.
Please kindly advise how to solve this problem.
Thank you.
Sirirak
answered
Similar Messages
-
Hi Friends,
What is the table and field to find out settlement rule as per project type.?
Any pointers
Thanks
Ashutoshtable COBRB
-
Re: cProject settlement rule defaulting as PSG during transfer.
Hello
We currrently use multi-level controlling scenario for cProjects, which generates project and subsequent WBS elements automatically.
I am looking at using automatic generation of settlement rules on all WBS elements to default 'CTR' and have created a settlement profile and strategy to incorporate this. The set.profile has been defautled in the project profile in PS and also in the Maintenance for cProjects Controlling scenario config within Accounting integration.
However, every time I transfer the cProject to PS, an error message in the controlling cockpit states 'Receiver categ. 'PSG' is not allowed by settlement rule' - which is correct as I have configured the profile for CTR only.
Is there t-code to access the cProject's defaulted settlement rule so it can changed to CTR and not PSG?
I have checked IAOM0 and doesn't seem to be there.
Thanks
PabloHi Pablo,
I see you encountered this error in 2009 and it hasn't been marked as answered yet.
I was wondering if you found any solution on this one later, because we are facing the same exact error in our current project. I would really appreciate if you share any info. on it.
Thanks,
DHP -
Table for Settlement rule in production orders
Hi All,
Is there any table by which I can get list of production order numbers & the details of the settlement rule maintained in that order.?
Regards,
MHPThere will be object number (OBJNR) against each production order number which you can obtain from table AUFK.
Later pass this object number to function module K_SETTLEMENT_RULE_GET to get the settlement rules.
Also try function module K_SRULE_PRE_READ for reading the settlement rules. Here pass the object numbers to the tables parameters -
SM - Service Order - TECO: Settlement rule (PSG)
Hi Experts,
I would like to know where can I maintain the default values of the Account Assignment in Profitability Segment? When TECOing a service order, I use PSG as the settlement rule. I would like to make the system automatically determine the profit center based on plant and business area.
Thanks in advance.
Regards,
nasjNasj,
Please post this query in "ERP Financials" forum for better response.
Regards,
Prasobh -
VA02 - maintain settlement rules
Hi folks,
I am trying to maintain a settlement rule within the Sales Order without the user going to the Item Level.
I want to inherit the WBS element from the Header VBAK and on the save of the document automatically create the settlement rule.
I have tried K_SETTLEMENT_RULES* functions and cant seem to get them to work.
Anyone got any ideas or any advice on this ?
Regards
GaryI managed to work this one out myself, but just in case someone else has to do it. here is how I acheived it.
Firstly set up all fields on COBRA and COBRB, then call FM
CALL FUNCTION 'K_SETTLEMENT_RULE_FILL'
TABLES
I_COBRA = lt_cobra
I_COBRB = lt_cobrb.
Next
For some reason the internal system ALWAYS sets the table
up as the update status, this causes problems on creation,
so we have to change to Insert status.
Assign (c_GT_cobrb) to <fs_cobrb>.
if <fs_cobrb> is assigned.
LT_COBRB_BT[] = <fs_cobrb>.
loop at lt_cobrb_bt.
Somehow the previous records are being kept in so have to
delete them or else prog falls over.
if lt_cobrb_bt-objnr <> lv_objnr.
delete lt_cobrb_bt.
endif.
check to see if record exists.
select count(*)
from cobrb
where objnr = lt_cobrb_bt-objnr
and bureg = lt_cobrb_bt-bureg
and lfdnr = lt_cobrb_bt-lfdnr.
if sy-subrc <> 0.
Set the flag to be insert instead of U
lt_cobrb_bt-uflag = 'I'.
modify lt_cobrb_bt.
else.
If settlement exists then exit.
lv_settl_exist = 1.
exit.
endif.
endloop.
If settlement exists then exit.
if lv_settl_exist = 1.
exit.
endif.
<fs_cobrb> = LT_COBRB_BT[] .
endif.
For some rreason the internal system ALWAYS sets the table
up as the update status, this causes problems on creation,
so we have to change to Insert status.
Assign (c_GT_cobra) to <fs_cobra>.
if <fs_cobra> is assigned.
LT_COBRa_BT[] = <fs_cobra>.
loop at lt_cobra_bt.
Somehow the previous records are being kept in so have to
delete them or else prog falls over.
if lt_cobra_bt-objnr <> lv_objnr.
delete lt_cobra_bt.
endif.
check to see if record exists.
select count(*)
from cobra
where objnr = lt_cobra_bt-objnr.
if sy-subrc <> 0.
Set the flag to be insert instead of U
lt_cobra_bt-uflag = 'I'.
modify lt_cobra_bt.
else.
If settlement exists then exit.
lv_settl_exist = 1.
exit.
endif.
If settlement exists then exit.
if lv_settl_exist = 1.
exit.
endif.
endloop.
<fs_cobra> = LT_COBRa_BT[] .
endif.
Then when the tables have had their update status amended then call FM
CALL FUNCTION 'K_SETTLEMENT_RULE_SAVE'
EXPORTING
DIALOG = ' '
OBJNR = lv_objnr
I_STATUS_UPDATE = ' '
EXCEPTIONS
NO_RULE_FOR_OBJNR = 1
OTHERS = 2. -
Settlement rules for WBS element
Hi,
I have a requirement to create WBS with settlement rules. Is there an FM or BAPI to call to create the settlement rule?
Thanks.
Lalynhi
good
types: begin of ty_objnr,
objnr like prps-objnr,
end of ty_objnr.
*.COBRA-Buffer (see FM KOBS)
types: begin of ty_cobra_buf.
include structure cobra.
types: uflag like dkobr-upd_flag,
end of ty_cobra_buf.
types: ty_t_cobra_buf type ty_cobra_buf occurs 10.
*.COBRB-Puffer mit Änderungsflag (see FM KOBS)
types: begin of ty_cobrb_buf.
include structure cobrb.
types: uflag like dkobr-upd_flag,
end of ty_cobrb_buf.
types: ty_t_cobrb_buf type ty_cobrb_buf occurs 10.
Internal tables *
data: it_abrechnug type standard table of ty_abrechnung,
it_objnr type standard table of ty_objnr,
it_cobra like table of cobra with header line,
it_cobrb like table of cobrb with header line.
Data *
data: wa_cobra_buf type ty_t_cobra_buf,
wa_cobrb_buf type ty_t_cobrb_buf,
wa_objnr like line of it_objnr,
wa_urzuo like cobrb-urzuo,
l_mem_cobrb like wa_cobrb_buf[],
l_mem_cobra like wa_cobra_buf[],
l_mem_cobrb_zeile like line of l_mem_cobrb,
l_mem_cobra_zeile like line of l_mem_cobra.
form urzuo_aendern using p_objnr p_pspnr p_urzuo.
data: c_objnr like prps-objnr,
c_pspnr like prps-pspnr,
c_urzuo like cobrb-urzuo.
c_objnr = p_objnr.
c_pspnr = p_pspnr.
c_urzuo = p_urzuo.
refresh: it_objnr,
it_cobra,
it_cobrb,
l_mem_cobra,
l_mem_cobrb.
wa_objnr = c_objnr.
append wa_objnr to it_objnr.
Reas settlement rule from the DM
call function 'K_SRULE_PRE_READ'
exporting
i_pflege = ' '
tables
t_sender_objnr = it_objnr
T_COBRA =
exceptions
wrong_parameters = 1
others = 2.
if sy-subrc 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
Fill internal buffer with settlement rules
call function 'K_SETTLEMENT_RULE_GET'
exporting
objnr = c_objnr
x_all = ' '
tables
e_cobra = it_cobra
e_cobrb = it_cobrb
exceptions
not_found = 1
others = 2.
if sy-subrc 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
Save settlement rule in ABAP-Memory
call function 'K_SRULE_EXPORT_IMPORT'
exporting
i_mode = 'EX'
exceptions
wrong_mode = 1
others = 2.
if sy-subrc 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
Read ABAP-Memory
import l_mem_cobra l_mem_cobrb from memory id 'K_SRULE'.
Change field URZUO and set Update-Flag
loop at l_mem_cobrb into l_mem_cobrb_zeile where urzuo is initial.
l_mem_cobrb_zeile-urzuo = p_urzuo.
l_mem_cobrb_zeile-uflag = 'U'. "Update Kennzeichen
modify l_mem_cobrb from l_mem_cobrb_zeile transporting urzuo uflag.
endloop.
Clear internal buffer
call function 'K_SETTLEMENT_RULE_REFRESH'
exporting
objnr = c_objnr.
Fill ABAP-Memory with new rules
export l_mem_cobra l_mem_cobrb to memory id 'K_SRULE'.
Fill internal buffer with new rules
call function 'K_SRULE_EXPORT_IMPORT'
exporting
i_mode = 'IM'
exceptions
wrong_mode = 1
others = 2.
if sy-subrc 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
SAve new rules
call function 'K_SETTLEMENT_RULE_SAVE'
exporting
dialog = 'X'
objnr = c_objnr
i_status_update = ' '
exceptions
no_rule_for_objnr = 1
others = 2.
if sy-subrc 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
commit work.
perform erfolg using c_pspnr.
endform. " URZUO_AENDERN
Thanks
mrutyun^ -
Check settlement rule at save WBS
Hi guys,
I have a question and I'd very thankful if someone answered me.
I would need create a validation in the at save on CJ20N transaction. This validation should check settlement rule ( Really is need that checks fixed asset in the settlement rule).
We are usign this BADI WORKBREAKDOWN_UPDATE and the method AT SAVE, is this possible to check in this BADI :
1. WBS status ( current status, not information stored in JEST table)
2. and check that WBS division is the same as Fixed asset division ( ANLA) , being fixed asset the reciver in the WBS settlement rule. ????
really our problem is that we are not sure how to retrieve information at this point from another tables different from PROJ, PRPS, RCJ_PRPSUP and SYST.
Thank you!!!!Hi Muralidhar!!!!
Thank you very much for your reply!!! We are trying to use that BAPI for check WBS status before it is saved.
Related to settlement rule information our problem is we don't know how obtain information from another table different from PROJ, PRPS, ....in this BADI, ( really is a technical question). We are creating a WBS ( which it has not be saved yet), settlement rule information is going to be saved in COBRA and COBRB but it is not yet.
Do you know how do I have to program it in order to obtain this information?
Thanks a lot!!!
Sara -
Hi all,
I've created a BDC for transaction KO02 that will add settlement rules to an existing order. Then I'm using the generated code to create a new program. I have two questions.
1. I need to validate against existing settlement rules. Is there a way to get this information, i.e. can I read the existing table somehow?
2. When I enter multiple entries, I noticed the following calls:
perform bdc_dynpro using 'SAPLKOBS' '0130'.
perform bdc_field using 'BDC_CURSOR' 'COBRB-BETRR(01)'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'COBRB-KONTY(01)' XXX'.
perform bdc_field using 'DKOBR-EMPGE(01)' 'XXX'.
perform bdc_field using 'COBRB-BETRR(01)' 'XXX'.
perform bdc_dynpro using 'SAPLKOBS' '0130'.
perform bdc_field using 'BDC_CURSOR' 'COBRB-BETRR(02)'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'COBRB-KONTY(02)' 'XXX'.
perform bdc_field using 'DKOBR-EMPGE(02)' 'XXX'.
perform bdc_field using 'COBRB-BETRR(02)' 'XXX'.
perform bdc_dynpro using 'SAPLKOBS' '0130'.
Do I need to increment those numbers myself? For example, COBRB-KONTY(01) -> COBRB-KONTY(02)?
Thanks!1) COAS - AUFNR
OBJNR -> COBRA-OBJNR, COBRB-OBJNR
as for your 1st question check for the COBRA to see if you can get the existing settlement rules for the order . You have to add more logic to the program for the check.
2) When you go to the Settlement screen on the top on status bar you see a icon for CREATE. Record that in SHDB - Click on it while recording and you can change your program to the program.
Do check BAPI_INTERNALORDER_CREATE
BAPI_INTERNALORDER_SAVEREPLICA helps your requirement. -
Validating Internal Order Settlement Rule during creation
Does anybody know of a user exit, badi, anything, that can be used to validate assignement data when creating/changing the settlement rule on an internal order?
Appreciate the help...
SamHi, I just wanted to come back and add this extra information incase someone else needs it in the future:
I think we were finally able to come up with an acceptable solution.
<b>The Problem:
============</b>
SAP does not provide an easy way to validate detail section of a settlement rule for an internal order. The user exits that are available do not import the COBRB structure that contains the screen data entered by user in the detail screen.
<b>Solution:
===========</b>
Watch out for wrapped lines!
(1) Implement the BADI: <b>CO_SRULE_CHECK</b>; NO filter; Settlement Rule Custom Validation BADI
(see current thread for details)
Inside the <b>DISTRIBUTION_RULE_CHECK</b> method of your BADI, implement your custom validation. You can call out to your standard CO validaton module, or whatever.
(2) Implement user exit: EXIT_SAPLRKIO_002(include zxaufu02): Call settlement_rule_check.
(3) Implement a subroutine as shown (adapt to your business environment):
FORM settlement_rule_check.
DATA: exit type ref to IF_EX_CO_SRULE_CHECK.
DATA: lt_cobra LIKE cobra OCCURS 0 WITH HEADER LINE, lt_cobrb LIKE cobrb OCCURS 0 WITH HEADER LINE.
don't validate in display mode
CHECK I_ACTVT NE 03.
Call function to get the current settlement rule from
memory buffer (this is the crux of the solution)
call function 'K_SETTLEMENT_RULE_GET'
EXPORTING
objnr = i_aufk-OBJNR
x_all = ' '
TABLES
e_cobra = lt_cobra
e_cobrb = lt_cobrb
EXCEPTIONS
not_found = 1
others = 2.
if SY-SUBRC <> 0.
raising E_MESSAGE.
endif.
Now Prepare/call BADI to check the custom rules
class CL_EX_CO_SRULE_CHECK definition load.
create an instance of BADI
call method cl_exithandler=>get_instance
changing
instance = exit.
call the check method of the BADI
call method: exit->DISTRIBUTION_RULE_CHECK
EXPORTING
DISTRIBUTION_RULE = lt_cobrb
EXCEPTIONS
not_allowed = 1
not_allowed_with_msg = 2.
either use a standard message function or create your
own
IF sy-subrc = 1.
PERFORM message_send
USING 'KD' 'E' '027' space space space space space.
ELSEIF sy-subrc = 2.
PERFORM message_send
USING sy-msgid sy-msgty sy-msgno
sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
space. "...
ENDIF.
endform.
(4) Test, Test, Test. Hope it works for you.
Sam -
Problem in Settlement Receiver during Settlement Rule in T.code IW31/32
Hi,
We have created an Equipment Number 11001212 with Business Area 1451 / Cost center 145130100. After that when are create Order in respect to that Equipment Number through IW31.
During Settlement Rule, when we select Account assignment category CTR - Cost Center...and press F4 on Settlement Receiver column, it shows the value in respect to all Cost Centers.
We want that in settlement receiver column, values should show in respect to related cost center. (defined as per Equipment Master).
Please guide...Hi,
Pass the Order number in AFIH to get Equipment Number (EQUNR) value.
Pass the Equipment No in V_EQUI table with Valid to date (DATBI) as 31.12.999 & get the value of ILOAN value.
Pass this value in ITOB table & get Cost Center KOSTL value.
In IWO10027 user exit, in F4 possible entry option, ABAP people can restrict the required cost center.
IWO10009 PM Order: Customer Check for 'Save' Event
Even though the user enters manually some other cost center without going for F4 option, by check that value, you can give the error message, while saving the order.
Pass the Order number in AUFK table to get Object Number (OBJNR).
Pass OBJNR value in COBRB table to get KOSTL value.
Compare both the value & you can give the error message.
Give these tables, fields & user exits to ABAP people. They can form the correct logic.
Incorporate both the logic.
Regards,
Maheswaran. -
Hello Experts,
I need to create settlement rule for work order.
Got one FM K_ORDER_SRULE_ADD but don't know how to use it.
Is this FM correct one to create settlement rule?
Can anyone please send sample code for FM?
Thanks in Advance,
Ripal.Hi everybody,
I found in a Rusian foruma way to create a settlement rule using the functions of the FM KOBS. I changed a bit the code because my requirement was just to update the field URZUO of the settlement rule. The original post (in Russian) can be found here.
My implementation is more simple because the requirement was different:
types: begin of ty_objnr,
objnr like prps-objnr,
end of ty_objnr.
*.COBRA-Buffer (see FM KOBS)
types: begin of ty_cobra_buf.
include structure cobra.
types: uflag like dkobr-upd_flag,
end of ty_cobra_buf.
types: ty_t_cobra_buf type ty_cobra_buf occurs 10.
*.COBRB-Puffer mit Änderungsflag (see FM KOBS)
types: begin of ty_cobrb_buf.
include structure cobrb.
types: uflag like dkobr-upd_flag,
end of ty_cobrb_buf.
types: ty_t_cobrb_buf type ty_cobrb_buf occurs 10.
* Internal tables *
data: it_abrechnug type standard table of ty_abrechnung,
it_objnr type standard table of ty_objnr,
it_cobra like table of cobra with header line,
it_cobrb like table of cobrb with header line.
* Data *
data: wa_cobra_buf type ty_t_cobra_buf,
wa_cobrb_buf type ty_t_cobrb_buf,
wa_objnr like line of it_objnr,
wa_urzuo like cobrb-urzuo,
l_mem_cobrb like wa_cobrb_buf[],
l_mem_cobra like wa_cobra_buf[],
l_mem_cobrb_zeile like line of l_mem_cobrb,
l_mem_cobra_zeile like line of l_mem_cobra.
form urzuo_aendern using p_objnr p_pspnr p_urzuo.
data: c_objnr like prps-objnr,
c_pspnr like prps-pspnr,
c_urzuo like cobrb-urzuo.
c_objnr = p_objnr.
c_pspnr = p_pspnr.
c_urzuo = p_urzuo.
refresh: it_objnr,
it_cobra,
it_cobrb,
l_mem_cobra,
l_mem_cobrb.
wa_objnr = c_objnr.
append wa_objnr to it_objnr.
* Reas settlement rule from the DM
call function 'K_SRULE_PRE_READ'
exporting
i_pflege = ' '
tables
t_sender_objnr = it_objnr
* T_COBRA =
exceptions
wrong_parameters = 1
others = 2.
if sy-subrc <> 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* Fill internal buffer with settlement rules
call function 'K_SETTLEMENT_RULE_GET'
exporting
objnr = c_objnr
x_all = ' '
tables
e_cobra = it_cobra
e_cobrb = it_cobrb
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* Save settlement rule in ABAP-Memory
call function 'K_SRULE_EXPORT_IMPORT'
exporting
i_mode = 'EX'
exceptions
wrong_mode = 1
others = 2.
if sy-subrc <> 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* Read ABAP-Memory
import l_mem_cobra l_mem_cobrb from memory id 'K_SRULE'.
* Change field URZUO and set Update-Flag
loop at l_mem_cobrb into l_mem_cobrb_zeile where urzuo is initial.
l_mem_cobrb_zeile-urzuo = p_urzuo.
l_mem_cobrb_zeile-uflag = 'U'. "Update Kennzeichen
modify l_mem_cobrb from l_mem_cobrb_zeile transporting urzuo uflag.
endloop.
* Clear internal buffer
call function 'K_SETTLEMENT_RULE_REFRESH'
exporting
objnr = c_objnr.
* Fill ABAP-Memory with new rules
export l_mem_cobra l_mem_cobrb to memory id 'K_SRULE'.
* Fill internal buffer with new rules
call function 'K_SRULE_EXPORT_IMPORT'
exporting
i_mode = 'IM'
exceptions
wrong_mode = 1
others = 2.
if sy-subrc <> 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
* SAve new rules
call function 'K_SETTLEMENT_RULE_SAVE'
exporting
dialog = 'X'
objnr = c_objnr
i_status_update = ' '
exceptions
no_rule_for_objnr = 1
others = 2.
if sy-subrc <> 0.
perform error using c_pspnr sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
commit work.
perform erfolg using c_pspnr.
endform. " URZUO_AENDERN
Hope it helps,
Jaime -
Settlement rule in production orders
Hi All,
Is there any report by which I can get list of production order numbers & the details of the settlement rule maintained in that order.?
Regards,
MHPI have tried to use KOC4 or KOSRLIST_OR but I think that dont apply to production order. But give them a try.
Or build report using tables:
CAUFV Field OBJNR (Object Number) link to COBRB
From COBRB take fields
COBRB-KONTY
COBRB-PROZS
COBRB-PERBZ -
Add field Quatity and UoM in Maintain and display settlement rule(SAPLKOBS)
Hi all experts,
Is there got any BAPI for function module for me to use for bump in data from Quantity (BMENG) and Unit of measurement (BEINH) at customized selection screen and updating it at COBRB table?
Best Regards,
Chee BoonAlso check if your network is header assigned or activity assigned. if the same is header assigned in that case only you can assign settlement rule at network header if the same is activity assigned in that case you need to assign settlement rule at activity level.
With Regards
Nitin P. -
hi all,
from where i will get info that a order is settle with which settlement rule and which settlement receiver ?
please help.
thanks in advanceHello,
Please check the Table COBRB and In this Table put the values for Field OBJNR (Object number) OR+Order Number.You will get all inormation you need.
Regards,
Rakesh
Maybe you are looking for
-
Sc reen too small print cant read
Screen too small print how to make it larger as it used to be
-
IPod nano 7th gen won't charge.
I bought it in July, everything has worked well. Yesterday the battery had run out, and now it won't read the charger - and I have tried multiple chargers. I have also tried resetting while plugged in, and that did not help either. Any ideas?
-
Can't extract Hotfixes and CU2 becuase of multidisk zip file?
Hi experts, Does anyone download hoxfixes and MSSQL 2008 CU2 from microsfot but can't extract? I download CU2 hotfixes from microsoft but when I try to extract, there always shows self-extracting multidisk zip file. How do I solve this problem? I c
-
Program RPURMD00 to undo TP postings Performance Issues
Hello All, We have created incorrect Third Party positng documents in PCP0. These have not been posted yet. When we try to run the simulation program to undo postings (RPURMD00), it took more than 22 hours and we finally had to cancel it and restart.
-
Hi, I have created the InfoPackage for ODS (Delta). When I click on Monitor, message is "No Data Records". It says "No successful initialization of the delta update took place" How do I resolve this? Kidnly help. Thanks!