Mapping of period with total quantity field

Hi All,
I haVe Total quantity field MEG001,MEG002,MEG003..............MEG012 from table COSP.
I have parameter on selection screen as period(perio) from table mbewh
No my requirement is if the period is 00 then field MEG001
if period is 01 then MEG002
period11...........MEG011
period 12............MEG012
Please let me know if any solution.
Regards,
oorvi

Hi,
You could try like this,
parameter: p_period type (your period field).
data: len type i,
         var type string.
len = p_period + 1.
concatenate 'MEG' len into var.
select single ( var )
from COSP
into temp
where (any conditions)
Vikranth

Similar Messages

  • CJI3 report not displaying values correctly in the "Total Quantity" field

    Dear Friends,
    Need your assistance on the issue explained below,
    In our project there is a scenario where the actuals posted on a WBS are split/distributed to various WBS.These actuals that are split can be CATS entries,manual posting (KB21) or postings that come to R3 from a legacy system.The split happens by means of a custom program and is not standard.There is a tab seperated text file that contains the split percentages and the sender as well as the receiver WBS elements.Off late it has been observed that after the split is done the CJI3 report does not show the split quantities correctly and hence there is difference in the values displayed in the currency field.This is not a rounding off difference and is considerable.We have done all possible analysis from our side but i am unable to find how the difference occurs.
    To add to this i have even come across certain notes which describe the issue closely but none of it has helped so far. I have simulated the scenario with the same settings in the Quality server and it seems to work fine there without any glitches. We have even compared the program in both the Quality as well as the Production servers and there is no difference in the program as well.The values for the total quantity field are stored in the table COVP and it has been observed the report is fetching this data to display in CJI3.
    I have run CJEN too but this too does not correct the report. I was just wondering if any of our colleagues can provide me with some suggestions or insight in this issue.
    Regards,
    Gokul

    Hi Praveen,
    Thanks for the response.
    Actually i did debug the program with the help of our technical guys but found nothing wrong in both the quality and the production system. We compared the program in both the systems and it seems to be same. I am exploring this issue. Will update the findings here.
    In case anyone has any suggestion please do suggest.
    Regards,
    Gokul

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Oldest Requisition with total quantity

    I have a report that shows all open purchase requisitions with the quantity to order. What I would like to do is only show the oldest (smalled number) requistion with the total quantity of all the requisitions per material. Is something like this possible?

    Hi,
    Try in the report columns, eg: if you have KeyFig1 in report in columns, just right click an dchekc with the propeties --> Calculate Result as and Calculate single value as options.
    Thanks
    Reddy.

  • Problem with  the quantity field in bdc?

    Hi,
    i have to populate a quantity field in bdc .
    for ex 123.00. but the bdc accepting only in the form of 123,00.
    How can I do this .
    I tried by changing the user profile, but went in vain.
    Suggest me how to convert ?
    Thanks.

    Hi,
    Create a variable of TYPE CHAR.Write your quantity field value into this variable and pass this variable to the BDC. This is the way of passing quantity fields to BDC.
    DATA: V_AMOUNT(22) TYPE C.
    WRITE ITAB-DMBTR INTO V_AMOUNT.
    Pass this V_AMOUNT to BDC flow.
    Hope this helps.
    ashish

  • BAPI for PURCHASE ORDER with OPEN QUANTITY field

    Hi All,
    I wanted to use the BAPI_PO_GETDETAIL to get the Purchase Order details upon triggering from Warehouse management system,
    But the details required contains a field called OPEN QUANTITY...which is not used in this BAPI.
    I request to let me know if any BAPI exits for PO details having the structure for this field:Open Quantity.
    Am using SAP version 4.0B.
    If not exists please advise how to customize the existing BAPI to meet the requirement.
    thanks
    mahi

    Hi,
    Open quantity is a calculated field. I guess the BAPI gives the details of the delivery, so take the ordered qty and substract the delivered qty from that.
    Delivery data is EKET table.
    Regards,
    Ravi

  • Populating Quantity fields in Table Maintainance generator Events.

    Hi all,
    I have a custom table, in that i have to check the material number and the quantity of the previously present entries and current entry which i am adding in the before save event.
    However in the total table.... The value of material is getting populated correctly but the value of the quantity is not the actual one which i have entered, It is taking the value 0.00 at runtime.
    Please suggest me the approach when we have to deal with the Quantity fields in the table events.
    Thanks in advance for your help.
    Regards,
    Anuja

    Hi,
    The reference for the Quantity field is provided in the Custom table. However the value of the Quantity is taken as 0.00 at run time.
    Please refer to the below code.
    LOOP AT total.
        IF <action> EQ space.
          l_wa_temp-matnr = total+3(18).
        l_wa_temp-bmenge = total+95(13).
          APPEND  l_wa_temp TO l_i_temp.
          CLEAR l_wa_temp .
        ENDIF.
      ENDLOOP.
    however the  l_wa_temp-bmenge is getting populated as 0.00 however the actual value entered for it is 10
    Regards,
    Anuja

  • How to add Total Quantity in Inbound and Outbound Delivery screen

    Hi,
    I want to add Total quantity field in Inbound and Outbound Delivery screens.
    In document flow i can see the line item quantities in ALV Format, but if i select Display the totals above the entry check box
    in Change Layout--> Display, i didn't see any totals displayed.
    Please help me on this?
    Regards
    Bhuvana

    Hi
    If the field is a customer field, see BADI 'LE_SHP_TAB_CUST_HEAD'
    Regards
    Eduardo

  • CL_GUI_ALV_GRID problem: editable quantity field

    Hi,
    I have this ALV with editable quantity field type MEINS.
    The quantity is displayed with 3 decimals.
    eg. 1.000
    when I try to change the value to 99
    and call method CHECK_CHANGED_DATA to get the updated value.
    it turns into 0.099 in my internal table.
    same thing happens when i change the value to 99.000.
    Did i miss out anything?
    Please help.

    Hi Jeff,
    This can be done by setting ref_fieldname and ref_tabname in the field catalogue for Currency and Quantity fields .
    Hope this helps.

  • Error with quantity field:Datasource Creation Using Function Module method

    Problem with DATASOURCE Creation using Function Module method :
    I have created a datasource ZSTANDARD_COST_PRICE using Function Module method . The datasource creation is successfull when I remove the quantity field from the Z table . If I dont remove the quantity field from my Z table it gives an error as "Units Field WAERS for field STPRS of datasource ZSTANDARD_COST_PRICE is hidden". I am not able to remove this error . Please someone guide.
    Let me know if my explanation is not clear enough.
    Thanks in advance,
    Neha.
    Z table definition is as below :
    MATNR MATNR CHAR 18 0 Material Number
    BWKEY BWKEY CHAR 4 0 Valuation area
    LFGJA LFGJA NUMC 4 0 Fiscal Year of Current Period
    STPRS STPRS CURR 11 2 Standard Price   " Here the currency field is WAERS and table T001
    PEINH PEINH DEC 5 0 Price Unit
    VJSTP VJSTP CURR 11 2 Standard price in previous year
    VJPEI VJPEI DEC 5 0 Price unit of previous year.
    Edited by: Neha Rathi on Jan 30, 2009 3:03 PM

    Hi,
    You should add it as one of the main fields as you have added other fields and not as the currency fields...that is..it should be part of the data source and you should be able to see it in RSO2...
    Also if added as i said then it will come as new field in the data source...you can either let it be there...or hide it..
    also if you want to populate it then you will have to write the code for this fields as well.
    Thanks
    Ajeet

  • Create item delivery with zero or total quantity (even if available stock)

    Hello!!
    My requirement is create a item delivery with zero or total quantity, but not only the stock available at this moment. The item only will have 2 possibilities: 0 quantity or total quantity of the sales order.
    Example of the current process:
    Material M-10: Stock available: 2
    M-10: Item in sales order: 6
    M-10: Item in delivery: 2  --> should be 0!!!
    Material M-20: Stock available: 10
    M-20: Item in sales order: 5
    M-20: Item in delivery: 5
    In M-10, quantity in item delivery should be 0. (my category item delivery allows quantity 0).
    Do you know if there is some customizing for this requirement? All quantity from sales order or 0 in delivery item.
    Thanks in advance,
    Jen

    Hi,
    for complete delivery:
    Entering the Indicator
    There are two places where you can enter this indicator:
    Customer master record
    This indicator belongs to the shipping data for a customer within a sales area. You enter an X in the Complete Delivery field on the shipping screen of the customer master record. The indicator is copied into the order header.
    Order header
    You can also enter the indicator X in the Delivery field on the business data screen of the order header.
    If you try to partially deliver an order to which you have assigned a complete delivery indicator, the system will inform you that the customer requires complete delivery of the order. All items must be delivered at the same time. The items cannot have different delivery deadlines.
    If the system cannot include all the items with the total order quantity in the delivery, you receive a message that the customer requires full delivery.
    If you enter the complete delivery indicator X, you must set the partial delivery indicator to C (no partial deliveries allowed).

  • Quantity field total

    Hi experts
    here in my quantity field there are units cm2(column centimeters) and WD(words)  if u caluculate total on qty naturally it will display * is any possibilty there in report level to disply cm2 total seperately and WD total seperately if so tetll me the solution.
    regards
    anand

    Hi Anand,
    As you want the subtotals for the quantity and due to different units you are getting * values in the result, the suggested approach was to distinguish the records based on units. This can be achieved using restricted KF where we will restrict the KF on Unit. This will ensure that all the records with "for example KG" as unit will be restricted in one restricted KF. Same can be achieved for all other units.
    This means you have to create 15 restricted KFs if you have 15 different units in the data. This will result in a bit slower response while executing the query with som many restricted KFs.
    Hope this clears your doubt.
    Regards,
    Yogesh,

  • Quantity fields not getting displayed in the second total row

    Hi,
    As per the requirement I have to display 2 total rows for an ALV report using CL_GUI_ALV_GRID. I am able to get the first total row properly using method get_subtotal(). However for the next total row only the character fields are getting displayed and the quantity fields are coming blank.
    The second total row will have different values based on a formula.
    Please help me out in resolving the issue.
    Thanks,
    Abhishek

    You can provide first row as the SUBTOTAL and next row as the TOTAL.
    Get one extra column on which you can do the SUBTOTAL.
    Regards,
    Naimesh Patel

  • Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..

    Dear friends,
    I am attempting write a dymanic Select Statement (with joins).
    And the sleect query looks like this..
      SELECT (LT_SEL_LIST)
      INTO CORRESPONDING FIELDS OF
      TABLE <DYN_TABLE>
      FROM (LT_FROM_LIST)
      WHERE (LT_WHERE3).
    Here the into table is a dynamically created internal table..
    which is created by ...this
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IT_OUTPUT2[]
        IMPORTING
          EP_TABLE        = DY_TABLE.
    the it_output2 contains the the fieldcatlog information of dynamically given fields :-
    like:-
           TABNAME
           FIELDNAME
           DATATYPE
           LENG
           INTTYPE
           ROLLNAME
           DECIMALS
           REFTABLE
           REFFIELD
    i mean the internal table is constructed with reference to all the bove metadata.
    Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
    When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
    "The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
    the target field's type or the target field is too short."
    after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
    so now my fieldcatlog looks like this:---
    LOOP AT IT_DD03L..
      IF IT_DD03L-DATATYPE = 'CURR'.
           TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
           ENDIF.
       IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
           TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
      ENDIF.
           TABLEFIELD-TABNAME     = IT_DD03L-TABNAME.
           TABLEFIELD-FIELDNAME   = IT_DD03L-FIELDNAME.
           TABLEFIELD-DATATYPE    = IT_DD03L-DATATYPE.
           TABLEFIELD-INTLEN      = IT_DD03L-LENG.
           TABLEFIELD-INTTYPE     = IT_DD03L-INTTYPE .
           TABLEFIELD-ROLLNAME    = IT_DD03L-ROLLNAME.
           TABLEFIELD-DECIMALS    = IT_DD03L-DECIMALS.
           TABLEFIELD-REF_TABLE   = IT_DD03L-REFTABLE.
           TABLEFIELD-REF_FIELD   = IT_DD03L-REFFIELD.
    APPEND TABLEFIELD.
    CLEAR TABLEFIELD.
    ENDLOOP.
    Note:- this is a test code so ignore performance issues...
    Please help me with some code ...to avoid the Runtime erorr.
    Thanks,
    jeevan.

    Hi Jeevan,
    Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
    data: it_dd03l type table of dd03l initial size 0,
          ls_dd03l type dd03l,
          lt_fldcat TYPE lvc_t_fcat,
          ls_fldcat TYPE lvc_s_fcat,
          ls_where(72) TYPE c,
          lt_where LIKE TABLE OF ls_where,
          lt_fld LIKE TABLE OF ls_where,
          lt_data_dy TYPE REF TO data.
    field-symbols: <ft_data> TYPE STANDARD TABLE.
    select * into table it_dd03l from dd03l
        where tabname = 'VBAK'
          and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
    check sy-subrc eq 0.
    loop at it_dd03l into ls_dd03l.
      move-corresponding ls_dd03l to ls_fldcat.
      append ls_fldcat to lt_fldcat.
      move ls_dd03l-fieldname to ls_where.
      append ls_where to lt_fld.
      if ls_dd03l-fieldname = 'VBELN'.
        clear ls_where.
        concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
        append ls_where to lt_where.
      endif.
    endloop.
    check not lt_fldcat is initial.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog           = lt_fldcat
          IMPORTING
            ep_table                  = lt_data_dy
          EXCEPTIONS
            generate_subpool_dir_full = 1
            OTHERS                    = 2.
        IF sy-subrc <> 0.
          RAISE no_configuration_data.
        ENDIF.
        ASSIGN lt_data_dy->*  TO <ft_data>.
    check sy-subrc eq 0.
    select (lt_fld) from VBAK into corresponding fields of table
        <ft_data>
        where (lt_where).
    Thanks
    Bala

  • Field to see total quantity in sales order

    Hi all,
    is  there  any s tandard  way    could  add  the  total  units field  into  sales  order  screen?
    (Not using any  append to VBAK  and  so  on)
    Thanks and  best  regards
    Germo

    Hi
    there is no such in standard, you might achieve this by using a screen variant, and add a field with help of your ABAPer to assist you.
    regards
    Sidi

Maybe you are looking for