Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

iw41 userexit problem

former_member251546
Participant
0 Likes
2,018

Hi,

good day sap guys

Ive created the user exit for iw41. its working fine but expet defualt checking one which is for Activity type. Problem is when you didnt change actiy type in iw41. its going to save. i dont want like tht. it has to kick the user exit .and check the activity type and go forther checking. if i change the activity type..its going to kick the user exit and working fine.

In user exit level. first it self, ive put the codition for it. its not kicking. plz have a look it. can you plz guide me..

user exit name: EXIT_SAPLCORF_004


DO 1 TIMES.
If afrud_imp-learr  NE 'CON'                     "Actity Type checking but in detualt secreen we've got HM.
   AND afrud_imp-learr NE 'CONS'.
EXIT.
 endif.
ENDDO.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,669

Hi

Use exit CONFPM05. It will trigger when u save.

Regards,

Raghu.

Hi,

good day sap guys

Ive created the user exit for iw41. its working fine but expet defualt checking one which is for Activity type. Problem is when you didnt change actiy type in iw41. its going to save. i dont want like tht. it has to kick the user exit .and check the activity type and go forther checking. if i change the activity type..its going to kick the user exit and working fine.

In user exit level. first it self, ive put the codition for it. its not kicking. plz have a look it. can you plz guide me..

user exit name: EXIT_SAPLCORF_004


DO 1 TIMES.
If afrud_imp-learr  NE 'CON'                     "Actity Type checking but in detualt secreen we've got HM.
   AND afrud_imp-learr NE 'CONS'.
EXIT.
 endif.
ENDDO.

7 REPLIES 7
Read only

Former Member
0 Likes
1,670

Hi

Use exit CONFPM05. It will trigger when u save.

Regards,

Raghu.

Read only

0 Likes
1,669

Hi,

Good day Raghavendra

thank you very much.. iam gonna see it

Regards

Read only

0 Likes
1,669

Hi,

good day raghavendra

Thank you very for given valueable information. You are right. its going to kicking the user exit one which you told.

and one more thing..ive created other user exit for iw32 for settelment rule creation. its working fine but except the population the Cost center value.

Plz have a look my code. it any wrong..Plz let me know.


DATA: srules TYPE srules_ext OCCURS 0,
      wa_srules TYPE srules_ext.
DATA: lt_zcs_settle_rc TYPE STANDARD TABLE OF zcs_settle_rc WITH HEADER LINE.
DATA: wa_zcs_settle_rc type zcs_settle_rc.
DATA: ls_copadata TYPE STANDARD TABLE OF bapi_copa_data  WITH HEADER LINE.

 Break-point.

CALL FUNCTION 'K_SRULE_CREATE'
   EXPORTING
     i_objnr                   = caufvd_imp-objnr
*     I_CHECK_ONLY_LOCAL        = ' '
*   IMPORTING
*     E_COBRA                   = ls_cobra
  EXCEPTIONS
    rule_already_exists       = 1
    OTHERS                    = 2.

sELECT * FROM zcs_settle_rc INTO TABLE lt_zcs_settle_rc WHERE auart  = caufvd_imp-auart AND
                                                                ilart  = caufvd_imp-ilart AND
                                                         ( RULE_TYPE = '001' OR RULE_TYPE = '002' ).
  lOOP AT lt_zcs_settle_rc into wa_zcs_settle_rc.
    wa_zcs_settle_rc-kostl = caufvd_imp-kostv.
    modify lt_zcs_settle_rc from wa_zcs_settle_rc.
  endloop.

Sort lt_zcs_settle_rc by RULE_TYPE.
 Loop at lt_zcs_settle_rc into wa_zcs_settle_rc.
  IF wa_zcs_settle_rc-auart = 'YSPS'.
    wa_srules-source = wa_zcs_settle_rc-RULE_TYPE.
    wa_srules-settl_type = 'PER'.
    wa_srules-percentage = '100'.
    wa_srules-comp_code  = caufvd_imp-bukrs.
    wa_srules-gl_account = wa_zcs_settle_rc-hkont.
    wa_srules-profit_ctr = caufvd_imp-prctr.
    wa_srules-costcenter = wa_zcs_settle_rc-kostl.
    APPEND wa_srules TO srules.
    CLEAR:wa_srules.

    wa_srules-source = wa_zcs_settle_rc-RULE_TYPE.
    wa_srules-settl_type = 'FUL'.
    wa_srules-percentage = '100'.
    wa_srules-comp_code  = caufvd_imp-bukrs.
    wa_srules-gl_account = wa_zcs_settle_rc-hkont.
    wa_srules-profit_ctr = caufvd_imp-prctr.
    wa_srules-costcenter = wa_zcs_settle_rc-kostl.
    APPEND wa_srules TO srules.
    CLEAR:wa_srules,
          wa_zcs_settle_rc.


CALL FUNCTION 'K_ORDER_SRULE_ADD'
    EXPORTING
      object_no                  = caufvd_imp-objnr

Read only

0 Likes
1,669

sorry continutii..


 CALL FUNCTION 'K_ORDER_SRULE_ADD'
    EXPORTING
      object_no                  = caufvd_imp-objnr
* IMPORTING
*   FLG_RULE_INSERTED          =
    TABLES
      srules                     = srules
      criteria                   = ls_copadata


  CALL FUNCTION 'K_SETTLEMENT_RULE_SAVE'
      EXPORTING
        DIALOG            = ' '
        OBJNR             = caufvd_imp-objnr
        I_STATUS_UPDATE   = 'X'

My problem is COST Center is not populating in iw32.. when you in the settelment rules of G/L account. it takes you at Sender reciver screen, there we can see the G/L account, source assignment, and Profit percentage..

Iam getting all values execpt the cost center..

Plz let me know if set parameter id is working for it. bcoz ive tried in all dimention but i havent get the value.

Regards

Read only

0 Likes
1,669

Hi,.

Good day Raghavendra

Ive implementated the function exit for iw41 one which youve told tht. its working fine but After error message come on the message bar. if you press the ENTER , IT gives the popup message "INVALID CALL OF A METHOD FOR CANFORMATION"

if click the exit then scree is gone..

how to prevent the pop up message. i think, the pop up message from system.

Regards

Read only

Former Member
0 Likes
1,669

Hi Balaji,

You use user exit : CONFPM05 PM/SM order conf.: Cust. specific enhancements when saving

function module : EXIT_SAPLCORF_005

Hope this can solve your problem.

Regards,

Tutun

Read only

0 Likes
1,669

Hi,

Good day Tutan

Ive checked the initial checking with Confpm05. its fine. but if the activitaion chage and forther calculation , i was dev function exit in the confpm04.

Ive put both function exits in one project. confpm04 and confpm05. i think its wrong. isnt it? bcoz if i go for activity changes and pu the Actual Work hours and do some calculation then it kicks first confpm05 next gives the error.

Is there any other way to link both function exits[confpm04 and confpm05] in the single project.

regards