Enhancement (HR ABAP)
HI Friends,
Pls solve this for me its urgent
In T-code PA30 ... giving PERNR , infotype 0015 and subtype after giving valid values I say CREATE
Now in the second screen there is a AMOUNT field which will be blank. My req is to populate the data in
the amount from the infotype PA0008 for that particcular PERNR. So pls tell me the exit or Badi or Enhancement Spot name to populate the data in that field(amount) I tried in all the ways but I could not found it
Thanks
Swati
Points will be given
There is the Concept called dynamic actions regarding this .Kindly chekc the available documkents fgro this ..ok
regards
sas
Moreover this is Functional people work
Reward points if useful
Similar Messages
-
SAP object enhancement using abap objects
Hi
I am enhancing a standard SAP object using ABAP objects.
I need to add 2 more fields to the struct in that object.
My qn is : how to redefine the parameter type of a method in standard class?
the code is
DATA: lt_list TYPE RCF_T_LIST_MASS_PROC_ACT_X.
CHECK me->start_selection EQ true.
CHECK exist_exception( ) EQ false.
DATA lo_ex TYPE REF TO cx_hrrcf.
TRY.
CALL METHOD me->ref_mass_proc_bl->get_mproc_cor_list_info
EXPORTING
mass_proc_cor_list = me->sel_mass_proc_cor
IMPORTING
mass_proc_list_info = lt_list.
CATCH cx_hrrcf INTO lo_ex.
add_exception( lo_ex ).
ENDTRY.
plz help me
if anyone provides code for this is appreciable.
ThanksHi,
either you can use the append technique <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ebc9446011d189700000e8322d00/content.htm">Append</a>
or you can define an additional import parameter.
Best Regards, Edgar -
Batch Input enhancement in ABAP program
Hi,
I want to know if it's possible to enhance an existing batch input session with an ABAP program.
this session is created by a program and I want that another program enhances this session.
thanks in advance for your help.
FranckThis is possible - The BDC data is stored in SAP tables and there are options in SM35 to download a BDC session to a text file, or upload one. I suggest you have a look at the code behind these options for functions etc that you can use to get an existing session. Once you have the data you just need to modify it and write it as a new session.
Andrew -
Enhancing 0FI_GL_4 - ABAP code is NOT working - URGENT PLEASE ???
Hi all,
I want to enhance 0FI_GL_4 extractor with CHECT, RWBTR & PRIDT from PAYR table if VBELN of 0FI_GL_4 is not BLANK, with the following conditions:
1.Load all the records of PAYRQ table into PAYRQ internal table LT_PAYRQ
with matching BELNR, AUGBL & BUKRS from I_DTFIGL_4 internal table.
2.Load all the records of PAYR table into PAYR internal table LT_PAYR
with matching AUGBL & BUKRS from LT_PAYRQ internal table.
3.Read PAYR internal table LT_PAYR with matching BELNR (from I_DTFIGL_4
internal table) and fill the new fields CHECT, RWBTR & PRIDT.
The following the is ABAP code, but it is NOT working:
DATA:I_DTFIGL_4 LIKE DTFIGL_4 OCCURS 0 WITH HEADER LINE,
L_TABIX LIKE SY-TABIX.
DATA: BEGIN OF LS_PAYRQ,
ZBUKR LIKE PAYRQ-ZBUKR,
BELNR LIKE PAYRQ-BELNR,
AUGBL LIKE PAYRQ-AUGBL,
END OF LS_PAYRQ.
DATA: LT_PAYRQ LIKE LS_PAYRQ OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF LS_PAYR,
VBLNR LIKE PAYR-VBLNR,
CHECT LIKE PAYR-CHECT,
RWBTR LIKE PAYR-RWBTR,
PRIDT LIKE PAYR-PRIDT,
END OF LS_PAYR.
DATA: LT_PAYR LIKE LS_PAYR OCCURS 0 WITH HEADER LINE.
WHEN '0FI_GL_4'.
I_DTFIGL_4 = C_T_DATA.
SELECT BELNR AUGBL ZBUKR
FROM PAYRQ
INTO CORRESPONDING FIELDS OF TABLE LT_PAYRQ
FOR ALL ENTRIES IN I_DTFIGL_4
WHERE BELNR = I_DTFIGL_4-BELNR
AND AUGBL = I_DTFIGL_4-AUGBL
AND BUKRS = I_DTFIGL_4-BUKRS.
SORT LT_PAYRQ BY BELNR.
SELECT VBLNR CHECT RWBTR PRIDT
FROM PAYR
INTO CORRESPONDING FIELDS OF TABLE LT_PAYR
FOR ALL ENTRIES IN LT_PAYRQ WHERE VBLNR = LT_PAYRQ-AUGBL
AND ZBUKR = LT_PAYRQ-ZBUKR.
SORT LT_PAYR BY VBLNR.
LOOP AT C_T_DATA INTO I_DTFIGL_4.
L_TABIX = SY-TABIX.
IF NOT I_DTFIGL_4-VBELN IS INITIAL. " IF BILLING DOCUMENT EXISTS
READ TABLE LT_PAYR WITH KEY VBLNR = I_DTFIGL_4-BELNR.
IF SY-SUBRC = 0.
MOVE LT_PAYR-CHECT TO I_DTFIGL_4-ZZCHECT.
MOVE LT_PAYR-RWBTR TO I_DTFIGL_4-ZZRWBTR.
MOVE LT_PAYR-PRIDT TO I_DTFIGL_4-ZZPRIDT.
MODIFY C_T_DATA FROM I_DTFIGL_4 INDEX L_TABIX.
ENDIF.
CLEAR:I_DTFIGL_4-ZZCHECT,I_DTFIGL_4-ZZRWBTR,I_DTFIGL_4-ZZPRIDT,
LT_PAYR, LT_PAYRQ.
ENDIF.
ENDLOOP.
Could you please find the problem with above ABAP code and correct it.
Since I want to enhance it, if VBELN is not Blank and do I have to move the IF condition (I_DTFIGL_4-VBELN IS INITIAL) to another location for better performance.
Thanks,
Venkat..Dear Gajesh,
Please accept my thanks for your Spontaneous reply.
Selection Screen data is given below.
1 --> Material Number
2 --> Inspection Lot Number
3 --> Date of Lot Creation
4--> Inspection Type
Normally the clint will give the Inspection Type ie 4th input and Date of Lot creation ie 3rd Input (Range of Date).
Please do the needful.
With Best Regards,
Raghu Sharma -
Data Source enhancement with ABAP....
My requirement is to enhance Z data source to include
bonus_cat,perfinc and active from ztrm_labdlycat table.
For that reason i appended the extract structure and in CMOD included the following code in EXIT_SAPLRSAP_001 as this is transaction data source
<b>CODE:</b>
case i_datasource.
when ' Z_TRM_LMS'.
Loop at case i_datasource.
when ' Z_TRM_LMS'.
Loop at i_t_data.
Select single bonus_cat perfinc active from ztrm_labdlycat into
i_t_data-zzbonus i_t_data-zzperf i_t_data-zzactive
Where locat = i_t_data-locat and
exrsn = i_t_data-exrsn and
apobj = i_t_data-apobj.
Modify i_t_data.
Endloop.
Endcase.
<b>ERROR</b>
The field "I_T_DATA" is unknown, but there is a field with the similar name "C_T_DATA".
I am new to BW and not familiar with ABAP code...please update me on this how can i correct error
ThanksInclude the into clause within bracket.
Select single bonus_cat perfinc active from ztrm_labdlycat into
(i_t_data-zzbonus, i_t_data-zzperf, i_t_data-zzactive)
Where locat = i_t_data-locat and
exrsn = i_t_data-exrsn and
apobj = i_t_data-apobj.
But its not good practice to include Select Statement inside Loop..endloop.
You can create a separate internal table with the three fields and fill it with single select.
Then you can use read statement inside your loop..endloop.
The code will be like.
TYPES: begin of ty_data,
Locat (INCLUDE THE VARIABLE TYPE),
Exrsn (INCLUDE THE VARIABLE TYPE),
Apobj (INCLUDE THE VARIABLE TYPE),
bonus_cat (INCLUDE THE VARIABLE TYPE),
perfinc (INCLUDE THE VARIABLE TYPE),
active (INCLUDE THE VARIABLE TYPE),
End of ty_data.
Data: i_data type ty_data occurs 0 with header line.
Select locat exrsn apobj bonus_cat perfinc active from ztrm_labdlycat into corresponding fields of table i_data.
Loop at i_t_data.
Read table i_data with key
locat = i_t_data-locat
exrsn = i_t_data-exrsn
apobj = i_t_data-apobj.
If sy-subrc = 0.
I_t_data-bonus_cat = i_data-bonus_cat.
I_t_data-perfinc = i_data-perfinc.
I_t_data- active = i_data- active.
Modify i_t_data.
Endif.
Endloop. -
Hi all,
we are currently in a project to implement SAP HR as HR master and distribute HR master data to other legacy systems using SAP XI.
There will be two different interfaces from SAP HR to XI, one for real-time updates of changes (delta) and one for batch updates of complete records. We use SAP R/3 4.7 ext2 and want to use Idoc type HRMD_A06 which contains all HR data (we will have to add segments for two infotypes, but that is not the problem).
The problem is that there is some information we need to distribute that not automatically gets included in this Idoc type (such as SAP personell number for manager of the org.unit an employee belongs to). My guess is that this has to be filled using some custom ABAP.
Does anyone have any experience with adding such information to an Idoc? We can always find a suitable field in the Idoc to store the values if we only can retrieve the correct information.
And secondly, how do we make sure this extra information is stored for the correct employee segment in the Idoc?
Finally, can we implement this function module so that it runs after the general Idoc is created, runs through the entire IDoc and adds the correct information for each employee segment, and then send the finished IDoc to XI? This goes for both real-time interface (implemented using change-pointers) and batch interface (scheduled job to collect master data).
Any information or experience on this matter will be highly appreciated. Any other suggestions to how this problems can be solved are also welcome.
Thanks in advance.
Best regards, Kenneth EriksenHi Kenneth,
Sorry for the misleading information abt the user exit at the first place.
For batch process,
1. Run PFAL transaction.
2. Follow the same process to determine the manager in user exit EXIT_SAPLRHAL_003. set the parameter flag as 'X'. Also export the parameter 'Flag' to memory id in the user exit after the process.perform the logic to determine manager pernr only if infotype 0001 is filled.
3. Second user exit EXIT_SAPLRHA0_001 will follow the previous exit. Import the parameter from memory id. if flag eq X. no process.
4. Manager pernr will be passed.
For change-pointer process,
only 1001 information should be triggered by change-pointers.
1.)run rbdmidoc to trigger change-pointers for hrmd_a.
2.)user exit EXIT_SAPLRHAL_003 will be executed internally in the first step. should not perform manager logic as no 0001 infotype filled. It means parameter FLAG is blank.
3). in the user exit EXIT_SAPLRHA0_001 , perform manager logic for change-pointers only if flag eq space.
following logic should be followed :
a.) IDOC_DATA fill contains the 1001 records.
b.) loop at idoc_data.
read each record and determine 0001 infotype for all employees with new manager(as described in my first reply). append the 0001 records into idoc_data_temp.
c.) process each record by record in idoc_data.
d.) after the endloop. move all the records from idoc_data_temp to idoc_data.
now idoc_data will contain only 0001 records no 1001 records.
e.) again loop at idoc_data, perform manager pernr logic.
The change-pointer process is just overriding the standard process and manipulating custom records.
this is the one way of achieving the solution.
The other solution to achieve change-pointers is to perform lot of customization.
1.) create a custom program to read the change-pointers from bdcpv table to read the unprocessed records for message type hrmd_a.
2.)create infotype 0001 records from 1001 data.
3.) also perform manager pernr logic for 0001 records as we are not calling standard transaction(master_idoc_create_smd_hrmd).
4.) follow the logic in the sample program to create idocs.
FUNCTION ZSKIT_CREATE_IDOCS.
""Local interface:
DATA:
*·······control·record·for·the·IDoc
IDOC_CONTROL LIKE EDIDC,
*·······data·records·for·the·IDoc
T_IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE,
*·······table·for·the·IDocs·created·by·MASTER_IDOC_CONTROL
T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
*·······partner·type·for·logical·system
C_PARTNER LIKE EDIDC-RCVPRT,
*·······help·variable·for·the·check·if·an·IDoc·has·to·be·created
H_CREATE_IDOC.
*·variables·specific·for·this·example
DATA:
*·······field·strings·with·IDoc·segment·structure
E1XITEM LIKE ZSKILL_CAT occurs 0 with header line,
*·······data·to·be·put·to·the·control·record
C_MESSAGE_TYPE LIKE EDIDC-MESTYP VALUE 'XAMPLE',
C_BASE_IDOC_TYPE LIKE EDIDC-IDOCTP VALUE 'XAMPLE01',
*·······segment·types·to·be·put·to·the·data·record·table
C_HEADER_SEGTYP LIKE EDIDD-SEGNAM VALUE 'E1XHEAD',
C_ITEM_SEGTYP LIKE EDIDD-SEGNAM VALUE 'ZSKILL_CAT'.
E1XITEM-SKILL_ID = '12345678'.
E1XITEM-SKILL_TYPE = 'SKI'.
E1XITEM-SHORT_TEXT = 'Test'.
E1XITEM-LONG_TEXT = 'Test skill'.
E1XITEM-TENANT_ID = 'check1234'.
E1XITEM-BEGDA = sy-datum.
E1XITEM-ENDDA = sy-datum.
E1XITEM-SKILL_UP = '01234567'.
E1XITEM-SKILL_DOWN = '3456789'.
append E1XITEM.
clear E1XITEM.
E1XITEM-SKILL_ID = '12345678'.
E1XITEM-SKILL_TYPE = 'Test'.
E1XITEM-SHORT_TEXT = 'Check'.
E1XITEM-LONG_TEXT = 'check skill'.
E1XITEM-TENANT_ID = 'test1234'.
E1XITEM-BEGDA = sy-datum.
E1XITEM-ENDDA = sy-datum.
E1XITEM-SKILL_UP = '01234567'.
E1XITEM-SKILL_DOWN = '3456789'.
append E1XITEM.
clear E1XITEM.
*···put·the·application·item·record·to·the·IDoc·segment
loop at e1xitem.
*···append·record·to·IDoc·data·table
T_IDOC_DATA-SEGNAM = C_ITEM_SEGTYP.
T_IDOC_DATA-SDATA = E1XITEM.
APPEND T_IDOC_DATA.
ENDLOOP.
idoc_control-rcvprt = 'LS'.
IDOC_CONTROL-RCVPRN = 'DI2440'.
IDOC_CONTROL-MESTYP = 'ZSKIT'.
IDOC_CONTROL-IDOCTP = 'ZSKIT'.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
*·in·update·task···"if·application·document·is·posted·in·update·task
EXPORTING
MASTER_IDOC_CONTROL = IDOC_CONTROL
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
MASTER_IDOC_DATA = T_IDOC_DATA.
*exceptions
*···········error_in_idoc_control··········=·1
*···········error_writing_idoc_status······=·2
*···········error_in_idoc_data·············=·3
*···········sending_logical_system_unknown·=·4
*···········others·························=·5.
*·A·commit·work·has·to·be·done.·It·could·also·be·done·in·the·calling
*·application.
COMMIT WORK.
READ TABLE T_COMM_CONTROL INDEX 1.
IF SY-SUBRC <> 0.
*·no·IDoc·was·created,·you·can·react·here,·if·neccessary
ENDIF.
ENDFUNCTION.
5.) also set the change-pointers records as 'processed' status using standard function module.(search for function module starting like change_pointers_read_mode_set)
Please decide between 2 solutions .
Also revert back for any concerns.
Regards,
Senthil -
hi experts,
any one can help to the problem in enhacement . my requirement is
Calculate the amount and provide that as default value in infotype 0015 by entering the input fields number and date in the same infotype. and if should have to calculate the amount based on the wage type from the infotype 0008 using the formula [{1BAS + 1COL)/30} * NO. OF DAYS] to the employee groups except 'A', 'X', 'T', 'W' .
plz,tell me the solution ASAPlook at this procedure
tcode : pm01
single screen enhancement.
CI include creation
1) here it is giving warnings when the structure is activated
like enhancement catagory for table is missing
After activating with the warnings, i am going for
generate objects
then it will update every module and db table by overwriting.
2) after overwriting all module pools it is navigating to a badi implementation screen.
Is this necessary to enhance through badi. -
Enhancing existing Abap code: using values that doesn't exist in table
Hi,<br><br>
I would like to enhance this code . My requirement is as follows.<br><br>
I have two tables customer and product<br><br>
<pre>KNVP customer master data table
Customer PF Person
700008 YF 45555
700008 YQ 46666
700008 ZF 46666
700008 YM 49999
700008 ZQ 44444
700008 ZM 43333
T179 product hierarchy table*
product hier PF
1000014000 ZM
1000015000 ZF
1000033000 ZQ
The current extractor is showing YM for all YPF values
Customer Zperson ZPF YPF YPerson
700008 46666 ZF YM 49999
700008 43333 ZQ YM 49999
700008 44444 ZM YM 49999</pre>
<br><br>
Case 1:IF customer doesn't have Partner function value YQ in master data then partner function YF person and partner function should be use.
<br><br>
case 2: IF customer doesn't have Partner function value YF in master data then partner function YQ person and partner function should be use.
<br><br>
case3:IF customer doesn't have Partner function value YQ and YF in master data then partner function YM person and partner function should be use.
<br><br>
The tricky part is that YQ doesn't exist in T179 table
<br><br>
<pre>
LOOP AT T_DATA.
ZIDX = SY-TABIX.
CLEAR T179.
Select partner function, assigned to current
product hierarchy level 2
SELECT * FROM T179
WHERE STUFE = '2'
AND PRODH = T_DATA-PRODH.
ENDSELECT.
Replace value with new partner function.
by replacing first letter to 'Y'
CONCATENATE 'Y' T179-ZZPARVW+1(1) INTO NEWPF.
Try to find new sales employee with this new partner function
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = NEWPF.
ENDSELECT.
IF SY-SUBRC EQ 0.
New partner found with this partner function
T_DATA-ZPARVW = NEWPF.
T_DATA-ZPERNR = KNVP-PERNR.
ELSE.
NEWPF = 'YM'.
Try to find new sales employee with partner function 'YM'
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = NEWPF.
ENDSELECT.
T_DATA-ZPARVW = NEWPF.
T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
MODIFY T_DATA INDEX ZIDX TRANSPORTING ZPARVW ZPERNR.
</pre>
<br><br>Edited by: Matt on Aug 24, 2010 9:31 AM - fixed formattingHi,
thanks for your input, I have written it like this and it is working well for YQ and YF partner functions but YM is not showing when both are missing.
LOOP AT T_DATA.
ZIDX = SY-TABIX.
CLEAR T179.
* Select partner function, assigned to current
* product hierarchy level 2
SELECT * FROM T179
WHERE STUFE = '2'
AND PRODH = T_DATA-PRODH.
ENDSELECT.
* Replace value with new partner function.
* by replacing first letter to 'Y'
CONCATENATE 'Y' T179-ZZPARVW+1(1) INTO NEWPF.
IF SY-SUBRC EQ 0.
IF NEWPF EQ 'YF'.
READ TABLE T_KNVP WITH KEY PARVW = 'YF'.
IF SY-SUBRC EQ 0. "YF exists in master data
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = 'YF'.
ENDSELECT.
T_DATA-ZPARVW = 'YF'.
T_DATA-ZPERNR = KNVP-PERNR.
ELSE.
READ TABLE T_KNVP WITH KEY PARVW = 'YQ'.
IF SY-SUBRC EQ 0. "YQ exists in master data
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = 'YQ'.
ENDSELECT.
T_DATA-ZPARVW = 'YQ'.
T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
ENDIF.
ENDIF.
IF NEWPF EQ 'YQ'.
READ TABLE T_KNVP WITH KEY PARVW = 'YQ'.
IF SY-SUBRC EQ 0. "YQ exists in master data
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = 'YQ'.
ENDSELECT.
T_DATA-ZPARVW = 'YQ'.
T_DATA-ZPERNR = KNVP-PERNR.
ELSE.
READ TABLE T_KNVP WITH KEY PARVW = 'YF'.
IF SY-SUBRC EQ 0. "YF exists in master data
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = 'YF'.
ENDSELECT.
T_DATA-ZPARVW = 'YF'.
T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
ENDIF.
ENDIF.
ELSE.
NEWPF = 'YM'.
* Try to find new sales employee with partner function 'YM'
CLEAR KNVP.
SELECT * FROM KNVP UP TO 1 ROWS
WHERE KUNNR = T_DATA-KUNNR
AND VKORG = T_DATA-VKORG
AND PARVW = NEWPF.
ENDSELECT.
T_DATA-ZPARVW = NEWPF.
T_DATA-ZPERNR = KNVP-PERNR.
ENDIF.
MODIFY T_DATA INDEX ZIDX TRANSPORTING ZPARVW ZPERNR.
ENDLOOP.
thanks
Edited by: Bhat Vaidya on Aug 30, 2010 1:31 PM -
Whil entering first lastname and dob in pb10,it should check in PAP database table ,if ,he is already PREVIOUS EMPLOYER OF of this company ,it should check how long back he worked it should come as warning and and also it will give that employe id also in that perticular screen,
how can i procede plz let me know.Hi sai krishna
If u want sample codes then just goto SMOD>PBAS0001>Components.
Then U'll find two exits.Single click on the name of one exit and click Sample code button(Blue icon) to get sample code.
Or the best way to understand how to write a code do put a BREAK-POINT in the exit and run the original transaction..Whenever it stops at break-point then look up and below to get the ideea of the code. -
New to Enhancements and Modifications in SAP ABAP
Hi experts,
Could anyone has a tutorials or ebooks on this topic? I need to learn more about this.. tnx in advance!!!Hi
Enhancements and User Exits
User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
The naming standard of function modules for functionmodule exits is:
EXIT_<program name><3 digit suffix>
The call to a functionmodule exit is implemented as:
CALL CUSTOMER.-FUNCTION <3 digit suffix>
To find a Exit.
Goto Transaction -- Find The Package
SMOD >f4>Use the Package here to Find the Exits In the Package.
Else if you Want to search by Application Area wise ,
There is one more tab to find the Exits in the Respective Application Area.
Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
Now Run ur Transaction to Check if it Triggers.
Thats it..
Suppose you need to find out all the user exits related to a tcode.
1. Execute the Tcode.
2. Open the SAP program.
3. Get the Development Class.
4. Execute Tcode SE84.
5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
6. Enter the Development class and execute.
Check out this thread..
The specified item was not found.
1. Type the transaction : system->status-> <PROG. NAME>
2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
3. Open CMOD utilities->SAP enhancements
EDIT->All selections
4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
5. The displayed list contains the enhancements names for the transaction You were looking for.
6. Create a project in CMOD and the code in default include->activate.
http://www.erpgenie.com/sap/abap/code/abap26.htm
which gives the list of exits for a tcode
http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
For information on Exits, check these links
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.planetsap.com/userexit_main_page.htm
User-Exits
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/ab038.htm
http://www.planetsap.com/userexit_main_page.htm
http://www.sap-basis-abap.com/sapab013.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
These links will help you to learn more on user exits.
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
http://www.planetsap.com/userexit_main_page.htm
http://www.allsaplinks.com/user_exit.html
www.sap-img.com/abap/what-is-user-exits.htm
Also please check these threads for more details about user exits.
Re: Screen exit
user exit and customer exit
user exit
1. Document on UserExits in FI/CO
http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
2. Finding User Exits...
http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
3. List of all User Exits...
http://www.planetsap.com/userexit_main_page.htm
ENHANCEMENT-POINT
ENHANCEMENT-POINT can either be static (for example, additional data declaration) or dynamic (for example, additional coding).
http://help.sap.com/saphelp_nw2004s/helpdata/en/56/ee9441026aae5fe10000000a1550b0/content.htm
Refer the very useful links below:
Enhancement-Point is a part of the new enhancement framework. He is some lite reading.
http://help.sap.com/saphelp_nw2004s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
Please check this blogs and wiki as well.
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/thenewEnhancementFrameworkandthenewkernel-basedBAdI&
Please check these weblog for more information and sample codes.
/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
Look at this articles:
New Enhancement Framework
Enhancement Framework
Enhancement Framework - The New Way to Enhance Your ABAP Systems
Switch Framework Demo
Introduction to the Enhancement Framework
To now more about BADi Implementation see:
How To Define a New BAdI Within the Enhancement Framework
How to implement a BAdI And How to Use a Filter
Enhancement-Point is a part of the new enhancement framework. He is some lite reading.
http://help.sap.com/saphelp_nw2004s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
Please check this blogs .
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/thenewEnhancementFrameworkandthenewkernel-basedBAdI&
Enhancement frame work is the new concept using which SAP allows you to change the existing programs
See the following blogs that talk about the same in detail
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
Defines a position in an ABAP program as an enhancement option, at which one or more source code plug-ins can be inserted.
Syntax
ENHANCEMENT-POINT enh_id SPOTS spot1 spot2 ...
[STATIC]
[INCLUDE BOUND].
Extras:
1. ... STATIC
2. ... INCLUDE BOUND
Effect
: This statement defines an explicit enhancement option at the current position in the program at which a source code enhancement can be made. In program generation, the source code plug-ins of the assigned enhancement implementation that are available in the current system and have a switch in the status stand-by or on, are inserted at this position.
If the addition STATIC is not specified, the source code enhancement is dynamic. This means that in program execution, only those source code plug-ins are executed whose switch has the status on. If a source code plug-in does not have a switch assigned to it, it is handled in the same way as a plug-in with a switch in the status on.
With enh_id, an ID must be specified directly for the enhancement option, which is unique in the current compilation unit without the addition INCLUDE BOUND, and with this addition, is unique in current Include program. At least one enhancement spot must be assigned to the enhancement option using the specification simple enhancement spots spot1, spot2, and so on.
Within enhancements, one or more source code plug-ins can be created for one enhancement option. A source code plug-in is created by the assignment of an enhancement implementation in the Enhancement Builder. This automatically generates an empty source code plug-in with a unique ID, which is displayed underneath ENHANCEMENT-POINT in the Editor, where the actual enhancement can be implemented between ENHANCEMENT and ENDENHANCEMENT.
A source code plug-in is assigned to only one enhancement option. Multiple source code plug-ins of one enhancement implementation and the source code plug-ins of multiple enhancement implementations can be assigned to one enhancement point.
Notes
: In the terminology of the enhancement concept, the statement ENHANCEMENT-POINT includes both the enhancement spot element definition and the enhancement spot invocation of the enhancement option.
The statement ENHANCEMENT-POINT can either be entered directly or created by choosing Edit ? Enhancement operations ? Create enhancement in the Enhancement Builder. After the program has been saved or created using Edit ? Enhancement operations ? Create enhancement, the statement can only be deleted by choosing Edit ? Enhancement operations ? Delete enhancement.
In addition to the enhancement options explicitly specified by ENHANCEMENT-POINT, ABAP programs also contain implicit enhancement points, which can also be enhanced using source code plug-ins.
Addition 1
... STATIC
Effect
: The addition STATIC is used to define a static source code enhancement. In a static source code enhancement, all incorporated source code plug-ins are taken into account when the program is executed, including those whose switch is in the status stand-by.
Note
: The STATIC addition is intended for the enhancement of data declarations, while the statement ENHANCEMENT-POINT without the STATIC addition is designed for the enhancement of executable coding. When the statement is executed using Enhancements ? Create enhancement, the addition is set according to this selection.
Addition 2
... INCLUDE BOUND
Effect
: This addition can be entered in Include programs. It links the source code enhancement to the current Include program. Each program that incorporates an Include program only includes the source code enhancements that are defined with this addition. Source code enhancements created using the INCLUDE BOUND addition have their own namespace in each Include program. This ensures that if several Include programs are integrated into one compilation unit, no namespace conflicts arise, either between Include programs, or with the source code enhancements of the compilation unit.
Without the addition INCLUDE BOUND, a source code enhancement is assigned to only one compilation unit. If the statement ENHANCEMENT-POINT is executed in an Include program without this addition, a compilation unit must be assigned to it in the Enhancement Builder.
Note
: In an Include program, Include-bound and non-Include-bound source code enhancements can not be defined at the same time. This also applies if an Include program incorporates other Include programs.
Enhancement points are points provided by sap in standard programs to modify the source code. Go to any standard program, Locate the spiral button on the toolbar. Then press it and then navigate to edit->enhancement operations->display enhancement point menu. Then a no of yellow lines would appear, which are the available en points. You would have to change it and write the applicable source code.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/2342e1f3-0b01-0010-a186-fdd404884050 [original link is broken]
Please try the link given below
http://help.sap.com/saphelp_nw2004s/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm
Regards
Anji -
IDOC: How to create child segment with abap code.
Hi,
I'am trying to write an abap code to create segments for an Idoc which structure is the following:
ZLE_00060_DLVY
> E1EDL20
> Z1DEL_CONS
>Z1DEL_MAT_HEADER
> Z1DEL_MAT
> E1EDL20RET2
> E1EDL22
> E1EDL21
> E1EDL23
> E1EDL51
I receive a sintax error: Error in IDoc with status 26 .
Checking the result I note all segment at the same level and an error about the segment E1EDL22
EDI: Syntax error in IDoc (segment cannot be identified)
Message no. E0078
Diagnosis
The segment E1EDL22 does not occur at the current level of the basic
type DELVRY05 (extension ZLE_00060_DLVY).
This error can have several reasons:
o The segment E1EDL22 is assigned to a group whose header segment does
not occur.
o The segment E1EDL22 does not exist in the syntax description of the
basic type DELVRY05 (extension ZLE_00060_DLVY).
o The sequence of segments in the group in which the segment appears
is incorrect.
Previous errors ('mandatory' segment or group missing) may be due to
this error.
Procedure
Please check the IDoc or the syntax description of the basic type
DELVRY05 (extension ZLE_00060_DLVY).
After the error I have:
data records
E1EDL20
Z1DEL_CONS
Z1DEL_MAT_HEADER
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
Z1DEL_MAT
E1EDL20RET2
E1EDL22
E1EDL21
Abap code:
idoc_data-segnam = 'Z1DEL_CONS'.
idoc_data-sdata = s_z1del_cons.
append idoc_data.
idoc_data-segnam = 'Z1DEL_MAT_HEADER'.
s_z1del_mat_header-tsegment = 'MATERIAL'.
idoc_data-sdata = s_z1del_mat_header.
append idoc_data.
clear idoc_data-sdata. <<<<<<<<<<< how to indent the structure because this is a child.
idoc_data-sdata = s_Z1DEL_MAT.
idoc_data-segnam = 'Z1DEL_MAT'.
append idoc_data.
idoc_data-segnam = 'E1EDL20RET2'.
idoc_data-sdata = s_E1EDL20RET2.
append idoc_data.
clear idoc_data.
idoc_data-segnam = 'E1EDL22'.
idoc_data-sdata = s_e1edl22.
append idoc_data.
clear idoc_data.
idoc_data-segnam = 'E1EDL21'.
idoc_data-sdata = s_e1edl21.
append idoc_data.
Any help will be well appreciated.
Thanks in advance.
Regards,
GiovanniHi,
following in debugging mode the abap code of the INCLUDE ZXTRKU02 where is defined the TABLES IDOC_DATA STRUCTURE EDIDD, I find that all field of the table IDOC_DATA are not set. More exactly my expectation is to find values for SEGNUM, HLEVEL, PSGNUM.
In a few words I need to execute an enhancement, via abap code, of the struscure of the idoc before sending it out since I have a requirement to test this enhancement in my XI environment, receiving as input this ideoc modified.
Then, I need to add a new segment and one child.
Any suggestion will be well appreciated.
Thanks in advance.
Regards,
Giovanni -
XSLT Mapping with Java Enhancement
Hi All
I am working on XSLT Mapping with Java Enhancement.
To do this scenario i have followed the following link.
http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
As per the above link I have created Source and Target Data Types , Message Types , Mesage Interfaces, XSLT Mapping (using the transaction XSLT_TOOL) and Interface Mapping part and configred a simple file to file scenario in the ID part.
Apart from this I have wirte the java code, compile the java code, create the jar file using .java and .class file and after creating the jar file import the .jar file in the imported archive of the IR..
when I am trying to execute the scenario I am getting the successful message in SXMB_MONI but the target file is having the payload as given below.
<?xml version ="1.0" encoding="UTF-8"?>
<name xmlns:javamap="java:com.company.group.MappingClass"/>
And as per the XSLT mapping the payload should be as below
<?xml version ="1.0" encoding="UTF-8"?>
<person>
<name>Rinku Gangwani</name>
</person>
I have also followed the following blog link but still i am getting the same issue
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
could you please tell me what can be the reason that i am getting the blank targt field values in the payload.
Thanks
Rinku GangwaniHi,
The Transaction code XSLT_TOOL for ABAP xslt mapping.But the Java Enhancement is used for normal xslt mapping which we created using Stylus Studio.You can not access the Java Enhancement in ABAP xslt mapping.
If you want to use Java Enhancement in xslt mapping then create a xslt mapping using Stylus Studio and save the file as .xsl and zip the .xsl and import to import archive.
Regards,
Prakasu.M
Edited by: prakasu on May 28, 2009 1:46 PM -
How to implement Strategy pattern in ABAP Objects?
Hello,
I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
Thanks and regards,
TapioKeshav has already outlined required logic, so let me fulfill his answer with a snippet
An Interface
INTERFACE lif_payment.
METHODS pay CHANGING c_val TYPE p.
ENDINTERFACE.
Payment implementations
CLASS lcl_payment_1 DEFINITION.
PUBLIC SECTION.
INTERFACES lif_payment.
ALIASES pay for lif_payment~pay.
ENDCLASS.
CLASS lcl_payment_2 DEFINITION.
PUBLIC SECTION.
INTERFACES lif_payment.
ALIASES pay for lif_payment~pay.
ENDCLASS.
CLASS lcl_payment_1 IMPLEMENTATION.
METHOD pay.
"do something with c_val i.e.
c_val = c_val - 10.
ENDMETHOD.
ENDCLASS.
CLASS lcl_payment_2 IMPLEMENTATION.
METHOD pay.
"do something else with c_val i.e.
c_val = c_val + 10.
ENDMETHOD.
Main class which uses strategy pattern
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
"during main object creation you pass which payment you want to use for this object
METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
"later on you can change this dynamicaly
METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
METHODS show_payment_val.
METHODS pay.
PRIVATE SECTION.
DATA payment_value TYPE p.
"reference to your interface whcih you will be working with
"polimorphically
DATA mr_payment TYPE REF TO lif_payment.
ENDCLASS.
CLASS lcl_main IMPLEMENTATION.
METHOD constructor.
IF ir_payment IS BOUND.
me->mr_payment = ir_payment.
ENDIF.
ENDMETHOD.
METHOD set_payment.
IF ir_payment IS BOUND.
me->mr_payment = ir_payment.
ENDIF.
ENDMETHOD.
METHOD show_payment_val.
WRITE /: 'Payment value is now ', me->payment_value.
ENDMETHOD.
"hide fact that you are using composition to access pay method
METHOD pay.
mr_payment->pay( CHANGING c_val = payment_value ).
ENDMETHOD. ENDCLASS.
Client application
PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
DATA gr_main TYPE REF TO lcl_main.
DATA gr_payment TYPE REF TO lif_payment.
START-OF-SELECTION.
"client application (which uses stategy pattern)
CASE pa_pay.
WHEN 1.
"create first type of payment
CREATE OBJECT gr_payment TYPE lcl_payment_1.
WHEN 2.
"create second type of payment
CREATE OBJECT gr_payment TYPE lcl_payment_2.
ENDCASE.
"pass payment type to main object
CREATE OBJECT gr_main
EXPORTING
ir_payment = gr_payment.
gr_main->show_payment_val( ).
"now client doesn't know which object it is working with
gr_main->pay( ).
gr_main->show_payment_val( ).
"you can also use set_payment method to set payment type dynamically
"client would see no change
if pa_pay = 1.
"now create different payment to set it dynamically
CREATE OBJECT gr_payment TYPE lcl_payment_2.
gr_main->set_payment( gr_payment ).
gr_main->pay( ).
gr_main->show_payment_val( ).
endif.
Regads
Marcin -
Master Data Source Enhancement
Hi Gurus
I have a table in SAP which has customer, Sales Organization, Distribution Channel, Language (which is in EN always) and Customer Sales Text...
The Customer Sales Text is maintained at Sales Organization and Distribution Channel level..below is the example of one record...
Customer Sales Org. Distr. Channel Lang. Customer Sales Text
123 01 01 EN Blank (No text here)
123 01 02 EN Blank (No text here)
123 01 03 EN Blank (No text here)
123 01 04 EN Blank (No text here)
123 01 05 EN John Mathwes (Text appears here)
123 01 06 EN Blank (No text here)
so when i pull the data to BI i need to see only one record with Customer and text only (no Sales org and distr. Channel necessary) which has the Customer text value (5th record in above example)..
I created Data source in SAP and pulling the data to BI in DSO with customer and customer text....it's sorting and getting the latest distribution channel record (6th record in above example0
Can yo uplease tell me is there any way that i can get the record which has customer text in it..(any possibilities of writing abap routine in info package) or any data source enhancement with abap code...
can you pelase tell me the abap code that needs to be performed to solve the issue...
Thanks in advance
sailendraSort the RESULT_PACKAGE by customer and customer text in the endroutine of your transformation.
After the sort, the record with text for customer will be the last record and it will overwrite the other records in the DSO which has blank values.
Just add the below sort statement in your end routine.
SORT RESULT_PACKAGE[] BY CUSTOMER CUSTOMER_TEXT.
As per the sample records mentioned in your post, after the sort, 5th record will become the last record and this will overwrite the other records which has blank value in the DSO.
--- Thanks... -
Debugging of inbound ABAP proxy
Please To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.
follow this method and check debugging mode.
Debugging of inbound proxies in WebAS 6.40 or higher
To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.
At first you have to set a break point in the ABAP code. Call transaction SPROXY. Expand the namespace http://sap.com/xi/XI/Demo/Airline, the node Message Interface (inbound) and the interface FlightBookingOrderRequest_In.
Double click on interface II_SXIDAL_FBO_REQUEST and get the view of the proxy object properties.
Double click on the implementing class (ABAP name) and then double click on the method name (this class has only one method).
Now you are in the inbound proxy implementation. Set the break point on the first executable line.
With help of the back button (F3) go back to the transaction SPROXY. Here you choose from menu Proxy -> Test Interface
In the next pop up check the field XML Editor to maintain the payload.
In the next screen apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
Now the inbound proxy processing should stop at the break point.
If the processing does not stop at the break point, there might be an error in the XML. Check at the result page for error messages.
Debugging of inbound proxies in WebAS 6.20
You set the break point the same way as described above.
To start the proxy test you call the report SPRX_TEST_INBOUND.
As parameters you enter the name of the ABAP interface and the method name of of the ABAP interface and check the parameter Edit Native XML
In the next screen you apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
Then you click first on save button (F11), then on back button (F3).
Now you should see your debug session. If not, check if the XML is valid. BAPI_GOODSMVT_CREATE to post Goods Movement
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
BAPI TO Upload Inventory Data
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:\sapdata\TEST.txt'.
parameters: e-file like rlgrap-filename default
'c:\sapdata\gdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
endform.
*--- End of Program
Finding the user-exits of a SAP transaction code
Finding the user-exits of a SAP transaction code
Enter the transaction code in which you are looking for the user-exit
and it will list you the list of user-exits in the transaction code.
Also a drill down is possible which will help you to branch to SMOD.
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 : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
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 eq 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.
*---End of Program
u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Difference Between BADI and User Exits
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.
What is difference between badi and user-exists?
What is difference between enhancements and user-exists? and what is the full form of BADI?
I have another doubt in BDC IN BDC WE HAVE MSEGCALL (i did not remember the > correct name) where the error logs are stored, MSEGCALL is a table or structure.
What is the system landscape?
1) Difference between BADI and USER-EXIT.
i) BADI's can be used any number of times, where as USER-EXITS can be used only one time.
Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
ii) BADI's are oops based.
2) About 'BDCMSGCOLL' it is a structure. Used for finding error records.
3) Full form of BADI 'Business addins'.
3) System land scape will be depends on your project
Ex:- 'Development server'>'Quality server'-> 'Production server'......
List Of User Exit Related to VL01N
I need to some restriction in fields ( Actual GI Date, T-Code:Vl01n ).
How do you find out whcih user exits belongs to VL01n ?
Here is the list of user exit related to VL01N :
V02V0001 - Sales area determination for stock transport order
V02V0002 - User exit for storage location determination
V02V0003 - User exit for gate + matl staging area determination
V02V0004 - User Exit for Staging Area Determination (Item)
V50PSTAT - Delivery: Item Status Calculation
V50Q0001 - Delivery Monitor: User Exits for Filling Display Fields
V50R0001 - Collective processing for delivery creation
V50R0002 - Collective processing for delivery creation
V50R0004 - Calculation of Stock for POs for Shipping Due Date List
V50S0001 - User Exits for Delivery Processing
V53C0001 - Rough workload calculation in time per item
V53C0002 - W&S: RWE enhancement - shipping material type/time slot
V53W0001 - User exits for creating picking waves
VMDE0001 - Shipping Interface: Error Handling - Inbound IDoc
VMDE0002 - Shipping Interface: Message PICKSD (Picking, Outbound)
VMDE0003 - Shipping Interface: Message SDPICK (Picking, Inbound)
VMDE0004 - Shipping Interface: Message SDPACK (Packing, Inbound)
Maybe you are looking for
-
Error applying Patch 11724916 - 11.2.0.2.2 Patch Set Update.
Hello, I have an 11.2.0.2.1 GI installation and 12311357 path applied correctly. But patch 11724916 is missing (I know they both are installed together). Trying to apply it I have the following error (as grid) : grid@selva-2./usr/local/software/oracl
-
My anchored objects dont display after CS5 upgrade - help?
Hi, We've just upgraded to CS5 from CS3. I publish educational books, which contain a lot of object styles and anchored objects. I have just opend a book im working on in CS5 and have had problems with both anchored objects not displaying and object
-
Wierd problem with mail.
I use Mail for my .mac account, and the program randomly added a photo to the headers of all the mail in my sent box, but i really don't want the photo there. I thought i deleted the photo, and i never told it to have the photo there. Please help! Ho
-
Folks, is there anyway to use GW DMS on Linux?
-
IOS7 has some bugs, Swipe changing lock screen! iphonehassomebugs
Hi everyone, Iphone has some bugs(Part 1) Check this video for my very first bug experience, http://www.youtube.com/watch?v=QK_nIq4b82s&feature=youtu.be Steps to reproduce the issue: 1. Keep the lock screen wallpaper and the home screen wallpaper dif