Application Development 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: 

How to add a mod in SAP code

Former Member
0 Kudos

Hello,

We have a requirement where we are supposed to force the user to select the branch name and counter everytime the user logs into transaction FPCJ.

When a user for the first time tries TR FPCJ and if the parameter 8BC is not stored then the user is allowed to select the branch name and counter. Upon again trying to use the transaction FPCJ the parameter id is retreived and the user does not go through selecting the branch name and counter.

I have found out the code where we can force the user to everytime select the branch name and counter.I need to do a modification in SAP code (ECC 6.0 module ISU) .

The code where i need to change is Include: LFKH2F02

Form:

<i>

FORM get_usr_param USING p_uname TYPE syuname

CHANGING p_offic TYPE offic_kk

p_chdsk TYPE chdsk_kk

pt_fkkcjm TYPE fkkcjm_t.

  • ---------------------------------------------------------------------*

DATA: l_clerks_cd TYPE tp_clerks_cd,

l_usr05 TYPE usr05,

l_bname TYPE usr05-bname,

l_parid TYPE usr05-parid.

----


MOVE: p_uname TO l_bname,

co_desk_param TO l_parid.

SELECT SINGLE * FROM usr05 INTO l_usr05

WHERE bname EQ l_bname

AND parid EQ l_parid.

IF sy-subrc EQ 0.

l_clerks_cd = l_usr05-parva(5).

----


parmeter saved => find master data -

p_offic = l_clerks_cd-offic.

p_chdsk = l_clerks_cd-chdsk.

----- if no master data exist everything is cleared and refreshed -


SELECT * FROM dfkkcjm INTO TABLE pt_fkkcjm

WHERE offic EQ p_offic

AND chdsk EQ p_chdsk.

ELSE.

------ no parameter saved => find master data which is not used -


PERFORM get_unused_md CHANGING pt_fkkcjm.

ENDIF.

</i>

The area i would likr to change is

<i>

  • SELECT SINGLE * FROM usr05 INTO l_usr05

  • WHERE bname EQ l_bname

  • AND parid EQ l_parid.

sy-subrc = 4.

</i>

I am not able to find any enhancement spots in here to do the modification.

Can anybody let me know any other alternative to achieve this ?

2 REPLIES 2

Former Member
0 Kudos

In ECC6 there will be an implicit enhancement point at the beginning of the form.

You could delete the relevant parameter entry from table USR05 at this point for the specified user - this would then cause the subsequent select to always fail.

Andrew

0 Kudos

MANY THANKS,

THAT SOLVED THE PROBLEM.