How to write include in user exit userexit_save_document
when i am trying to insert a inlcude in the exit userexit_save_document. i am getting error.
i ahve written a statement 'include 'Zabcd' inside the user exit.
doubl clicked on the include->system asked to create a new include-> opted for yes-> an editor came inc hange mode-> i ahve witten the statements form test. endform.
when i am trying to activate my include 'Zabcd' ,, ia m getting an error. "the corresponding form should have an edform"
i cant proceed , it is beyond my imagination
can some help me out of this situation.
Best Regards
Amarender Reddy B
So you have
FORM userexit_save_document.
INCLUDE zabcd.
ENDFORM.
And your include contains
FORM myform.
ENDFORM.
Include just inserts source code at the INCLUDE point, so effectively you've written:
FORM userexit_save_document.
FORM myform.
ENDFORM.
ENDFORM.
Now do you see the problem?
matt
Similar Messages
-
How to find out the user-exits?
hi.
how to find out the user-exits?
regards
eswar.Hi,
*& Report ZEXITFINDER
*report zexitfinder.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Regards -
How to find out appropriate user exit
Hi,
I want to know how to find out the user exit that matches to the requirement. Suppose for a material master program, there are so many include programs hence im unable to find call custer-function and even unable to debug an appropriate include. Please help me out how to learn user exits in a rightious way.
Thanks
BasuLook for program SAPICSS_ in your system and run it. This program can also be found under CMOD menu: Utilities -> SAP enhancements.
This will only give you the CMOD user exits.
There is a program someone made that searches for all sorts of user-exits (including BADI's etc.). I remember that it was posted on sapfans.com
Edited by: Maen Anachronos on Apr 6, 2009 3:22 PM -
How to find the exact user exit in enhancement.
Hi All,
I am in learning phase. I am working on TCODE VA01 and want to change the PO Date. But i am unable to find out the exact user exit. If somebody could guide me that what is the procedure to find the exact user exit for a perticular field or like that. I am know how to find all the enhancements in the TCODE.hi
Run this program and give the tcode and it will list down all the user exits for that Tcode.
REPORT z_find_userexit NO STANDARD PAGE HEADING.
TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir, tstct.
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
START-OF-SELECTION.
SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR' AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR' AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
SELECT * FROM tadir INTO TABLE jtab WHERE pgmid = 'R3TR' AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct WHERE sprsl EQ sy-langu AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ', 20(20) p_tcode, 45(50) tstct-ttext. SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline, 2 'Exit Name', 21 sy-vline , 22 'Description', 95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt WHERE sprsl = sy-langu AND name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline, 2 jtab-obj_name HOTSPOT ON, 21 sy-vline , 22 modsapt-modtext, 95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
Regards
Sajid
Edited by: shaik sajid on Jun 26, 2009 12:06 PM
Edited by: shaik sajid on Jun 26, 2009 12:10 PM -
How to find my specific user exit
hi friends,
in the transaction vl06O , we have different screens under different tabs,
in the screen under shipment tab, there are two fields,
incoterm
productcode
i should change the values appearing in these fileds only for specific data,
the data to the incoterm field is brough from likp table,
i felt that, i shpuld be using a user exit for this,
can any one plz suggest me which user exit to user or how do i
find the correct user exit for this using break points, i found out that,
the field incoterm is being called from
a screen 2000 in
SAPMV50A program.
did any one face this problem earlier.
thank you.Hi,
Use this code to find user exits for specific transaction. You can create a tool program with this..
REPORT z_find_userexit NO STANDARD PAGE HEADING.
TABLES : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
Find SAP Modifactions
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
Enjoy SAP.
Pankaj Singh. -
How to find a correct User-Exit
Hi All
I need to make changes in the user exit and there are many user-exits in the standard program here my question is how to find the correct user-exit which suits our requirement.
Thanks
srinirun this program by giving ur t code...and click the exit it will go to SMOD there u read the documentation of that exit..if ur requirement satisfies try to use that one..
REPORT ZUSEREXIT.
*report zuserexit no standard page heading.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : devclass like tadir-devclass.
parameters : tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname = tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen. -
Output type in user exit USEREXIT_SAVE_DOCUMENT in VL02N
Hello all, i am using the user exit USEREXIT_SAVE_DOCUMENT in include MV50AFZ1 to process some information when delivery is saved in VL02N. The problem is i have to limit this to a certain output type. There are 3 different ones that the user can choose from and i have to be able to know which one they did.
Does anyone know what table is used to store this information that i can read in the user exit? Or is there a FM to get that information?
Thanks in advance for your help.
-- DavidHi
Check This table T685B and this view VN_T685B for output ..
Regards. -
How to find the exact user exit for our requirement?
Dear Mr. keerthi,
can you please explain me how to find the exact user exit for our requirement?Hi sandip
There is more than one method in which you can check for user-exits.The following method is used very often.
<b>How to find the exact user-exit for your requirement.</b>
1. You can check the user exists using transaction SE85.
2. Repository Information System -> Enhancements -> Customer exits
3. You can search the user-exits by package name.
4. Double click on each exit name to check the function module exits.
<b>The procedure to find the package name.</b>
Execute transaction SE93
Enter the tcode of the transaction for which you want to check the user exit.
Example: if you want to find the user-exit for purchase orders while changing, enter ME22n and press display.
You will get to see the package name
But you need to confirm that the user exit will get triggered at the appropriate event.
( example: you might want some validations to be done ON SAVE of a purchase order)
<b>Checking if the user-exit is getting triggered or not.</b>
1. Open the user exit function module (that you have got in step 4) in Tcode SE37.
2. Click on where used button. In the pop up that immediately appears choose only programs .
3. You will get a list of programs. Double click on the program name.
4. You will get the list of location where this function module user exit is used.
5. Place session break points at each of these location ( at each CALL FUNCTION statement)
6. Now go to your transaction ( say change purchase order tcode:Me22n) and check if the user exit is getting triggered on appropriate event.
regards,
Prasad -
How to find the ME29N 'USER EXIT' when our save the release PO after.
How to find the ME29N 'USER EXIT' when our save the release PO after.
which user exit will be used?
thanks.
alex.Hi,
process :
go to tranx code : ME29N ,
System---->Status , here copy the program name (SAPLMEGUI),
go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
tranx code : CMOD , Utilites--->Sap Enanchement,
specify the package name : ME
and execute, displays a list of exits ,
and find out our suitable exit based on requirement.
check these : EXIT_SAPMM06E_021
reg
Siva -
How to find the appropriate user exit for invoic02 idoc in idoc_output_invo
Hi all,
I am new to this community p
i have issue regarding the How to find the appropriate user exit for invoic02 idoc in idoc_output_invoic function module.........
thanks,Hi ,
welcome to SDN.
You can select the appropriate Customer exit accrding to the available parameters .
The list of exits available are
EXIT_SAPLVEDF_001
EXIT_SAPLVEDF_002
EXIT_SAPLVEDF_003
EXIT_SAPLVEDF_004
For Example , if you want to modify the Idoc data(EDIDD) you have to use the EXIT_SAPLVEDF_002. accodingly you can select the user exit according to the avaialable parametres.Use Table MODSAP fto get the Enhancement name.
Hope this Helps
Rgds
Sree
Edited by: Sree on Jul 23, 2010 12:11 PM -
How to find out all user exits edited
Hi All,
Would you know how to find out all user exits have been ever edited?
Can we find out those user exit by some tcode or table?
Thank you very much
Best Regards,
Calvin
Edited by: Sam Sum on Mar 2, 2009 5:09 AMHi,
Just try this in your system.
Go to SE38 and give ZX* and press F4.
Have a look at table MODATTR to find the active projects in your system.
Regards
Edited by: Rajvansh Ravi on Mar 2, 2009 5:17 AM -
How can I find the USer Exit...
Hi,
How can I find the USer Exit...
I need to do changes for this User Exit :EXIT_SAPLKEII_002
In which T-code I can open this Exit
Ex: Go to some Transcation code and then give the name of the Exit ato access this Exit
...any sugesstions will be apprecaited!
Thanks & Regards,
KittuHi,
the EXIT : EXIT_SAPLKEII_002 is the exit,in this SAPLKEII is the standard Program.Copy this program and go to transactio SE38 and press Enter and then go for the option Where used list and check the check box Transaction. It displays the possible Transactions that the Exit triggers
Regards,
Vijaya Lakshmi.T -
Examples of code ritten in includes in user exits
Can anyone send some examples on code written in includes of user exits.
Thanks in advanceU S E R E X I T F O R P A 0 0 0 8 *
IF innnn-infty = '0008' AND
( ipsyst-ioper = 'INS' OR
ipsyst-ioper = 'COP' ).
G L O B A L D E C L A R A T I O N S *
DATA:
g_lga TYPE lgart, " Wagetype
g_count(2) TYPE n,
g_cnt_blank(2) TYPE n, " Record position for hrly WT
g_cnt_hrly(2) TYPE n, " Record position for hrly WT
g_cnt_inc(2) TYPE n, " Record position for inc WT
g_cnt_lng(2) TYPE n, " Record position for lng WT
g_cnt_ret(2) TYPE n, " Record position for ret WT
g_wtype(11) TYPE c, " Wage type
g_wrate(11) TYPE c, " Wage rate
g_ht510_rate TYPE betrg, " Default rate for WT0011 from T510
g_maxrate_inc TYPE betrg, " Maximum Incumbency Rate
g_maxrate_lng TYPE betrg, " Maximum Longevity Rate
g_maxrate_ret TYPE betrg. " Maximum Retention Rate
D A T A D E C L A R A T I O N *
DATA:
it_9006 TYPE TABLE OF pa9006,
st_9006 TYPE pa9006,
i0008 TYPE p0008,
st_grdcode TYPE zthhr_grdcode.
F I E L D S Y M B O L S *
FIELD-SYMBOLS: <fs_wtype> TYPE ANY, " Used for Wage Type
<fs_wrate> TYPE ANY. " Used for Amount
C O N S T A N T S *
CONSTANTS:
c_molga_10 type molga value '10', " Country grp for US
c_hlgar_0011 TYPE lgart VALUE '0011', " Hourly Wage Type
c_ilgar_0012 TYPE lgart VALUE '0012', " Incumbent Wage Type
c_llgar_0147 TYPE lgart VALUE '0147', " Longevity Wage Type
c_rlgar_01e0 TYPE lgart VALUE '01E0', " Retention Wage Type
c_subty_inc TYPE subty VALUE '1', " Subtype for Incumbency
c_subty_lng TYPE subty VALUE '4', " Subtype for Longevity
c_subty_ret TYPE subty VALUE '5'. " Subtype for Retention
P R O C E S S I N G *
Typecast PRELP to PNNNN structure
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = i0008.
Refresh & Clear Process variables.
CLEAR: g_lga, g_count, g_cnt_blank, g_cnt_hrly, g_cnt_inc,
g_cnt_lng, g_cnt_ret, g_wtype, g_wrate, g_maxrate_inc,
g_maxrate_lng, g_maxrate_ret.
Populate all unexpired & applicable records of IT9006 of subtype:
Incumbency, Longevity and Retention
REFRESH: it_9006.
SELECT * FROM pa9006 INTO TABLE it_9006
WHERE pernr EQ i0008-pernr
AND begda LE i0008-begda
AND endda GE i0008-begda
AND ( subty EQ c_subty_inc
OR subty EQ c_subty_lng
OR subty EQ c_subty_ret )
AND zapplflg EQ 'X'.
Sort IT9006 Table descending based on Amount
SORT it_9006 BY zwage zaddamt DESCENDING.
Check for validity of Pay Scale Group & Level
SELECT * FROM zthhr_grdcode UP TO 1 ROWS
INTO st_grdcode
WHERE trfgr = i0008-trfgr
AND trfst = i0008-trfst.
ENDSELECT.
IF sy-subrc EQ 0.
If valid, read the Maximum Incumbency Rate
READ TABLE it_9006 INTO st_9006
WITH KEY zwage = c_ilgar_0012
zgrdcode = st_grdcode-grdcode
TRANSPORTING zaddamt.
IF sy-subrc EQ 0.
g_maxrate_inc = st_9006-zaddamt.
ENDIF.
ENDIF.
Get Max Longevity rate
READ TABLE it_9006 INTO st_9006 WITH KEY zwage = c_llgar_0147
TRANSPORTING zaddamt. " to g_maxrate_inc.
IF sy-subrc EQ 0.
g_maxrate_lng = st_9006-zaddamt.
ENDIF.
Get Max Retention rate
READ TABLE it_9006 INTO st_9006 WITH KEY zwage = c_rlgar_01e0
TRANSPORTING zaddamt. " to g_maxrate_inc.
IF sy-subrc EQ 0.
g_maxrate_ret = st_9006-zaddamt.
ENDIF.
CLEAR : g_count, g_cnt_blank, g_cnt_hrly, g_cnt_inc,
g_cnt_lng, g_cnt_ret.
Check Infotype 0008 Wagetype entries
DO 40 TIMES
VARYING g_lga FROM i0008-lga01 NEXT i0008-lga02.
g_count = g_count + 1.
IF NOT g_lga IS INITIAL. " Fill max no of field filled
g_cnt_blank = g_count.
ENDIF.
IF g_lga = c_hlgar_0011. " Get Rec Pos for Hrly WT
g_cnt_hrly = g_count.
ELSEIF g_lga = c_ilgar_0012. " Get Rec Pos for Inc WT
g_cnt_inc = g_count.
ELSEIF g_lga = c_llgar_0147. " Get Rec Pos for Lng WT
g_cnt_lng = g_count.
ELSEIF g_lga = c_rlgar_01e0. " Get Rec Pos for Ret WT
g_cnt_ret = g_count.
ENDIF.
ENDDO.
g_cnt_blank = g_cnt_blank + 1. " Next Avl. Pos for WT entry
Incumbency Processing
0011 and 0012 both not found
IF g_cnt_hrly = 0 AND g_cnt_inc = 0.
Do Nothing
0011 Not found but 0012 found
ELSEIF g_cnt_hrly = 0 AND g_cnt_inc > 0.
CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
IF g_maxrate_inc <> 0.
<fs_wtype> = c_ilgar_0012.
<fs_wrate> = g_maxrate_inc.
ELSE.
If WT0012 has expired in IT9006, revert to WT0011 with
default rate from T510
<fs_wtype> = c_hlgar_0011.
SELECT betrg FROM t510 UP TO 1 ROWS
INTO g_ht510_rate
WHERE molga = c_molga_10
AND trfar = i0008-trfar
AND trfgb = i0008-trfgb
AND trfgr = i0008-trfgr
AND trfst = i0008-trfst
AND lgart = c_hlgar_0011
AND begda LE i0008-begda
AND endda GE i0008-endda.
ENDSELECT.
IF sy-subrc = 0.
<fs_wrate> = g_ht510_rate.
ENDIF.
ENDIF.
0011 found but 0012 Not found
ELSEIF g_cnt_hrly > 0 AND g_cnt_inc = 0.
IF g_maxrate_inc <> 0.
Update 9006 amount if greater. And Replace 0011 with 0012
CONCATENATE 'I0008-LGA' g_cnt_hrly INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_hrly INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
IF <fs_wrate> < g_maxrate_inc.
<fs_wtype> = c_ilgar_0012.
<fs_wrate> = g_maxrate_inc.
ELSE.
Do Nothing
ENDIF.
ELSE.
Do Nothing
ENDIF.
0011 and 0012 both found
ELSEIF g_cnt_hrly > 0 AND g_cnt_inc > 0.
Rate in IT9006 exists.
IF g_maxrate_inc <> 0.
Remove existing 0011
CONCATENATE 'I0008-LGA' g_cnt_hrly INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_hrly INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
If hourly rate < Max Inc Rate, Clear Hrly WT & update WT0012
IF <fs_wrate> LT g_maxrate_inc.
CLEAR : <fs_wtype>, <fs_wrate>.
Update existing 0012 with new amount
CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
<fs_wtype> = c_ilgar_0012.
<fs_wrate> = g_maxrate_inc.
If hourly rate > Max Inc Rate, clear WT0012
ELSE.
CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
CLEAR : <fs_wtype>, <fs_wrate>.
ENDIF.
Rate in IT9006 do not exists.
ELSE.
Let 0011 be there but remove 0012.
CONCATENATE 'I0008-LGA' g_cnt_inc INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_inc INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
CLEAR : <fs_wtype>, <fs_wrate>.
ENDIF.
ENDIF.
Longevity Processing
Wage type 0147 already exists
IF g_cnt_lng > 0.
CONCATENATE 'I0008-LGA' g_cnt_lng INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_lng INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
IT9006 contains the rate.
IF g_maxrate_lng > 0.
Update the existing amount
<fs_wtype> = c_llgar_0147.
<fs_wrate> = g_maxrate_lng.
ELSE.
Remove Wage Type 0147
CLEAR <fs_wtype>.
CLEAR <fs_wrate>.
ENDIF.
Currently no 0147 exists
ELSE.
IT9006 contains the rate.
IF g_maxrate_lng > 0.
Add 0147 with amount
CONCATENATE 'I0008-LGA' g_cnt_blank INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_blank INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
<fs_wtype> = c_llgar_0147.
<fs_wrate> = g_maxrate_lng.
g_cnt_blank = g_cnt_blank + 1.
IT9006 does not contain the rate.
ELSE.
Do Nothing
ENDIF.
ENDIF.
Retention Processing
Wage type 01E0 already exists
IF g_cnt_ret > 0.
CONCATENATE 'I0008-LGA' g_cnt_ret INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_ret INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
IT9006 contains the rate.
IF g_maxrate_ret > 0.
Update the existing amount
<fs_wtype> = c_rlgar_01e0.
<fs_wrate> = g_maxrate_ret.
ELSE.
Remove Wage Type 01E0
CLEAR <fs_wtype>.
CLEAR <fs_wrate>.
ENDIF.
Currently no 01E0 exists
ELSE.
IT9006 contains the rate.
IF g_maxrate_ret > 0.
Add 01E0 with amount
CONCATENATE 'I0008-LGA' g_cnt_blank INTO g_wtype.
CONCATENATE 'I0008-BET' g_cnt_blank INTO g_wrate.
ASSIGN (g_wtype) TO <fs_wtype>.
ASSIGN (g_wrate) TO <fs_wrate>.
<fs_wtype> = c_rlgar_01e0.
<fs_wrate> = g_maxrate_ret.
g_cnt_blank = g_cnt_blank + 1.
IT9006 does not contain the rate.
ELSE.
Do Nothing
ENDIF.
ENDIF.
Typecast the PNNNN to PRELP structure
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = i0008
IMPORTING
prelp = innnn.
Show Data Again Switch to display the field values again
show_data_again = 'X'.
ENDIF. -
How to find all the user exits includes ,
Hi All ,
I need to find all the includes which are created for purpose of implementing user exits , I know they all start with ZX* but where to get the list .
THank you all
Vinay KollaHi Vinay....
Just excute following program in your ABAP Edter....
( Input parameters: T'CODE and User exit type.)
>TABLES: MODSAP, MODACT, TSTC.
>
>PARAMETERS: INPUT1 LIKE TSTC-TCODE DEFAULT ' ',
> INPUT2 LIKE MODSAP-TYP DEFAULT ' '.
>
>DATA: SEARCH1(6),
> SEARCH2(3),
> SEARCH3 LIKE MODSAP-MEMBER.
>DATA : FIRST_ROW VALUE 'Y'.
>
>CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
> '%' INPUT2 INTO SEARCH2.
>
>SELECT * FROM TSTC WHERE TCODE LIKE SEARCH1.
> FIRST_ROW = 'Y'.
> CHECK TSTC-PGMNA NE SPACE.
> CONCATENATE '%' TSTC-PGMNA '%' INTO SEARCH3.
> SELECT * FROM MODSAP WHERE TYP LIKE SEARCH2
> AND MEMBER LIKE SEARCH3.
> SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
> IF FIRST_ROW EQ 'Y'.
> WRITE: /0 TSTC-TCODE, 6 TSTC-PGMNA, 16 MODSAP-NAME, 32 MODSAP-TYP,
> 45 MODSAP-MEMBER, 70 MODACT-NAME.
> FIRST_ROW = 'N'.
> ELSE.
>WRITE: /16 MODSAP-NAME, 32 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
> ENDIF.
> CLEAR : MODSAP, MODACT.
> ENDSELECT.
> IF SY-SUBRC NE 0.
> WRITE : /0 TSTC-TCODE, 6 TSTC-PGMNA, 30 'No exits found'.
> ENDIF.
> CLEAR TSTC.
>ENDSELECT.
>
>END-OF-SELECTION.
> CLEAR: SEARCH1, SEARCH2, SEARCH3.
Thanks,
Naveen Inuganti. -
How to write BDC in Function exit (user exit )
Hi champs,
I am trying to write one bdc code in a function exit but it is giving me the error:
" Incorrect nesting: Before the statement "FORM", the structure
introduced by "FUNCTION" must be concluded with "ENDFUNCTION". -
The code which i have written is
**& Include ZXMRCU01
data: begin of it_imptt occurs 0,
POINT like imptt-point,
MRMIN like imptt-MRMIN,
MRMAX like imptt-MRMAX,
end of it_imptt.
Internal table to store BDC screens *
and field values *
DATA: BEGIN OF it_BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF it_BDCDATA.
select point
MRMIN
MRMAX from imptt into it_imptt
for all entries in imrg_ins
where point = imrg_ins-point.
endselect.
read table imrg_ins with key point = it_imptt-point.
if imrg_ins-readg < it_imptt-mrmin
or imrg_ins-readg > it_imptt-mrmax.
perform bdc_dynpro using 'SAPLIQS0' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RIWO00-QMART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RIWO00-QMART'
'M1'.
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'VIQMEL-QMTXT'
'test desc1'.
call transaction 'IW21'
using it_BDCDATA
Mode 'A'
update 'S'.
REFRESH it_BDCDATA.
endif.
**& Form bdc_dynpro
text ---- Taking 2 parameters Screen Name & Screen Number.
FORM BDC_DYNPRO USING SCREEN_NAME SCREEN_NUMBER.
CLEAR it_BDCDATA.
it_BDCDATA-PROGRAM = SCREEN_NAME.
it_BDCDATA-DYNPRO = SCREEN_NUMBER.
it_BDCDATA-DYNBEGIN = 'X'.
APPEND it_BDCDATA.
ENDFORM. "bdc_dynpro
**& Form bdc_field
text---- Taking 2 parameters Field Name & Field Number.
FORM BDC_FIELD USING FNAME FVAL.
CLEAR it_BDCDATA.
it_BDCDATA-FNAM = FNAME.
it_BDCDATA-FVAL = FVAL.
APPEND it_BDCDATA.
ENDFORM. "bdc_field
Is there any different way of writing bdc in user exit?<b>FUNCTION.</b>
**& Include ZXMRCU01
data: begin of it_imptt occurs 0,
POINT like imptt-point,
MRMIN like imptt-MRMIN,
MRMAX like imptt-MRMAX,
end of it_imptt.
Internal table to store BDC screens *
and field values *
DATA: BEGIN OF it_BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF it_BDCDATA.
select point
MRMIN
MRMAX from imptt into it_imptt
for all entries in imrg_ins
where point = imrg_ins-point.
endselect.
read table imrg_ins with key point = it_imptt-point.
if imrg_ins-readg < it_imptt-mrmin
or imrg_ins-readg > it_imptt-mrmax.
perform bdc_dynpro using 'SAPLIQS0' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RIWO00-QMART'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RIWO00-QMART'
'M1'.
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'VIQMEL-QMTXT'
'test desc1'.
call transaction 'IW21'
using it_BDCDATA
Mode 'A'
update 'S'.
REFRESH it_BDCDATA.
endif.
<b>ENDFUNCTION.</b>
**& Form bdc_dynpro
text ---- Taking 2 parameters Screen Name & Screen Number.
FORM BDC_DYNPRO USING SCREEN_NAME SCREEN_NUMBER.
CLEAR it_BDCDATA.
it_BDCDATA-PROGRAM = SCREEN_NAME.
it_BDCDATA-DYNPRO = SCREEN_NUMBER.
it_BDCDATA-DYNBEGIN = 'X'.
APPEND it_BDCDATA.
ENDFORM. "bdc_dynpro
**& Form bdc_field
text---- Taking 2 parameters Field Name & Field Number.
FORM BDC_FIELD USING FNAME FVAL.
CLEAR it_BDCDATA.
it_BDCDATA-FNAM = FNAME.
it_BDCDATA-FVAL = FVAL.
APPEND it_BDCDATA.
ENDFORM. "bdc_field
Regards
Peram
Maybe you are looking for
-
Put new HD in and now can't get it to boot, please help!
With disk it tells me to select a destination volume but it's blank. Without disk it gives me a ? in a folder. Please help getting really frustrated.
-
Nokia 5200 Caller can't hear me!
Can anybody help? If I make or receive a call, I can hear them but they can't hear me. Is it me or is it the phone?
-
Hi, 1.Is there any upper limit on the storage capacity of Oracle 8i Lite? 2.Can oracle 8i lite be used for storing large amount of data say in the order of 100MBs or so ? Thanks and regards, Gane.
-
I want to download 'my' videos from YouTube and Google Video
i'm on: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6. and I am looking for a WORKABLE way to download my videos from YouTube and Google Video. When I download them straight from YouTube of GoogleVide
-
Kodak Ultima photo paper...HELP !!!
Hi, I m looking to solve this issue;I m trying to find a perfect setting to print photos using "Iphoto 6" with a "Canon i860" and this new Kodak paper "UPP-4-A" or "Kodak Ultima photo paper"...All im getting for now are green pictures. Thanks in adva