Create or Change number range for a object

Create or Change number range for a object
Change is used have consistent record in sap for a particular object.Here i have described about address number ,for Ex:-When we create a vendor using BAPI we need update the address in ADRC table,in order to maintain consistent record for sap it creates a internal number i.e address number in ADRC or other table.

Generate number for an object using NUMBER_GET_NEXT

 Generate number for an object using NUMBER_GET_NEXT

The  requirement was to generate a unique internal number for vendor address.

This is a function module to generate a  unique internal number in SAP system .
First of all FM NUMBER_RANGE_ENQUEUE
will lock the number range generator and then  
FM NUMBER_GET_NEXT will get the next available number 
FM NUMBER_RANGE_DEQUEUE will unlock the FM




How to create vendor master in SAP











  • Check for the vendor existence 
  
use function module BAPI_VENDOR_EXISTENCECHECK

       CALL FUNCTION 'BAPI_VENDOR_EXISTENCECHECK'

      EXPORTING

        vendorno    = l_f_lifnr "Vendor

        companycode = p_bukrs   "company code

      IMPORTING

        return      = g_r_return.   ( g_r_return TYPE bapiret1.)

      IF g_r_return-type CA 'AEX' .

      Vendor does not exist.

   ELSEIF  g_r_return-type IS INITIAL

    vendor alredy exits 

     MESSAGE I521(FN) WITH l_f_lifnr.

   endif. 

    Populate all the mandatory fields                       i_lfa1 "Vendor Master: General data address,country etc i_lfb1 "Vendor Master: Company data i_lfm1 "Vendor Master: Purchasing Data (Purchasing organization)   t_xlfbk "Bank details  
     Create vendor                   CALL FUNCTION 'VENDOR_INSERT' "in update task
        EXPORTING
          i_lfa1        = i_lfa1 "Vendor Master: General data
          i_lfb1        = i_lfb1 "Vendor Master: Company data
          i_lfm1        = i_lfm1 "Vendor Master: Purchasing Data (Purchasing organization)
        TABLES
          t_xlfas       = t_xlfas
          t_xlfb5       = t_xlfb5
          t_xlfbk       = t_xlfbk "Bank details
          t_xlfza       = t_xlfza
          T_XKNVK       = T_XKNVK
                .
      IF sy-subrc = 0.
        COMMIT WORK.
    *Vendor is created
      ELSE.
    *  Error while creating vendor
      ENDIF.  

 Protected by Copyscape Web Copyright Checker

Create vendor using BAPI

Create vendor using BAPI

  CALL FUNCTION 'VENDOR_INSERT' "in update task
    EXPORTING
      i_lfa1        = i_lfa1 "Vendor Master: General data:- address,country etc
      i_lfb1        = i_lfb1 "Vendor Master: Company data accounting information
      i_lfm1        = i_lfm1 "Vendor Master: Purchasing Data (Purchasing organization)
    TABLES
      t_xlfas       = t_xlfas
      t_xlfb5       = t_xlfb5
      t_xlfbk       = t_xlfbk "Bank details
      t_xlfza       = t_xlfza
      T_XKNVK       = T_XKNVK
            .
  IF sy-subrc = 0.
    COMMIT WORK.
*Vendor is created
  ELSE.
*  Error while creating vendor
  ENDIF.



Protected by Copyscape Web Copyright Checker


Change directory entry or development of any development like program, function module ,forms ,sap scripts etc.
  1. Go to tcode Se03
  2. Click on the change object directory entries next screen will come .Here we can change development class for any sap object like program ,function group, data element etc…For example change dev class of program check the check box as shown below give program name and execute
  3. Double click on the package to get the next screen
  4. Now here click the change button to change the development class shown below Similarly for  forms go to se03 follow the same procedure only change the entries as shown below Enter  ‘FORM’ press enter ,give the form name and check the check box as shown below


Protected by Copyscape Web Copyright Checker

Transaction code for table maintenance


Transaction code for table maintenance

  1. Create any table go to se11


  1. Go to the maintenance generator  utilities-->table maintenance or  (SE56)


  1. Generate the table maintenance, create a function group in se80 ,(if the function group is not maintained ,we cannot create maintenance screen in SM30 as the module for the maintenance generator going to be saved in the function group)

           

  1. Go to code SE93 give the tcode for the table maintenance generator ZEMPLOYEE_TCODE


  1. press enter go to the next screen fill the values as follows:

    Tcode SM30 (maintenance generator), View name = table name,  Update = X

  1. execute the tcode




Protected by Copyscape Web Copyright Checker

/*Newer Posts*/ Older Posts Home