Skip to end of metadata
Go to start of metadata

Agenda:

1. What is coding block.

2. About coding block sub-screen and its limitation.

3. How  to create a customer own fields.

4. How  to Add customer field into Customer created sub-screen.

5. Main debug points.


 

1. What is coding block.

   The coding block is a tool used to enter additional account assignments, for example, cost center,
   order or project and customer fields. The coding block is supported by Accounting (AC) and used
   by other application components such  as HR, CO, FI-SL……

2. About coding block sub-screen and its limitation.

   (1) Check all SAP standard coding block Sub-screen and maintain customer own screen in Tcode
        OXK1.

   (2) It is not necessary to maintain customer own screen, by default sub-screen:9999 is used.

   (3) After you have generated a coding block subscreen, the changes carried out  and valid in all clients
        of the system  and for all transactions.

   (4) Max. 18 Customer own fields can be created.

   (5) Customer fields from the coding block can be added without modification in Enjoy transactions, but
        Max. 5 fields can be added.

3. How  to create a customer own fields.

   Using basic mode or expert mode to define customer fields in Tcode OXK3

     Basic mode:

     In OXK3->press “Add field” button:

      (1) Enter Development Class.
      (2) Field name: Must begin with ZZ or YY.
      (3) Field description: that is to appear on the sub-screen
      (4) Data type: CHAR or NUMC are offered as data types for a coding field  (CHAR can defined as an
           ALPHA conversion in expert mode only, by creating DOMAIN with Conversion  routine: ALPHA,
           that is numerical values are portrayed internally with leading zeros).
      (5) Choose the function Test run to check whether your entries are valid.
      (6) Remove the flag from the Test run field, the PROC. Run will be  automatically set.
      (7) Choose Execute.
      (8) Check the log for confirming the generation is done correctly or not.

    Expert Mode:

    The expert mode allows you to perform step-by-step all the functions which the basic mode carries out 
    automatically in the background. This affords you greater freedom when defining the various parameters 
    you require. But ABAP Dictionary knowledge is necessary.

     In OXK3->menu: Account Assignment Fields->Expert Mode->next screen->Account Assignment Fields:  
      (1) Create domain for a new customer fields(Optional).
      (2) Create data element for a new customer fields(optional).
      (3) Add field->add the new field in the Include structure CI_COBL.
      (4) Add field BI: if this new field is used in Batch input as well, then do this step.
      (5) Add field to BSEG->the new field must be added to the end of the field and before append structure 
          in BSEG.
      (6) Add control entry-> for making this new field available for customizing.

     Example in Basic mode:Create Z field as below:

    

     Example in Basic mode: check the log in Test Run mode:

   

     Example in Basic mode: Run in Proc. Mode, check the log.

   

     Example in Basic mode: Run in Proc. Mode, check the log. Pay attention to the generation PRG, if any
     inconsistency happens, just run one of these PRG.

     

     Example in Basic mode: check in BSEG and CI_COBL table for ensuring the ZZGlADYS field generated.

   
   

   

     Example in Basic mode: check field status in Tcode OB14.    

   

     Example in Basic mode: check ZZgladys is available in coding block sub-screen, ZZgladys is displayed
     in sub-screen:9999 by default.

   

4. How  to Add customer field into Customer created sub-screen.

    Which Sub-screen are used by system depends on the required entry fields and optional fields and Priority
    of sub-screen.
    Example create sub-screen as 9997 with all possible fields in Tcode OXK1

     
 

   
  
   

  Sub-screen 9997 is displayed in Tcode FB01 as follow:  

 

5. Main debug points.

  The Main PRG:SAPLKACB, and the main FM:COBL_SEND_PBO, within this FM, the coding block is called 
  by COBL_EX_SEND_PBO, and then check the required fields and their field status, get modification number
  of fields and Priority, and so on, then at last which screen is used as default one is determined according to the
  number of required fields and Priority etc.

 (1) Mapping the coding block fields and Check field status in main PRG SAPLKACB, source code of LKACBF01.

 
   
 (2) Check internal table: gt_coblf  ( 0 = “false” ; 1 = “true” ).

 
    

 (3) Make the customer created sub-screen 9997 (ZZGLADYS included) as default one for coding block screen.

           
   

 (4) Check the required fields, optional fields and priority for the sub-screen in internal table TREFFER, in this 
       case 9997 is the default sub-screen for coding block.

 
  

 (5) If ZZGLADYS is suppressed , check the result in internal table TREFFER after sorting, the required fields 
      lowered from 5 to 4 due to ZZGLADY is not included anymore, so the dynnr No. with small one will be selected
      as default sub-screen. In this case, it should be 1014.

 
 

 (6) The selected sub-screen will be transferred to field of TREFFER-DYNNR as default one to be used after sorting
      (this is1014).

 

 

  • No labels

2 Comments

  1. Hi,

     

    Is it possible to add this custom field to Account assignment tab of the PO (ME21N?)

    Thanks

  2. Hi Gladys,

    Before adding Customer Fields using OXK3, in FB03, some lines (with specific G/L accounts) don't have Coding Block subscreen (it doesn't call FM COBL_SEND_PBO).

    So could you please help on how to add Customer Fields into these lines?

    Thanks and hope to receive your reply soon! (smile)