Showing posts with label Enhancements. Show all posts
Showing posts with label Enhancements. Show all posts

Thursday, April 16, 2020

Validation for Purchase requisition date before saving purchase requisition date.

                       
  • Validation for Purchase requisition date before saving purchase requisition date.

  • Purchase requisition date validation.

  • User exit MEREQ001.


Use this EXIT_SAPLMEREQ_005 function module for displaying error messages at the time of saving of  Purchase requisition.


DATA Fcode TYPE  Sy-UCOMM.
if im_data_new-badat < sy-datum.
    MESSAGE 'Purchase requisition Date not is less than the System Date' TYPE 'E'.
   endif.
   if im_data_new-FRGDT < sy-datum.
     MESSAGE 'PR Release Date not is less than the System Date' TYPE 'E.
   endif.


Wednesday, March 18, 2020

Customer Exit and BAdI for PO in SAP

Customer Exit and BAdI for PO.

BAdI for PO.




The following is a list of customer Exits and BADI that I have used to date, along with their functions:

BADI ME_PURCHDOC_POSTED
Method: POSTED
TCode: ME22N, ME23N, ME29N

BADI ME_PROCESS_PO_CUST
Method: CLOSED
TCode: ME22N, ME23N, ME29N

Customer Exit MM06E005 (Customer fields in purchasing documents)
EXIT_SAPMM06E_016 (Export Data to Customer Subscreen for Purchasing Document Items (PBO))
desc: can be used to validate the header line or line item before
data storage process. so later validation checks will be made at the time
the user presses enter after inputting data on the subscreen.

Actually there are many more exits that can be used. I wrote only a few possible references.

Wednesday, February 26, 2020

SAP ABAP enhancement interview question.



List of ABAP enhancement  interview question.


ABAP enhancement question.


1.       What is enhancement and how many types are there?
2.      What is implicit enhancement?
3.      How explicit enhancement differs from implicit?
4.      What are user-exits? If you have worked state an example.
5.      What is customer exit and how it affects standard program?
6.      Difference between enhancement-point and enhancement-section?
7.      Do you use commit after code in enhancement-point? If yes where have you used it? (Note : never use commit in enhancements , you can but it's not a good practice as the enhancement can be called via other programs as well)
8.     Why do we implement badi?
9.      What is the use of badi? and what makes it a reliable method?
10.  What is filtered badi?
11.   How do you find a badi? Tell me two -three ways?
12.  What are adapter classes?
13.  How the methods of badi gets executed?
14.  What interface are there in badi by default?
15.   What is BET in enhancement?

Sunday, February 2, 2020

KE51 transaction how to make field (Address) required in SAP ABAP.


KE51 transaction how to make field (Address) required in SAP ABAP.
SAP does not provide any configuration and user exit to make fields in Address tab required in transaction KE51.After that debug ABAP Code, I found the way that you need to create enhancement point in include program LRKPMF05 in subroutine md_user_command_handle.

This example we want to make field Street, City, Country and Region is required when user click SAVE. Please check out this ABAP Code below.
FORM md_user_command_handle CHANGING p_fcode.
1) Form MD_USER_COMMAND_HANDLE, Start                                                                                                               
ENHANCEMENT 1  ZIMP_CO_REQUIRED_ADDR_KE51.    "active version
IF md_fcode = 'MD_SAVE'.

IF PRCT_V-STRAS EQ ''.
  MESSAGE 'You must input Street' TYPE 'E'.
ENDIF.


IF PRCT_V-ORT01 EQ ''.
 MESSAGE 'You must input Kota' TYPE 'E'.
ENDIF.

IF PRCT_V-LAND1 EQ ''.
 MESSAGE 'You must input Country' TYPE 'E'.
ENDIF.

IF PRCT_V-REGIO EQ ''.
 MESSAGE 'You must input Region' TYPE 'E'.
ENDIF.

ENDIF.
ENDENHANCEMENT.