Settlement rule BADI in Compatible Units
Hello All,
Is it possible to activate the settlement rule BADI for CU even if we dont activate the Operation Level Costing ? Can we derive settlement rule on Order header based on primary characters, instead of operation level ?
The requirement is to settle the cost of orders to different receivers as per requirement.
Thanks
Sarang
There is a feature in Compatible units in PM. This has the functionality of Operation lvel costing. Once you do this you can derive the settlement rule automatically on each operation based on characters maintained in Compatible unit. There is a settlement rule BADI to achieve this.
I was just checking is it possible to use this BADI without activating Operation level costing.
Thanks
Sarang
Similar Messages
-
Regarding WBS settlement Rule using WBS_SETTLEMENT_RULE BADI
Hello every one could any one tel me about
Settlement rule of WBS by using BADI WBS_SETTLEMENT_RULE
I wanted to use same settlement rule far all WBS under same project
eg IF user enter settlement rule for WBS level 1 that should get copy into remaining all WBS thats all requirment
I am trying it thtough BADI WBS_SETTLEMENT_RULE and method DETERMINE STATERGY ?
Can i do selecting settlement rule of WBS1 and updating same table with same values for remianing WBS levels.
Thank you in advance
Deepak PawarHi Deepak,
Yes, you use the that Badi, but he badi WBS_SETTLEMENT_RULE is actually not needed to fulfill the requirement, if the customizing is set accordingly.
More important is the selection in CJB1 or CJB2, so that the inherit not happend from the project defintion(instead of WBS1) to underlying WBS. I think, it can only be done using right variant with CJB1.
There is a new Badi WBS_SETTLEMENT_RULE_NEW, which allow more detailed control of the copy settlment rule action. The method GET_TEMPLATE can be used to determine which object( e.g. WBS1 ) should be used.
Kind regards,
Zhenbo -
Badi for IW31 to keep check on Funds Center and Settlement rule
Hi,
My requirement is that While running IW31,if the first four characters of Settlement Rule(Cost Center) and FundsCenter is not equal to Planning Plant then an error message should be raised . Can you suggest any appropriate BADI or User Exit for this?
Path for Funds Center-->Go to>Assignment--->Funds Management
Thanks
K SrinivasHii Srinivas,
Did you find any solution for this, i am also encountering the same problem.
Regards,
meenakshi -
Exit/BADI for creating settlement rules in IW32 upon release of order
I need settlement rules to be populated in IW32 when an order is released.
The data for the settlement rules population will be obtained from a Z table based on Order type and Maintenance Activity Type.
I am not able to find out a suitable BADI/EXIT to fulfill this requirement. Has anybody worked on this kind of requirement earlier? Please suggest an EXIT/BADI/BTE for this.
Thanks in Advance!!Hi Harveen,
How did you populate the fields in K_ORDER_SRULE_ADD. Which ones did you populate. I keep getting an error message.
Receiver categ. is not allowed by settlement prof. PM0001 for this sender
Message no. KD031 Diagnosis The settlement profile specifies which receiver
categories you can settle a sender to. Receiver category is not allowed by
settlement profile PM0001 for this sender.
Procedure
You can do the following:
Assign a settlement profile to the sender, that implements the
required receiver category .
Choose "Goto -> Settlement Parameters".
Specify another receiver for distribution rule 009. If you already
used this rule for a previous settlement, enter a valid-to period. Then
enter a new rule for the next settlement with a receiver category. This
category must be one that is allowed by settlement profile PM0001.
Procedure for System Administration
If necessary, maintain a suitable settlement profile.
Would very much appreciate your help.
Cheers
Eunice -
Settlement rule for Rental unit
Hello all,
Request your kind help. i have created a Building under a BE. Then I have created a RO object of type Rental Space (RS).
I am now trying to maintain settlement rule for the RS. First I am going into the Edit - CO settlement rule and maintaining the required rules.
I find that the Save button is deactivated in this screen. So i click on the BACK button and come back to the master data screen of the RS. Now i am clicking on the SAVE button and the nessage appears "Rental Space has been changed".
I am then coming out of the screen by typing /N.
Again I am typing /NREBDRO and calling the same master data (RS). Now when i am trying to view the settlement rule that I just created and saved, the system issues an error message "no settlement rule is defined".
My questions are:
1. What are the basic setting configs required to be able to save a settlement rule for a rental object?
2. Why am I unable to save the settlement rules to this RS.
3. I am not facing any such problem when I am trying to assign settlement rules for RO of type Pooled Space. So why is it that there is a problem with Rental Spaces?
Request your kind help please.
Regards,
Suvarghya DuttaHello all,
Let me rephrase the doubt:
Can someone please tell me how I may find out as to which objects could the costs incurred on the following objects be settled to ?
BE
BU
Pooled Space (PS)
Rental Space (RS).
Also, if the settlemnt rule in BU states that costs would be settled to BE, then is it possible to define:
1. Valid settlement rule in PS, marking a cost centre as a receipient
2. Valid settlement rule in RS, marking a cost centre as a receipient.
Can someone please tell me what is the basis or ratinality to be followed while defining settlement rules on RE-FX objects?
Kindly help.
Regards,
Suvarghya Dutta -
Capital Project Settlement Rule for lower WBS
Hello,
At my present client, for Investment projects the client want to settle top level WBS to AUC and capitalise it. So ideally the cost from lower level WBS should flow to top WBS. I am using substitution to remove investment profile from lower WBS.My concern is how do I auto populate the settlement rule for lower WBS to top WBS. I am aware about settlement strategy and OSS note 211324 (however dont want to implement this note)
The appraoch I am looking for is using "WBS_SETTLEMENT_RULE' BAdI . However this BADI calls for strategy and I could not maintain the required strategy (settlement to top WBS). Is there some BADI/Function module available which can be called for updating the settlement rules on lower WBS while saving or Release ? Can I make use of exits in Substitution?
Please let me know your opinions.
Thanks
SarangThanks Virendra. I agrree the only approach is development. But I need to give inputs to my developer.
We tried with BADI "WBS_SETTLEMENT_RULE" but it didnt work as it calls strategy in configuration.
So I am checking for some other options for e.g "WORKBREAKDOWN_UPDATE" which is called during save or Fn modules K_SETTLEMENT_RULE_FILL or K_SETTLEMENT_RULE_SAVE which I can use. This is a client requirement to create AUC only at top level n all cost to be rolled up to superior WBS n then settle to AUC.
The other option I was thinking is of using exits thru substitution.
What will be the best approach?
Thanks
Sarang -
Automatic creation of settlement rule while creating sales order
Hi Friends,
Can any one help me how to create settlement rule automatically while creating sales order i.e saving sales order. Is there any function module or any badi which can be used.. please suggest.
thanks
bobbyHi,
Here is the solution , First Create a sustitution by going into OPSN Transaction , only user exit say 'U902'
and write the form routine in Program named 'ZRGGBS000'
The code is below ,
*& Form U902
Automatic Generation of Settlement Rule For WBS and Company 4180
FORM u902.
Exit For Automatic Settlement Rule Creation for WBS Billing elements
IF sy-tcode = 'CJ20N' or sy-tcode = 'CJ01' or sy-tcode = 'CJ02'.
DATA lv_proj TYPE ps_pspid.
lv_proj = proj-pspid.
EXPORT lv_proj TO MEMORY ID 'PSPID'.
Calling YGPS_CJB1EXEC Program For Creating Settlement Rule
SUBMIT ygps_cjb1exec AND RETURN.
ENDIF.
ENDFORM. "u902
*& Program YGPS_CJB1EXEC
PROGRAM ygps_cjb1exec.
Automatic Generation of Settlement Rule For WBS and Company 4180
Called From Exit For Automatic Settlement Rule Creation for WBS Billing elements
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata,
itab TYPE TABLE OF bdcmsgcoll.
DATA :lv_currm LIKE bkpf-monat,
lv_curry LIKE bkpf-gjahr,
lv_prevm LIKE bkpf-monat,
lv_prevy LIKE bkpf-gjahr,
lv_proj TYPE ps_pspid,
lv_mode TYPE c,
lv_time TYPE sy-uzeit.
DATA :g_datfm LIKE usr01-datfm,
g_dd(2) TYPE c, " Day
g_mm(2) TYPE c, " Month
g_yyyy(4) TYPE c, " Year
g_sydatum(10) TYPE c.
IMPORT lv_proj FROM MEMORY ID 'PSPID'.
lv_mode = 'N'.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLKAZB'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'PRZB-VARIANT'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'PRZB-VARIANT'.
bdcdata_wa-fval = 'ZGPS0001'.
APPEND bdcdata_wa TO bdcdata_tab.
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
bukrs = '4180'
IMPORTING
currm = lv_currm
curry = lv_curry
prevm = lv_prevm
prevy = lv_prevy.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'RKAUF-FROM'.
bdcdata_wa-fval = lv_currm.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'RKAUF-GJAHR'.
bdcdata_wa-fval = lv_curry.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=VARC'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'RKPSEL00'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'CN_PROJN-LOW'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'CN_PROJN-LOW'.
bdcdata_wa-fval = lv_proj.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'CN_PSPNR-LOW'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'CN_NETNR-LOW'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'CN_ACTVT-LOW'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'CN_MATNR-LOW'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '/00'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=SAVE'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=VBAC'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSPO1'.
bdcdata_wa-dynpro = '0100'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=YES'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLKAZB'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'RKAUF-BATCH'.
bdcdata_wa-fval = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'RKAUF-TEST'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=RUN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLKABA'.
bdcdata_wa-dynpro = '0210'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'KABA01-JNAME'.
bdcdata_wa-fval = 'CJB1_EXEC'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_SUBSCR'.
bdcdata_wa-fval = 'SAPLKABA'.
APPEND bdcdata_wa TO bdcdata_tab.
Extract the date format from the user settings
PERFORM f_get_dateformat CHANGING g_datfm.
Changing the current date format to User Profile Date Settings
PERFORM f_format_date USING g_datfm
sy-datum+4(2)
sy-datum+6(2)
sy-datum+0(4)
CHANGING g_sydatum.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'KABA01-STDAY'.
bdcdata_wa-fval = g_sydatum.
APPEND bdcdata_wa TO bdcdata_tab.
lv_time = sy-uzeit + 30.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'KABA01-STTME'.
bdcdata_wa-fval = lv_time.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'KABA01-PRIKZ'.
bdcdata_wa-fval = space.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=TAKE'.
APPEND bdcdata_wa TO bdcdata_tab.
Calling Transaction 'CJB1' for creating settlement rule
CALL TRANSACTION 'CJB1' USING bdcdata_tab MODE lv_mode .
IF sy-subrc = 0.
ENDIF.
*& Form F_GET_DATEFORMAT
This subroutine returns the date format in the user setttigs
<--P_G_DATFM Date Format
FORM f_get_dateformat CHANGING p_g_datfm. "#EC *
SELECT SINGLE datfm FROM usr01 INTO p_g_datfm
WHERE bname = sy-uname.
ENDFORM. " F_GET_DATEFORMAT
*& Form F_FORMAT_DATE
This subroutine returns the date as per the user settings
-->P_G_DATFM Date Format
-->P_G_MM Month
-->P_G_DD Day
-->P_G_YYYY Year
<--P_G_DATE Date
FORM f_format_date USING p_g_datfm
p_g_mm
p_g_dd
p_g_yyyy
CHANGING p_g_date. "#EC *
CONSTANTS: c_dot VALUE '.',
c_slash VALUE '/',
c_dash VALUE '-',
c_1 VALUE '1',
c_2 VALUE '2',
c_3 VALUE '3',
c_4 VALUE '4',
c_5 VALUE '5',
c_6 VALUE '6'.
DATA: l_day(2),
l_month(2).
l_day = p_g_dd.
l_month = p_g_mm.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_month
IMPORTING
output = l_month.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_day
IMPORTING
output = l_day.
CASE p_g_datfm.
WHEN c_1.
CONCATENATE l_day l_month p_g_yyyy INTO p_g_date
SEPARATED BY c_dot.
WHEN c_2.
CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
SEPARATED BY c_slash.
WHEN c_3.
CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
SEPARATED BY c_dash.
WHEN c_4.
CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
SEPARATED BY c_dot.
WHEN c_5.
CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
SEPARATED BY c_slash.
WHEN c_6.
CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
SEPARATED BY c_dash.
ENDCASE.
ENDFORM. " F_FORMAT_DATE
thanks
bobby -
Automatic settlement rule creation
Hello Guru's,
I have a scenario of capital proejcts. Were I create Assets with the help of Investment profile at the top(1st level) WBS element. Now my requirment is the cost of the second level WBS should be rolled upto top level WBS element. To do this I have to manually create settlement rule for all second level WBS to settle at top level. I have to create this rule automatically throught CBJ2 tcode.
As per SAP Note 211324 I have Implemented the modification. Now I have Insert value '5' with short text 'Superior WBS element'. Also have assign the strategy to Acct. Assign element. This strategy is also assigned to settlement profile. Also have assigned this settleemnt profile to project profile.
Now, when i run CJB2 tcode for my project the system issues me an error :-
Error(s) during creation of settlement rule
Message no. ORB509
Diagnosis
Errors occurred during the check on settlement receivers.
System Response
Processing stopped.
Procedure
Check whether the:
Specific receiver Account assignment e actually exists
Settlement profile ZPI03 permits account assignment to the specified receiver
Please throw some light on this error
Regards,
TusharThanks Virendra,
Thanks for your reply but tell me after the implementation of note do I need to implement BADI also as in past for some forums you have mentioned???
Regards,
Tushar -
Validation on settlement rule percentage
Hi folks,
We have a requirement to set up a validation on the settlement rule percentage for an IO/WBS which settles to a final asset to restrict it to 1% or greater. In other words the settlement rule to final asset below 1% should not be permitted. Could you please suggest if this is doable?
Thanks!Hi Manish,
You have two ways to check for it:
1. Check for Exits in WBS validation.
2. Check BADI WBS_SETTLEMENT_RULE. With this you can automatically populate the settlement rule based on project type.
Regards
Saurabh -
Check on Settlement Rule in IW31
Hi,
I have to keep check on Settlement Rule in IW31. i have to compare the first four characters of Settlement rule with that of Planning Plant. If both are not equal an error message should be raised.
For example Settlement Rule--->1600009 and if plant = 1500 an error message should be raised.
Please suggest any suitable BADI or User Exit for this. I have tried many options like CL_EXITHANDLER for BADIs. But the tables in them are not giving both Plant and Cost Center(Settlement Rule) values.
Please help.
Thanks
K SrinivasHave a look at exit IWO10009
* get settlement rules from ABAP memory
call function 'K_SETTLEMENT_RULE_GET'
exporting
objnr = p_caufvd_imp-objnr
x_all = ' '
tables
e_cobra = lt_cobra
e_cobrb = lt_cobrb
exceptions
not_found = 1
others = 2.
if not sy-subrc = 0.
* if not found, then go to database for settlement rules
call function 'K_SRULE_READ_ARCHIVE'
exporting
i_archive_handle1 = 0
i_objnr = p_caufvd_imp-objnr
i_append = ' '
tables
t_cobra = lt_cobra
t_cobrb = lt_cobrb
exceptions
not_enough_info = 1
others = 2.
endif.
Make the validations you need.
Hope it helps, saludos! -
Generation of WBS Settlement Rule
Hi Folks!
I was wondering if there is any function module that allow me to generate a WBS Settlement Rule for a specific project and for elements on level 3.
If there is no FM for this, is there any workaround to do this.
Thx for any advise.
Regards,
Gilberto LiHi Gilberto,
Hm, not a question that has a simple answer. Settlement rules are first of all defined in customizing how the should be behave and secondly lies the question how to update a CO cost object with this settlement rule.
Let us first assume that customizing is done with a settlement profile named ZZ_PROF for instance. This is defined in customizing like path (from R/3 4.7): Trans SPRO -> Project System -> Costs -> Automatic and Periodic Allocations -> Settlement -> Settlement Profile -> Create Settlement Profile.
My first advice would be to use the "automatic settlement derivation feature" that can be setup in customizing alike. Trans SPRO -> Project System -> Costs -> Automatic and Periodic Allocations -> Settlement -> Settlement Rule for Work Breakdown Structure Element. Read the docu for this node (right click and choose Display documentation) to understand what possibilities and limitations this functionality has. Below this node you have the possibility to define a "settlement strategy" and allocate this to a project profile. There is also an option to define a BADi whereby you you can somewhat influence the automatic generation of settlement rules. You must "obey" the rules in the "settlement strategy" but can do some filtering of SD orders influence and derive a "settlement strategy" baseed on some coding logic of your choice.
To execute these settings on operative projects you run trans CJB1 (collective processing) or CJB2 (indicidual processing).
All in all: This is good functionality but maybe not what you are looking for due to the built in "restrictions" in the "settlement strategy" profile.
My second advice would be: What I did in the past was to write a batch input program that was run just before period end closing (that is before settlement - of course) that did read all relevant WBS elements without a settlement rule and derived a new settlement rule. Finally, updated the setttlement coding block with this info. Processing of the BDC is then done via trans SM35 the normal way.
I also did a check for trans CJB2: In include LKAZBF15 there is the "magic" call to the update FM with name KSRG_GENERATE_RULE. One option could be to set a break point here and run the trans to see what parameters has to be filled. This implies that the customizing is done before, of course. I have a feeling that this is NOT the easist solution to use - to fill the parameters correctly may be difficult
I hope this helps you in deciding what action to take.
Sometimes a simple BDC will do the trick although it may not be a "good" solution.
Disclaimer: There might be some other relevant FM to solve your problem as I am not aware of. If you find one for WBS elements then I would certainly be interested in any findings.
Regards, Johan -
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 -
Settlement rules in transaction IW31
Hi gurus,
Here is the requirement.
After going into transaction IW31, we usually create settlement rules using the separate icon for that on the IW31 screen.
Instead of that is it possible to create settlement rules either when we release the order or when we save the the order? The settlement rules has to be created automatically. Is it possible using user exits or BADIs?
Thanks
NobzCustomizing
Plant Maintenance and Customer Service->Maintenance and Service Processing->
Maintenance and Service Orders->Functions and Settings for Order Types->
Settlement Rule: Define Time and Creation of Distribution Rule->
Order type + 1 Mandatory for release
================================================================================
CMOD - Enhancement: IWO10027 User exit: Generate user-defined settlement rule
Example
*& Include ZXWOCU24 *
data char24(24).
CLEAR pmdfu_tab.
REFRESH pmdfu_tab[].
pmdfu_tab-konty = 'PR'.
pmdfu_tab-fdind = caufvd_imp-pspel.
pmdfu_tab-perbz = 'PER'.
pmdfu_tab-prozs = 100.
APPEND pmdfu_tab.
CLEAR pmdfu_tab.
pmdfu_tab-konty = 'PR'.
pmdfu_tab-fdind = caufvd_imp-pspel.
pmdfu_tab-perbz = 'GES'.
pmdfu_tab-prozs = 100.
APPEND pmdfu_tab.
CLEAR pmdfu_tab. -
Inserting PO and Item fileds in settlement rule in IW31/32/33
Hi ,
My requirement is as follows:
I want to store a PO and PO Item to a CS Order (IW31/32/33) in Settlement rule screen exclusively.
I came to know that it is not possible to associate a purchase Order through configuration.
Plz suggest the possible Enhancement / exits/BADIs or any other methd for inserting a PO and Item field in settlement rule in transaction IW32.Hi,
I am unable to attach the Screen Shot for your refrence, Here SCN is not supporting me .
So i have send you the Code:
I created ztable name ZPM_TABLE
with fields ZEBELN
ZEQUNR
ZTPLNR
In which PO No Equipment No and Functional Location Data is stored..
Then in Exit IWOC0003..
I written Code to fetch the Po Vendor Details for that particular Equipment No or Functional Location Value as follows :
Please Note :
In My Code I have used Submit Program Name to get the Po Item Values :
Code as Follows:
{ if sy-tcode eq 'IW21' or
sy-tcode eq 'IW31'.
tables : ekko,
lfa1,
adrc,
t005u,
t005t,
zpm_table.
data : wa_lfa1 like lfa1 occurs 0 with header line,
it_lfa1 like lfa1 occurs 0 with header line,
wa_popup like zpm_table occurs 0 with header line,
it_ekko like ekko occurs 0 with header line,
wa_adrc like adrc occurs 0 with header line,
po_serv type zpo_service1 with header line.
it_ser type zpo_service1 with header line.
*data : text_val type string.
data : begin of it_popup occurs 0,
po_no like ekko-ebeln,
po_no1 like ekko-ebeln,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
mobile like lfa1-telf2,
street1 like adrc-str_suppl1,
street2 like adrc-str_suppl2,
street like adrc-street,
pin like adrc-post_code1,
tel like adrc-tel_number,
fax like adrc-fax_number,
ext like adrc-tel_extens,
country like t005t-landx,
po_text(100) type c,
end of it_popup.
data : begin of it_ser occurs 0,
extrow type string,
SRVPOS type string,
KTEXT1 type string,
menge type esll-menge ,
meins type esll-meins,
netwr type esll-netwr,
end of it_ser.
data : scrn_popup like it_popup occurs 0 with header line.
data: po type string,
text_val type string,
ven_add type string,
ven_no type string,
ven_name type string,
antwort(1) type c,
answer(1) type c,
choise type sy-tabix,
text1 type string.
data: l_answer like sy-input.
if i_equnr is not initial. "here I_equnr is the Equipment No which flows in the Screen .
select * from zpm_table into
corresponding fields of table wa_popup
where zequnr = i_equnr.
elseif i_equnr is not initial and i_tplnr is not initial. "here I_tplnr is the FL No which flows in the Screen .
clear : wa_popup.
select * from zpm_table into
corresponding fields of table wa_popup
where zequnr = i_equnr and
ztplnr = i_tplnr.
elseif i_tplnr is not initial.
clear : wa_popup.
select * from zpm_table into
corresponding fields of table wa_popup
where ztplnr = i_tplnr.
endif.
if wa_popup[] is not initial.
read table wa_popup.
select ebeln lifnr from ekko
into corresponding fields of table it_ekko
where ebeln = wa_popup-zebeln.
if it_ekko[] is not initial.
select * from lfa1 into
corresponding fields of table wa_lfa1
for all entries in it_ekko
where lifnr = it_ekko-lifnr.
endif.
*endloop.
loop at wa_lfa1 . "into it_lfa1 WITH TABLE KEY lifnr = it_ekko-lifnr.
select * from adrc into
corresponding fields of table wa_adrc
where addrnumber = wa_lfa1-adrnr.
data:wa_t005u type t005u occurs 0 with header line.
select * from t005u into
corresponding fields of table wa_t005u
where spras = 'EN'
and land1 = wa_adrc-country
and bland = wa_adrc-region.
data:wa_t005t type t005t occurs 0 with header line.
select * from t005t into
corresponding fields of table wa_t005t
where spras = 'EN'
and land1 = wa_adrc-country.
it_popup-po_no = wa_popup-zebeln.
it_popup-lifnr = wa_lfa1-lifnr.
it_popup-name1 = wa_lfa1-name1.
it_popup-mobile = wa_lfa1-telf2.
read table wa_adrc index 1.
it_popup-street1 = wa_adrc-str_suppl1.
it_popup-street2 = wa_adrc-str_suppl2.
it_popup-street = wa_adrc-street.
it_popup-pin = wa_adrc-post_code1.
it_popup-tel = wa_adrc-tel_number.
it_popup-fax = wa_adrc-fax_number.
it_popup-ext = wa_adrc-tel_extens.
it_popup-country = wa_t005t-landx.
append it_popup.
endloop.
text1 = 'This Equip/Func.Location is Maintained or Service is undertaken by'.
concatenate 'Vendor No : ' it_popup-lifnr
into ven_no .
concatenate 'Vendor Name : ' it_popup-name1
into ven_name .
concatenate it_popup-street1
it_popup-street2
it_popup-street
it_popup-pin
it_popup-country
'Mob:' it_popup-mobile
'Tel:' it_popup-tel '-' it_popup-ext
into ven_add separated by space.
concatenate 'Please Refer this PO No. : ' it_popup-po_no
into po .
message 'Warning!!!' type 'I'.
Function Module for Pop Up *
call function 'POPUP_TO_CONFIRM_WITH_MESSAGE'
exporting
DEFAULTOPTION = 'Y'
diagnosetext1 = text1
diagnosetext2 = ven_no
diagnosetext3 = ven_name
textline1 = ven_add
textline2 = po
titel = 'Warning!!!'
START_COLUMN = 25
START_ROW = 6
cancel_display = 'X'
importing
answer = antwort.
" Area for option Yes or No "" .
if antwort = 'J'.
if it_popup-po_no is not initial. " Please Note here im checking for PO No
export it_popup-po_no to memory id 'Memo1'. "Po No is exported to another Program there i coded for Po items
submit zpm_po_services and return.
endif.
else.
*call TRANSACTION 'iw21'.
call transaction 'IW21' and skip first screen.
endif.
endif. " End of Total itab value/
else.
exit.
endif. }
This is the Code for zpm_po_services
For any Clarification Revert Back..
With Regards,
Vinu.R -
I need to create a control that will restrict the abiltiy of an order to settle to only certain types of WBS elements.
Currently we have a settlement profile that will only allow WBS settlement. We need to further restrict this settlement to only specific WBS elements. Does anybody know of a user exit, or some other way of doing this?
ThanksHi,
There is a BAdI for validating the distribution rules of settlement rules.
You can use this BAdI and write the validation code in it for restricting the settlemtn to only specific type of WBS ELEMENTS.
BAdI is CO_SRULE_CHECK.
Regards
Ram
Maybe you are looking for
-
New MacBookPro. Where can I find a driver for my Microtek Scanmaker 3600
I recently bought a new MacBook Pro (10.6.8) but to date, haven't been able to find any software/driver to use for my scanner, including the Microtek site. I have a Microtek Scanmaker 3600 that still works perfectly. I have searched forums and online
-
Dear all SAP ECC6.0 retail for provogue implementation, I am submitting the queries, can u please make solutions for all, these are the pending queries for provogue. Which canu2019t able to go for live? Please your people can support for the is
-
I buy extension from adobe online, i installed it correctly but then the extension menu was greyed out and i can't click it. Some help please.
-
upgraded from 5.1 to 5.5. now, when i try to computer reports, after entering the computer password i'm taken to a log-in page with the TEXT IN ARABIC! The URL is about 500 characters long, starting with https://services.linksys.com/lela_reporting/l
-
Problem with public WiFi requiring disclaimer on iPhone 5
My iPhone has a problem with public WiFi networks that require you to hit the button accepting a disclaimer before you can browse on the Internet. When I click on the network the Log In header pops up but eventually times out with an "Error Opening P