How to create cluster view for related tables



A cluster view is a group of maintenance dialog which are collected in one maintenance unit .This allows data entry to one or more related table/view part of the cluster maintenance view. Cluster view is very useful when we would like to maintain a related
Tables/View.

Transaction code to create a cluster view: SE54
Transaction code to maintain a cluster view: SM34

Steps to create cluster maintenance view.

Here I have taken a scenario and going explain with three related table
Account ,Business and method


Cluster View for  tables ZACCOUNT, ZBUSINESS and ZMETHOD

ZACCOUNT

    ->ACCOUNT


ZBUSINESS
->ACCOUNT
->BUSINESS

ZMETHOD
    ->ACCOUNT
->BUSINESS
->METHOD




Step1: Go to SE11 create a table ZACCOUNT and maintenance screens


Step2: Similarly for table ZBUSINESS and ZMETHOD


 







Note: All the tables must have foreign key relationship with each other and table maintenance screen must be created for each table.

STEP 3: Call transaction SE54 .Create cluster view ZCLUSTER of the three table






Note: We can also create events in the cluster table not explained here .


Step 4: after header entry click Object Structure and give Table/View name, dependency as “R”(Header entry ) ,sequence number  .


Select all the table click field dependencies.

Now go to the header entry in order active the same.

Step5: Now test the same as shown below




Step 6 :
We can maintain the records in all the above tables using a single cluster view tcode SM34

























Protected by Copyscape Web Copyright Checker 
How to copy sap script or download /upload sap script

  1. Go to the tcode sa38 or se38 RSTXSCRP
  2. For download use Mode as EXPORT  and object name
  3. Popup to save to the local file.
  1. For upload change the mode from EXPORT to IMPORT















Protected by Copyscape Web Copyright Checker

How to append structure to Table or View
Append structure can be associated with only one view or table.This can be included at the end of the view or table.Steps to create append structure.

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

/*Newer Posts*/ Older Posts Home