Quantity field as input field in purchase templates

Hi SDN,
we are on WAS 700, SRM 5.0. SRM Server 5.5
I am facing an urgent change request, which is a modification of standard templates and dynpros.
The Task:
When I create a shopping cart via "Old Purchase Orders and Templates" I want the quantity field as an input field, so that I can change quantities right here, when adding items from the public template to the shopping cart.
The Business Case:
We get tons of bad user feedback, as the process as it is, is really time consuming, because first you chose items from the template and in the next step you have to change the quantities.
The html template involved is the:
SAPLBBP_PDH_SEARCH 4001
The corresponding dynpro is:
4001 in function group BBP_PDH_SEARCH
In the dynpro I see a quantity-field in the creen painter:
-QUANTITY in Table Control TC_SUBLIST_SC
in the html template I have:
`if (SUBLIST-ITM_TYPE[n].value != "HIER")`
              `SUBLIST-QUANTITY[n].value` `SUBLIST-UNIT[n].value`
I guess I need something like:
<input type="text" name="<SUB_WA>-QUANTITY" value="`SUBLIST-QUANTITY[n].value`">
How do I set up the input field? Help greatly appreciated!!!
Kind regards, Matthias Kasig
Message was edited by:
        Matthias Kasig

Hi,
in perform mark_read_from_web you have something like that:
MODIFY <sublist> FROM <lfs_sub_wa>.
this modifies your sublist with new values.
All you have to do is add to <lfs_sub_wa> quantity field.
in code:
lv_index = lv_index + 1.
      field-get 'SUBLIST-MARK' lv_index lt_mark lv_leng.
      IF sy-subrc <> 0.
        CONTINUE.
      ELSE.
        READ TABLE lt_mark INDEX 1.
        IF sy-subrc EQ 0.
          MOVE lt_mark TO <lfs_sub_mark>.
          MODIFY <sublist> FROM <lfs_sub_wa>.
          IF <lfs_itm_type> EQ c_hier AND
             <lfs_exp> is initial And
             lt_mark EQ gc_yes.
            MOVE <lfs_itm_guid> TO lt_sel_hier-guid.
            APPEND lt_sel_hier.
          ENDIF.
        ENDIF.
      ENDIF.
add something like this:
lv_index = lv_index + 1.
      field-get 'SUBLIST-MARK' lv_index lt_mark lv_leng.
      field-get 'SUBLIST-QUANTITY' lv_index lt_mark lv_leng.
      IF sy-subrc <> 0.
        CONTINUE.
      ELSE.
        READ TABLE lt_mark INDEX 1.
        IF sy-subrc EQ 0.
          MOVE lt_mark TO <lfs_sub_mark>.
          MODIFY <sublist> FROM <lfs_sub_wa>.
          IF <lfs_itm_type> EQ c_hier AND
             <lfs_exp> is initial And
             lt_mark EQ gc_yes.
            MOVE <lfs_itm_guid> TO lt_sel_hier-guid.
            APPEND lt_sel_hier.
          ENDIF.
        ENDIF.
      ENDIF.
Regards,
Marcin Gajewski

Similar Messages

  • How to make quantity field in puplic templates editable?

    Hi SDN,
    we are implementing SRM 5.0.
    We have a change request to make the quantity field in public templates  (or when you chose approved (old) shopping carts for a new order) ready for input.
    What I tried so far is to go to the corresponding template, which is
    SAPLBBP_PDH_SEARCH 4001 and exchange
    `SUBLIST-QUANTITY[n].value`
    by
    <input type="text" name="SUBLIST-QUANTITY[n]" value="`SUBLIST-QUANTITY[n].value`">
    Debugging the corresponding dynpro 4001 of function group BBP_PDH_SEARCH
    PAI: MODULE mark_read_from_web. 
    there:
    LOOP AT <sublist> INTO <lfs_sub_wa>.
    shows, that the new quantity I might set on the webfrontend does not get transferred to <sublist>-quantity in the dynpro.
    Even though in the debugger I manually changed the incoming quantity, it does not show up on the next webscreen with the shopping cart...
    any ideas welcome,
    regards, matthias

    Hi Atul,
    the need for the requirement is very obvious, also we had this modification in the old release - and I am merely trying to rebuild it.
    But for the business case: Just imagine you have 100 or more articles in a public template and maybe you have to chose new articles from different public templates. Then it is really painful if you have to recheck the shopping cart after you have filled it, just to change the quantities. This modification saves a lot of time and work for the users. Also I am wondering why it is not already standard behaviour.
    regards, matthias

  • Quantity field to be shown on 1ST line only for purchase order items in ALV

    Dear All,
    I am fetching data from purchase order history table (EKBE) where PO line items contains multiple times. User does not want to view  fields that are repeating multiple times in all lines, but in the top line. By sorting the same in ALV , I can do the same with character type fields, but how to do the same with quantity fields. One way out is converting the same into character fields. Is there any other way. Please give me some solution. Also while sorting , the number which gets repeated (i.e Items in PO for different PO's ) does not gets displayed. I want my program to display them.
    Thanks,
    Debopriyo Mallick

    Try this
    loop at ist_mseg into wa_mseg.
      ON CHANGE OF wa_mseg-con.
        move '111' to wa_mseg-con1.
        modify ist_mseg from wa_mseg.
      ENDON.
    endloop.
    loop at ist_mseg into wa_mseg.
      if wa_mseg-con1 ne '111'.
        move 0 to wa_mseg-menge.
        move 0 to wa_mseg-netpr.
      endif.
      modify ist_mseg from wa_mseg.
    endloop.
    mseg-con is the concatenation of ebeln and ebelp values.
    pk

  • Purchase Order - Quantity Field printing.

    Hi Gurus.
    I am printing purchase orders via SAP script.
    My users want the quantity field (RM06P-PRMG1) to have a dot(.) not a comma(,)
    eg they want to print the number as 200.000 and not 200,000
    Is there somewhere, i can switch this without adding an ABAP routine to fix this.
    Thanks.
    Points will be awarded.

    Hi Wandai,
    Did you try changing the user settings? Access the menu and go to System -> User profile -> User defaults. Here you can see two options in the Decimal notation tab.
    Option 1 is : Comma and
    Option 2 is : Period.
    Please change and try with each of the above option.
    If this doesn't work you need to check the data type you are using for this variable.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • Quantity field for user input in interactive alv

    hi,
    i have created an interactive alv report that allows user to key in quantity fields using fm "REUSE_ALV_LIST_DISPLAY'. then quantity field is referred to MARD-LABST for instance, with 3 decimals point. When i tried to key in quantity as '9', it then will be converted into 0.009 by using cl_gui_alv_grid->check_changed_data( ). May i know what the root causes are and also how to resolve it using same fm??? Thanks.

    Hi,
    In the field catalog, for the field set the attribute DECIMALS to 3.
    This should resolve your issue.
    Regards,
    Sagar

  • Tcode VL10G  quantity field values are not displaying ?

    Hi All,
    In TCODE - VL10G - Sales and Purchase Order display  -
    After passing the input values it displays the results with minimum fields in the ALV layout.  When I add Quantity fields to the layout - WMENG -Order quantity and any other Quantity related fields it is not displaying values in the results. Even though the values exists in the table.
    Can anyone tell me what could be the reason? In the input screen u2013 passing the values in USER ROLE tab has anything related to this issue?
    I tried to debug and could not find code related to VBEP table or other table which has quantity fields.
    Please let me know if any ideas? Thanks in advance.

    Hi,
    We are using - SAP ECC 6.0 system.
    Any hint how I can solve this?
    Thanks.

  • Fields in purchasing cube

    Hi experts,
    I am using the cube 0pur_c01 which is loaded from 3 datasources 2lis_02_itm, 2lis_02_scl, 2lis_02_s012.
    But there are only few fields in this standard cube. I want to add some more fields.
    Can anyone please suggest me what are the major fields for Purchasing data. So that i will include them into my infocube.
    Regards,
    Bhadri M.

    Hi,
    We have modified our cube to contain the following key figs and charracteristics.  These are available by modifying the standard datasource by changing it in LBWE and pulling in additional fields available for selection.
    1.  Characteristics which are of use are as follows:
    Calendar Day
    Calendar Year/Month
    Calendar Year/Week
    Fiscal year / period
    Fiscal year variant
    Calendar Year/Quarter
    Base Unit of Measure
    Local currency
    Country key
    Company code
    Number of purchasing info record
    Purchasing info record category
    Material
    Valuation type
    Product Description
    Material group
    Purchasing organization
    Indicator: Data to Be Canceled
    Vendor
    Version
    Value Type for Reporting
    Flag for Contracts
    Plant
    Storage location
    Supplying Plant
    PO Number
    PO Line Number
    Purchasing document type
    Puchasing document category
    "Delivery Completed" Indicator
    Item Category in Purchasing Document
    Reason for Ordering
    Acct Assignment Category
    Control indicator for purchasing document type
    Confirmation control key
    Tax on sales/purchases code
    Shipping conditions
    Purchasing group
    2.  Key Figures of use:
    Number of deliveries
    Delivery Date Variance 1
    Delivery Date Variance 2
    Delivery Date Variance 3
    Delivery Date Variance 4
    Delivery Date Variance 5
    Delivery quantity variance 1
    Delivery quantity variance 2
    Delivery quantity variance 3
    Delivery quantity variance 4
    Delivery quantity variance 5
    Invoice amount: Returns
    Weighted total delivery time
    Effective order value of returns
    Value of goods received in local currency
    Goods receipt value as at posting date
    Invoice Receipt Quantity as at Posting Date
    Invoice Amount as at Posting Date
    Actual goods receipt quantity
    Goods receipt quantity of returns
    Goods receipt qty in base unit (calculate wtd.delivery time)
    GR value: Returns as at posting date
    Invoiced amount
    Invoice receipt quantity of returns
    IR quantity: Returns as at posting date
    IR value: Returns as at posting date
    Invoice receipt quantity
    Effective purchase order value
    Target delivery quantity
    Order quantity (returns)
    Number of contract items
    Number of scheduling agreement schedule lines
    Number of purchase order schedule lines
    Number of purchase order items
    Order quantity
    Number of quotation items
    Number of request for quotation items
    Number of scheduling agreement items
    Total delivery time in days
    Net Purchase Order Value
    Purchase Main IV Value
    Cheers...

  • Check on quantity field of co11n

    hi all,
        I want to display error messages when the quantity field at goods movement level of transaction co11n is 0 or space.
    Find me the user exit or badi , but field exit is becoming complex as the screen is a table control.
    help me.

    hi madhav,
    CONFPP01                                PP order conf.: Determine customer specific default values
    CONFPP02                                PP order conf.: Customer specific input checks 1
    CONFPP03                                PP order conf.: Cust. specific check after op. selection
    CONFPP04                                PP order conf.: Customer specific input checks 2
    CONFPP05                                PP order conf.: Customer specific enhancements when saving
    CONFPP06                                PP Order Confirmations: Actual Data Transfer
    CONFPP07                                Single Screen Entry: Inclusion of User-Defined Subscreens
    CONFPS01                                PS confirmation: Determine customer specific default values
    CONFPS02                                PS confirmation: Customer specific input checks 1
    CONFPS03                                PS confirmation: Customer specific check after op. selection
    CONFPS04                                PS confirmation: Customer specific input checks 2
    CONFPS05                                PS confirmation: Customer specific enhancements when saving
    CONF0001                                Enhancements in order confirmation
    CONFPI01                                Process order conf.: Calculate cust.specific default values
    CONFPI02                                Process order confirmation: Customer spec. input checks 1
    CONFPI03                                Process order conf.: Cust. spec. check after op. selection
    CONFPI04                                Process order conf.: Customer specific input checks 2
    CONFPI05                                Process order conf.: Cust. spec. enhancements when saving
    CONFPI06                                Process order confirmation: Actual data transfer
    CONFPM01                                PM/SM order conf.: Determine cust. specific default values
    CONFPM02                                PM/SM order confirmation: Customer specific input checks 1
    CONFPM03                                PM/SM order conf.: Cust. spec. check after op. selection
    CONFPM04                                PM/SM order conf.: Customer specific input check 2
    CONFPM05                                PM/SM order conf.: Cust. specific enhancements when saving
    these are the list of userexits for the transaction co11n try keeping the break point in each user exit and check which suits your requirement.
    the second method is you can do it by reading the documentation of the each exit.
    Hope its clear to you,
    Reward points fi usefull,
    Thanks,
    kalyan.

  • Rounding quantity field in scheduling agreement not considered in JITK

    Hello ALL,
    I would like to consult to you a scenario I am facing when it comes to creating a scheduling agreement (VA31) and maintaining a Rounding Quantity (field ABLFZ) in it.
    When using the standard LZ type scheduling agremeent, the Rounding quantity is considered when creating a delivery in VL10.
    However, when using the LZJ type of scheduling agreement, the Rounding quantity is NOT considered when creating a delivery in JITK.
    Can you please tell me what causes the case in LZJ scheduling agreement?
    Thank you all in advance.

    Hi,
    This field is not available for Scheduling Agreement. It is only available for Purchase Order.
    Even you will not get this in Field selection also.

  • Quantity field not getting update in PCA document for Goods Receipt

    We have the Purchase Account activated for our company code.
    For movement type 101 (Goods Receipt), I am getting the quantity field updated for GR/IR account and Stock Account (B/S item).
    But the quantity field is not getting updated for the "Purchase Account" and the "other offsetting PL A/C).
    Please advice whether I am missing something.
    Regards
    B.Mohanty

    Hi Aravind,
    Check SAP notes  1063198 and 1117587.
    FAGLL03 display quantity which is updated in FAGLFLEXA, BSEG is not
    relevant in this case. This is clearly explained in the note 1063198.
    The quantity posts through to FI on the 'goods receipt' items, but not on the
    'invoice receipt' items.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    But in the old 'Profit Center Accounting' and the old' Special Ledger'
    the field has been important.
    As the same logic of these areas to 'store' the Quantity is also used
    in the NewG/L the field get only filled in the line, where it make
    'sense' from our point of view, because only in the 'goods receipt'
    lines a 'real' Quantity is posted to the system.
    So as before in the PCA and SL, now also in the NewG/L the Quantity is
    filled in the correct and important lines and postings.
    In the BSEG ('old document segment table') the field is filled 'just'
    as it is send to the FI, but this is not completely correct from the
    business point of view.
    This can also lead to issues with the reporting and summation to this
    field. So with creating the new logic in the NewG/L the 'correct'
    standard of the 'writing' for the Quantity has also been taken over.
    So in the end, the update and display is correct according  SAP standard behavior.
    Actually,Quantities within G/L are never reliable,
    because the purpose of FI is a view on the data according to amount
    but not according to quantity.
    In the FI normally the Quantity is not a 'real' important field, as it
    is more related to the MM area.
    I hope I could be of assistance.
    Regards,
    Fernando

  • Quantity field in at user-command

    Hi,
    I have declared the quantity field  V_QTY TYPE AFKO-GAMNG.
    I am passing the quantity field values from the internal table which is having data for the quantity field to V_QTY. but the field V_QTY is not filling with the quantity.
    Instead of the quantity, it is taking the   * value into the field.
    I am not using any control break commands in my coding.  I am attaching the code also. can anyone guide me .
    Report ztest.
    TABLES:  AFKO,                         " Order Header
             AFPO,                         " Order Item
             AUFK,                         " Order Master
             RESB,
             AFVC,                         " Order Operation w/i an Order
             AFVV,                        " Qty/Dates/values in an Operation
             CRHD,                         " Work Center
             MARA,                         " Material Master
             MAKT,                         " Material Description
             AUSP,                         " Characteristic Values
             CABN,                         " Characteristic
             PLPO,                         " Task list-operation/activity
             PLFL,                         " Task list - sequences
             TJ02T,                        " System status texts
             JEST.                         " Individual Object Status
    TYPE-POOLS:SLIS.
    TYPE-POOLS:ICON.
    DATA:CHECK(1),
         TOTAL(7) VALUE 'TOTAL :',
         W_AMOUNT TYPE GAMNG VALUE 0.
    TYPES:BEGIN OF T_AFKO,
          CHECK,
          AUFNR TYPE AFKO-AUFNR,
          GLTRP TYPE AFKO-GLTRP,
          GSTRP TYPE AFKO-GSTRP,
          GAMNG TYPE AFKO-GAMNG,
          PLNBEZ TYPE AFKO-PLNBEZ,
          END OF T_AFKO.
    DATA:I_AFKO TYPE STANDARD TABLE OF T_AFKO,
         W_AFKO LIKE LINE OF I_AFKO.
    DATA:I_AFKO1 TYPE STANDARD TABLE OF T_AFKO,
         W_AFKO1 LIKE LINE OF I_AFKO1.
    DATA:PONUM TYPE AFKO-AUFNR,
         STDATE TYPE AFKO-GLTRP,
         FIDATE TYPE AFKO-GSTRP,
         QUANTY TYPE AFKO-GAMNG,
         MATER  TYPE AFKO-PLNBEZ,
         DESCR  TYPE MAKT-MAKTX,
         INDEX  TYPE SY-INDEX,
         COUNT(3) VALUE '0'.
    TYPES:BEGIN OF T_FINAL,
          CHECK,
          LIGHT  TYPE ICON-ID,
          MATNR  TYPE RESB-MATNR,
          AUFNR  TYPE AFKO-AUFNR,
          GLTRP  TYPE AFKO-GLTRP,
          GSTRP  TYPE AFKO-GSTRP,
          GAMNG  TYPE AFKO-GAMNG,
          PLNBEZ TYPE AFKO-PLNBEZ,
          MAKTX  TYPE MAKT-MAKTX,
          END OF T_FINAL.
    DATA:I_FINAL TYPE STANDARD TABLE OF T_FINAL,
         W_FINAL LIKE LINE OF I_FINAL,
         I_FINAL1 TYPE STANDARD TABLE OF T_FINAL,
         W_FINAL1 LIKE LINE OF I_FINAL1.
    TYPES:BEGIN OF T_CRHD,
          OBJID TYPE CRHD-OBJID,
          ARBPL TYPE CRHD-ARBPL,
          END OF T_CRHD.
    DATA:I_CRHD TYPE STANDARD TABLE OF T_CRHD,
         W_CRHD LIKE LINE OF I_CRHD.
    TYPES:BEGIN OF T_AFVC,
          AUFPL TYPE AFVC-AUFPL,
          ARBID TYPE AFVC-ARBID,
          END OF T_AFVC.
    DATA:I_AFVC TYPE STANDARD TABLE OF T_AFVC,
         W_AFVC LIKE LINE OF I_AFVC.
    TYPES:BEGIN OF T_ITEM,
          MATNR  TYPE RESB-MATNR,       " Component Matl Number
          MAKTX  TYPE MAKT-MAKTX,       " Matl Desc for Component
          BDMNG  TYPE RESB-BDMNG,       " Component Req'd Qty
          END OF T_ITEM.
    DATA:I_ITEM TYPE STANDARD TABLE OF T_ITEM,
         W_ITEM LIKE LINE OF I_ITEM.
    TYPES:BEGIN OF T_RESB,
          MATNR TYPE RESB-MATNR,
          AUFNR TYPE RESB-AUFNR,
          BDMNG TYPE RESB-BDMNG,
          END OF T_RESB.
    DATA:I_RESB TYPE STANDARD TABLE OF T_RESB,
         W_RESB LIKE LINE OF I_RESB.
    DATA:I_MAKT TYPE STANDARD TABLE OF MAKT,
         W_MAKT LIKE LINE OF I_MAKT,
         I_MAKT1 TYPE STANDARD TABLE OF MAKT,
         W_MAKT1 LIKE LINE OF I_MAKT1.
    TYPES:BEGIN OF T_AUFK,
          AUFNR TYPE AUFK-AUFNR,
          AUART TYPE AUFK-AUART,
          WERKS TYPE AUFK-WERKS,
          OBJNR TYPE AUFK-OBJNR,
          END OF T_AUFK.
    DATA:I_JEST TYPE STANDARD TABLE OF JEST,
         W_JEST LIKE LINE OF I_JEST.
    DATA:I_AUFK TYPE STANDARD TABLE OF T_AUFK,
         W_AUFK LIKE LINE OF I_AUFK.
    DATA:V_QTY TYPE AFKO-GAMNG,
         LINES TYPE I,
         V_AUFNR TYPE AFKO-AUFNR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:
    P_WERKS TYPE AUFK-WERKS OBLIGATORY MEMORY ID WRK,  " PLANT
    P_AUART TYPE AUFK-AUART OBLIGATORY.                "ORDER TYPE
    SELECT-OPTIONS: S_PLNBEZ FOR AFKO-PLNBEZ.          "material
    PARAMETERS: P_ARBPL TYPE CRHD-ARBPL OBLIGATORY.    "Work center
    SELECT-OPTIONS:
    S_GSTRP  FOR AFKO-GSTRP OBLIGATORY.   "ORDER BASIC START DATE
    *s_gltrp  FOR afko-gltrp OBLIGATORY,  "ORDER BASIC FINISH DATE
    *s_gstrs  FOR afko-gstrs,             "ORDER SCHEDULE START DATE
    *s_gltrs  FOR afko-gltrs.             "ORDER SCHEDULE FINISH DATE
    PARAMETERS:P_MATNR TYPE RESB-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    *ALV data declarations
    DATA: I_FIELDCATALOG    TYPE SLIS_T_FIELDCAT_ALV,
          W_FIELDCATALOG    LIKE LINE OF I_FIELDCATALOG,
          S_FIELDCATALOG  TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_TAB_GROUP    TYPE SLIS_T_SP_GROUP_ALV,
          GD_LAYOUT       TYPE SLIS_LAYOUT_ALV,
          GD_REPID        LIKE SY-REPID VALUE SY-REPID,
          T_HEADING       TYPE SLIS_T_LISTHEADER,
          IT_LISTHEADER   TYPE SLIS_T_LISTHEADER,
          W_KEYINFO       TYPE SLIS_KEYINFO_ALV,
          WA_SORT         TYPE SLIS_SORTINFO_ALV,
          IT_SORT         TYPE SLIS_T_SORTINFO_ALV,
          IT_TITLE_BASIC  TYPE
                LVC_TITLE VALUE 'SELECTION OF PRODUCTION ORDERS',
          IT_TITLE_ITEM  TYPE LVC_TITLE VALUE 'MIXING REPORT'.
    DATA: PO TYPE AUFNR,
          P_SELFIELD TYPE SLIS_SELFIELD.
    DATA: I_EVENTS TYPE SLIS_T_EVENT,
          W_EVENTS LIKE LINE OF I_EVENTS.
    CLEAR:   W_EVENTS.
    REFRESH: I_EVENTS.
    DATA:I_HEADER TYPE SLIS_T_LISTHEADER,
         W_HEADER LIKE LINE OF I_HEADER.
    BEGIN OF CODE FOR ALV_HIERSEQ_LIST*************
    TYPES:BEGIN OF T_HHEADER,
         EXPAND,
          MATNR TYPE RESB-MATNR,
          MAKTX TYPE MAKT-MAKTX,
          V_QTY,
          END OF T_HHEADER.
    DATA:I_HHEADER TYPE STANDARD TABLE OF T_HHEADER,
         W_HHEADER LIKE LINE OF I_HHEADER.
    TYPES:BEGIN OF T_HITEM,
          CHECK,
          MATNR  TYPE RESB-MATNR,
          AUFNR  TYPE AFKO-AUFNR,
          GAMNG  TYPE AFKO-GAMNG,
          PLNBEZ TYPE AFKO-PLNBEZ,
          MAKTX TYPE MAKT-MAKTX,
          GLTRP  TYPE AFKO-GLTRP,
          GSTRP  TYPE AFKO-GSTRP,
          END OF T_HITEM.
    DATA:I_HITEM TYPE STANDARD TABLE OF T_HITEM,
         W_HITEM LIKE LINE OF I_HITEM.
    END OF CODE FOR ALV_HIERSEQ_LIST ****************************
    INITIALIZATION.
      PERFORM BUILD_FIELDCATALOG.
      PERFORM BUILD_LAYOUT.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM GET_EVENTS.
      PERFORM GET_DATA.
    END-OF-SELECTION.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATALOG
          text
    FORM BUILD_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '1'.
      W_FIELDCATALOG-FIELDNAME    = 'MATNR'.
      W_FIELDCATALOG-TABNAME      = 'I_HHEADER'.
      W_FIELDCATALOG-SELTEXT_M    = 'Phantom Material'.
    W_FIELDCATALOG-ROLLNAME     = 'MATNR'.
      W_FIELDCATALOG-OUTPUTLEN    = '20'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '2'.
      W_FIELDCATALOG-FIELDNAME    = 'MAKTX'.
      W_FIELDCATALOG-TABNAME      = 'I_HHEADER'.
      W_FIELDCATALOG-SELTEXT_M    = 'Phantom Material Description'.
    W_FIELDCATALOG-ROLLNAME     = 'MAKTX'.
      W_FIELDCATALOG-OUTPUTLEN    = '40'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '3'.
      W_FIELDCATALOG-FIELDNAME    = 'BDMNG'.
      W_FIELDCATALOG-TABNAME      = 'I_HHEADER'.
      W_FIELDCATALOG-OUTPUTLEN    = '20'.
      W_FIELDCATALOG-SELTEXT_M    = 'Total Batch qty:'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '1'.
      W_FIELDCATALOG-SELTEXT_M    = 'Selection'.
      W_FIELDCATALOG-FIELDNAME    = 'CHECK'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      W_FIELDCATALOG-EDIT        = 'X'.
      W_FIELDCATALOG-CHECKBOX    = 'X'.
      W_FIELDCATALOG-INPUT       = 'X'.
    W_FIELDCATALOG-HOTSPOT     = 'X'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
    CLEAR W_FIELDCATALOG .
    W_FIELDCATALOG-COL_POS      = '2'.
    W_FIELDCATALOG-FIELDNAME    = 'MATNR'.
    W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
    W_FIELDCATALOG-ROLLNAME     = 'MATNR'.
    W_FIELDCATALOG-OUTPUTLEN    =  '12'.
    APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '2'.
      W_FIELDCATALOG-FIELDNAME    = 'AUFNR'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      W_FIELDCATALOG-ROLLNAME     = 'AUFNR'.
      W_FIELDCATALOG-OUTPUTLEN    =  '12'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-COL_POS      = '3'.
    W_FIELDCATALOG-SELTEXT_M    = 'PO Qty'.
      W_FIELDCATALOG-FIELDNAME    = 'GAMNG'.
      W_FIELDCATALOG-ROLLNAME     = 'GAMNG'.
      W_FIELDCATALOG-OUTPUTLEN    =  '20'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-COL_POS      = '4'.
    W_FIELDCATALOG-SELTEXT_M    =  'Header Material'.
      W_FIELDCATALOG-FIELDNAME    =  'PLNBEZ'.
      W_FIELDCATALOG-ROLLNAME     =  'MATNR'.
      W_FIELDCATALOG-OUTPUTLEN    =  '20'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG.
      W_FIELDCATALOG-COL_POS      = '5'.
    W_FIELDCATALOG-SELTEXT_M    = 'Material Description'.
      W_FIELDCATALOG-FIELDNAME    =   'MAKTX'.
      W_FIELDCATALOG-ROLLNAME     =   'MAKTX'.
      W_FIELDCATALOG-OUTPUTLEN    =  '40'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '6'.
      W_FIELDCATALOG-FIELDNAME    = 'GSTRP'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      W_FIELDCATALOG-ROLLNAME     = 'CO_GSTRP'.
      W_FIELDCATALOG-OUTPUTLEN    =  '10'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
      CLEAR W_FIELDCATALOG .
      W_FIELDCATALOG-COL_POS      = '7'.
      W_FIELDCATALOG-FIELDNAME    = 'GLTRP'.
      W_FIELDCATALOG-TABNAME      = 'I_HITEM'.
      W_FIELDCATALOG-ROLLNAME     = 'CO_GLTRP'.
      W_FIELDCATALOG-OUTPUTLEN    =  '10'.
    W_FIELDCATALOG-SELTEXT_M    = 'Basic End Date'.
      APPEND W_FIELDCATALOG TO I_FIELDCATALOG.
    ENDFORM.                    "BUILD_FIELDCATALOG
    *&      Form  get_events
          text
    FORM GET_EVENTS.
      CLEAR : W_EVENTS, I_EVENTS[].
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 0
        IMPORTING
          ET_EVENTS   = I_EVENTS.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                             INTO W_EVENTS.
      IF SY-SUBRC EQ 0.
        MOVE 'TOP_OF_PAGE' TO W_EVENTS-FORM.
        MODIFY I_EVENTS FROM W_EVENTS INDEX SY-TABIX.
      ENDIF.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
                             INTO W_EVENTS.
      IF SY-SUBRC EQ 0.
        MOVE 'SUB_USER_COMMAND' TO W_EVENTS-FORM.
        MODIFY I_EVENTS FROM W_EVENTS INDEX SY-TABIX.
      ENDIF.
      READ TABLE I_EVENTS WITH KEY NAME = SLIS_EV_PF_STATUS_SET
                INTO W_EVENTS.
      IF SY-SUBRC EQ 0.
        MOVE 'PF_STATUS_SET' TO W_EVENTS-FORM.
        MODIFY I_EVENTS FROM W_EVENTS INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    "get_events
    *&      Form  build_layout
          text
    FORM BUILD_LAYOUT.
    gd_layout-no_input          = 'X'.
    gd_layout-colwidth_optimize = 'X'.
      GD_LAYOUT-ZEBRA             = 'X'.
      W_KEYINFO-HEADER01          = 'MATNR'.
      W_KEYINFO-ITEM01            = 'MATNR'.
      GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
    GD_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  data_retrieval
          text
    FORM GET_DATA.
    IF p_matnr IS NOT INITIAL.
      SELECT MATNR
             AUFNR
             BDMNG
             FROM RESB INTO TABLE I_RESB
             WHERE DUMPS = 'X'.
                AND matnr = p_matnr.
      SORT I_RESB BY MATNR AUFNR.
    ENDIF.
      SELECT * FROM JEST INTO CORRESPONDING FIELDS OF TABLE I_JEST
                   WHERE STAT = 'I0002'
                    AND INACT = ' '.
      SELECT OBJID
              ARBPL
              FROM CRHD INTO TABLE I_CRHD WHERE ARBPL = P_ARBPL.
      IF NOT I_CRHD[] IS INITIAL.
        SELECT AUFPL
               ARBID
               FROM AFVC INTO TABLE I_AFVC
               FOR ALL ENTRIES IN I_CRHD
               WHERE ARBID = I_CRHD-OBJID.
      ENDIF.
      IF NOT I_AFVC[] IS INITIAL.
        SELECT AUFNR
               GLTRP
               GSTRP
               GAMNG
               PLNBEZ
               FROM  AFKO INTO CORRESPONDING FIELDS OF TABLE I_AFKO
               FOR ALL ENTRIES IN I_AFVC
               WHERE AUFPL = I_AFVC-AUFPL
                 AND GSTRP IN S_GSTRP.
        SORT I_AFKO BY AUFNR.
      ENDIF.
      IF NOT I_AFKO[] IS INITIAL.
        SELECT AUFNR
               AUART
               WERKS
               OBJNR
               FROM AUFK INTO TABLE I_AUFK
               FOR ALL ENTRIES IN I_AFKO
                   WHERE AUFNR = I_AFKO-AUFNR
                     AND AUART = P_AUART
                     AND WERKS = P_WERKS.
        SORT I_AUFK BY AUFNR OBJNR.
        SELECT * FROM MAKT INTO TABLE I_MAKT1
                 FOR ALL ENTRIES IN I_AFKO
                 WHERE MATNR = I_AFKO-PLNBEZ
                   AND SPRAS = SY-LANGU.
        SORT I_MAKT1 BY MATNR.
      ENDIF.
      IF NOT I_RESB[] IS INITIAL.
        SELECT * FROM MAKT INTO TABLE I_MAKT
                 FOR ALL ENTRIES IN I_RESB
                 WHERE MATNR = I_RESB-MATNR
                   AND SPRAS = SY-LANGU.
        SORT I_MAKT BY MATNR.
      ENDIF.
    CLEAR W_HHEADER-BDMNG.
    ***BEGIN OF PHANTOM MATERIAL HEADER INTERNAL TABLE***
      CLEAR W_AUFK.
      CLEAR W_RESB.
      LOOP AT I_RESB INTO W_RESB.
        W_HHEADER-MATNR = W_RESB-MATNR.
        READ TABLE I_MAKT INTO W_MAKT
                  WITH KEY MATNR = W_RESB-MATNR BINARY SEARCH.
        W_HHEADER-MAKTX = W_MAKT-MAKTX.
        APPEND W_HHEADER TO I_HHEADER.
        MODIFY I_HHEADER FROM W_HHEADER INDEX SY-TABIX.
        CLEAR W_HHEADER.
        CLEAR W_RESB.
        SORT I_HHEADER BY MATNR.
        DELETE ADJACENT DUPLICATES FROM I_HHEADER.
      ENDLOOP.
    ****END OF PHANTOM MATERIAL HEADER INTERNAL TABLE***
    **BEGIN OF PHANTOM MATERIAL ITEM DETAILS***************
      IF NOT I_HHEADER[] IS INITIAL.
        LOOP AT I_HHEADER INTO W_HHEADER.
          LOOP AT I_RESB INTO W_RESB WHERE MATNR = W_HHEADER-MATNR.
            IF SY-SUBRC = 0.
              READ TABLE I_AUFK INTO W_AUFK
                         WITH KEY AUFNR = W_RESB-AUFNR.
              READ TABLE I_JEST INTO W_JEST
                         WITH KEY OBJNR = W_AUFK-OBJNR.
              IF SY-SUBRC = 0.
                W_HITEM-CHECK = CHECK.
                W_HITEM-MATNR = W_HHEADER-MATNR.
                READ TABLE I_AFKO INTO W_AFKO
                        WITH KEY AUFNR = W_AUFK-AUFNR BINARY SEARCH.
                W_HITEM-AUFNR = W_AFKO-AUFNR.
                W_HITEM-PLNBEZ = W_AFKO-PLNBEZ.
                READ TABLE I_MAKT1 INTO W_MAKT1
                        WITH KEY MATNR = W_AFKO-PLNBEZ.
                W_HITEM-MAKTX = W_MAKT1-MAKTX.
                W_HITEM-GLTRP = W_AFKO-GLTRP.
                W_HITEM-GSTRP = W_AFKO-GSTRP.
                W_HITEM-GAMNG = W_AFKO-GAMNG.
                APPEND W_HITEM TO I_HITEM.
                MODIFY I_HITEM FROM W_HITEM INDEX SY-TABIX.
                SORT I_HITEM BY AUFNR.
                CLEAR W_HITEM.
              ENDIF.
            ENDIF.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    ***********END OF PHANTOM MATERIAL ITEM DETAILS.*********************
    ENDFORM.                    "get_item_DETAILS
    *&      Form  top_of_page
          text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
      IT_LIST_COMMENTARY = I_HEADER
    I_LOGO =
    I_END_OF_LIST_GRID =
    ENDFORM.                    " alv_top_of_page
    *&      Form  user_command
          text
         -->P_UCOMM    text
         -->P_SELFIELD text
    FORM DISPLAY_ALV_REPORT.
      SORT I_HHEADER BY MATNR.
      SORT I_HITEM   BY MATNR AUFNR.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         I_CALLBACK_PROGRAM             = GD_REPID
         I_CALLBACK_PF_STATUS_SET       = 'PF_STATUS_SET'
         I_CALLBACK_USER_COMMAND        = 'SUB_USER_COMMAND'
         IS_LAYOUT                      = GD_LAYOUT
         IT_FIELDCAT                    = I_FIELDCATALOG
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
         IT_EVENTS                      = I_EVENTS[]
      IT_EVENT_EXIT                  =
          I_TABNAME_HEADER               = 'I_HHEADER'
          I_TABNAME_ITEM                 = 'I_HITEM'
      i_structure_name_header        =
      i_structure_name_item          =
          IS_KEYINFO                     = W_KEYINFO
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB_HEADER                = I_HHEADER
          T_OUTTAB_ITEM                  = I_HITEM
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display_alv_report
    *****BEGIN OF CUMMILATIVE QUANTITY***********************
    FORM PF_STATUS_SET USING EXTAB TYPE SLIS_T_EXTAB.
      BREAK POINT.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "PF_STATUS_SET
    *&      Form  SUB_USEMR_COMMAND
          text
         -->P_UCOMM    text
         -->P_SELFIELD text
    FORM SUB_USER_COMMAND  USING P_UCOMM  LIKE SY-UCOMM
                           P_SELFIELD TYPE SLIS_SELFIELD.
      CASE SY-UCOMM.
        WHEN 'SUMM'.
          CLEAR W_HITEM.
          CLEAR W_HHEADER-V_QTY.
          P_SELFIELD-REFRESH = 'X'.
          DATA:LV_TABIX TYPE SY-TABIX.
          LOOP AT I_HITEM INTO W_HITEM.
            READ TABLE I_HHEADER INTO W_HHEADER
                        WITH KEY MATNR = W_HITEM-MATNR BINARY SEARCH.
            IF SY-SUBRC = 0.
              LV_TABIX = SY-TABIX.
              IF W_HITEM-CHECK = 'X'.
                W_HHEADER-V_QTY = W_HHEADER-V_QTY +  W_HITEM-GAMNG.
                MODIFY I_HHEADER FROM W_HHEADER
                      INDEX LV_TABIX." TRANSPORTING V_QTY.
              ENDIF.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    *********END OF CUMMILATIVE QUANTITY
    Thanks in advance.
    Ramesh.

    Hello Ramesh,
    Check your declerations,
    In internal table  I_HHEADER , the quantity field is of character type. And in internal table I_HITEM, the field GAMNG is of type quantity. There will be type mismatch.Correct it and see if it works.
    Regards

  • How to validate Quantity field in TV - Inputfield ?

    Hello All,
            I'm using a table view to show the output .
    IN this table view I made 2 fields as Input fields.
    Both the fields are Quantity fields.
    Now when the user enters a value in this Quantity field I want to validate it with respect to it's units .
    How can I do that ?
    In my case if the user enters correct value it works but when he enters a wrong value my BSP is going for a dump.
    I tried to debug the<b> LIPS table</b> to verify how SAP was handling this checking for the field <b>LFIMG</b>. But there there is a statement called chain --endchain.
    SO there is no chance for debugging.
    My code is as follows :-
            LOOP AT gt_final INTO wa_final.
              CLEAR: gv_row,lv_qty,lv_string,gv_len,gv_cell_id1.
              gv_row = sy-tabix.
              gv_len = STRLEN( gv_row ).
              gv_len = gv_len - 1.
    * Modify the Third Column
              CONCATENATE 'INB01_TV_ID' '_' gv_row(gv_len) '_' '3' INTO gv_cell_id1 .
              lv_string = request->get_form_field( name = gv_cell_id1 ).
              WRITE lv_string TO lv_qty  UNIT wa_final-units.
              CLEAR :wa_final-del_quantity.
              wa_final-del_quantity = lv_qty.
              MODIFY gt_final FROM wa_final TRANSPORTING del_quantity.
            ENDLOOP.
    Can anyone tell me how to validate the entry for the Quantity filed ?
    Regards,
    Deepu.K
    I have one more Question .
    Whenever BSP goes for a dump in this case I want to handle this by a message .
    Is it possible ?
    Message was edited by:
            deepu k

    Hello Raja,
           I want to validate the entry in the QUantity field with respect to the Unit of the Quantity.
    I.e say for example I have a unit as PC (pieces) then the quantity must be only of thousands,lakks and so..on......but not in points i.e a piece quantity must be full either 200 ,2 lakhs or 2 pieces but not 2.5 pieces.
    SO now if the user enters 2.5 it's a wrong value as the quantity for the Unit PIECES can't have half-piece. (2.5 = 2 + 0.5) .SO i want to validate this .
    I hope I'm clear.
    How should I do ?
    Regards,
    Deepu.k

  • Problem with quantity field in BDC

    hi experts,
                   i am trying to upload  data from internal table to SAP using BDC, but while uploading quantity fields it is giving error as "Input fields is longer than screen field", Is there any method to upload quantity fields to SAP.
                     thanks in adancae,

    Hi,
    Before passing the value to perform bdc_field, convert that value to char type
    For eg.
    DATA :        v_val(10)               TYPE c,
      v_val = wa_operation-std_value_01. CONDENSE v_val.
      CONCATENATE 'PLPOD-VGW01(' n_linecount1 ')' INTO v_para.
      PERFORM f_bdc_field       USING v_para           v_val.
    FORM f_bdc_field  USING fnam fval.
      CLEAR wa_bdctab.
      wa_bdctab-fnam = fnam.
      wa_bdctab-fval = fval.
      APPEND wa_bdctab TO it_bdctab.
    ENDFORM.                    " f_bdc_field
    check this it would be useful.

  • Order quantity field in the item overview tab of a sales order

    Hi,
    I would like to make the order quantity field inactive, i.e., the field should be greyed out, when i enter the transaction VA01.
    Is there any way this can be done through functional configuration?
    Cheers,
    MR

    Unfortunately, it doesn't.
    The requirement was to adapt transaction's layout in order to disable editing (e.g. turning it to grey, disactivating the field) for a particular field. This kind of job should be done dinamically as it interests only some kind of Purchase Requisitions (whose attributes should be checked "runtime").
    I found a good user exit which is executed every time a PR is loaded from Enjoy transactions ME51N/ME52N/ME53N in which i can easily check if prerequisites for the "locked field" exist... but there's no visibility over the right SCREEN in that user exit (and also, I tried, in ANY of the std userexit) so I don't know how to tell the transaction "hey, for this order turn the EPSTP (=pstyp in EBAN) grey since it must be not-modifiable".
    Can't get at the same time Field Exit to work on this system (46C)

  • Sales order quantity field editable even when billed.

    Hi Gurus,
    Good Day to you all!
    We have this sales order that is already delivered and billed. I was just wondering why the sales order 'order quantity' field can still be changed or is still editable? Is it standard procedure that it would be disabled and uneditable? Is there a configuration behind this?
    We have some sales orders that are directly billed without any need for delivery. These sales orders shows the order quantity as disabled and uneditable unlike the one stated above. Anyone can please help regarding this problem
    Thank you very much!
    Best Regards,
    JV Nunez

    Dear,
    User exits in the program MV45AFZZ - USEREXIT_FIELD_MODIFICATION or USEREXIT_SAVE_DOCUMENT
    SEREXIT_FIELD_MODIFICATION -> you can disable/enable screen fields by using this user exit as you want quantity in VA02.
    screen-name = 'RV45A-KWMENG' OR " Order quantity
    screen-name = 'VBEP-WMENG' OR " Order qty in Schedule Lines
    screen-name = 'RV45A-KMPMG'. " Order quantity in "Structure" tab
    SCREEN-INPUT = 0.
    Please check with ABAPr.
    Regards,
    R.Brahmankar

Maybe you are looking for

  • How to Move my mobile Applications Folder?

    I am running our of space on my C drive and at the moment all my media (music & movies) except for my applications are on my D drive. How do I move my default applications folder to my D Drive? iTunes 9 by the way. thanks in advance.

  • I can't change events in iCal 5.0.

    On my MacBook OS X 10.7.1, I can't make any manual changes to iCal events.  When trying to edit an event, any typed change is temporary and the calendar reverts to its previous data right before my eyes.  Seems as though iCal can't write or save my c

  • Dynamic conifguration

    Hi I have worked on the dynamic configuration from weblog, /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 its working fine but i want to make that as dynamic this function dynamic enough s

  • Active content updater not working

    hello, i am having alot of trouble getting the active content updater for my flash to work, i have followed all directions and i still have to click to activate the content? i am using Flash 8 professional. Any help please?

  • Ineteractive form application deployment error

    Dear All, We are creating a Adobe document application using Developer Studio.we have already done config , we are SP15 now. We are just keeping a simple static text in this form to test it. When we deploy and run it gives us error: Failed to process