Number of fields in the table

Hi experts,
How do you obtain the number of fields of a particular table ?
I want the count of the fields of a table.
Thanks in advance,
Chithra.

Check the code below:
DATA: d_ref TYPE REF TO data,
i_alv_cat TYPE TABLE OF lvc_s_fcat,
ls_alv_cat LIKE LINE OF i_alv_cat,
fname TYPE fieldname,
ncomp(9) TYPE n,
rcount(9) TYPE n,
fcount(3) TYPE n.
TYPES: BEGIN OF itab1,
message(50) TYPE c,
END OF itab1.
DATA: g_itab1 TYPE STANDARD TABLE OF itab1.
DATA: wa_itab1 TYPE itab1.
ncomp = 1.
rcount = 0.
TYPES: tabname LIKE dcobjdef-name,
fieldname LIKE dcobjdef-name.
PARAMETER: p_tablen TYPE tabname. "Input table field
DATA: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE dntab.
DATA: END OF itab.
FIELD-SYMBOLS : <f_fs> TYPE table,
<f_fs2> TYPE ANY,
<f_fs3> TYPE ANY,
<f_fs4> TYPE ANY.
REFRESH itab.
CALL FUNCTION 'NAMETAB_GET' "Fetches the fields
EXPORTING
langu = sy-langu
tabname = p_tablen
TABLES
nametab = itab
EXCEPTIONS
no_texts_found = 1.
LOOP AT itab .
ls_alv_cat-fieldname = itab-fieldname.
ls_alv_cat-ref_table = p_tablen.
ls_alv_cat-ref_field = itab-fieldname.
ls_alv_cat-seltext = itab-fieldtext.
ls_alv_cat-reptext = itab-fieldtext.
APPEND ls_alv_cat TO i_alv_cat.
fcount = fcount + 1.
ENDLOOP.
WRITE:/ fcount.
WRITE: ' number of column'.
internal table build
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_alv_cat
IMPORTING
ep_table = d_ref.
ASSIGN d_ref->* TO <f_fs>. " Dynamic table creation with fields of the
*table
DATA: l_field TYPE fieldname,
l_field1 TYPE fieldname.
SELECT * FROM (p_tablen) INTO CORRESPONDING FIELDS OF TABLE <f_fs>.
"Fetching of the data from the table
rcount = 0.
LOOP AT <f_fs> ASSIGNING <f_fs2>.
rcount = rcount + 1.
DO fcount TIMES.
"Here u can check the validations and process
ASSIGN COMPONENT ncomp OF STRUCTURE <f_fs2> TO <f_fs4>.
IF NOT <f_fs4> IS INITIAL.
MOVE <f_fs4> TO l_field1.
ncomp = ncomp + 1.
ELSE.
CONCATENATE 'IN ROW' rcount 'COLUMN' ncomp 'IS BLANK' INTO wa_itab1.
APPEND wa_itab1 TO g_itab1.
ncomp = ncomp + 1.
ENDIF.
ENDDO.
CLEAR:ncomp.
ENDLOOP.
LOOP AT g_itab1 INTO wa_itab1.
WRITE:/ wa_itab1 'is blank'.
ENDLOOP.
regards
Kannaiah

Similar Messages

  • Fields missing in SM30 after adding new fields to the table

    Hi ABAPers,
    I added a new field & marked another field as primary key in the table. Then I generated the table maintenance view for the table in SE55 and adjusted Database utility SE14.
    When i saw the table in SM30. The number of fields in the overview screen of SM30 shows less field then existing in table. i.e in my table i have 10 fields(3 primary). in SM30 it shows only 5 fields(3 primary + 2 normal fields)
    In SE51, the overview screen of the table show less fields in the field list..
    I want all the fields in the Table maintenance overview screen. Please suggest me a way forward friends..
    Note: the system is 4.0B.
    Thanks...Suresh Kumar

    Hi
    You have to re-generate your dialog for SM30 by table maitenance generator.
    - From Se11 go to table maitenance generator
    - Choose update icon
    - Set flags for NEW FIELD
    - Go to expert
    - Set flag to re-generate dynpro
    Message was edited by: max bianchi

  • Search Help on Table Control - Fill more than one field in the table?

    Hey everyone,
    I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table...  The internal table has the line type of a structure I've defined in the data dictionary.  Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)...  I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
    The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table.  Is this a limitation of using search helps within table controls?
    I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help.  Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
    For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
    Thanks,
    Dallas

    Hi Dallas,
    (1)
    What  i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
    if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
    if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
    (2)
    usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
    (3)
    as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
    Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
    Regards
    Byju

  • How to control the number of fields in the Advanced mode in af:query

    Hi,
    How to control the number of fields in the Advanced mode in <af:query>?
    Say i have 20 fields in my table and i created a view criteria with 2 fields. It would work perfectly in Basic mode. But in the Advanced mode all other fields selection is possible on clicking the ADD Fields button. I did not want the client to make a search with all 20 fields. Only 10 fields are to be listed in the Advanced Mode even though there are 20 fields in my table.
    How do i control the list of fields in ADDFields button?
    Any ideas?
    KR

    You can uncheck the Querable property of the attributes which you need not show up in the Advanced Mode (but they will not show up in other modes too !) or programatically set the same as mentioned here -
    http://adfcodebits.blogspot.com/2010/11/bit-27-setting-view-object-attributes.htmlAlso you can hide the AddFields button as suggested here - http://www.notjustjava.com/2011/12/cool-tips-to-showhide-components-of-the-query-control-of-adf/

  • Drop down in the selection for the field from the table

    Hi.
    i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
    please tell me how to use the function module and what could be the line of codes.
    the drop down is for the select option on the slection screen of the classical report.
    please help .

    HI,
    Check below code..it may help you.
    REPORT Zbunu .
    TYPES :BEGIN OF STR ,
           MATNR TYPE MATNR ,
           END OF STR .
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
           VAR TYPE MARA-MATNR .
    PARAMETERS : S_MATNR TYPE MATNR ,
                  P_MATNR TYPE MATNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
    SELECT MATNR FROM MARA INTO
    CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_MATNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = 'X'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      tables
        value_tab              = ITAB
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Ansumesh

  • Folio number not updated in the table RG23D

    Hi all,
    Folio number not updated in the table RG23D when I create depot excise invoice using batch program J_1IJCHK. Can any one help me by providing rootcause and solution.
    Thanks in advance.
    Regards
    Balaji

    See can i know in which version u r working,Because if u r in 4.6c there will be some problem.Some patches will be there.
    Try this program i have send and assign excise duty
    REPORT YJ_1IJCHK MESSAGE-ID 8I.
    TABLES :  J_1IEXCHDR,                  "excise header
              J_1IEXCDTL,                  "excise detail
              J_1IRG23D ,                  "RG23D register
              J_1IWRKCUS,                  "Plant level customisation
              J_1IREGSET,                  "register set customisation
              J_1IEXCDEF,                  "Tax default information
              VBFA,                        "sales document flow
              LIKP,                        "delivery header
              LIPS,                        "delivery detail
              T005,                        "country information
              KUAGV,                       "sold-to-party information
              KUWEV,                       "ship-to-party information
              KNA1,                        "customer master
              VBPA,                        "sales document partner
              TVKO,                        "sales organisation to company co
              VBUK,                        "delivery information
              MAKT,                        "material description
              T001.                        "company code
    selection-screen begin of block delivery_details no intervals.
    PARAMETERS: FCODE    TYPE C,
                DELIVERY LIKE LIPS-VBELN,
                EXCGROUP LIKE J_1IEXCHDR-EXGRP,
                SERGROUP LIKE J_1IEXCHDR-SRGRP.
    TYPES : BEGIN OF RG23D.
            INCLUDE STRUCTURE J_1IRG23D.
    TYPES:  MENGR LIKE J_1IEXCDTL-MENGR,           "remaining quantity
            MENGA LIKE J_1IEXCDTL-MENGA,           "quantity actually rec
            ADDBED LIKE J_1IEXCDTL-ADDBED,
            ADDSED LIKE J_1IEXCDTL-ADDSED,
            ADDAED LIKE J_1IEXCDTL-ADDAED,
            END OF RG23D.
    DATA : BEGIN OF J1IJ300,
            BUKRS   LIKE TVKO-BUKRS,
            WERKS   LIKE LIPS-WERKS,
            REGID   LIKE J_1IREGSET-J_1IREGID,
            WAERS   LIKE T001-WAERS,
            SHIPFROM_IND TYPE C,                          " Added 10/12/1998
            RG23D_SERIALNO TYPE C,                        " Added 10/12/1998
         END OF J1IJ300.
    DATA :  TRNTYP(4)   TYPE C,
            CONDT-NAME(3) TYPE C,
            TOTAL_LRG23D   LIKE LIPS-LFIMG,
            ALLOC_LRG23D   LIKE LIPS-LFIMG,
            SHIPFROM_IND   LIKE J_1IEXCHDR-STATUS,
            RG23D_SERIALNO LIKE J_1IEXCHDR-STATUS.
    DATA : BEGIN OF XLIPS OCCURS 10,
    internal table to store the delivery item information
             VBELN LIKE LIPS-VBELN,
             POSNR LIKE LIPS-POSNR,
             MATNR LIKE LIPS-MATNR,
             MAKTX LIKE MAKT-MAKTX,
             WERKS LIKE LIPS-WERKS,
             LGORT LIKE LIPS-LGORT,
             CHARG LIKE LIPS-CHARG,
             LFIMG LIKE LIPS-LFIMG,
             MEINS LIKE LIPS-MEINS,
             BED   LIKE J_1IRG23D-EXBED,
             SED   LIKE J_1IRG23D-EXSED,
             AED   LIKE J_1IRG23D-EXAED,
             CUR   LIKE J_1IRG23D-EXCUR,
             SELFLAG TYPE C ,              "T=excise invoice selected
             INDEX LIKE SY-TABIX,          "index in the table
             FLG TYPE C.                   "item selection
    DATA : END OF XLIPS.
    DATA : CRG23D TYPE RG23D OCCURS 30 WITH HEADER LINE.
    contains all rg23d entries for the document
    DATA : LRG23D TYPE RG23D OCCURS 30 WITH HEADER LINE.
    contains item rg23d entries
    DATA : BEGIN OF Z_1IRG23D OCCURS 30.
    stores the data to be updated
            INCLUDE STRUCTURE J_1IRG23D.
    DATA : END OF Z_1IRG23D.
    DATA : BEGIN OF EXCINV OCCURS 30.
    factory inovoics selected for item
            INCLUDE STRUCTURE J_1IEXCDTL.
    DATA : END OF EXCINV.
    DATA : BEGIN OF ASSIGNED_EXCINV OCCURS 30.
            INCLUDE STRUCTURE J_1IEXCDTL.
    DATA : END OF ASSIGNED_EXCINV.
    DATA : A_INDEX LIKE SYST-TABIX.
    DATA : BEGIN OF LOCK_TABLE OCCURS 10,
    table containing plant-material combination and status of the lock
              WERKS  LIKE J_1IEXCDTL-WERKS,
              MATNR  LIKE J_1IEXCDTL-MATNR,
              STATUS TYPE C,                   "LOCKED/UNLOCKED
           END OF LOCK_TABLE.
    DATA : BEGIN OF LOCKTAB OCCURS 0,
               TRNTYP LIKE J_1IEXCDTL-TRNTYP,
               DOCNO  LIKE J_1IEXCDTL-DOCNO,
               DOCYR LIKE  J_1IEXCDTL-DOCYR,
               ZEILE LIKE  J_1IEXCDTL-ZEILE,
            END OF LOCKTAB.
    DATA :
          CRG23D-CTR  TYPE I,              "Line count of crg23d table
          SHIPFROM    LIKE J_1IRG23D-SHIPFROM,
          FOLIO       LIKE J_1IRG23D-FOLIO,
          SERIALNO    LIKE J_1IRG23D-SERIALNO,
          DEPEXNUM    LIKE J_1IRG23D-DEPEXNUM,
          DEPEXYEAR   LIKE J_1IRG23D-DEPEXYEAR.
    CONSTANTS :
       BED       LIKE CONDT-NAME VALUE 'BED',
       AED       LIKE CONDT-NAME VALUE 'AED',
       SED       LIKE CONDT-NAME VALUE 'SED',
       CES       LIKE CONDT-NAME VALUE 'CES',
       LOCKED    TYPE C          VALUE '1',
       UNLOCKED  TYPE C          VALUE '2'.
    AT SELECTION-SCREEN.
       PERFORM CHECK_VBELN_INPUT.
    IF     FCODE = 'S'.
           PERFORM DELIVERY_START_USER_EXIT.
           PERFORM READ_DELIVERY_HEADER.
           PERFORM GET_COMP_CODE.
           PERFORM READ_CUSTOMISATION.
           PERFORM GET_ITEM_INFO.
           PERFORM LOCKING.
           PERFORM RG23D_SELECTION.
           PERFORM SAVE_DOCUMENT.
           MESSAGE I000 WITH 'Selection Complete for Delivery ' DELIVERY.
    ELSEIF FCODE = 'V'.
           PERFORM GET_COMP_CODE.
           PERFORM READ_CUSTOMISATION.
           PERFORM GET_ITEM_INFO.
           PERFORM LOCKING.
           PERFORM UPDATE_DOCUMENT.
           MESSAGE I000 WITH 'Verfiy/Post Complete for Delivery ' DELIVERY.
    ENDIF.
    FORM CHECK_VBELN_INPUT.
    Validate Function Code
       IF NOT ( FCODE = 'S' OR FCODE = 'V' ).
         MESSAGE E000 WITH 'Valid Functions are S/V - Select/Verify Post'.
       ENDIF.
      IF DELIVERY IS INITIAL.
         MESSAGE E000 WITH 'Delivery number cannot be initial'.
      ENDIF.
    check if goods issue done for the delivery
        SELECT SINGLE WBSTK INTO VBUK-WBSTK
            FROM  VBUK
            WHERE VBELN = DELIVERY.
        IF  SY-SUBRC = 0.
            IF VBUK-WBSTK <> 'C' AND FCODE = 'V'.
               MESSAGE W339 WITH DELIVERY.
            ENDIF.
        ELSE.
               MESSAGE E000 WITH 'Invalid Delivery'.
        ENDIF.
    if in select mode check if excise invoice already selected for delive
        SELECT SINGLE * FROM J_1IRG23D
            WHERE VBELN = DELIVERY.
        IF     FCODE = 'S'.
               IF SY-SUBRC = 0.
                  MESSAGE E325 WITH DELIVERY.
               ENDIF.
        ELSEIF FCODE = 'V'.
               IF     SY-SUBRC NE 0.
                      MESSAGE E000 WITH 'Selection not over for ' DELIVERY.
               ELSEIF J_1IRG23D-STATUS = 'P'.
                      MESSAGE E000 WITH 'Record Already Posted '.
               ENDIF.
        ENDIF.
      CLEAR J_1IRG23D.
    ENDFORM.                    " CHECK_VBELN_INPUT
    FORM READ_DELIVERY_HEADER.
      SELECT SINGLE * FROM LIKP
        WHERE VBELN = DELIVERY.
    get the sold-to-party
      CLEAR: KUAGV, KUWEV.
      SELECT SINGLE KUNNR NAME1 LAND1
              FROM KNA1 INTO (KUAGV-KUNNR,KUAGV-NAME1,KUAGV-LAND1)
         WHERE KUNNR = LIKP-KUNAG.
    get the ship-to-party
      SELECT SINGLE KUNNR LAND1 NAME1
              FROM KNA1 INTO (KUWEV-KUNNR,KUWEV-LAND1,KUWEV-NAME1)
          WHERE KUNNR = LIKP-KUNNR.
    ENDFORM.                    " READ_DELIVERY_HEADER
    FORM GET_COMP_CODE.
    get the company code of the document from the sales organisation
      CLEAR TVKO-BUKRS.
      SELECT SINGLE BUKRS FROM TVKO INTO TVKO-BUKRS
        WHERE VKORG = LIKP-VKORG.
      J1IJ300-BUKRS = TVKO-BUKRS.
      SELECT SINGLE WAERS FROM T001 INTO J1IJ300-WAERS
        WHERE BUKRS = J1IJ300-BUKRS.
    ENDFORM.                    " GET_COMP_CODE
    FORM READ_CUSTOMISATION.
      SELECT SINGLE WERKS INTO J1IJ300-WERKS
           FROM   LIPS
           WHERE  VBELN = DELIVERY.
    Plant level customisation
      SELECT SINGLE * FROM  J_1IWRKCUS
             WHERE  J_1IWERKS   = J1IJ300-WERKS .
      IF SY-SUBRC <> 0.
        MESSAGE E303 WITH 'plant' J1IJ300-WERKS 'J_1IWRKCUS'.
      ENDIF.
      IF J_1IWRKCUS-J_1IDEPOT IS INITIAL.
    plant is defined as factory
        MESSAGE E322 WITH J1IJ300-WERKS.
      ENDIF.
      J1IJ300-REGID = J_1IWRKCUS-J_1IREGID.
      TRNTYP = 'DLDO'.
      SELECT SINGLE * FROM J_1IREGSET
           WHERE J_1IREGID = J1IJ300-REGID.
      IF SY-SUBRC <> 0.
        MESSAGE E303 WITH 'Register id' J1IJ300-REGID 'J_1IREGSET'.
      ENDIF.
    ENDFORM.                    " READ_CUSTOMISATION
    *&      Form  GET_ITEM_INFO
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GET_ITEM_INFO.
      REFRESH : CRG23D, LRG23D, EXCINV, XLIPS.
      PERFORM READ_DELIVERY_ITEM.
    ENDFORM.                    " GET_ITEM_INFO
    *&      Form  READ_DELIVERY_ITEM
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM READ_DELIVERY_ITEM.
      DATA : CNT LIKE SY-TABIX.
      CLEAR CNT.
      REFRESH XLIPS.
      SELECT * FROM LIPS
         WHERE VBELN = DELIVERY.
    read the delivery item
    perform plant checking only if in create mode
          IF LIPS-WERKS <> J1IJ300-WERKS.
    plant is different from that of the first item
            SELECT SINGLE J_1IREGID INTO J_1IWRKCUS-J_1IREGID
                 FROM   J_1IWRKCUS
                 WHERE  J_1IWERKS = LIPS-WERKS.
            IF SY-SUBRC <> 0.
              MESSAGE E303 WITH 'plant' LIPS-WERKS 'J_1IWRKCUS'.
            ENDIF.
            IF J_1IWRKCUS-J_1IREGID <> J1IJ300-REGID.
    register id of the two plants are different
              MESSAGE E338 WITH DELIVERY.
            ENDIF.
          ENDIF.
        CLEAR XLIPS.
    store the item details
        XLIPS-VBELN = LIPS-VBELN.
        XLIPS-POSNR = LIPS-POSNR.
        XLIPS-MATNR = LIPS-MATNR.
        PERFORM GET_MATERIAL_DESC
              USING XLIPS-MATNR
                    XLIPS-MAKTX.
       XLIPS-WERKS = LIPS-WERKS.
       XLIPS-LGORT = LIPS-LGORT.
       XLIPS-CHARG = LIPS-CHARG.
       XLIPS-LFIMG = LIPS-LFIMG.
       XLIPS-MEINS = LIPS-VRKME.                           "changed 2.3.98
       CLEAR : XLIPS-BED, XLIPS-SED, XLIPS-AED.
       XLIPS-CUR = J1IJ300-BUKRS.
       CNT = CNT + 1.
       XLIPS-INDEX = CNT.
       XLIPS-SELFLAG = 'F'.
       APPEND XLIPS.
    ENDSELECT.
    ENDFORM.                    " READ_DELIVERY_ITEM
    *&      Form  GET_MATERIAL_DESC
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GET_MATERIAL_DESC USING MATNR MAKTX.
      SELECT SINGLE MAKTX FROM  MAKT INTO MAKTX
             WHERE  MATNR       = MATNR
             AND    SPRAS       = 'E'            .
    ENDFORM.                               " GET_MATERIAL_DESC
    *&      Form  LOCKING
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM LOCKING.
    REFRESH LOCK_TABLE.
    LOOP AT XLIPS.
      LOCK_TABLE-WERKS  = XLIPS-WERKS.
      LOCK_TABLE-MATNR  = XLIPS-MATNR.
      LOCK_TABLE-STATUS = UNLOCKED.
      COLLECT LOCK_TABLE.
    ENDLOOP.
    PERFORM LOCK_UNLOCK_PLANT_MATERIAL USING LOCKED.
      SELECT TRNTYP DOCNO DOCYR ZEILE INTO
          (LOCKTAB-TRNTYP,
          LOCKTAB-DOCNO,LOCKTAB-DOCYR,
          LOCKTAB-ZEILE)
                              FROM   J_1IEXCDTL
                          WHERE TRNTYP = 'GRPO'
                          AND  WERKS = XLIPS-WERKS
                          AND  LGORT = XLIPS-LGORT
                          AND  MATNR = XLIPS-MATNR
                          AND  CHARG = XLIPS-CHARG.
        APPEND LOCKTAB.
      ENDSELECT.
    *share lock for all excise invoices
      LOOP AT LOCKTAB.
        CALL FUNCTION 'ENQUEUE_EJ_1IEXDTL'
             EXPORTING
                  MODE_J_1IEXCDTL = 'S'
                  MANDT           = SY-MANDT
                  TRNTYP          = LOCKTAB-TRNTYP
                  DOCYR           = LOCKTAB-DOCYR
                  DOCNO           = LOCKTAB-DOCNO
                  ZEILE           = LOCKTAB-ZEILE
             EXCEPTIONS
                  FOREIGN_LOCK    = 1
                  SYSTEM_FAILURE  = 2
                  OTHERS          = 3.
      ENDLOOP.
    ENDFORM.                    " LOCKING
    *&      Form  LOCK_UNLOCK_PLANT_MATERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM LOCK_UNLOCK_PLANT_MATERIAL USING ACTION.
      DATA: __UNAME  LIKE SY-UNAME,
            __OBJECT LIKE DD25V-VIEWNAME.
      DATA : BEGIN OF LOCK_STRUCT,
               GRANNAME(10)   VALUE 'J1IJ',
               ENQMODE        VALUE 'E',
               MANDT          LIKE  SY-MANDT,
               WERKS          LIKE  J_1IEXCDTL-WERKS,
               MATNR          LIKE  J_1IEXCDTL-MATNR,
            END OF LOCK_STRUCT.
      LOCK_STRUCT-MANDT = SY-MANDT.
      LOOP AT LOCK_TABLE WHERE STATUS <> ACTION.
    perform the locking/unlocking operation only for the items for which
    it is not already done
        LOCK_STRUCT-WERKS = LOCK_TABLE-WERKS.
        LOCK_STRUCT-MATNR = LOCK_TABLE-MATNR.
       CALL 'C_ENQUEUE'
         ID 'OPCODE'           FIELD ACTION
         ID 'ENQOBJ'           FIELD 'J_1IJ'
         ID '01'               FIELD LOCK_STRUCT
         ID 'COLLISION_UNAME'  FIELD __UNAME
         ID 'COLLISION_OBJECT' FIELD __OBJECT.
       CASE SY-SUBRC.
         WHEN 0.
           LOCK_TABLE-STATUS = ACTION.
           MODIFY LOCK_TABLE.
         WHEN 2.
           MESSAGE E341 WITH LOCK_TABLE-WERKS LOCK_TABLE-MATNR  __UNAME.
         WHEN OTHERS.
           IF ACTION = LOCKED.
             MESSAGE E342 WITH 'locking'
                               LOCK_TABLE-WERKS LOCK_TABLE-MATNR.
           ELSE.
             MESSAGE E342 WITH 'unlocking'
                               LOCK_TABLE-WERKS LOCK_TABLE-MATNR.
           ENDIF.
       ENDCASE.
      ENDLOOP.
    ENDFORM.                    " LOCK_UNLOCK_PLANT_MATERIAL
    *&      Form  RG23D_SELECTION
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM RG23D_SELECTION.
    REFRESH CRG23D.
    REFRESH ASSIGNED_EXCINV.
    LOOP AT XLIPS.
    *write: / xlips-vbeln,xlips-posnr,xlips-matnr, xlips-meins, xlips-lfimg.
    REFRESH EXCINV.
    CALL FUNCTION 'J_1I6_SELECT_EXCISE_INVOICE_DE'
         EXPORTING
             BUKRS        = J1IJ300-BUKRS
             CHARG        = XLIPS-CHARG
             WERKS        = XLIPS-WERKS
             EXGRP        = EXCGROUP
             MATNR        = XLIPS-MATNR
             QTY_CHECK    = 'X'
             MULTI        = 'X'
             NO_DAY_CHECK = 'X'
             SHIPFROM     = SHIPFROM
             LGORT        = XLIPS-LGORT
         TABLES
              EXC_TAB     = EXCINV
         EXCEPTIONS
              OTHERS       = 1.
         TOTAL_LRG23D = 0.
         ALLOC_LRG23D = 0.
         SORT EXCINV BY DOCYR DOCNO .
         LOOP AT ASSIGNED_EXCINV.
            READ TABLE EXCINV WITH KEY DOCYR = ASSIGNED_EXCINV-DOCYR
                                     DOCNO = ASSIGNED_EXCINV-DOCNO
                                     ZEILE = ASSIGNED_EXCINV-ZEILE
                                     BINARY SEARCH.
            IF SY-SUBRC = 0.
               A_INDEX = SY-TABIX.
               EXCINV-MENGR = EXCINV-MENGR - ASSIGNED_EXCINV-MENGR.
               MODIFY EXCINV INDEX A_INDEX .
            ENDIF.
         ENDLOOP.
         DELETE EXCINV WHERE MENGR = 0.
    total_lrg23d = total balance quantity in the selected excise invoices
    alloc_lrg23d = Quantity allocated to a delivery line item,
    Allocation continues till
      - We have balance quantity in excise invoice selection
      - Till total delivery quantity is allocated
        LOOP AT EXCINV.
      To Force the same shipfrom for all the excise invoices
      Shipfrom Ind can be determined in the start user-exit
        IF  J1IJ300-SHIPFROM_IND = 'Y'.
            IF  XLIPS-INDEX = 1 AND SY-TABIX = 1.
                SHIPFROM = EXCINV-SHIPFROM.
            ENDIF.
            IF SHIPFROM NE EXCINV-SHIPFROM.
               EXCINV-RIND3 = 'X'.
               MODIFY EXCINV.
               CONTINUE.
            ENDIF.
        ENDIF.
      Allocation
        IF XLIPS-LFIMG NE ALLOC_LRG23D.
            TOTAL_LRG23D = TOTAL_LRG23D + EXCINV-MENGR.
            IF XLIPS-LFIMG > TOTAL_LRG23D.
               ALLOC_LRG23D = ALLOC_LRG23D + EXCINV-MENGR.
            ELSE.
               EXCINV-MENGR = XLIPS-LFIMG - ALLOC_LRG23D.
               ALLOC_LRG23D = ALLOC_LRG23D + EXCINV-MENGR.
            ENDIF.
        ELSE.
               EXCINV-RIND3 = 'X'.
         ENDIF.
         MODIFY EXCINV.
         ENDLOOP.
         DELETE EXCINV WHERE RIND3 = 'X'.
         LOOP AT EXCINV.
            MOVE-CORRESPONDING EXCINV TO ASSIGNED_EXCINV.
            APPEND ASSIGNED_EXCINV.
            CLEAR ASSIGNED_EXCINV.
         ENDLOOP.
         IF TOTAL_LRG23D < XLIPS-LFIMG.
            MESSAGE E000 WITH 'Not enough balance in RG23D ......'.
        ENDIF.
    Collect all allocated excise invoices to crg23d table
      LOOP AT EXCINV.
        PERFORM FILL_CRG23D.
        APPEND CRG23D.
      ENDLOOP.
    ENDLOOP.
    ENDFORM.                    " RG23D_SELECTION
    *&      Form  SAVE_DOCUMENT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM SAVE_DOCUMENT.
          PERFORM PREPARE_RG23D_DATA.
    Generate RG23D serial number and Excise Invoice Serial Number
       IF J1IJ300-RG23D_SERIALNO = 'Y'.
       PERFORM GENERATE_RG23D_SERIAL ON COMMIT.
       ENDIF.
       PERFORM GENERATE_EXCISE_INV_SERIAL ON COMMIT.
         CALL FUNCTION 'J_1I7_USEREXIT_DEPOT_BEF_SAVE'
              TABLES
                   RG23D   = Z_1IRG23D
              EXCEPTIONS
                   OTHERS  = 1.
         PERFORM UPDATE_RG23D ON COMMIT.
         PERFORM UPDATE_EXCDTL ON COMMIT.
         COMMIT WORK.
        PERFORM LOCK_UNLOCK_PLANT_MATERIAL USING UNLOCKED.
         PERFORM UNLOCKING.
         MESSAGE S333 WITH DELIVERY.
    ENDFORM.                    " SAVE_DOCUMENT
    *&      Form  PREPARE_RG23D_DATA
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM PREPARE_RG23D_DATA.
      REFRESH Z_1IRG23D.
      LOOP AT CRG23D WHERE MENGE <> 0.
        CLEAR Z_1IRG23D.
        Z_1IRG23D = CRG23D.
        Z_1IRG23D-USNAM = SY-UNAME.
        Z_1IRG23D-CPUDT = SY-DATUM.
        Z_1IRG23D-EXGRP    = EXCGROUP.
        Z_1IRG23D-SRGRP    = SERGROUP.
        APPEND Z_1IRG23D.
        IF CRG23D-ADDAED <> 0 OR CRG23D-ADDSED <> 0 OR CRG23D-ADDAED <> 0 .
    additional excise is applicable
    make quantity zero for A certificate entries
          CLEAR : Z_1IRG23D-MENGE.
    get all the A certificates for the excise document item
          SELECT * FROM J_1IEXCDTL
    TODO : add the transaction type to the selection procedure
                 WHERE RDOC1    = CRG23D-DOCNO
                 AND   RYEAR1   = CRG23D-DOCYR
                 AND   RITEM1   = CRG23D-ZEILE
                 AND   RIND1    = 'G'.
    get the A certificate number
            SELECT SINGLE
                   EXNUM EXYEAR INTO (Z_1IRG23D-EXNUM, Z_1IRG23D-EXYEAR)
                   FROM  J_1IEXCHDR
                   WHERE  TRNTYP = J_1IEXCDTL-TRNTYP
                   AND    DOCYR  = J_1IEXCDTL-DOCYR
                   AND    DOCNO  = J_1IEXCDTL-DOCNO.
            Z_1IRG23D-TRNTYP = J_1IEXCDTL-TRNTYP.
            Z_1IRG23D-DOCYR  = J_1IEXCDTL-DOCYR.
            Z_1IRG23D-DOCNO  = J_1IEXCDTL-DOCNO.
            Z_1IRG23D-ZEILE  = J_1IEXCDTL-ZEILE.
            Z_1IRG23D-EXBED  = ( J_1IEXCDTL-EXBED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-EXSED  = ( J_1IEXCDTL-EXSED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-EXAED  = ( J_1IEXCDTL-EXAED * CRG23D-MENGE )
                                          / CRG23D-MENGA.
            Z_1IRG23D-RG23ASER = J_1IEXCDTL-RG23ASER.
            Z_1IRG23D-RG23CSER = J_1IEXCDTL-RG23CSER.
            Z_1IRG23D-RGPLASER = J_1IEXCDTL-RGPLASER.
            APPEND Z_1IRG23D.
          ENDSELECT.
        ENDIF.
    ENDLOOP.
    ENDFORM.                    " PREPARE_RG23D_DATA
    *&      Form  UPDATE_RG23D
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_RG23D.
    *update the rg23d register
      INSERT J_1IRG23D FROM TABLE Z_1IRG23D ACCEPTING DUPLICATE KEYS.
      IF SY-SUBRC <> 0.
        MESSAGE A308 WITH 'J_1IRG23D'.
      ENDIF.
    ENDFORM.                    " UPDATE_RG23D
    *&      Form  UPDATE_EXCDTL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_EXCDTL.
      LOOP AT CRG23D WHERE MENGE <> 0.
    update the remaining quantity in the excise invoice item tables
        UPDATE J_1IEXCDTL
           SET      MENGR   = MENGR - CRG23D-MENGE
                    AENAM   = SY-UNAME
                    AEDAT   = SY-DATUM
           WHERE    TRNTYP  = 'GRPO'
             AND    DOCYR   = CRG23D-DOCYR
             AND    DOCNO   = CRG23D-DOCNO
             AND    ZEILE   = CRG23D-ZEILE.
        IF SY-SUBRC <> 0.
          MESSAGE A308 WITH 'J_1IRG23D'.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_EXCDTL
    *&      Form  FILL_CRG23D
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM FILL_CRG23D.
      CRG23D-TRNTYP   = EXCINV-TRNTYP.
      CRG23D-DOCYR    = EXCINV-DOCYR.
      CRG23D-DOCNO    = EXCINV-DOCNO.
      CRG23D-ZEILE    = EXCINV-ZEILE.
      CRG23D-VBELN    = XLIPS-VBELN.
      CRG23D-POSNR    = XLIPS-POSNR.
      CRG23D-EXNUM    = EXCINV-EXNUM.
      CRG23D-EXYEAR   = EXCINV-EXYEAR.
      CRG23D-LIFNR    = EXCINV-LIFNR.
      CRG23D-MATNR    = EXCINV-MATNR.
      CRG23D-MAKTX    = EXCINV-MAKTX.
      CRG23D-CHAPID   = EXCINV-CHAPID.
      CRG23D-MEINS    = EXCINV-MENGR_UOM.
      CRG23D-WERKS    = EXCINV-WERKS.
      CRG23D-EXCUR    = EXCINV-EXCUR.
      CRG23D-RG23ASER = EXCINV-RG23ASER.
      CRG23D-RG23CSER = EXCINV-RG23CSER.
      CRG23D-RGPLASER = EXCINV-RGPLASER.
      CRG23D-MENGR    = EXCINV-MENGR.
      CRG23D-MENGA    = EXCINV-MENGA.
      CRG23D-MENGE    = EXCINV-MENGR.            " Move the allocated Qty
      CRG23D-EXBED    = ( EXCINV-EXBED  * CRG23D-MENGE ) / EXCINV-MENGA.
      CRG23D-EXSED    = ( EXCINV-EXSED  * CRG23D-MENGE ) / EXCINV-MENGA.
      CRG23D-EXAED    = ( EXCINV-EXAED  * CRG23D-MENGE ) / EXCINV-MENGA.
    ENDFORM.                    " FILL_CRG23D
    *&      Form  UPDATE_DOCUMENT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM UPDATE_DOCUMENT.
    LOOP AT XLIPS.
      UPDATE J_1IRG23D SET STATUS = 'P'
      WHERE  VBELN       = XLIPS-VBELN
      AND    POSNR       = XLIPS-POSNR.
    ENDLOOP.
    COMMIT WORK.
    ENDFORM.                    " UPDATE_DOCUMENT
    *&      Form  DELIVERY_START_USER_EXIT
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM DELIVERY_START_USER_EXIT.
    CALL FUNCTION 'J_1I7_USEREXIT_EXGRP_DETERM'
         EXPORTING
              EXCGRP         = EXCGROUP
            MBLNR          =
            MJAHR          =
            VENDOR         =
              VBELN          = DELIVERY
         IMPORTING
              EXCGRP         = EXCGROUP
              SHIPFROM_IND   = J1IJ300-SHIPFROM_IND
              RG23D_SERIALNO = J1IJ300-RG23D_SERIALNO
         EXCEPTIONS
              OTHERS         = 1.
    CALL FUNCTION 'J_1I7_USEREXIT_SERGRP_DETERM'
         EXPORTING
              SRGRP          = SERGROUP
            MBLNR          =
            MJAHR          =
              VBELN          = DELIVERY
         IMPORTING
              SRGRP          = SERGROUP
         EXCEPTIONS
              OTHERS         = 1.
    ENDFORM.                    " DELIVERY_START_USER_EXIT
    *&      Form  GENERATE_RG23D_SERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GENERATE_RG23D_SERIAL.
      LOOP AT Z_1IRG23D WHERE MENGE <> 0.
      CLEAR: FOLIO, SERIALNO.
      SELECT MAX( FOLIO ) MAX( SERIALNO )
      INTO   (Z_1IRG23D-FOLIO, Z_1IRG23D-SERIALNO)
      FROM   J_1IRG23D
      WHERE  TRNTYP = Z_1IRG23D-TRNTYP
      AND    DOCNO  = Z_1IRG23D-DOCNO
      AND    DOCYR  = Z_1IRG23D-DOCYR
      AND    ZEILE  = Z_1IRG23D-ZEILE.
      MODIFY Z_1IRG23D.
      ENDLOOP.
    ENDFORM.                    " GENERATE_RG23D_SERIAL
    *&      Form  GENERATE_EXCISE_INV_SERIAL
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM GENERATE_EXCISE_INV_SERIAL.
      CLEAR: DEPEXNUM, DEPEXYEAR.
    CALL FUNCTION 'J_1I6_DETERMINE_EXC_YEAR'
         EXPORTING
              I_BUKRS      = J1IJ300-BUKRS
         IMPORTING
              EXCISE_YEAR  = DEPEXYEAR
         EXCEPTIONS
              MISS_COMPANY = 1
              OTHERS       = 2.
      IF SY-SUBRC NE 0.
        MESSAGE E526 WITH 'Company ' J1IJ300-BUKRS.
      ENDIF.
      CALL FUNCTION 'NUMBER_GET_NEXT'
           EXPORTING
                NR_RANGE_NR             = '01'
                OBJECT                  = 'J_1IDEPINV'
                QUANTITY                = '1'
                SUBOBJECT               = SERGROUP
                TOYEAR                  = DEPEXYEAR
           IMPORTING
                NUMBER                  = DEPEXNUM
           EXCEPTIONS
                INTERVAL_NOT_FOUND      = 1
                NUMBER_RANGE_NOT_INTERN = 2
                OBJECT_NOT_FOUND        = 3
                QUANTITY_IS_0           = 4
                QUANTITY_IS_NOT_1       = 5
                INTERVAL_OVERFLOW       = 6
                OTHERS                  = 7.
      CASE SY-SUBRC.
        WHEN 0.
        WHEN 1.
          MESSAGE A336 WITH 'internal document' ': Interval not found'
                            '. Number object : J_1IDEPINV'.
        WHEN 3.
          MESSAGE A336 WITH 'internal document' ': Object not found'
                            '. Number object : J_1IDEPINV'.
        WHEN OTHERS.
          MESSAGE A336 WITH 'internal document'
                            '. Number object : J_1IDEPINV'.
      ENDCASE.
    Update Depot Excise Invoice Year and Number in the table
      LOOP AT Z_1IRG23D.
        Z_1IRG23D-SERIALNO  = Z_1IRG23D-SERIALNO + 1.
        Z_1IRG23D-DEPEXYEAR = DEPEXYEAR.
        Z_1IRG23D-DEPEXNUM  = DEPEXNUM.
        MODIFY Z_1IRG23D.
      ENDLOOP.
    ENDFORM.                    " GENERATE_EXCISE_INV_SERIAL
    *&      Form  UNLOCKING
          text
    -->  p1        text
    <--  p2        text
    FORM UNLOCKING.
      LOOP AT LOCKTAB.
        CALL FUNCTION 'DEQUEUE_EJ_1IEXDTL'
             EXPORTING
                  MODE_J_1IEXCDTL = 'S'
                  MANDT           = SY-MANDT
                  TRNTYP          = LOCKTAB-TRNTYP
                  DOCYR           = LOCKTAB-DOCYR
                  DOCNO           = LOCKTAB-DOCNO
                  ZEILE           = LOCKTAB-ZEILE.
      ENDLOOP.
    ENDFORM.                    " UNLOCKING

  • Need help in Populating a Z-field in the table "MARD"

    Hi Group,
    I have a requirement like as under:
    1)
    Need to add a field in the transaction MM01/02/03 screen in the view u2018Plant data / stor. 1u2019. And this field should go into the table u2018MARDu2019 table, by appending the structure and adding this field details in it.
    2)
    Once I post a value into this field thru the transactions (MM01/MM02/MM03) , I need the value in the screen to be populated into the table u2018MARDu2019 in the Appended Structure field.
    Could you please help me out by getting a proper User Exit or BADI which fulfills the requirement?
    in Summary, please let me know a User Exit or BADI which will update the Z-field of the table 'MARD'.
    Thanks for the help in advance.
    Regards,
    Vishnu.

    please  check , it might help you.
    How to add fields to MM01 Transaction
    How to add a new field in MM01 with CONCEPT as a field?
    How to add a new field in MM01, with say contaminent  as a field?
    HI ALL, How can i add new field in mm01 basicdata1 screen
    Add button in MM01 Transaction
    i want to add the one field in mm01 application how can i add the field?
    If you dont get the answer still , please search the forum you will get many links for your requirement
    Regards
    Satish Boguda

  • Changing the attibutes of a field in the table will affect existing data

    Hi Experts,
    If I want to changne the field attribute of particular field in the table, this table whoes field is changed is used in 15 more tables.Will that affect the data in production after changing the field attributes in all the 15 tables.
    Thanks in Advance.
    Regards,
    IFF

    Hi,
    Definitely data will effect in all tables and also you have to modify all the programs which are used modified tables.
    Regards,
    Peranandam

  • Problem with displaying Date field in the table.

    Hi All,
    I am trying to display data into a table UI Element. 
    In that data, i have one DATE type field. While displaying data in DATE field, it will display like this "01.02.2009".
    Now my requirement is if i want to modify that DATE field, it will allow to modify "01.02.2009"  to "26.02.2009".
    But while modifying DATE field , I want to show the Calender of that month, in that i  have to select the another date.
    (Like normal Date UI Element will show that calender).
    Can anyone please help me.
    Thanks in Advance!
    Regards,
    Sreelakshmi.

    Hi,
          Go to the context attribute that was mapped to the DATE field of the table and change the perperty INPUT HELP MODE to  AUTOMATIC and it works.
    Regards,
    Manne.

  • Add a custom-field in the table MARC and manage it in MM01/MM02/MM03

    Good day to all of you!
    I have this task: To add a custom-field to the table MARC. This custom-field will be managed through the MM01/MM02/MM03 transaction as follows:
    In the Basic Data 1 or Basic Data 2 the custom-field data will be added. Let's say the field is MATNR OBSOLETE.
    I have searched and implemented the things in customizing: Made a copy of function group MGD1, added the field on the screen.
    MY PROBLEM! How to manage it??? When the user enters MM01/MM02/MM03 and update this field, the field should be updated in MARC.
    1. I am not sure that this custom-field should be on Basic Data1 or Basic Data2.They want it at plant level.
    2. How to manage the data transfer from SAP Standard Program and my Custom Function Group.
    PLs: Do not paste me link to sap technical site with that example, because there takes the custom fields and UPDATE a CUSTOM TABLE. I need to update MARC!
    All the documentations i have read until now tell you how to add the field, ONLY the first part of the SOLUTION.
    Any help, pls?
    Good day and thank you!

    Hi Alex,
    In which way you are trying to update that custom filed. Have you written any logic in EXITS/BADIS?
    http://pavelgk.pbworks.com/f/6729224-Implement-Screen-Exit-for-MM01-Adding-New-Fields-in-Screen.pdf
    and
    Just read the OSS note mentioned earlier.
    Symptom
    You want to integrate customer-specific fields in material master maintenance.
    Other terms
    SAPLMGMM, RMDATIND, ALE, CI_MMH1, EXIT_SAPLMGMU_001 
    Solution
    To add customer-specific fields to an existing material master table (such as MARA or MARC) , you can proceed as follows as of Release 3.0C:
          1. Use an append structure to add the fields to the required table in the Dictionary (this is not a modification; for details, see the SAP document "ABAP/4 Dictionary"). In Release 3.x, the length of the field names must be the same as  the standard five character fields. This is necessary because of dynamic assignments. As of Release 4.0A, the lengths of the field names can be longer than five characters. If the changes of the fields should be recorded in the change document and taken into account during ALE distribution, set the 'Change document-relevant' indicator for the corresponding data elements. For table MARA in Release 3.x, you must also enhance the database view MARU because the database changes are carried out using this view. This small modification is no longer necessary as of Release 4.0A because the database view MARU is enhanced automatically when you enhance table MARA or the include EMARA (which is the data part of table MARA).
          2. Enhancing online maintenance in customized material master maintenance:
          Define a subscreen with your customer-specific fields in a customer-specific function group created as a copy of the standard function group MGD1.
          In Customizing, assign this subscreen to a maintenance screen using the "Copy customized material master" function. For details, see the Implementation Guide (IMG). As of Release 4.0A, program COPYMGD1 is available. You can use this program to create customer-specific function groups as required. This program is also incorporated in the Customizing function 'Configure customized material master'. Ensure that each field of the subscreen has a field statement in the flow logic, otherwise the data is not transported correctly. You can use subscreen SAPLMGD1 2002 as an example.
          If you want these fields to be subject to standard field selection, you must add new entries for them to the central field table for material master maintenance (T130F): 
          Application examples for standard field selection:
          The field is mandatory and is to be flagged with a "?".
          The field belongs exclusively to the purchasing user department. Purchasing data and MRP data are both contained on one screen. However, the MRP controller is not to see the purchasing data.
          The following data is required for each field:
                a) Field name        (T130F-FNAME)
                b) Field selection group (T130F-FGRUP)
                Here, you should use a standard field group if the customer field is subject to the same field selection as the standard fields of the standard field group. If it is not, use a customer-specific field group.
                You must then check and, if necessary, modify the attribute of the field group using the function "Maintain field selection for data screens" in Customizing under "Logistics Basic Data -> Material Master".
                Field groups 111 through 120 that are not used in the standard system are reserved as customer-specific field groups. As of Release 3.0F, additional customer field groups are available. (For details, see the IMG).
                c) Maintenance status (T130F-PSTAT)
                List of the user departments that may maintain the field. You can display possible values by using the input help for the maintenance status field in the Customizing activity "Configure Material Master" when maintaining logical screens.
                d) Reference        (T130F-KZREF)
                This indicator must be set if the field from the reference material should be proposed during creation with reference.
    Note: You cannot yet use Customizing to enhance table T130F; you can use only transaction SE16 (Data Browser) or transaction SM31. Future releases will include a separate Customizing function for maintaining customer-specific fields. See Note 306966. By implementing this note you can add entries to table T130F within Customizing. This type of maintenance is possible as of Release 4.5B.
    You may change the entries for standard fields only with regard to the reference data and field selection group. Changing other data for standard fields constitutes a modification. Therefore, you cannot use the Customizing function "Assign Fields to Field Groups" to change this data.
    In addition, you must not add new standard fields to table T130F.
          3. If you want to maintain customer-specific fields using data transfer by direct input or via ALE distribution, proceed as follows:
          Add the fields to central field table T130F (see above).
          Add the customer-specific fields to the data structures for the data transfer (for example, BMMH1 for the main data).
          Also, add the customer-specific fields to the tables in which the incorrect data is stored during direct input. These tables have the same name as the corresponding master data table and also have the suffix _TMP.
          For example: If you add customer-specific fields to table MARA, you should add the same fields to table MARA_TMP.
          If you use ALE, you must also add fields to the IDoc. To process enhanced IDocs, you can use enhancement MGV00001 with customer exit EXIT_SAPLMV01_002 for creating the IDocs and customer exit EXIT_SAPLMV02_002 for posting the IDocs.
          Prior to Release 3.0E, enhancing structure BMMH1 constitutes a modification. In this case, you must add the new fields tot the end of the structure before the last field (SENDE = record end indicator).
          As of Release 3.0F, structure BMMH1 contains the customer include CI_MMH1, which is part of the enhancement MGA0001. Here, you must proceed as follows:
                a) Add the customer-specific fields to include CI_MMH1.
                The names of the fields in CI_MMH1 must be identical to those of the corresponding fields in material master tables MARA, MARC and so on.
                Important: The fields must be CHAR type fields. Therefore, create CHAR type data elements whose lengths are identical to the output length of your fields in  table MARA and so on. Use these data elements in include CI_MMH1, but use the field names from table MARA and so on.
                b) Activate include CI_MMH1.
                c) If you have not used customer structure ZMMH1 before, create it as a copy of structure BMMH1 and delete the standard fields that you do not require. You are not permitted to delete field STYPE and include CI_MMH1 when doing this. If you have already used structure ZMMH1, add include CI_MMH1 to it.
                d) Activate structure ZMMH1. This also adds the customer-specific fields to ZMMH1.
    Run program RMDATING. This program generates routines which are supplied to your customer-specific fields from the input file. As of Release 4.5A, you also need to activate the routines/function modules generated by program RMDATING (especially, the MAT_MOVE_BMMH1_XXXX modules). Details about this subject (especially the procedure when using customer structure ZMMH1) are described in the IMG for transferring the material data under item 'Maintain Transfer Structure'. Also, check the declaration of structure WA in program RMMMBIMC to see whether it is declared with sufficient length. If necessary, enhance the declaration (for the time being, this still constitutes a minor modification).
    In addition, lengthen domain DI_DATA with CHAR 5000. As of Release 3.1H, this has already been done.
    Important: When using customer-specific fields, you can use only structure ZMMH1 to transfer the data. Otherwise, after the next SAP upgrade which contains new standard fields in structure BMMH1, the input files no longer match. If you want these new standard fields to be transferred, add them after your customer-specific fields (the order of the fields in structure ZMMH1 does not need to be the same as the order of the fields in BMMH1).
    If you want foreign key dependencies or fixed domain values to be checked, or another check for a customer field, this is possible up to and including Release 3.0D only by modifying the corresponding check function modules. As of Release 3.0E, you can use function exit EXIT_SAPLMGMU_001 (SAP enhancement MGA00001) for these purposes.
    If you want to use engineering change management to schedule future changes for your customer-specific fields or you want to use the 'Display at Key Date' function, execute program GENERATE in addition. This program generates the necessary assignments for interpreting the change documents. With regard to engineering change management, you must read Notes 60281, 60973, and 48962.
    To date, it is not possible to integrate customer-specific tables in material master maintenance without making a modification. However, you can create customer-specific development objects containing the essential additional logic. You can then integrate these development objects in your system as part of only a minor modification.
    check this link. It may helps you to solve your issue.
    Thanks
    Sravan

  • Include a field in the table maintenance generator

    Hi All,
    There is a Z table with MATNR and another numeric field and the table maintenance generator exists for the table. The requirement is to include another field for MAKTX ( Material description) in the table maintenance generator with input disabled. Is it possible to do the same in the table maintenance generator else please suggest me the best solution.
    Thanks in Advance.

    Hi Srinivasa,
    This is quite simple, first add the field MAKTX into the Table and activate it .
    Now again generate the Table maintainence for the table.
    from Table maintainence generator go to the main program
    there click the screen maintained for Table maintainence generator .
    in the Pbo of the screen write the following code.
    assume table name is table1.
    Loop at screen.
    if screen-name = table1-maktx.
    screen-input = '0'.
    modify screen.
    endif.
    endloop.
    this will automatically disable the material description field in the Table Maintainence Generator.
    This is will solve your problem
    Regards,
    Madhavi

  • Add columns with custom fields in the table control of MIGO

    Hi,
    I have to add custom fields in the table control view of item in the MIGO.  I have added the fields in the GOITEM structure and i am able to display it in the item details tab.  I want the same fields to be visible as columns in the table control view of the items.
    I found that TV_GOITEM is the control in SAPLMIGO program referring to the table control of items but it is referring only to the standard fields available in Screen 200.
    Please let me know if there is any screen exit or option to add the custom fields in the control TV_GOITEM.
    Thanks.

    Hi,
    Thanks for your reply.  I have added the custom fields in the item detail.  But the customer wants the custom fields in the table view also.
    Is there any screen exit available to modify the table control of MIGO?
    Thanks.

  • Is it possible to add icons to a field in the table control  ?

    Dear Gurus,
               Greetings..............
    Is it possible to add icons to the line item of  a field in the table control ?
    Thanks in advance
    Raj Kumar

    HI
    YES IT IS POSSIBLE.
    DO THE FOLLOWING
    1.DECLARE INCLUDE <ICON>.
    2.IN YOUR INTERNAL TABLE DECLARE FIELD ICON
    icon(4) TYPE c,
    3. POPULATE YOUR INTERNAL TABLE WITH APPROPRIATE ICONS BY SELECTING FROM INCLUDE SPECIFIED ABOVE.
    EG:
    wa2-icon = '@5C@'.
    4.PASS IT TO FIELDCAT
    wa_fieldcat-fieldname = 'ICON'.
        wa_fieldcat-icon = 'X'.            " Displayed as Icon
      wa_fieldcat-tabname = ' '.
      wa_fieldcat-seltext = 'Status'.
      wa_fieldcat-coltext = text-001.
      APPEND wa_fieldcat TO it_fieldcat.

  • Field in the table but not in the datasource

    I have a datasource 0co_pc_act_05 based on mbew table . I need a field from that table , which is not present in the datasource , what should i do .?
    How can i get the field from the table into the datasource?
    Thanks

    hi Mike,
    try following steps
    - in r/3 transaction rsa6 choose the datasource, click enhance strucutre, then append structure, system will propose z..., confirm it, in the next screen, type in the field name e.g abcd
    - activate the append structure
    - back to rsa6 choose the datasource, click edit, remove mark in column 'hidden' field for that field, save the datasource.
    - in this case you no need to do user exit since that field exist in the origin table where the data extracted.
    - recheck with rsa3
    later in bw side
    - create new infoobject, then right click the datasource and 'replicate datasource', change transfer rules, move the new field from right side to left (to be included in transfer structure), then assign the field by type in the new created infoobject name, activate the transfer rules. include also this new object in infocube etc.
    hope this helps.

  • In the Dreamweaver brim Bindings, the recordset and all of the fields of the table are not EXHIBITED

    In the Dreamweaver brim Bindings, the recordset and all of the fields of the table are not EXHIBITED. I don't know if an option of configuration adjustment exists in Dreamweaver that corrects the problem. It is Dreamweaver CS4 - Version 10.0 build 4117.

    I have traced the problem to a corrupted profile.  When I captured the images in question, I also used Color Cherckr to create a profile for processing.  When I apply that profile to the adjustments I make, I can no longer "Edit In".  If I use another profile, even one that I created using Color Checkr at a different point in time, I don't have the issue.  Something seems to have corrupted the new profile.  I will re-create the profile and see if the issue is resolved.

Maybe you are looking for

  • ITunes wont open....will I loose all my music????

    Help please!! my itunes (windows) wont open when I click on the short cut or go into start and programs. it simply wont open. Someone recommended delelting and re downloading...but will I loose all my music????? Someone please help me!!! THANKS!

  • How to conver string date to sql date

    Hi, i have a html form which will populate the date in the text field using popup window in the mm\dd\yy format . In the servlet i first retrieve the value as string object and need to store that one the database. using setDate method of prepared sta

  • Document header text

    Dear experts what is the standard procedure to create document header text. thanks dipti

  • Printing document takes forever.Zzzzzzzzzzzzzzzz

    Using OS 10.6.4, each time I print a document, I have to wait and wait for the printer to print. I'm using HP LaserJet M1319F. Driver version: 1.3.0.261 Is this normal? The first document, I have to wait a couple of seconds before the printer respond

  • Howto simulate a PSTN

    Hello, is it possible to simulate a PSTN with tree routers (e.g. 2x 1841, 2821)? Each is equipped with an CTRLR E1 Module (VWIC2-2MFT-G703). Both routers are conntect with an special cross cable to get the interface active. !!! This should become a t