Activation of VBAP

My table vbap. In vbap table i have zvbap structure.In that structure i have fields.
i changed the two fields data type from NUMC to DEC and i changed the length of the fields also. After i activated the structure zvbap and table vbap.it is showing partly active.
and i went to SE14 given vbap table name chose the button activate and adjust data base.
after that it shows error SQL runtime error. but no data is present in that table  vbap.
please tell me

Hi,
If system is showing <b>partly active</b> means some errors occured in activation. You need to clear the errors.
check the errors in zvbap.
system will show you log. follow the log and do the necessary changes.
Activate the <b>zvbap and vbap.</b>
regards,
Kishore

Similar Messages

  • Table VBRP and VBAP could not actived

    My system is SAP ERP IDES ECC 6.0 SR2. After importing the  support package SAP_APPL from 006 to the newest 016, when I try to user VA03 , the system raise a dump,  after check the error information, I found it caused by Table VBAP and VBRP not actived correctly.
    Check log:
    Check table VBRP (WOODY/09.09.06/22:56)
    Enhancement category 3 possible, but include or subty. not yet classified
    Field name J_1BTAXLW4 can be provided in this system. Please do not use.
    Field name J_1BTAXLW5 can be provided in this system. Please do not use.
    VBRP: Structure change at field level (DB is adjusted)
    Check on table VBRP resulted in errors
    Check table VBAP (WOODY/09.09.06/22:57)
    Append structure ZZDEAVBAP appended to table VBAP
    Enhancement category 3 possible, but include or subty. not yet classified
    Field name J_1BTAXLW4 can be provided in this system. Please do not use.
    Field name J_1BTAXLW5 can be provided in this system. Please do not use.
    VBAP: Structure change at field level (DB is adjusted)
    Check on table VBAP resulted in errors
    Activation log:
    VBAP:
      =========================================================================
    Activation of worklist (WOODY / 2009.09.06 / 23:05:56 /)
    =========================================================================
    Technical log for mass activation
        See log WOODY20090906230546:ACT
    TABL VBAP was not activated
    Check table VBAP (WOODY/09.09.06/23:05)
    Append structure ZZDEAVBAP appended to table VBAP
    Enhancement category 3 possible, but include or subty. not yet classified
    Field name J_1BTAXLW4 can be provided in this system. Please do not use.
    Field name J_1BTAXLW5 can be provided in this system. Please do not use.
    VBAP: Structure change at field level (DB is adjusted)
    Check on table VBAP resulted in errors
    =========================================================================
    End of activation of worklist
    =========================================================================
    Can somebody help me to resolve  this problem? Many thanks!

    VBRP Activation log:
    =========================================================================
    Activation of worklist (WOODY / 2009.09.06 / 23:07:40 /)
    =========================================================================
    Technical log for mass activation
        See log WOODY20090906230740:ACT
    TABL VBRP was not activated
    Check table VBRP (WOODY/09.09.06/23:07)
    Enhancement category 3 possible, but include or subty. not yet classified
    Field name J_1BTAXLW4 can be provided in this system. Please do not use.
    Field name J_1BTAXLW5 can be provided in this system. Please do not use.
    VBRP: Structure change at field level (DB is adjusted)
    Check on table VBRP resulted in errors
    =========================================================================
    End of activation of worklist
    =========================================================================

  • Inactive Pricing

    Hi All,
    we are getting an issue in sales order pricing.
    one of the item in sales order has a all Inactive condition . meaning that specific item price is not getting added at header price
    when I did some analysis, I found that Statistical flag is not clear. ( VBAP table)
    I tried to make some small changes in the order like Qty change, Manual price change , item cat change, manual price update for the item but no change in any situation.
    so work around to provided to user is, mark the item as inactive and add same item as a new item.
    for example-
    Item 1080- all conditions are inactive, no pricing is getting added.
    Statistical flag is active in VBAP table.
    Overview Price -  79,990.93  USD
    Header Price -  79,009.03  USD
    Item 1080-    981.90  USD (is not added)
    pls let me know the solution how to clear that flag and make price active.
    Regards,
    Abhijit

    Hi Abhijit,
    Please post the screenshot of Analysis of Ctype.(Sales Order-Conditions Tab-Analysis Icon at bottom of the page)
    I guess there would be the issue.
    1. See in the Pric proc Req column, is there any routine assigned?
    If it's assigned then is fulfilling the requirement?
    Thank$
    Hidayath

  • Problem in activating include structure for VBAP

    hi ,
      i have to add 3 fields in an include structure  of vbap table.
    when i added and activated it ,it is showing 'partly active'.even the vbap table is becoming 'partly active'.
    zvxxvbap_include1 is the include strcuture .it is present in vbap table .
    plz tell me why it is showing as 'partly active'??
    regards
    pavan

    Hi Friend,
    Please do not use long name for include, make it short up to 6 chars. Check all data element had been activated of your Z include.
    Then try to activate again, read logs what taht is saying actually.
    Try in Extra -> Database Utility -> Adjust database and activate it.
    Hope it will help you.
    Regards
    Krishnendu

  • Unable to get Material No and Description from VBAP

    Hi Gurus
    Can anyone please help me to get material number and description from vbap table, The report is fine but I am unable to get material no and description.
    regards
    report ZCHGDOC_BY_SALES no standard page heading
                              line-size 132.
    type-pools:
      slis.                     " ALV types
    Tables
    tables:
      cdhdr,                    " Change documents: Header
      cdpos,                    " Change documents: Items
      vbak,                     " Sales order: Header
      mara,                     " Material No
      user_addr,                 " User Address
      vbap.                     " Contract order: Items
    Types
    types:
      begin of ty_cdhdr,
        objectclas like cdhdr-objectclas,     " Object class
        objectid   like cdhdr-objectid,       " Object value
        changenr   like cdhdr-changenr,       " Document change number
        username   like cdhdr-username,       " Changed by
        udate      like cdhdr-udate,          " Changed on
        utime      like cdhdr-utime,          " Changed at
        tcode      like cdhdr-tcode,          " Transaction code
      end of ty_cdhdr,
      ty_it_cdhdr type ty_cdhdr occurs 0,
      begin of ty_cdpos,
        objectclas like cdpos-objectclas,     " Object class
        objectid   like cdpos-objectid,       " Object value
        changenr   like cdpos-changenr,       " Document change number
        tabname    like cdpos-tabname,        " Table name
        tabkey     like cdpos-tabkey,         " Table key
        fname      like cdpos-fname,          " Field name
        chngind    like cdpos-chngind,        " Change indicator
        value_new  like cdpos-value_new,      " New value of field
        value_old  like cdpos-value_old,      " Old value of field
      end of ty_cdpos,
      ty_it_cdpos type ty_cdpos occurs 0,
      begin of ty_dd03l,
        tabname   like dd03l-tabname,
        fieldname like dd03l-fieldname,
        as4local  like dd03l-as4local,
        as4vers   like dd03l-as4vers,
        rollname  like dd03l-rollname,
      end of ty_dd03l,
      ty_it_dd03l type ty_dd03l occurs 0,
      begin of ty_dd04t,
        rollname   like dd04t-rollname,
        ddlanguage like dd04t-ddlanguage,
        as4local   like dd04t-as4local,
        as4vers    like dd04t-as4vers,
        scrtext_l  like dd04t-scrtext_l,
      end of ty_dd04t,
      ty_it_dd04t type ty_dd04t occurs 0,
      begin of ty_kna1,
        kunnr like kna1-kunnr,                 " Customer number
        name1 like kna1-name1,                 " Customer name
      end of ty_kna1,
      ty_it_kna1 type ty_kna1 occurs 0,
       begin of ty_user_addr,
        bname    like user_addr-bname,              " user no
        name_textc like user_addr-name_textc ,      " Username
      end of ty_user_addr,
      ty_it_user_addr type ty_user_addr occurs 0,
      begin of ty_vbap,
        matnr     like vbap-matnr,             " Material No
        arktx     like vbap-arktx,             " Production Description
      end of ty_vbap,
      ty_it_vbap type ty_vbap occurs 0,
      ty_text(500) type c,
      ty_lines type tline,
      ty_it_lines type ty_lines occurs 0,
      begin of ty_merged,
        vbeln     like vbak-vbeln,            " Sales order number
        erdat     like vbak-erdat,            " Created on
        auart     like vbak-auart,            " Order type
        faksk     like vbak-faksk,            " Billing block in SD document
        netwr     like vbak-netwr,            " Net value
        waerk     like vbak-waerk,            " Currency
        vkorg     like vbak-vkorg,            " Sales organisation
        vtweg     like vbak-vtweg,            " Distribution channel
        vkbur     like vbak-vkbur,            " Sales office
        fkara     like vbak-fkara,            " Proposed billing type
        kunnr     like vbak-kunnr,            " Sold-to party
        bname     like vbak-bname ,           " User No
        xblnr     like vbak-xblnr,            " Reference
        fbuda     like vbkd-fbuda,            " Date services rendered
        username  like cdhdr-username,        " Changed by
        udate     like cdhdr-udate,           " Changed on
        utime     like cdhdr-utime,           " Changed at
        tcode     like cdhdr-tcode,           " Transaction code
        tabname   like cdpos-tabname,         " Table name
        tabkey    like cdpos-tabkey,          " Table key
        fname     like cdpos-fname,           " Field name
        chngind   like cdpos-chngind,         " Change indicator
        value_new like cdpos-value_new,       " New value of field
        value_old like cdpos-value_old,       " Old value of field
        scrtext_l like dd04t-scrtext_l,       " Description of field
        intnote   type ty_text,               " Internal note
        hdrnote   type ty_text,               " Header note
        name1     like adrc-name1,            " Sold-to party name
        matnr     like vbap-matnr,            " Material No
        arktx     like vbap-arktx,            " Product Description
      end of ty_merged,
      ty_it_merged type ty_merged occurs 0,
      begin of ty_vbak,
        vbeln    like vbak-vbeln,             " Sales order number
        erdat    like vbak-erdat,             " Created on
        auart    like vbak-auart,             " Order type
        faksk    like vbak-faksk,             " Billing block in SD document
        netwr    like vbak-netwr,             " Net value
        waerk    like vbak-waerk,             " Currency
        vkorg    like vbak-vkorg,             " Sales organisation
        vtweg    like vbak-vtweg,             " Distribution channel
        vkbur    like vbak-vkbur,             " Sales office
        fkara    like vbak-fkara,             " Proposed billing type
        kunnr    like vbak-kunnr,             " Sold-to party
        xblnr    like vbak-xblnr,             " Reference
        objectid like cdhdr-objectid,         " Change document object
      end of ty_vbak,
      ty_it_vbak type ty_vbak occurs 0,
      begin of ty_vbkd,
        vbeln like vbkd-vbeln,                " Sales order number
        posnr like vbkd-posnr,                " Sales order item
        fbuda like vbkd-fbuda,                " Date services rendered
      end of ty_vbkd,
      ty_it_vbkd type ty_vbkd occurs 0.
    Internal tables
    data:
      it_cdhdr    type ty_it_cdhdr,
      it_cdpos    type ty_it_cdpos,
      it_fieldcat type slis_t_fieldcat_alv,
      it_kna1     type ty_it_kna1,
      it_user_addr type ty_it_user_addr,
      it_merged   type ty_it_merged,
      it_vbak     type ty_it_vbak,
    Material No
      it_vbap     type ty_it_vbap,
      it_vbkd     type ty_it_vbkd.
    data:
      wa_vbak  type ty_vbak.
    data:
      st_tvariant  like disvariant,
      st_variant   like disvariant.
    constants:
      co_as4local_a           like dd03l-as4local     " Active version
                              value 'A',
      co_objectclas_verkbeleg like cdhdr-objectclas
                              value 'VERKBELEG',
      co_posnr_initial        like vbkd-posnr         " Initial item number
                              value is initial,
      co_posnr_initial_2        like vbap-posnr         " Initial item number
                              value is initial,
      co_save_u               type c                  " User display variant
                              value 'U',              " saving allowed.
      co_trvog_0              like vbak-trvog         " Sales order
                              value '0'.
    data:
      va_exit                 type c,                 " ALV display
      va_tabix                like sy-tabix.
    selection-screen: begin of block b1 with frame title text-001.
    select-options:
      s_vkorg  for vbak-vkorg OBLIGATORY,            " Sales organisation
      s_vkbur  for vbak-vkbur,            " Sales office
      s_vtweg  for vbak-vtweg,            " Distribution channel
      s_vbeln  for vbak-vbeln,            " Sales order number
      s_usrnme for cdhdr-username,        " Changed by
      s_udate  for cdhdr-udate.           " Changed on
    selection-screen: end of block b1,
                      begin of block b2 with frame title text-002.
    parameters:
      p_varint like disvariant-variant.   " Display variant.
    selection-screen: end of block b2.
    Initialization
    initialization.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
             exporting
                  i_save     = co_save_u
             changing
                  cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
    at selection-screen on value-request for p_varint.
    Provide display variant list for this program.
      call function 'REUSE_ALV_VARIANT_F4'
           exporting
                is_variant = st_variant
                i_save     = co_save_u
           importing
                e_exit     = va_exit
                es_variant = st_tvariant
           exceptions
                not_found  = 2.
      if sy-subrc eq 2.
        message id sy-msgid type 'S'
                number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        if va_exit eq space.
          st_variant = st_tvariant.
          p_varint = st_tvariant-variant.
        endif.
      endif.
    At selection screen
    at selection-screen.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
             exporting
                  i_save     = co_save_u
             changing
                  cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
    Start of selection
    Extract order details from VBAK
      select vbeln erdat auart faksk netwr waerk vkorg vtweg vkbur fkara
             kunnr xblnr
             from  vbak
             into  table it_vbak
             where vkorg in s_vkorg
             and   vkbur in s_vkbur
             and   vbeln in s_vbeln.
      if sy-subrc ne 0.
      No data found for selection
        message s001(zgen).
        exit.
      endif.
      loop at it_vbak into wa_vbak.
        va_tabix = sy-tabix.
        wa_vbak-objectid = wa_vbak-vbeln.
        modify it_vbak from wa_vbak
                       index va_tabix
                       transporting objectid.
      endloop.
    if sy-subrc ne 0.
      No data found for selection
       message s001(zgen).
       exit.
    endif.
    loop at it_vbak into wa_vbak.
       va_tabix = sy-tabix.
       wa_vbak-objectid = wa_vbak-vbeln.
       modify it_vbak from wa_vbak
                      index va_tabix
                      transporting objectid.
    endloop.
    Extract  Change data
      select objectclas objectid changenr username udate utime tcode
             from  cdhdr
             into  table it_cdhdr
             for   all entries in it_vbak
             where objectclas eq co_objectclas_verkbeleg
             and   objectid   eq it_vbak-objectid
             and   username   in s_usrnme
             and   udate      in s_udate.
      if sy-subrc eq 0.
        select objectclas objectid changenr tabname tabkey fname chngind
               value_new value_old
               from  cdpos
               into  table it_cdpos
               for   all entries in it_cdhdr
               where fname NE 'CMPRE_FLT'
               and objectclas eq it_cdhdr-objectclas
               and   objectid   eq it_cdhdr-objectid
               and   changenr   eq it_cdhdr-changenr.
      endif.
    Extract customer details from KNA1
      select kunnr name1
             from  kna1
             into  table it_kna1
             for   all entries in it_vbak
             where kunnr eq it_vbak-kunnr.
    ---- Changes are made here -
    Extract Material details from vbap
      select matnr arktx
             from  vbap
             into  table it_vbap
             for   all entries in it_vbak
             where
             vbeln eq it_vbak-vbeln
              and   posnr eq co_posnr_initial.
    -----------------End of Change ----------------------*
    Extract Contract No from vbkd.
      select vbeln posnr fbuda
             from  vbkd
             into  table it_vbkd
             for   all entries in it_vbak
             where vbeln eq it_vbak-vbeln
             and   posnr eq co_posnr_initial.
      perform merge_data tables it_cdhdr
                                it_cdpos
                                it_kna1
                                it_user_addr
                                it_merged
                                it_vbak
                                it_vbap
                                it_vbkd.
      if it_merged[] is initial.
        message s001(zgen).
        exit.
      endif.
    Release memory no longer required.
      free: it_cdhdr,
            it_cdpos,
            it_kna1,
            it_user_addr,
            it_vbak,
            it_vbap,
            it_vbkd.
    Build field catalog for call to report function
      perform build_field_catalog tables it_fieldcat.
    Output report.
      perform output_report tables it_fieldcat
                                   it_merged.
    *&      Form  merge_data
          text
    form merge_data  tables   pa_it_cdhdr  type ty_it_cdhdr
                              pa_it_cdpos  type ty_it_cdpos
                              pa_it_kna1   type ty_it_kna1
                              pa_it_user_addr type ty_it_user_addr
                              pa_it_merged type ty_it_merged
                              pa_it_vbak   type ty_it_vbak
                              pa_it_vbap   type ty_it_vbap
                              pa_it_vbkd   type ty_it_vbkd.
    Local internal tables
    data:
      lit_dd03l type ty_it_dd03l,
      lit_dd04t type ty_it_dd04t.
    Local work areas
    data:
      lwa_cdhdr  type ty_cdhdr,
      lwa_cdpos  type ty_cdpos,
      lwa_dd03l  type ty_dd03l,
      lwa_dd04t  type ty_dd04t,
      lwa_kna1   type ty_kna1,
      lwa_user_addr type ty_user_addr,
      lwa_merged type ty_merged,
      lwa_vbak   type ty_vbak,
      lwa_vbap   type ty_vbap,
      lwa_vbkd   type ty_vbkd.
    Local variables
    data:
      lva_dd03l_tabix like sy-tabix,
      lva_dd04t_tabix like sy-tabix.
    Sort Data
      sort pa_it_cdhdr by objectid changenr.
      sort pa_it_cdpos by objectid changenr tabname tabkey fname.
      sort pa_it_kna1  by kunnr.
      sort pa_it_user_addr by bname.
      sort pa_it_vbak  by vbeln.
       sort pa_it_vbkd  by vbeln.
      loop at pa_it_vbak into lwa_vbak.
        clear lwa_merged.
      Assign sales order fields to reporting work area
        lwa_merged-vbeln = lwa_vbak-vbeln.
        lwa_merged-erdat = lwa_vbak-erdat.
        lwa_merged-auart = lwa_vbak-auart.
        lwa_merged-faksk = lwa_vbak-faksk.
        lwa_merged-netwr = lwa_vbak-netwr.
        lwa_merged-waerk = lwa_vbak-waerk.
        lwa_merged-vkorg = lwa_vbak-vkorg.
        lwa_merged-vtweg = lwa_vbak-vtweg.
        lwa_merged-vkbur = lwa_vbak-vkbur.
        lwa_merged-fkara = lwa_vbak-fkara.
        lwa_merged-kunnr = lwa_vbak-kunnr.
       lwa_merged-bname = 1wa_user_addr-bname.
        lwa_merged-xblnr = lwa_vbak-xblnr.
    Assgin Material to reporting work area
       lwa_merged-matnr  = lwa_vbap-vbeln.
      Get name of sold-to party from PA_IT_KNA1
        clear lwa_kna1.
        read table pa_it_kna1 into lwa_kna1
                              with key kunnr = lwa_vbak-kunnr
                              binary search.
        lwa_merged-name1 = lwa_kna1-name1.
      Get name  from PA_it_user_addr
       clear lwa_user_addr.
       read table pa_it_user_addr into lwa_user_addr
                             with key  = lwa_user_addr-bname
                             binary search.
       lwa_merged-username = lwa_user_addr-name_textc.
      Get business data from PA_IT_VBKD.
        clear lwa_vbkd.
        read table pa_it_vbkd into lwa_vbkd
                              with key vbeln = lwa_vbak-vbeln
                              binary search.
        lwa_merged-fbuda = lwa_vbkd-fbuda.
    Get Material Data
      clear lwa_vbap.
        read table pa_it_vbap into lwa_vbap
                             with key matnr = lwa_vbap-matnr
                                with key vbeln = lwa_vbak-vbeln
                              binary search.
        lwa_merged-arktx = lwa_vbap-arktx.
      Get internal note text for sales order
        perform read_text using '0002'
                                '1'
                                lwa_merged-vbeln
                                'VBBK'
                                lwa_merged-intnote.
      Get header note 1 text for sales order
        perform read_text using 'Z002'
                                '1'
                                lwa_merged-vbeln
                                'VBBK'
                                lwa_merged-hdrnote.
      Determine if change documents exist for sales order.
        clear lwa_cdhdr.
        read table pa_it_cdhdr into lwa_cdhdr
                               with key objectid = lwa_vbak-objectid.
        if sy-subrc ne 0.
          continue.
        endif.
        loop at pa_it_cdhdr into lwa_cdhdr
                            from sy-tabix.
          lwa_merged-username = lwa_cdhdr-username.
          lwa_merged-udate    = lwa_cdhdr-udate.
          lwa_merged-utime    = lwa_cdhdr-utime.
          lwa_merged-tcode    = lwa_cdhdr-tcode.
          clear lwa_cdpos.
          read table pa_it_cdpos into lwa_cdpos
                                 with key objectid = lwa_cdhdr-objectid
                                          changenr = lwa_cdhdr-changenr
                                 binary search.
          loop at pa_it_cdpos into lwa_cdpos
                              from sy-tabix.
            lwa_merged-tabname   = lwa_cdpos-tabname.
            lwa_merged-tabkey    = lwa_cdpos-tabkey.
            lwa_merged-fname     = lwa_cdpos-fname.
            lwa_merged-chngind   = lwa_cdpos-chngind.
            lwa_merged-value_new = lwa_cdpos-value_new.
            lwa_merged-value_old = lwa_cdpos-value_old.
          Get description for field - determine date element
            clear lwa_dd03l.
            read table lit_dd03l into lwa_dd03l
                                 with key tabname   = lwa_cdpos-tabname
                                          fieldname = lwa_cdpos-fname
                                 binary search.
            lva_dd03l_tabix = sy-tabix.
            if sy-subrc ne 0.
              select single tabname fieldname as4local as4vers rollname
                     from   dd03l
                     into   lwa_dd03l
                     where  tabname   eq lwa_cdpos-tabname
                     and    fieldname eq lwa_cdpos-fname
                     and    as4local  eq co_as4local_a.
              if sy-subrc eq 0.
                insert lwa_dd03l into lit_dd03l
                                 index lva_dd03l_tabix.
              endif.
            endif.
          If data element was found, get description
            if not lwa_dd03l is initial.
              clear lwa_dd04t.
              read table lit_dd04t into lwa_dd04t
                                   with key rollname   = lwa_dd03l-rollname
                                            ddlanguage = sy-langu
                                   binary search.
              lva_dd04t_tabix = sy-tabix.
              if sy-subrc ne 0.
                select single rollname ddlanguage as4local as4vers scrtext_l
                       from  dd04t
                       into  lwa_dd04t
                       where rollname   eq lwa_dd03l-rollname
                       and   ddlanguage eq sy-langu.
                if sy-subrc eq 0.
                  insert lwa_dd04t into lit_dd04t
                                   index lva_dd04t_tabix.
                else.
                  lwa_dd04t-scrtext_l = 'Description for field not found'.
                endif.
              endif.
            endif.
            lwa_merged-scrtext_l = lwa_dd04t-scrtext_l.
            append lwa_merged to pa_it_merged.
            at end of changenr.
            Only process field changes for this change document.
              exit.
            endat.
          endloop.
          at end of objectid.
          Initialise work area so we know change document for order has
          been processed.
            clear lwa_merged.
          Only process change documents for this sales order.
            exit.
          endat.
        endloop.
      endloop.
    endform.                    " merge_data
    *&      Form  build_field_catalog
          text
    form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
    data:
    Local variable
      lva_col_pos   type slis_fieldcat_alv-col_pos,
    Local structure
      st_fieldcat   type slis_fieldcat_alv.
      lva_col_pos = 0.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VBELN'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VBELN'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VKBUR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VKBUR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '6'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
    clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VKORG'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'VKORG'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '6'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
    clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'KUNNR'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'KUNNR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
        st_fieldcat-outputlen = '6'.
      append st_fieldcat to pa_it_fieldcat.
    clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'NAME1'.
      st_fieldcat-ref_tabname   = 'KNA1'.
      st_fieldcat-ref_fieldname = 'NAME1'.
      st_fieldcat-row_pos       = '1'.
        st_fieldcat-outputlen = '15'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
    clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'MATNR'.
      st_fieldcat-ref_tabname   = 'VBAP'.
      st_fieldcat-ref_fieldname = 'MATNR'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-col_pos       = lva_col_pos.
        st_fieldcat-outputlen = '6'.
      append st_fieldcat to pa_it_fieldcat.
    clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'SCRTEXT_L'.
      st_fieldcat-ref_tabname   = 'DD04T'.
      st_fieldcat-ref_fieldname = 'SCRTEXT_L'.
      st_fieldcat-row_pos       = '1'.
       st_fieldcat-outputlen = '20'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'UDATE'.
      st_fieldcat-ref_tabname   = 'CDHDR'.
      st_fieldcat-ref_fieldname = 'UDATE'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '10'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'USERNAME'.
      st_fieldcat-ref_tabname   = 'CDHDR'.
      st_fieldcat-ref_fieldname = 'USERNAME'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '6'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'FNAME'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'FNAME'.
      st_fieldcat-row_pos       = '4'.
      st_fieldcat-outputlen = '8'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'CHNGIND'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'CHNGIND'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '8'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'WAERK'.
      st_fieldcat-ref_tabname   = 'VBAK'.
      st_fieldcat-ref_fieldname = 'WAERK'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '5'.
      st_fieldcat-col_pos       = lva_col_pos..
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VALUE_NEW'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'VALUE_NEW'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '20'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
      clear st_fieldcat.
      add 1 to lva_col_pos.
      st_fieldcat-tabname       = 'PA_IT_MERGED'.
      st_fieldcat-fieldname     = 'VALUE_OLD'.
      st_fieldcat-ref_tabname   = 'CDPOS'.
      st_fieldcat-ref_fieldname = 'VALUE_OLD'.
      st_fieldcat-row_pos       = '1'.
      st_fieldcat-outputlen = '20'.
      st_fieldcat-col_pos       = lva_col_pos.
      append st_fieldcat to pa_it_fieldcat.
    endform.                    " build_field_catalog
    *&      Form  output_report
          text
    form output_report tables pa_it_fieldcat type slis_t_fieldcat_alv
                              pa_it_merged   type ty_it_merged.
    Local variables
    data:
      lva_formname type slis_formname,
      lva_repid    like sy-repid.
      lva_repid = sy-repid.
      lva_formname = 'ALV_USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = lva_repid
          i_callback_user_command = lva_formname
          i_save             = 'A'
          is_variant         = st_variant
          it_fieldcat        = pa_it_fieldcat[]
        tables
          t_outtab           = pa_it_merged
        exceptions
          program_error      = 1
          others             = 2.
    endform.                    " output_report
    *&      Form  alv_user_command
          text
    form alv_user_command using pa_ucomm    like sy-ucomm
                                pa_selfield type slis_selfield.
    Local work areas
    data:
      lwa_merged type ty_merged.
      clear lwa_merged.
      read table it_merged into lwa_merged
                           index pa_selfield-tabindex.
      case pa_selfield-fieldname.
        when 'VBELN'.
        Contract Number
          set parameter id 'AUN' field lwa_merged-vbeln.
         call transaction 'VA03' and skip first screen.
    S_BCE_68001393
    when 'USERNAME'.
        Username
          set parameter id 'username' field lwa_merged-username.
          call transaction 'S_BCE_68001393' and skip first screen.
        when 'KUNNR'.
        Customer number
          set parameter id 'KUN' field lwa_merged-kunnr.
          set parameter id 'VKO' field space.
          set parameter id 'VTW' field space.
          set parameter id 'SPA' field space.
          call transaction 'XD03' and skip first screen.
      endcase.
    endform.                    " alv_user_command
    *&      Form  read_text
          text
    form read_text  using    pa_id
                             pa_inline_count
                             pa_name
                             pa_object
                             pa_text.
    Local internal tables
    data:
      lit_inlines type ty_it_lines,
      lit_lines   type ty_it_lines.
    Local work areas
    data:
      lwa_lines   type ty_lines.
    Local variables
    data:
      lva_tdname    like thead-tdname.
      refresh: lit_inlines,
               lit_lines.
      lva_tdname = pa_name.
      call function 'READ_TEXT_INLINE'
        exporting
          id                    = pa_id
          inline_count          = pa_inline_count
          language              = sy-langu
          name                  = lva_tdname
          object                = pa_object
        tables
          inlines               = lit_inlines
          lines                 = lit_lines
        exceptions
          id                    = 1
          language              = 2
          name                  = 3
          not_found             = 4
          object                = 5
          reference_check       = 6
          others                = 7.
      loop at lit_lines into lwa_lines.
        concatenate pa_text
                    lwa_lines-tdline
                    into pa_text separated by space.
      endloop.
    endform.                    " read_text ENDLOOP.

    Hi
    As per your code here:
    "-------------- Changes are made here ----------------
    *Extract Material details from vbap
    select matnr arktx
    from vbap
    into table it_vbap
    for all entries in it_vbak
    where
    vbeln eq it_vbak-vbeln
    and posnr eq co_posnr_initial.   " Here the condition specifies you want to select sales order items where there is no item number, which i beleive shouldnt be the case
    " -----------------End of Change ----------------------
    Try as below by commenting the Item Number is INITIAL condition:
    select matnr arktx
       from vbap
       into table it_vbap
       for all entries in it_vbak
       where
       vbeln eq it_vbak-vbeln.
    "and posnr eq co_posnr_initial.
    Regards
    Eswar

  • Requirement list should be Populated in MD04 When FIXED QTY/DATE activation In credit limit exceeded

    Dear sd experts
    I Have one Business requirement But i dont know how to achieve Please share Your ides
    Generally once any document is blocked due to credit limit .. we can release in VKM3
    But in my business process For some sales orders we have maintained FIXED QTY/DATE Option in sales order
    i know this functionality
    so if it is activated and same time if customer crossed his credit limit system confirms 0 qnty as per sap stranded
    And no requirement will be seen in MD04
    So in this situation no meaning To release in VKM3 
    My requirement is We have to activate  FIXED QTY/DATE Option in sales order as well as if document crossed credit limit also Items should be scheduled and it should be transformed To MD04  And Authorization person will release in VKM3
    How to fix this ..thanks a lot 

    Hi Sreehari,
    For your requirement, you need to add a requirement at the access sequence level for the access sequence related to the  KRML output type.
    Code must be written based on the below logic.
    If VBUK-CMGST (Header Overall credit status) is blocked and
    If VBEP-BMENG (Confirmed quantity at schedule line level) is >0 then output has to be triggered. Further if order is having more then one schedule line system has to check for the last line (Tell this to Developer and make sure you test one scenario regarding this. First schedule line with zero confirmed quantity and second with full quantity).
    For the second requirement
    If VBUK-CMGST (Header Overall credit status) is blocked and
    if VBAP-KWMENG (Item quantity) is changed output has to be triggered again.
    Hope this explains.
    Edited by: mokirala tilak on Sep 15, 2011 4:44 PM
    Edited by: mokirala tilak on Sep 15, 2011 4:51 PM

  • Limitation on Adding custom fields into VBAP (Updating from BAPI )

    I have added some custom fields into BAPI structure BAPE_VBAP and corresponding structure to update the custom fields added into VBAP.
    in my code i am passing the value bapiparex-valuepart1 = bape_vbap0(240). bapiparex-valuepart1 = bape_vbap240(240),
    bapiparex-valuepart1 = bape_vbap480(240) and bapiparex-valuepart1 = bape_vbap720(240)
    But, while activation its informing me that more than 441 character length not allowed for the structure. Where the total length should be allowed upto 960.
    is there any OSS notes which i can apply to extend the limit for adding more custom fields into VBAP .
    Please help

    Dear All,
    Good Morining.
    The User creation and Assigining roles is done by the same preson and As i have mentioned above i am disabling the Manage_User action,And if i give the responsiblity of assigining  roles to an other person then he can also create user (standard functionality) where i cannot add my required features.Thereby leading for inconsistency.Therefore we thought that we will also add this funtionality in Webdynpro application and for the same, we have to provide the search criteria where currently we are able to search the role based on data entry(eg:t* or Ume etc) .But we need to search also based on the DataSource(ie Portal Role ,All DataSource and UME).Please Can you guide me in this.
    Also please let me know if we are going in a right approach and also suggest any better approach to achieve the same.
    Thanks and Regards,
    Nishita Salver

  • Sub-total button In-active in ALV

    Hi,
    I have created ALV using set_table_for_first_display method, but in the toolbar 'sub total' and 'find next' buttons are In-active. How to activate these buttion in tool bar.
    Thanks,

    No need to use do_sum in field catlog.
    I have created one dummy program and i am able to see sub total button.
    Check the below program :
    REPORT ZTEST_ALV1 no standard page heading.
    Good Example for Object Oriented ALV
    Handles Double click
    class cl_event_receiver definition.
    public section.
    methods handle_double_click
            for event double_click of cl_gui_alv_grid
            importing e_row e_column.
    private section.
    endclass.
    class cl_event_receiver implementation.
    method handle_double_click.
    perform drill_down using e_row-index.
    endmethod.
    endclass.
    Data Declaration Part
    tables : makt.
    Internal table
    types : begin of ty_itab ,
            matnr(18) type c,
            tqty like vbap-kwmeng,
            kunnr(10) type c,
            qty like vbap-kwmeng,
            netpr like vbap-netpr,
            end of ty_itab.
    data itab type standard table of ty_itab.
    data wa_itab like line of itab.
    data wa_itab2 like line of itab.
    ALV Internal table
    Internal table
    types : begin of ty_itab1 ,
            matnr(18) type c,
            tqty(15) type c,
            kunnr(10) type c,
            qty like vbap-kwmeng,
            netpr like vbap-netpr,
            end of ty_itab1.
    data : itab1 type standard table of ty_itab1.
    data : wa_itab1 like line of itab1.
    ALV Variable
    data : v_repid like sy-repid,
           v_dynnr like sy-dynnr,
           ok_code like sy-ucomm,
           cl_gui_custom_container type ref to cl_gui_custom_container,
           cl_gui_alv_grid type ref to cl_gui_alv_grid,
           cl_event_reciver type  ref to cl_event_receiver,
           layout type lvc_s_layo,
           fieldcat type lvc_t_fcat.
    data : flag type c.
    Fill the default values
    initialization.
    v_repid = sy-repid.
    v_dynnr = sy-dynnr.
    start-of-selection.
    Get the data from MAKT Table
    perform get_data_makt.
    Call Screen
    perform call_screen.
    *&      Form  get_data_makt
         Get the data from makt table
    FORM get_data_makt.
    wa_itab-matnr = 'Mat1'.
    wa_itab-tqty =  '500'.
    wa_itab-kunnr = 'Kun1'.
    wa_itab-qty = '100'.
    wa_itab-netpr = '200.00'.
    append wa_itab to itab.
    wa_itab-matnr = 'Mat1'.
    wa_itab-tqty =  '500'.
    wa_itab-kunnr = 'Kun2'.
    wa_itab-qty = '400'.
    wa_itab-netpr = '200.00'.
    append wa_itab to itab.
    wa_itab-matnr = 'Mat2'.
    wa_itab-tqty =  '300'.
    wa_itab-kunnr = 'Kun3'.
    wa_itab-qty = '150'.
    wa_itab-netpr = '100.00'.
    append wa_itab to itab.
    wa_itab-matnr = 'Mat2'.
    wa_itab-tqty =  '300'.
    wa_itab-kunnr = 'Kun1'.
    wa_itab-qty = '150'.
    wa_itab-netpr = '100.00'.
    append wa_itab to itab.
    sort itab by matnr.
    Use internal table control break statements
    loop at itab into wa_itab.
    move wa_itab to wa_itab2.
    at new tqty.
    move wa_itab2-matnr to wa_itab1-matnr.
    move wa_itab2-tqty to wa_itab1-tqty.
    move wa_itab2-kunnr to wa_itab1-kunnr.
    move wa_itab2-qty to wa_itab1-qty.
    flag = 'X'.
    endat.
    if flag ne 'X'.
    move space to wa_itab1-tqty.
    move wa_itab2-kunnr to wa_itab1-kunnr.
    move wa_itab2-qty to wa_itab1-qty.
    endif.
    append wa_itab1 to itab1.
    clear : wa_itab,
            flag,
            wa_itab1,
            wa_itab2.
    endloop.
    ENDFORM.                    " get_data_makt
    *&      Form  call_screen
          Screen 1000
    FORM call_screen.
    call screen 1000.
    ENDFORM.                    " call_screen
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE USER_COMMAND_1000 INPUT.
    case ok_code.
    when 'EXIT'.
    leave to screen 0.
    when 'BACK'.
    leave to screen 0.
    when 'CANC'.
    leave to screen 0.
    endcase.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  STATUS_1000  OUTPUT
          text
    MODULE STATUS_1000 OUTPUT.
      SET PF-STATUS '1000'.
    SET TITLEBAR 'xxx'.
    CREATE OBJECT CL_GUI_CUSTOM_CONTAINER
      EXPORTING
       PARENT                      =
        CONTAINER_NAME              = 'GRID1'
       STYLE                       =
       LIFETIME                    = lifetime_default
        REPID                       = v_repid
        DYNNR                       = v_dynnr
       NO_AUTODEF_PROGID_DYNNR     =
      EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5
        others                      = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CREATE OBJECT CL_GUI_ALV_GRID
      EXPORTING
       I_SHELLSTYLE      = 0
       I_LIFETIME        =
        I_PARENT          = cl_gui_custom_container
       I_APPL_EVENTS     = space
       I_PARENTDBG       =
       I_APPLOGPARENT    =
       I_GRAPHICSPARENT  =
       I_USE_VARIANT_CLASS = SPACE
       I_NAME            =
      EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 4
        others            = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Create Event Receiver
    create object cl_event_reciver.
    ALV Specific .Data Selection
    Populate field catalog
    perform get_fieldcatlog.
    CALL METHOD cl_gui_alv_grid->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
       I_BYPASSING_BUFFER            =
       I_BUFFER_ACTIVE               =
       I_CONSISTENCY_CHECK           =
        I_STRUCTURE_NAME              = 'I_MAKT'
       IS_VARIANT                    =
        I_SAVE                        = 'U'
       I_DEFAULT                     = 'X'
       IS_LAYOUT                     =
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
      CHANGING
        IT_OUTTAB                     = itab1
        IT_FIELDCATALOG               = fieldcat
       IT_SORT                       =
       IT_FILTER                     =
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    set handler cl_event_reciver->handle_double_click for cl_gui_alv_grid.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Form  get_fieldcatlog
          text
    FORM get_fieldcatlog.
    data ls_fcat type lvc_s_fcat.
    refresh fieldcat.
    Material #
    clear ls_fcat.
    ls_fcat-reptext = 'Material Number'.
    ls_fcat-coltext = 'Material Number'.
    ls_fcat-fieldname = 'MATNR'.
    ls_fcat-tabname = 'ITAB1'.
    ls_fcat-outputlen = '18'.
    ls_fcat-col_pos = 1.
    append ls_fcat to fieldcat.
    Material #
    clear ls_fcat.
    ls_fcat-reptext = 'Total Qty'.
    ls_fcat-coltext = 'Total Qty'.
    ls_fcat-fieldname = 'TQTY'.
    ls_fcat-tabname = 'ITAB1'.
    ls_fcat-outputlen = '15'.
    ls_fcat-col_pos = 2.
    append ls_fcat to fieldcat.
    Material #
    clear ls_fcat.
    ls_fcat-reptext = 'Customer Number'.
    ls_fcat-coltext = 'Customer Number'.
    ls_fcat-fieldname = 'KUNNR'.
    ls_fcat-tabname = 'ITAB1'.
    ls_fcat-outputlen = '18'.
    ls_fcat-col_pos = 3.
    append ls_fcat to fieldcat.
    Material #
    clear ls_fcat.
    ls_fcat-reptext = 'QTY'.
    ls_fcat-coltext = 'QTY'.
    ls_fcat-fieldname = 'QTY'.
    ls_fcat-tabname = 'ITAB1'.
    ls_fcat-outputlen = '18'.
    ls_fcat-col_pos = 4.
    append ls_fcat to fieldcat.
    Material #
    clear ls_fcat.
    ls_fcat-reptext = 'NETPR'.
    ls_fcat-coltext = 'Net value'.
    ls_fcat-fieldname = 'NETPR'.
    ls_fcat-tabname = 'ITAB1'.
    ls_fcat-outputlen = '18'.
    ls_fcat-col_pos = 4.
    append ls_fcat to fieldcat.
    ENDFORM.                    " get_fieldcatlog
    *&      Form  drill_down
          text
         -->P_E_ROW_INDEX  text
    FORM drill_down USING    P_E_ROW_INDEX.
    *read table i_makt into wa_makt index p_e_row_index.
    *if sy-subrc eq 0.
    *set parameter id 'MAT' field wa_makt-matnr.
    *call transaction 'MM02' and skip first screen.
    *endif.
    ENDFORM.                    " drill_down
    Thanks
    Seshu

  • Getting Error in Activation

    Hi Experts,
    I am having error in activating my own created table.
    My table name : ZFINAL1
    Getting the error like,
    ZFINAL1-KWMENG (Specify reference table & reference field)
    Then i given  reference table 'VBAP' & reference field "KWMENG"
    Again am getting the error like,
    ZFINAL1-KWMENG (combination reference table/field VBAP-KWMENG does not exist)
    Please tell how to solve the problem.
    Thanks & Regards,
    Arun Kumar

    Hi Arun,
    See when we use the standard data elements we must also copy their ref. table and ref. fields (specially in case of Quantity & Currency Fields).
    Now you do one thing,
    Goto table VBAP from SE11.
    Goto to the last TAB 'Currency/Quantity Fields' and find the data element you are using in your case it is 'KWMENG'.
    Now look at the Ref. Table & Ref. Field Column these are the values you will have to use in your newly created table.
    Ref. Table : VBAP
    Ref. Field:  VRKME
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Active Sum button alv

    How active the standard sum button in the alv oo?

    try this code:
    *& Report  ZTEST_DEMO_ALV
    report  ztest_demo_alv.
    class cl_event_reciever definition deferred.
    data:
    wa_vbak type vbak.
    data:
    i_vbak type standard table of vbak,
    i_vbap type standard table of vbap.
    data:
    v_container1 type scrfname value 'CONT1',
    v_grid1      type ref to cl_gui_alv_grid,
    v_custom_container1 type ref to cl_gui_custom_container,
    v_container2 type scrfname value 'CONT2',
    v_grid2      type ref to cl_gui_alv_grid,
    v_custom_container2 type ref to cl_gui_custom_container,
    ok_code type syucomm,
    v_event_reciever type ref to cl_event_reciever.
    *       CLASS cl_event_reciever DEFINITION
    class cl_event_reciever definition.
      public section.
        methods:
          handle_double_click for event double_click of cl_gui_alv_grid
            importing e_row e_column.
    endclass.                    "cl_event_reciever DEFINITION
    *       CLASS cl_event_reciever IMPLEMENTATION
    class cl_event_reciever implementation.
      method handle_double_click.
        read table i_vbak
        into wa_vbak
        index e_row.
        if sy-subrc = 0.
          select * from vbap
            into table i_vbap
            where vbeln = wa_vbak-vbeln.
          if sy-subrc = 0.
            set screen 00.
            leave to screen 100.
          endif.
        endif.
      endmethod.                    "handle_double_click
    endclass.                    "cl_event_reciever IMPLEMENTATION
    select-options:
    s_vbeln for  wa_vbak-vbeln.
    start-of-selection.
      select * from  vbak
        into table i_vbak
        up to 50 rows
        where vbeln in s_vbeln.
      if sy-subrc <> 0.
        message i000(z_zzz_ca_messages)  with 'No data found!'.
        leave list-processing.
      endif.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status '100'.
    *  SET TITLEBAR 'xxx'.
      if v_custom_container1 is not bound.
        create object v_custom_container1
        exporting container_name = v_container1.
        create object v_grid1
          exporting i_parent = v_custom_container1.
        call method v_grid1->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAK'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbak
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
        create object v_event_reciever.
        set handler v_event_reciever->handle_double_click for v_grid1.
      endif.
      if v_custom_container2 is not bound
        and i_vbap is not initial.
        create object v_custom_container2
        exporting container_name = v_container2.
        create object v_grid2
          exporting i_parent = v_custom_container2.
        call method v_grid2->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAP'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbap
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
      endif.
      if v_custom_container2 is bound.
        call method v_grid2->refresh_table_display.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case ok_code.
        when 'BACK'.
          if v_grid1 is bound.
            call method v_grid1->free.
          endif.
          if v_grid2 is bound.
            call method v_grid2->free.
          endif.
          set screen 00.
          leave screen.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

  • Get Sales Document number from Project Defintion,WBS,N/w,N/w Activity

    dear all,
      I am working in PS module ,
    I need to get the sales document no from Project definition ,WBS element ,N/w and N/w activity .
    plz let me know any FM or the table relatio to get the Sales document Number .
    Note :
       In AFKO table i have a field called RMANR(sales Docu)  this field is always empty . Kindly
       give any other solution .
    Regards,
      Vinoth.v

    Hi Vinoth ,
    Please refer the below link for Some of the SAP-PS Master and transaction tables.
    [http://www.sapfans.com/sapfans/forum/logps/messages/1347.html]
    Project and Sales Doc Number Relation
      AFKO  and PROJ linked with field PRONR.
    WBS and Sales Doc Number relation
    VBAK                           PS_PSP_PNR                     PRPS
    VBAP                           PS_PSP_PNR                     PRPS
    You can use the Program  RSPRTBEZ to get those relation between the tables. Above mentioned table details have been taken through the same.

  • Using VBAP table fields in VOFM ??

    Hi Guys,
                  I have an requirement where i have to add an z field in vbap table.... the value in this field will
    come from an screen enhancement in trx va01 for item level .......then using
    VOFM  trx in the menu  FORMULA --> CONDITION VALUE i have created a routine
    901 where i will be using fields KOMP-MGAME, XKOMV-KBETR and VBAP-ZFIELD
    Following problem arises
    1. VBAP is not available in the routine.
    2. while CHECKING the routine an information is displayed saying "there is no main
    program for include RV64A901" and is getting activated but when i CHECK the main include
    RV64ANNN i am getting an error message the field VBAP is unkown
    i have run the pgm RV80HGEN and RV80HGEN and checked entries in table TFRM and TFRMT
    every thing seems to be fine....
    looking fwd for ur help....
    Mayank

    thanks Vinod,
                          ......but can u tell me why while CHECKING the routine an information is displayed saying "there is no main program for include RV64A901"  and is being activated even if there are errors in my code any way to solve it.

  • Is there any Data Mapping document Between S&OP ( model that uses supply planning operator ) and SAP ECC that I will help the client in Data Mapping activity.

    Hello All,
    Is there any Data Mapping document Between S&OP ( model that uses supply planning operator ) and SAP ECC that I will help in Data Mapping activity.
    Thanks,
    Mownesh

    There are standard templates in HCI data sources.
    e.g. 1) Customer Master data template is SOP_MD_CustomerMaster for extracting master data from SAP ECC and load it to S&OP
    KNVP is the table for customer in ECC from that you can select the fields as required
    KUNNR for customer Number
    ADRNR for Address
    List of a few commonly used table names of ECC:
    Product Related:
    MARA – Material Master (MATNR)
    MARC – Material Master with Plant Data (MATNR, WERKS)
    MARD – Material Master with Storage Location Data (MATNR, LGORT, WERKS)
    MAKT – Material Master Material Descriptions (MATNR, MATKL)
    MBEW – Material Valuation Data (MATNR, BWTAR)
    MVKE – Material Master : Sales related Data
    MDKP, MDTB – MRP related Data( Header, Item)
    MCHA, MCHB – Material Batches (Header, Item) (MATNR, WERKS, LGORT, CHARG)
    Vendor/Supplier related:
    LFA1 – vendor data (LIFNR)
    LFB1 --  Company Code Segment : Vendor Data(LIFNR, BUKRS)
    LFC1 --  FI Related Vendor Data (LIFNR, BELNR)
    LFM1 – Pur. Orgn. Related Vendor Data (LIFNR, EKORG)
    PReq/PO, BOM Related:
    EBAN – Pur. Req. Data( BANFN, BNFPO, BADAT, MATNR)
    EINA – Purchase Info. Record(General Data)(INFNR, MATNR, LIFNR)
    EINE – Purchase Info. Record (pur. Orgn. Data) (INFNR, EKORG)
    ELBK, ELBN, ELBP – Vendor Evaluation Related Data
    EKKO – PO Data (Header) (EBELN, BSTYP, BSART)
    EKPO – PO Data (Item) (EBELN, EBELP, MATNR)
    Pur. Req., RFQ and PO are differentiated by Doc Type (BSTYP) in EKKO table.
    For RFQ it is ‘A’ and for PO it is ‘F’
    MKPF – GRN Data (Header) (EBELN, BLDAT, BUDAT, XBLNR, BKTXT)
    MSEG – GRN Data(Item) MBLNR, BWART, LIFNR, MATNR, EBELN)
    Apart from this there are lot of tables which begin with ‘M’ & ‘E’, but we
    use the following very often.
    EQUK – Quota (Header)(QUNUM, MATNR)
    EQUP – Quota (Item) (QUNUM, QUPOS, LIFNR)
    EKBE – PO History Data (EBELN, EBELP, BELNR, BLDAT, MATNR, VGABE)
    EKBZ – PO History with Delivery Costs(EBELN, BELNR, LIFNR, XBLNR)
    EKET – Schedule lines data of a PO(EBELN, EINDT, SLFDT)
    EKES – Vendor Confirmations Data (EBELN, EBTYP, EINDT, XBLNR)
    T163F – Confirmation Texts (EBTYP, EBTXT)
    T156 – Movement Types (BWARE)
    T024 – Purchasing Groups
    T024E – Purchase Organizations
    T163 – Item Category’s in Purchasing Documents(PSTYP)
    T149D – Valuation Types
    T134 – Material Types
    FVLK – Delivery Types
    STKO, STPO – BOM(Bill Of Material) related Data (Header & Item)
    STPU, STPN, STST, STZU – BOM Related Tables
    RKPF, RBKP, RSEG (Header & Item) – MM – FI Related Data
    KONO, KONH – Pricing data
    T006 – Basic Unit Of Measurements
    Customer/Sales Order Related:
    VBAK : Sales Document(Header Data) (VBELN)
    VBAP : Sales Document(Item Data) (VBELN, POSNR, MATNR, ARKTX, CHARG)
    Enquiry, Quotation, Sales Order are differentiated based on Doc.
    Type(VBTYP Field) in VBAK, VBAP Tables for Enquiry VBTYP = A, for Quotation ‘B’ & for Order it is ‘C’.)
    LIKP : Delivery Table(Header Data) (VBELN, LFART, KUNNR, WADAT, INCOL)
    LIPS : Delivery Table(Item Data)(VBELN, POSNR, WERKS, LGORT, MATNR, VGBEL)
    (LIPS – VBGELN = VBAK- VBELN, LIPS-VGPOS = VBAP-POSNR)
    VTTK : Shipment Table(Header Data) (TKNUM)
    VTTP : Shipment Table (Item Data)(TKNUM, TPNUM, VBELN)
    (VTTP – VBELN = LIKP – VBELN)
    VBRK : Billing Table(Header Data) (VBELN, FKART, BELNF)
    VBRP : Billing Table(Item Data) (VBELN, POSNR, FKIMG, NEWR, VGBEL, VGPOS)
    (VERP – AUBEL = VBAK- VBELN, VBRP – VBEL = LIKP – VBELN)
    Apart from these tables there are lot of other tables which starts with ‘V’, but we use the
    following tables frequently.
    VBUK: All Sales Documents status & Admn. Data(Header) (VBELN, VBTYP)
    VBTYP = ‘C’ (Sales Order) VBTYP = ‘L’(Delivery) VBTYP = ‘M’(Invoice)
    VBUP: Sales Documents status & Admin. Data(Item) (VBELN, POSNR)
    VBEP : Sales Document Schedule Lines Data (VBELN, POSNR, EDATU, WMENG)
    VBKD: To get sales related Business data like Payment terms etc.(VBELN, ZTERM)
    VBFA: Sales Document flow data(VBELV, VBELN, POSNV, VBTYP)
    VBPA: Partner functions Data(VBELN, PARVW, KUNNR, LIFNR)
    TVLKT: Delivery Type: Texts(LFART, VTEXT)
    KNA1, KNB1, KNC1 : Customer Master Data and Other Partner’s Data(KUNNR,
    NAME1,LAND1)
    KNVK: Customer Master Contact Person(PARNR, KUNNR)
    KNVV: Customer Master Sales Data.
    LFA1, LFB1, LFC1: Vendor Master Data(To get Transporter data)(LIFNR, NAME1, ORT01)
    MARA, MARC, MARD : Material Master Data(Basic, Plant, St. Location Views)
    TVKO: Sales Organizations(VKORG)
    TVKOV: Distribution Channels(VTWEG)
    TVTA: Divisions(SPART)
    TVKBZ: Sales Office(VKBUR)
    TVBVK: Sales Group(VKGRP)
    T077D: Customer Account Group(KTOKD)
    T001W: Plants(WERKS)
    T001L: Storage Locations(LGORT)
    TWLAD: To get address of Storage Location and Plant(LGORT, ADRNR)
    TVAU: Sales Document (Order) Types
    KONV: Condition Types (pricing) (KNUMV, KSCHL, KWETR)
    T685T: Condition Types Texts.
    ADRC: To get Addresses of Partners
    VBBE, VBBS: Sales Requirements Data
    VBKA: Sales Activities Data
    VBPV: Sales Document Product Proposal
    Based on the functionality you can search ECC table names and fields
    Hope this information is helpful for you.
    Thanks and Regards,
    Anjali

  • Error while activating a routine  "no object list"

    hi
    I am getting a error while activating a routine Rv50c601
    "There is no object list for INCLUDEs"  Please suggest on the error and resoulution
    regards
    Nishant

    Try running program RV80HGEN.
    Regards,
    Naiimesh Patel

  • Malicious or not? Message popped up: Mozilla security found (something like too much, forget exact word) activity on your computer so it will do a fast scan of system file. With OK button.

    I was looking at youtube.com, which always tells me my browser is not supported and recommends I download Firefox, but that is what I was using, so I went to Firefox to check for updates. (I think I also had freecycle.org open.) Then this message popped up in a new page: Mozilla security found (something like "too much", forget exact word) activity on your computer so it will do a fast scan of system file. There was an OK button. The page address was: http://update17.stegner.ce.ms/index.php?Q7Lhl9ShbRxGJXpkM1VLSi4ZE8H4pTedoVPySgeppM3VpC+thEspcFG7qxHgn1pdsC2h5ygPGWI3t5hXqMzL9EQaZZ3J1e3CKXgCb0Qp. I did not click OK but copied the link and closed the window which closed the internet. I have never seen this before and would like to know if it is really Mozilla or possibly something malicious. Thank you.

    Good catch. That almost certainly is an invitation to download malware.
    There are a lot of infected web sites pushing "fake antivirus" software. If you have any doubts about whether your system might have become infected, you can supplement your regular security software with these two highly regarded scanners:
    Malwarebytes Anti-malware : http://www.malwarebytes.org/mbam.php
    SUPERAntiSpyware : http://www.superantispyware.com/

Maybe you are looking for

  • How I solved my shuffle problems!!!

    It was very simple you see. After 3 days of messing around with the **###! shuffle...it would work ,then not work, then it would say "can't read or write to disk" after I did the 4 R's and everything else they suggested.I called Apple and they said i

  • CE 7.2 Installtion media files

    Dear Experts,                      I am installing CE 7.2 while installing it is asking JAVA EXPORT (VOL.01).Which media file I need to select.                    I downloaded  51038266 CD, in this inside DATA-UNITS there are CE_JAVA_EXPORT,CE_JAVA_E

  • Rough BOM at the time of product development

    dear expert: excuse my nascent approach. i dont know how to address this but my client is asking to fullfill the below requirement we are Apparel manufacturing company. as per our scenerio we pass a long development period approx 6 months before rece

  • After upgraded to 3.6.6, firefox freezes on flash sites. After several right clicks it seems to unfreeze. Latest flash plugin already installed. Any idea

    after upgraded to 3.6.6, firefox freezes on flash sites. After several right clicks it seems to unfreeze. Latest flash plugin already installed. Same happens on new profile & after clean mozilla installation. Any idea? == User Agent == Mozilla/4.0 (c

  • Files Window always displays in front

    Since upgrading to CC (might have also been an issue in CS6, can't remember), the files window always displays as the top window. I like to have it fill a good portion of my monitor so that I can easily see the ftp file next to the local files and al