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

User exit.

Former Member
0 Likes
1,448

Hi, I am new to USEREXIT. I have to add one field in KOB1. its now having the Amount in USD (KAEP_COAC

WRGBTR

RKGXXX), i have show there INR value also. I have found the exit include and its ZXKAEPU01. Now I have to write code in that include. Now how can i know what is the output fields or internal tables in it? or how to use SMOD or CMOD? Plz dont send documentation, i already have many. Please tell how to do it step by step....

exit : COOMEP01 CO-OM: Information system -> line item reports

Function module

EXIT_SAPLKAEP_001

INCLUDE ZXKAEPU01 .

Message was edited by:

KaushiK©Datta

13 REPLIES 13
Read only

Former Member
0 Likes
1,284

go to CMOD create new project==>click enhancement asingment==>assign ur user exit there and save==>then click components==>double click ur FM(EXIT_SAPLKAEP_001)==>double clk include (ZXKAEPU01)==>write ur own coding here

when ur FM is called thr'w user exit by standard program..ur coding will get executed...

reward if usefull

before going to do this go to SMOD and put COOMEP01 click documentation to know how to handle this user exit

Message was edited by:

Sugumar Ganesan

Read only

0 Likes
1,284

Thanks Sugumar,

But in the part of write ur coding....i have a doubt. I have USD now i have to calculate INR. So what how can i corelate my coding with standard? If i calculate INR and its in a internal table then how will it being called and it will show in the standard KOB1? how to collect input from the standards???

Read only

0 Likes
1,284

are u sure that ur using correct user exit and function module?

Read only

0 Likes
1,284

as FC told me to do.......im not also sure....its in alv display..so it will be possible

Read only

0 Likes
1,284

Hi

then go ahead and change the values in CS_RECORD type KAEP_COVP_EXT. Check results in ALV.

For currency conversion from USD to ISR FMs

CONVERT_TO_FOREIGN_CURRENCY

CONVERT_TO_LOCAL_CURRENCY

can be used. Check the documentation and discuss with your FC if necessary.

Regards

Clemens

Read only

0 Likes
1,284

hi, Clemens thanks for your reply..

As I told early Im new to USER EXIT. Can u explane it step by step....plz it will be helpful to me.

Read only

0 Likes
1,284

Hi Kaushik,

I don't do it daily.

VIA SMOD and Ctrl-F you can find your exitname

COOMEP01 CO-OM: Information system -> line item reports

Create a project in TA CMOD, assign this EXIT. From there, click into EXIT_SAPLKAEP_001, from there into include zxkaepu01. Thats the place where you change values of fields of structure CS_RECORD.

Save. Activate. Go back to CMOD. Activate your (z*) project.

You may set a break-point in your coding to make sure the exit gets triggered. If not, go to the calling position in form extend_covp of function group KAEP.

Good luck!

Regards.

Clemens.

Read only

0 Likes
1,284

thanks .

But I need more. here it is. In the KOB1 transaction the field wich im going to replace is Table Name : KAEP_COAC Field Name : WOVBTR. Now im using the exit Function module EXIT_SAPLKAEP_001, in which changing parameter is CS_RECORD TYPE KAEP_COVP_EXT .... So how to relate KAEP_COVP and KAEP_COAC,,,,? can u send me some example code for this....i mean in the o/p WOVBTR will cointain my calculate value and it will display in the o/p.

Read only

0 Likes
1,284

Hi KaushiK,

after having changed each and every available field of CS_RECORD and checking the results in transactional display, you may get an idea on how to proceed.

If you can't get the expected results by modifying CS_RECORD, you may look for another userexit or try with dynamic assign:

[sample code; change for your application]


CONSTANTS: BSL(20) VALUE '(SAPMF05A)BSEG-BSCHL'.

FIELD-SYMBOLS: <BSL>.

ASSIGN (BSL) TO <BSL>.
IF SY-SUBRC = 0.
 <BSL> = 'XY'.
...

There is no way exceot start, try, see what you get, change, try again and so on. You will never get a redymade solution for anything in SAP life.

Sorry if this does not really encourage you.

Regards,

Clemens

Read only

0 Likes
1,284

thanks 4 ur valuable suggession . I just want few more. In the CMOD below the Function Exit there is anothe colum named include table. Clicking on that a popup is comming that """Include ****** is being created""". What is the use of it or how can i use them and which 1 will be perfect for my coding.... ??

Read only

0 Likes
1,284

Hi Kaushik,

if you click into the function module source, you will see that the include names are includes of the function modules.

The idea is that, because the include name starts with Z, it's in customer name space and it is no modification of any standard object if you put your code there.

The best is, to go to the function source and then double-click the include name to create the include. It is a good habit to copy the local interface section on top of the function source to the include source. This helps you to know where you are.

how come you never assign any point to any answer? Points are just to let the poster know that his answer has been valuated. Never give points to people explicitly asking for them. Always give points if you think the answer is helpful.

Regards,

Clemens

Read only

0 Likes
1,284

i tried a lot..but in d end im not able to get the desired o/p. Let me try more.

Read only

Former Member
0 Likes
1,284

thanks all