Uom urgent

Hi experts,
plz go through this issue
I am in SAP 4.70
Base UOM in MMR is MT
Unit of Issue is KG
  When I try to issue 0.4 kg
System populating the message "Quantity in stockkeeping unit is zero
Message no. M7106
Diagnosis
The system has converted the quantity entered in the unit of entry into the quantity in the stockkeeping unit. The conversion results in a quantity that is smaller than 0.001. As only three decimal places are possible for a quantity, a quantity that is smaller than this (for example, 0.0003) is interpreted as 0.000.
I would like to know is there any solution for this in further releases or any SAP notes exist for this.
And now the UOM cannot be changed
Plz throw some light on this.
TR

you cannot solve your problem to be satisfied, you violated the recommendations of SAP for setup of material units.
SAP recommends to always use the smalles unit as base unit to avoid rounding issues.
The quantity fields have 3 decimals only. CUNI settings will have no impact on this. This is just a technical settings for the field domain.
1 MT = 1000 kg
1 kg = 0,001 MT
0,04 kg = 0,0004 MT
but: SAP has only 3 decimals for quantity fields --> hence it needs to round --> in this case DOWN --> which is
0,04 kg = 0,000 MT
See OSS note 362932. It has all kind of information about conversion, ...
The easies solution is to create a new material master with KG as base unit and MT as alternative unit .
Then issue all the quantity of old material number with 201 to cost center
then do a 202 to write on the quantity at the new material.
Edited by: Jürgen L. on May 28, 2008 12:01 PM

Similar Messages

  • UOM Problem - Urgent

    Hi Ppl,
    We have set UOM-EA as decimal places 0 from Tx SPRO.But it is allowing the decimal places in all transaction accross the client.We are not even getting a clue
    using the Tx CUNI.Have already checked the Table T006 where all the UOMs are maintained and seen that decimal field ofr EA is set as 0.
    What is the reason for this?
    How can it will be corrected,if through ABAP plz reply,its urgent.
    Thx in Adv.
    John.

    If something is "urgent" please use the official support channels (Service Marketplace) and open an OSS call.
    What unit did you set to 0?
    Markus

  • Conversion of UOM TO KG'S Urgent!!!!!!!!!!!!!!!!!

    can any one tell me how to convert UOM TO KG'S.
    Is there any FM to do it.

    use the FM:
    UNIT_CONVERSION_SIMPLE
    Usage:
      CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
           EXPORTING
                INPUT                = <value in Base unit>
                UNIT_IN              = <Unit of measure>
                UNIT_OUT             = 'KG'
           IMPORTING
                OUTPUT               = V_Value
           EXCEPTIONS
                CONVERSION_NOT_FOUND = 2
                INPUT_INVALID        = 4
                OUTPUT_INVALID       = 4
                TYPE_INVALID         = 4
                DIVISION_BY_ZERO     = 6
                OVERFLOW             = 8
                UNITS_MISSING        = 10
                UNIT_IN_NOT_FOUND    = 12
                UNIT_OUT_NOT_FOUND   = 12.
    Regards,
    Ravi
    Message was edited by:
            Ravi Kanth Talagana

  • Report Name:Pending GR's Against Quality Inspection(Urgent)

    Hi Frds,
    here i wants display GR Number,GR Date,Material code,Material Desc,UOM,Material quantity,Plant,Vendor Code,Vendor Name.
    Now i want table and field name for Quantity ..Give some Tips to do this report ..
    Urgent.
    BY
    Pari Vendhan.R

    Hi,
    Check the QALS table for inspection lots.........and QAMR,QAMV for inspection results.
    Cheers,
    jose.

  • Urgent: Error-Record 39,779, segment 0001 is not in the cross-record table

    Hi Gurus,
    This is an urgent production issue: I got the following error-
    I am updating data records from a DSO to Infocube in delta mode,
    1.Record 39,779, segment 0001 is not in the cross-record table
    2.Error in substep: End Routine
    I dont know problem is in the End Routine or somewhere else,
    The End routine is this:
    PROGRAM trans_routine.
          CLASS routine DEFINITION
    CLASS lcl_transform DEFINITION.
      PUBLIC SECTION.
    Attributs
        DATA:
          p_check_master_data_exist
                TYPE RSODSOCHECKONLY READ-ONLY,
    *-    Instance for getting request runtime attributs;
        Available information: Refer to methods of
        interface 'if_rsbk_request_admintab_view'
          p_r_request
                TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
      PRIVATE SECTION.
        TYPE-POOLS: rsd, rstr.
      Rule specific types
        TYPES:
          BEGIN OF tys_TG_1,
         InfoObject: ZVEHICLE Unique Vehicle ID.
            /BIC/ZVEHICLE           TYPE /BIC/OIZVEHICLE,
         InfoObject: ZLOCID Mine Site.
            /BIC/ZLOCID           TYPE /BIC/OIZLOCID,
         InfoObject: ZLOCSL Location Storage Location.
            /BIC/ZLOCSL           TYPE /BIC/OIZLOCSL,
         InfoObject: 0VENDOR Vendor.
            VENDOR           TYPE /BI0/OIVENDOR,
         InfoObject: ZNOMTK Nomination Number.
            /BIC/ZNOMTK           TYPE /BIC/OIZNOMTK,
         InfoObject: ZNOMIT Nomination Item.
            /BIC/ZNOMIT           TYPE /BIC/OIZNOMIT,
         InfoObject: ZNOMNR Nomination number.
            /BIC/ZNOMNR           TYPE /BIC/OIZNOMNR,
         InfoObject: ZVSTTIME Vehicle Starting Time Stamp.
            /BIC/ZVSTTIME           TYPE /BIC/OIZVSTTIME,
         InfoObject: ZVEDTIME Vehicle Ending Time Stamp.
            /BIC/ZVEDTIME           TYPE /BIC/OIZVEDTIME,
         InfoObject: ZNETWT Net Weight.
            /BIC/ZNETWT           TYPE /BIC/OIZNETWT,
         InfoObject: TU_GRS_WG Gross Wgt.
            /BIC/TU_GRS_WG           TYPE /BIC/OITU_GRS_WG,
         InfoObject: ZTU_TRE_W Tare Wgt.
            /BIC/ZTU_TRE_W           TYPE /BIC/OIZTU_TRE_W,
         InfoObject: ZCUSTWT Customer Weight.
            /BIC/ZCUSTWT           TYPE /BIC/OIZCUSTWT,
         InfoObject: ZCAR_NO Car Number.
            /BIC/ZCAR_NO           TYPE /BIC/OIZCAR_NO,
         InfoObject: ZINBND_ID Train Consist Inbound ID.
            /BIC/ZINBND_ID           TYPE /BIC/OIZINBND_ID,
         InfoObject: ZOTBND_ID Train Consist Return Load.
            /BIC/ZOTBND_ID           TYPE /BIC/OIZOTBND_ID,
         InfoObject: 0SOLD_TO Sold-to Party.
            SOLD_TO           TYPE /BI0/OISOLD_TO,
         InfoObject: 0CUSTOMER Customer Number.
            CUSTOMER           TYPE /BI0/OICUSTOMER,
         InfoObject: 0SHIP_TO Ship-To Party.
            SHIP_TO           TYPE /BI0/OISHIP_TO,
         InfoObject: ZVEHI_NO Vehicle Number.
            /BIC/ZVEHI_NO           TYPE /BIC/OIZVEHI_NO,
         InfoObject: ZCARSTDAT Car Start Date.
            /BIC/ZCARSTDAT           TYPE /BIC/OIZCARSTDAT,
         InfoObject: ZCAREDDAT Car End Date.
            /BIC/ZCAREDDAT           TYPE /BIC/OIZCAREDDAT,
         InfoObject: ZCARSTTIM Car Start Time.
            /BIC/ZCARSTTIM           TYPE /BIC/OIZCARSTTIM,
         InfoObject: ZCAREDTIM Car End Time.
            /BIC/ZCAREDTIM           TYPE /BIC/OIZCAREDTIM,
         InfoObject: 0COMPANY Company.
            COMPANY           TYPE /BI0/OICOMPANY,
         InfoObject: ZCONTRACT Contract.
            /BIC/ZCONTRACT           TYPE /BIC/OIZCONTRACT,
         InfoObject: 0PLANT Plant.
            PLANT           TYPE /BI0/OIPLANT,
         InfoObject: ZLOADTIME Total Vehicle Loading time.
            /BIC/ZLOADTIME           TYPE /BIC/OIZLOADTIME,
         InfoObject: ZSHIPDATE Shipping Date.
            /BIC/ZSHIPDATE           TYPE /BIC/OIZSHIPDATE,
         InfoObject: ZSHIPTIME Shipping Time.
            /BIC/ZSHIPTIME           TYPE /BIC/OIZSHIPTIME,
         InfoObject: ZMNEDDT Manifest End Date.
            /BIC/ZMNEDDT           TYPE /BIC/OIZMNEDDT,
         InfoObject: ZMNEDTM Manifest End Time.
            /BIC/ZMNEDTM           TYPE /BIC/OIZMNEDTM,
         InfoObject: ZLDEDDT Loaded End Date.
            /BIC/ZLDEDDT           TYPE /BIC/OIZLDEDDT,
         InfoObject: ZLDEDTM Loaded End Time.
            /BIC/ZLDEDTM           TYPE /BIC/OIZLDEDTM,
         InfoObject: ZMANVAR Manifest Variance.
            /BIC/ZMANVAR           TYPE /BIC/OIZMANVAR,
         InfoObject: ZTU_TYPE Trpr Unit Type.
            /BIC/ZTU_TYPE           TYPE /BIC/OIZTU_TYPE,
         InfoObject: ZACTULQTY Actual posted quantity.
            /BIC/ZACTULQTY           TYPE /BIC/OIZACTULQTY,
         InfoObject: ZVEDDT Vehicle End Date.
            /BIC/ZVEDDT           TYPE /BIC/OIZVEDDT,
         InfoObject: ZVEDTM Vehicle End Time.
            /BIC/ZVEDTM           TYPE /BIC/OIZVEDTM,
         InfoObject: ZVSTDT Vehicle Start Date.
            /BIC/ZVSTDT           TYPE /BIC/OIZVSTDT,
         InfoObject: ZVSTTM Vehicle Start Time.
            /BIC/ZVSTTM           TYPE /BIC/OIZVSTTM,
         InfoObject: ZTRPT_TYP Vehicle type.
            /BIC/ZTRPT_TYP           TYPE /BIC/OIZTRPT_TYP,
         InfoObject: 0CALMONTH Calendar Year/Month.
            CALMONTH           TYPE /BI0/OICALMONTH,
         InfoObject: 0CALYEAR Calendar Year.
            CALYEAR           TYPE /BI0/OICALYEAR,
         InfoObject: ZLOEDDT Quality Sent End Date.
            /BIC/ZLOEDDT           TYPE /BIC/OIZLOEDDT,
         InfoObject: ZLOEDTM Quality sent End Time.
            /BIC/ZLOEDTM           TYPE /BIC/OIZLOEDTM,
         InfoObject: ZATMDDT At Mine End Date.
            /BIC/ZATMDDT           TYPE /BIC/OIZATMDDT,
         InfoObject: ZATMDTM At Mine End Time.
            /BIC/ZATMDTM           TYPE /BIC/OIZATMDTM,
         InfoObject: ZDELAY Delay Duration.
            /BIC/ZDELAY           TYPE /BIC/OIZDELAY,
         InfoObject: ZSITYP Schedule type.
            /BIC/ZSITYP           TYPE /BIC/OIZSITYP,
         InfoObject: ZDOCIND Reference document indicator.
            /BIC/ZDOCIND           TYPE /BIC/OIZDOCIND,
         InfoObject: 0BASE_UOM Base Unit of Measure.
            BASE_UOM           TYPE /BI0/OIBASE_UOM,
         InfoObject: 0UNIT Unit of Measure.
            UNIT           TYPE /BI0/OIUNIT,
         InfoObject: ZACT_UOM Actual UOM.
            /BIC/ZACT_UOM           TYPE /BIC/OIZACT_UOM,
         Field: RECORD.
            RECORD           TYPE RSARECORD,
          END   OF tys_TG_1.
        TYPES:
          tyt_TG_1        TYPE STANDARD TABLE OF tys_TG_1
                            WITH NON-UNIQUE DEFAULT KEY.
    $$ begin of global - insert your declaration only below this line  -
    ... "insert your code here
    $$ end of global - insert your declaration only before this line   -
        METHODS
          end_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              RESULT_PACKAGE              type tyt_TG_1
            RAISING
              cx_rsrout_abort.
        METHODS
          inverse_end_routine
            IMPORTING
              i_th_fields_outbound         TYPE rstran_t_field_inv
              i_r_selset_outbound          TYPE REF TO cl_rsmds_set
              i_is_main_selection          TYPE rs_bool
              i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
              i_r_universe_inbound         TYPE REF TO cl_rsmds_universe
            CHANGING
              c_th_fields_inbound          TYPE rstran_t_field_inv
              c_r_selset_inbound           TYPE REF TO cl_rsmds_set
              c_exact                      TYPE rs_bool.
    ENDCLASS.                    "routine DEFINITION
    $$ begin of 2nd part global - insert your code only below this line  *
    ... "insert your code here
    $$ end of 2nd part global - insert your code only before this line   *
          CLASS routine IMPLEMENTATION
    CLASS lcl_transform IMPLEMENTATION.
          Method end_routine
          Calculation of result package via end routine
          Note: Update of target fields depends on rule assignment in
          transformation editor. Only fields that have a rule assigned,
          are updated to the data target.
      <-> result package
      METHOD end_routine.
    *=== Segments ===
        FIELD-SYMBOLS:
          <RESULT_FIELDS>    TYPE tys_TG_1.
        DATA:
          MONITOR_REC     TYPE rstmonitor.
    *$*$ begin of routine - insert your code only below this line        *-*
    Fill the following fields by reading Nomination and Vehicls DSO
    SOLD_TO, Customer
    data: L_TIMESTAMP1 TYPE timestamp,
          L_TIMESTAMP2 TYPE timestamp,
          L_TIMESTAMP3 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP4 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP5 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP6 type CCUPEAKA-TIMESTAMP,
          L_TIMESTAMP7 TYPE timestamp,
          L_TIMESTAMP8 TYPE timestamp,
          L_TIMESTAMP9 type timestamp,
          L_TIMESTAMP10 type TIMESTAMP,
          L_CHAR1(14),
          L_CHAR2(14),
          l_duration type I,
          L_TS TYPE TZONREF-TZONE,
          l_flag,
          l_nomit TYPE /BIC/OIZNOMIT,
          l_error_flag.
    l_TS = 'CST'.
    Data: EXTRA_PACKAGE type tyt_TG_1.
    data: extra_fields type tys_TG_1.
    LOOP at RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
    clear l_error_flag.
    Get sold_to and customer from nomination table.
       Select single SOLD_TO /BIC/ZLOCSL /BIC/ZCONTRACT COMPANY
                     /BIC/ZMNEDDT /BIC/ZMNEDTM /BIC/ZLDEDDT
                     /BIC/ZLDEDTM SHIP_TO /BIC/ZACTULQTY
                     /BIC/ZLOEDDT /BIC/ZLOEDTM /BIC/ZDELAY
                     /BIC/ZATMDDT /BIC/ZATMDTM
                     /BIC/ZSITYP /BIC/ZDOCIND
               into (<RESULT_FIELDS>-SOLD_TO,
                     <RESULT_FIELDS>-/BIC/ZLOCSL,
                     <RESULT_FIELDS>-/BIC/ZCONTRACT,
                     <RESULT_FIELDS>-company,
                     <RESULT_FIELDS>-/BIC/ZMNEDDT,
                     <RESULT_FIELDS>-/BIC/ZMNEDTM,
                     <RESULT_FIELDS>-/BIC/ZLDEDDT,
                     <RESULT_FIELDS>-/BIC/ZLDEDTM,
                     <RESULT_FIELDS>-SHIP_TO,
                     <RESULT_FIELDS>-/BIC/ZACTULQTY,
                     <RESULT_FIELDS>-/BIC/ZLOEDDT,
                     <RESULT_FIELDS>-/BIC/ZLOEDTM,
                     <RESULT_FIELDS>-/BIC/ZDELAY,
                     <RESULT_FIELDS>-/BIC/ZATMDDT,
                     <RESULT_FIELDS>-/BIC/ZATMDTM,
                     <RESULT_FIELDS>-/BIC/ZSITYP,
                     <RESULT_FIELDS>-/BIC/ZDOCIND)
               from   /BIC/AZTSW_0000
               where /BIC/ZNOMTK = <RESULT_FIELDS>-/BIC/ZNOMTK
                AND  /BIC/ZNOMIT = <RESULT_FIELDS>-/BIC/ZNOMIT.
    Select Invalid Nominations
      if sy-subrc <> 0.
        l_error_flag = 'X'.
      endif.
       <RESULT_FIELDS>-customer = <RESULT_FIELDS>-SOLD_TO.
    Prepare time stamp for Time Differences
    Vehicle Starting Time Stamp
      clear : L_TIMESTAMP9,L_TIMESTAMP10.
      CONVERT DATE <RESULT_FIELDS>-/BIC/ZCARSTDAT TIME
                   <RESULT_FIELDS>-/BIC/ZCARSTTIM
               INTO TIME STAMP L_TIMESTAMP9 TIME ZONE l_TS.
    Vehicle Ending Time Stamp
      CONVERT DATE <RESULT_FIELDS>-/BIC/ZCAREDDAT TIME
                   <RESULT_FIELDS>-/BIC/ZCAREDTIM
               INTO TIME STAMP L_TIMESTAMP10 TIME ZONE l_TS.
      Clear : L_TIMESTAMP3, L_TIMESTAMP4,
             <RESULT_FIELDS>-/BIC/ZVEDTIME,
             <RESULT_FIELDS>-/BIC/ZVSTTIME.
      <RESULT_FIELDS>-/BIC/ZVEDTIME = L_TIMESTAMP10.
      <RESULT_FIELDS>-/BIC/ZVSTTIME = L_TIMESTAMP9.
      L_TIMESTAMP3 = L_TIMESTAMP10.
      L_TIMESTAMP4 = L_TIMESTAMP9.
    Caliculate the load time
    IF L_TIMESTAMP3 is initial.
       clear <RESULT_FIELDS>-/BIC/ZLOADTIME.
    elseif L_TIMESTAMP4 is initial.
       clear <RESULT_FIELDS>-/BIC/ZLOADTIME.
    else.
       CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
         EXPORTING
           timestamp1       =  L_TIMESTAMP3
           timestamp2       =  L_TIMESTAMP4
         IMPORTING
           DIFFERENCE        = <RESULT_FIELDS>-/BIC/ZLOADTIME
    ENDIF.
    Caliculate the Manifest Variance
       clear : L_TIMESTAMP5,L_TIMESTAMP6,L_TIMESTAMP7,L_TIMESTAMP8.
       CONVERT DATE <RESULT_FIELDS>-/BIC/ZMNEDDT TIME
                    <RESULT_FIELDS>-/BIC/ZMNEDTM
               INTO TIME STAMP L_TIMESTAMP7 TIME ZONE l_TS.
       CONVERT DATE <RESULT_FIELDS>-/BIC/ZLDEDDT TIME
                    <RESULT_FIELDS>-/BIC/ZLDEDTM
               INTO TIME STAMP L_TIMESTAMP8 TIME ZONE l_TS.
      L_TIMESTAMP5 = L_TIMESTAMP7.
      L_TIMESTAMP6 = L_TIMESTAMP8.
    Caliculate the Maniefest Variance
    IF L_TIMESTAMP5 is initial.
       clear <RESULT_FIELDS>-/BIC/ZMANVAR.
    elseif L_TIMESTAMP6 is initial.
       clear <RESULT_FIELDS>-/BIC/ZMANVAR.
    else.
       CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
         EXPORTING
           timestamp1       =  L_TIMESTAMP5
           timestamp2       =  L_TIMESTAMP6
         IMPORTING
           DIFFERENCE        = <RESULT_FIELDS>-/BIC/ZMANVAR
       IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    ENDIF.
    Delete datapackets with blank nominations
    Delete datapackets with blank shipdate and Invalid Time Stamps
    *IF <RESULT_FIELDS>-/BIC/ZNOMTK IS INITIAL OR
      <RESULT_FIELDS>-/BIC/ZSHIPDATE IS INITIAL.
    l_error_flag = 'X'.
    *ENDIF.
    <RESULT_FIELDS>-/BIC/ZVEHI_NO = 1.
      <RESULT_FIELDS>-CALMONTH = <RESULT_FIELDS>-/BIC/ZSHIPDATE(6).
      <RESULT_FIELDS>-CALYEAR  = <RESULT_FIELDS>-/BIC/ZSHIPDATE(4).
    if l_error_flag = 'X'.
    Looks like Monitor Entries are not working in SP11.
    Hence the following is commented temporarily.
    CLEAR MONITOR_REC.
    MONITOR_REC-MSGID = '0M'.
    MONITOR_REC-MSGTY = 'S'.
    MONITOR_REC-MSGNO = '501'.
    MONITOR_REC-MSGV1 = <RESULT_FIELDS>-/BIC/ZNOMTK.
    MONITOR_REC-recno = sy-tabix.
    APPEND MONITOR_REC to MONITOR.
    RAISE exception type CX_RSROUT_ABORT.
    DELETE RESULT_PACKAGE index sy-tabix.
    CLEAR L_ERROR_FLAG.
    else.
       MODIFY RESULT_PACKAGE FROM <RESULT_FIELDS>.
    endif.
    clear l_nomit.
    l_nomit = <RESULT_FIELDS>-/BIC/ZNOMIT.
    extra_fields = <RESULT_FIELDS>.
    Actual Qty and Contract details
       Select /BIC/ZLOCSL /BIC/ZNOMIT /BIC/ZCONTRACT /BIC/ZACTULQTY
              /BIC/ZSITYP /BIC/ZDOCIND
              SOLD_TO SHIP_TO COMPANY
               into (extra_fields-/BIC/ZLOCSL,
                     extra_fields-/BIC/ZNOMIT,
                     extra_fields-/BIC/ZCONTRACT,
                     extra_fields-/BIC/ZACTULQTY,
                     extra_fields-/BIC/ZSITYP,
                     extra_fields-/BIC/ZDOCIND,
                     extra_fields-SOLD_TO,
                     extra_fields-SHIP_TO,
                     extra_fields-company)
               from  /BIC/AZTSW_0000
               where /BIC/ZNOMTK = <RESULT_FIELDS>-/BIC/ZNOMTK AND
                     /BIC/ZNOMIT <> l_NOMIT.
           INSERT extra_fields into table EXTRA_PACKAGE.
       endselect.
    ENDLOOP.
    Append lines of extra_package to RESULT_PACKAGE.
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "end_routine
          Method inverse_end_routine
          This subroutine needs to be implemented only for direct access
          (for better performance) and for the Report/Report Interface
          (drill through).
          The inverse routine should transform a projection and
          a selection for the target to a projection and a selection
          for the source, respectively.
          If the implementation remains empty all fields are filled and
          all values are selected.
      METHOD inverse_end_routine.
    $$ begin of inverse routine - insert your code only below this line-
    ... "insert your code here
    $$ end of inverse routine - insert your code only before this line -
      ENDMETHOD.                    "inverse_end_routine
    ENDCLASS.                    "routine IMPLEMENTATION

    Hi,
    Most probably you are appending some records in the data package or deleting from the data package through end routine or expert routine or start routine.
    I just solved it.....you will have to import the note 1180163.
    Then modify the code which you are using....and include the function module as mentioned in the note 1223532.
    You need to add the function module just before you append the records.This will work perfectly.
    Thanks
    Ajeet

  • Urgent: regarding ALV  report display problem

    hi,
    There are 3 problems:-
    1.) I had made a ALV report in which i have to display 'POSTING DATE' (iseg-budat) when we execute the report i.e. it should be displayed as  PERIOD :- _______  to _______ on alv report ..
    2.)the 2nd problem is dat when i use the '  wa_fieldcat-no_zero = 'X'.  It eliminates all the leading zeros which are present which is okay when i it displays material no.. but the problem is dat it also deletes the other fields where the values are to be zeros.
    i had used this FM:-
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
       INPUT = ITS1-MATNR
       IMPORTING
       OUTPUT = ITS1-MATNR.
    so that only matnr field are to be 0's.
    3.) I want to delete the rows which use to contain the values 0's as there are no calculations are performing as these are displayed .
    ANYbody having solution of this problem ,plzzzz provide the soluion of it as it is most urgent to me and dat person will definately rewarded.
    regards,
    ric.s

    hi kiran,
    thanks for ur response. here is d code which i am using it and plzz help me to figure out where i have to make changes:-
    REPORT  ZTEST03.
    TABLES: ISEG,MARA.
    TYPE-POOLS : SLIS.
    INTERNAL TABLE FOR INVENTORY STOCK *****************
    DATA: BEGIN OF ITS1 OCCURS 0,
          MATNR LIKE ISEG-MATNR,
          MEINS LIKE ISEG-MEINS,
          MENGE LIKE ISEG-MENGE,
          WRTZL LIKE ISEG-WRTZL,
          BUCHM LIKE ISEG-BUCHM,
          WRTBM LIKE ISEG-WRTBM,
          WERKS LIKE ISEG-WERKS,
          BUDAT LIKE ISEG-BUDAT,
          MTART LIKE MARA-MTART,
          ITEMDESC LIKE MAKT-MAKTX,
          DIFFQTY LIKE ISEG-BUCHM,
          DIFFVALUE LIKE ISEG-WRTBM,
          END OF ITS1.
    data: t_heading type slis_t_listheader.
    SELECTION-SCREEN BEGIN OF BLOCK PAR1 WITH FRAME TITLE TEXT-001.
    *********PARAMETERS*********
    PARAMETERS : PLANT LIKE ISEG-WERKS OBLIGATORY.
    *********SELECTION SCREEN OPTIONS*********
    SELECT-OPTIONS : R_DATE FOR ISEG-BUDAT,
                     M_TYPE  FOR MARA-MTART,
                     IT_M FOR MARA-MATNR.
    *********DEFINING VARIABLES*********
      SELECTION-SCREEN END OF BLOCK par1.
    TOP-OF-PAGE.
         PERFORM PG_HEADER.
    START-OF-SELECTION.
    SELECT DISTINCT A~MATNR A~MEINS A~MENGE A~WRTZL A~BUCHM A~WRTBM A~WERKS A~BUDAT B~MTART
       FROM ISEG AS A INNER JOIN MARA AS B ON B~MATNR = A~MATNR
         INTO CORRESPONDING FIELDS OF TABLE ITS1 WHERE B~MATNR = A~MATNR  AND B~MEINS = A~MEINS AND A~WERKS = PLANT AND A~BUDAT IN R_DATE AND B~MTART IN M_TYPE AND B~MATNR IN IT_M.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
       INPUT = ITS1-MATNR
       IMPORTING
       OUTPUT = ITS1-MATNR.
      SORT ITS1 BY MATNR.
      DELETE ADJACENT DUPLICATES  FROM  ITS1 WHERE MENGE = 0 AND BUCHM = 0.
    LOOP AT ITS1.
         ITS1-DIFFQTY = ITS1-MENGE - ITS1-BUCHM.
         ITS1-DIFFVALUE = ITS1-WRTZL - ITS1-WRTBM.
         SELECT SINGLE MAKTX FROM MAKT INTO ITS1-ITEMDESC WHERE MATNR = ITS1-MATNR.
         MODIFY ITS1.
    ENDLOOP.
    PERFORM PRN_SMSTOCK_ALV.
    WRITING DATA FROM D TABLES**********
    FORM PG_HEADER.
    WRITE : 'PHYSICAL INVENTORY AUDIT REPORT             PLANT : ', PLANT.
    ENDFORM.
    *&      Form  PRN_SMSTOCK_ALV
          text
    -->  p1        text
    <--  p2        text
    form PRN_SMSTOCK_ALV .
    data: w_title   type lvc_title,
          w_repid   type syrepid,
          w_comm    type slis_formname,
          w_status  type slis_formname,
          x_layout  type slis_layout_alv,
          t_event    type slis_t_event,
          t_fieldcat type slis_t_fieldcat_alv,
          t_sort     type slis_t_sortinfo_alv.
    refresh t_fieldcat.
    refresh t_event.
    refresh t_sort.
    clear x_layout.
    clear w_title.
      perform set_fieldcat2 using:
    1  'MTART'     'MTART'     'MARA'  '15'  space 'MATERIAL TYPE'        space  space  space space space space space space SPACE t_fieldcat 'L' 'C',
    2  'MATNR'     'MATNR'     'MARA'  '13'  space 'MATERIAL NO. '        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    3  'ITEMDESC'  'MAKTX'     'MAKT'  '25'  space 'MATERIAL DESCRIPTION' space  space  space space space space space space SPACE t_fieldcat 'L' 'C',
    4  'MEINS'     'MEINS'     'MARA'  '5'   space 'UOM'                  space  space  space space space space space space SPACE t_fieldcat 'C' 'C',
    5  'MENGE'     'MENGE'     'ISEG'  '13'  space 'ORG.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    6  'WRTZL'     'WRTZL'     'ISEG'  '13'  space 'ORG.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    7  'BUCHM'     'BUCHM'     'ISEG'  '13'  space 'PHY.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    8  'WRTBM'     'WRTBM'     'ISEG'  '13'  space 'PHY.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    9  'DIFFQTY'   'MENGE'     'ISEG'  '13'  space 'DIFF.INV.QTY'         space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    10 'DIFFVALUE' 'WRTZL'     'ISEG'  '13'  space 'DIFF.INV.VALUE'       space  space  space space space space space space SPACE t_fieldcat SPACE 'P'.
    x_layout-zebra = 'X'.
    perform set_top_page_heading using t_heading t_event.
    perform set_events using t_event.
      w_status = ''.
      w_repid = sy-repid.
      w_comm   = 'USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = w_repid
          it_fieldcat              = t_fieldcat
          i_Callback_top_of_page   = 'Top-of-page'
          is_layout                = x_layout
          it_sort                  = t_sort
          i_callback_pf_status_set = w_status
          i_callback_user_command  = w_comm
          i_save                   = 'X'
          it_events                = t_event
          i_grid_title             = w_title
          tables
          t_outtab                 = ITS1
        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.
    FORM set_fieldcat2 USING
          p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
          t_fieldcat TYPE slis_t_fieldcat_alv
          P_JUST
          P_FTYPE.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
    wa_fieldcat-no_zero = 'X'.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-hotspot = p_hotspot.
      wa_fieldcat-checkbox = p_checkbox.
      wa_fieldcat-icon = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
    IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
    ENDIF.
    IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
    ENDIF.
    IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
    ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
    IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
    ENDIF.
      IF NOT P_JUST IS INITIAL.
        WA_FIELDCAT-JUST = P_JUST.
      ENDIF.
    Set as editable or not.
      IF NOT p_edit IS INITIAL.
        wa_fieldcat-input     = 'X'.
        wa_fieldcat-edit     = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    ======================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
         exporting
              it_list_commentary = t_heading.
    ENDFORM.
    form set_top_page_heading using t_heading type slis_t_listheader
                                    t_events  type slis_t_event.
    data: x_heading type slis_listheader,
          x_event   type line of slis_t_event.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = 'PHYSICAL INVENTORY AUDIT REPORT'.
      append x_heading to t_heading.
    Plant Name
    clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'PLANT: '.
      x_heading-info = its1-werks.
      append x_heading to t_heading.
    Posting Date
    *clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'POSTING DATE: '.
    x_heading-info = ITS1-BUDAT.
    append x_heading to t_heading.
    Control Date
    clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'CONTROL No: '.
    x_heading-info = its1-werks.
    append x_heading to t_heading.
    Control date
    clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'CONTROL DATE: '.
    x_heading-info = its1-werks.
    append x_heading to t_heading.
    User who is running the report
    clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'User: '.
    x_heading-info = sy-uname.
    append x_heading to t_heading.
    Date of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Date: '.
      write sy-datum to x_heading-info.
      append x_heading to t_heading.
    Time of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Time: '.
      write sy-uzeit to x_heading-info.
      append x_heading to t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-form = 'TOP_OF_PAGE'.
      append x_event to t_events.
    endform.
    form set_events using t_events type slis_t_event.
    data: x_event   type line of slis_t_event.
    endform.
    plzzz help me out as it is most urgent to me.
    regards,
    ric.s

  • Want to know the flow and fields urgent

    Hi ABAP Gurus,
               i am developing Smart Form in that i want the details of purchase order no, purchase order date, vendor address information ,vendor pan no, payment terms and item code/description, quantity, rate, uom,amount(currency),
    tax code description,
    exc/service tax,
    edcess,
    hsc,
    vat/cst
    these are the fields i have to use in my smart form i got fields from ekko,ekpo and J_1IMOVEND but where i strucked is in condition fields i.e,
    exc/service tax,
    edcess,
    hsc,
    vat/cst 
    i want the technical name and the logic for the same i will give only po no in my selection. pls help me its urgent.

    Hi,
    VAT INFORMATION  field is: VBRK-STCEG
    Regards
    Basheer

  • Report correction Urgent

    Hi,
    I am doing Inventory ageing report. The report is giving correct result if I go with material wise selection upto 100 materials at a time. If I run the same report based on Material Group it is giving wrong result. I am pasting the code.
    Kindly correct the report it is urgent. Please help to solve this.
    Waiting for quick reply
    regards,
    Ram
    REPORT ZMMR0024 LINE-SIZE 170 NO STANDARD PAGE HEADING .
    TYPE-POOLS : SLIS.
    TABLES : T001, T023, T001K, MARA, marv, MAKT, MBEW, MSEG, ekpo.
    Constants
    CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
    'TOP_OF_PAGE'.
    Internal Tables
    DATA  :  BEGIN OF GT_FINAL OCCURS 0,
             MATKL LIKE MARA-MATKL,
             MATNR LIKE MARA-MATNR,
             LBKUM LIKE MBEW-LBKUM,
             tot_val type p decimals 2,
             MAKTX LIKE MAKT-MAKTX,
             tot_amt type p decimals 2,
             price type p decimals 2,
             meins like mara-meins,
             END OF GT_FINAL,
             DETAIL_FINAL LIKE GT_FINAL OCCURS 0 WITH HEADER LINE.
    DATA  :  BEGIN OF MAT_FINAL OCCURS 0,
             MATKL LIKE MARA-MATKL,
             TOT_VAL LIKE MSEG-MENGE,
             TOT_AMT LIKE MBEW-SALK3,
             PRICE LIKE MBEW-SALK3,
             meins like mara-meins,
             END OF MAT_FINAL.
    DATA :   BEGIN OF I_MARA OCCURS 0,
             MATNR LIKE MARA-MATNR,
             MATKL LIKE MARA-MATKL,
             MAKTX LIKE MAKT-MAKTX,
             MEINS LIKE MARA-MEINS,
             LBKUM LIKE MBEWH-LBKUM,
             TOT_AMT LIKE MBEW-SALK3,
             END OF I_MARA.
    DATA :   BEGIN OF I_MKPF_MSEG OCCURS 0,
             MATNR LIKE MARA-MATNR,
             MBLNR LIKE MSEG-MBLNR,
             ZEILE LIKE MSEG-ZEILE,
             MENGE LIKE MSEG-MENGE,
             BWART LIKE MSEG-BWART,
             BUDAT LIKE MKPF-BUDAT,
             NET_VAL LIKE MSEG-MENGE,
             ebeln like mseg-ebeln,
             ebelp like mseg-ebelp,
             lfbnr like mseg-lfbnr,
             lfpos like mseg-lfpos,
             SHKZG LIKE MSEG-SHKZG,
             meins like mara-meins,
             END OF I_MKPF_MSEG,
             WA_TEMP LIKE I_MKPF_MSEG.
    DATA :   BEGIN OF I_MBEWH OCCURS 0,
             MATNR LIKE MARA-MATNR,
             LBKUM LIKE MBEW-LBKUM,
             SALK3 LIKE MBEW-SALK3,
             BWKEY LIKE MBEW-BWKEY,
             END OF I_MBEWH.
    DATA :   I_MBEWH1 LIKE I_MBEWH OCCURS 0 WITH HEADER LINE.
    DATA :   BEGIN OF I_TEMP OCCURS 0,
             MATNR LIKE MARA-MATNR,
             NET_VAL LIKE MSEG-MENGE,
             meins like mara-meins,
             END OF I_TEMP.
    RANGES : RANGE_WERK FOR T001W-WERKS,
             RANGE_DATE FOR SY-DATUM,
             S_BWTAR FOR BWTAR.
    DATA :  PERIOD LIKE  BAPI0002_4-FISCAL_PERIOD,
            FISCAL_YEAR LIKE  BAPI0002_4-FISCAL_YEAR,
            CUR_VAL LIKE MSEG-MENGE,
            NET_VAL LIKE MSEG-MENGE,
            TOT_VAL LIKE MSEG-MENGE,
            TOT_QTY LIKE MSEG-MENGE,
            TOT_AMT1 LIKE MBEW-SALK3,
            RES_DATE LIKE SY-DATUM,
            NUM LIKE MBEW-SALK3,
            UOM LIKE MARA-MEINS.
    Data declarations for alv
    DATA : GV_PAGE TYPE N VALUE 0.
    DATA : GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
           GT_SORT             TYPE SLIS_T_SORTINFO_ALV,
           GT_FILTER           TYPE SLIS_T_FILTER_ALV,
           GT_SP_GROUP         TYPE SLIS_T_SP_GROUP_ALV,
           GT_EVENTS           TYPE SLIS_T_EVENT WITH HEADER LINE,
           GV_REPID            LIKE SY-REPID,
           GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
           GV_SAVE(1)          TYPE C,
           GT_VARIANT          LIKE DISVARIANT,
           GV_DOMNAME          LIKE DD07V-DOMNAME,
           GV_DOMVAL           LIKE DD07V-DOMVALUE_L,
           GW_FIELDCAT         TYPE SLIS_FIELDCAT_ALV.
    Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001.
    PARAMETERS     : GS_BUKRS LIKE T001K-BUKRS OBLIGATORY.
    SELECT-OPTIONS : GS_MATKL FOR MARA-MATKL,
                     GS_MATNR FOR MARA-MATNR.
    PARAMETERS     : gs_ped like s031-spmon OBLIGATORY,
                     GS_DAYS(3) TYPE n,
                     MG1 RADIOBUTTON GROUP GR1,
                     MT2 RADIOBUTTON GROUP GR1.
    SELECTION-SCREEN END OF BLOCK SEL.
    Validations on selection screen
    AT SELECTION-SCREEN ON GS_BUKRS.
      PERFORM F00_VALIDATE_COMPANY_CODE.
    AT SELECTION-SCREEN ON GS_MATKL.
      IF NOT GS_MATKL[] IS INITIAL.
        PERFORM F01_VALIDATE_MATERIAL_GROUP.
      ENDIF.
    AT SELECTION-SCREEN ON GS_MATNR.
      IF NOT GS_MATNR[] IS INITIAL.
        PERFORM F01_VALIDATE_MATERIAL.
      ENDIF.
    AT SELECTION-SCREEN ON GS_days.
      if gs_days = ''.
        gs_days = 0.
      endif.
    START-OF-SELECTION.
      GV_REPID = SY-REPID.
      PERFORM F20_EVENTTAB_BUILD CHANGING GT_EVENTS[].
      PERFORM F30_SELECT_PRIMARY_DATA.
      IF MG1 = 'X'.
        PERFORM F11_DATA_FORMAT_GROUP.
        PERFORM F50_MATERIAL_GROUP_DATA.
        PERFORM F40_DISPLAY_REPORT TABLES MAT_FINAL.
      ELSEIF MT2 = 'X'.
        PERFORM F10_DATA_FORMAT_MAT.
        PERFORM F40_DISPLAY_REPORT TABLES GT_FINAL.
      ENDIF.
    *&      Form  F20_EVENTTAB_BUILD
    FORM F20_EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
      CONSTANTS:  LC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
                  'TOP_OF_PAGE',
                  LC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
                  'USER_COMMAND'.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 0
        IMPORTING
          ET_EVENTS   = LT_EVENTS.
    note : lt_events has all the events
      READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
      INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO LT_EVENTS.
      ENDIF.
      READ TABLE LT_EVENTS WITH KEY NAME =   SLIS_EV_USER_COMMAND
      INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE LC_FORMNAME_USER_COMMAND TO LS_EVENT-FORM.
        APPEND LS_EVENT TO LT_EVENTS.
      ENDIF.
    ENDFORM.                    "F20_EVENTTAB_BUILD
    *&      Form  F12_E04_COMMENT_BUILD
    FORM F12_E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE
    SLIS_T_LISTHEADER.
      DATA : LS_LINE TYPE SLIS_LISTHEADER,
             LV_TEXT(100) TYPE C,
             LV_DAYLOW(2) TYPE C,
             LV_MONTHLOW(2) TYPE C,
             LV_YEARHIGH(4) TYPE C,
             LV_DAYHIGH(2) TYPE C,
             LV_MONTHHIGH(2) TYPE C,
             LV_YEARLOW(4) TYPE C,
             LV_DATFORMAT1(10),
             LV_DATFORMAT2(10).
      CONCATENATE  'Company Code :' ' '  GS_BUKRS
      INTO LV_TEXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LV_TEXT.
      IF NOT GS_MATKL[] IS INITIAL.
        IF GS_MATKL-HIGH IS INITIAL AND NOT GS_MATKL-LOW IS INITIAL.
          CONCATENATE  'Material Group :' ' '  GS_MATKL-LOW
          INTO LV_TEXT SEPARATED BY SPACE.
        ELSE .
          CONCATENATE  'Material Group :' GS_MATKL-LOW ' to'
          GS_MATKL-HIGH INTO LV_TEXT SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LV_TEXT.
      IF NOT GS_MATNR[] IS INITIAL.
        IF GS_MATNR-HIGH IS INITIAL AND NOT GS_MATNR-LOW IS INITIAL.
          CONCATENATE  'Material :' ' '  GS_MATNR-LOW
          INTO LV_TEXT SEPARATED BY SPACE.
        ELSE .
          CONCATENATE  'Material :' GS_MATNR-LOW ' to'
          GS_MATNR-HIGH INTO LV_TEXT SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LV_TEXT.
    LV_YEARLOW  = gs_ped+0(4).
    LV_MONTHLOW = gs_ped+4(2).
    LV_DAYLOW   = gs_ped+6(2).
    CONCATENATE LV_DAYLOW LV_MONTHLOW LV_YEARLOW INTO LV_DATFORMAT1
    *SEPARATED BY '.'.
      CONCATENATE  'Key month : ' gs_ped
      INTO LV_TEXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LV_TEXT.
      CONCATENATE  'Number of days :' ' '  GS_DAYS
      INTO LV_TEXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LV_TEXT.
      GV_PAGE = GV_PAGE + 1.
      CONCATENATE  'PAGE NO : ' ' '  GV_PAGE
      INTO LV_TEXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = LV_TEXT.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    ENDFORM.                    "F12_E04_COMMENT_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  validate_sales_organization
          text
    FORM F00_VALIDATE_COMPANY_CODE .
      SELECT SINGLE BUKRS
          FROM T001
          INTO T001-BUKRS
          WHERE BUKRS = GS_BUKRS.
      IF SY-SUBRC = 0.
      ELSE.
        MESSAGE E000(ZCBOM) WITH 'Please enter the valid material group'.
      ENDIF.
    ENDFORM.                    " validate_sales_organization
    *&      Form  VALIDATE_PLANT
          text
    -->  p1        text
    <--  p2        text
    FORM F01_VALIDATE_MATERIAL_GROUP.
      SELECT SINGLE MATKL
          FROM T023
          INTO T023-MATKL
          WHERE MATKL IN GS_MATKL.
      IF SY-SUBRC = 0.
      ELSE.
        MESSAGE E000(ZCBOM) WITH 'Please enter the valid material group'.
      ENDIF.
    ENDFORM.                    " VALIDATE_PLANT
    *&      Form  VALIDATE_MATERIAL
          text
    -->  p1        text
    <--  p2        text
    FORM F01_VALIDATE_MATERIAL.
      SELECT SINGLE MATNR
          FROM MARA
          INTO MARA-MATNR
          WHERE MATNR IN GS_MATNR.
      IF SY-SUBRC = 0.
      ELSE.
        MESSAGE E000(ZCBOM) WITH 'Please enter the valid material '.
      ENDIF.
    ENDFORM.                    " VALIDATE_MATERIAL
    *&      Form  F40_DISPLAY_REPORT
    FORM F40_DISPLAY_REPORT TABLES IT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = GV_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
          IT_FIELDCAT             = GT_FIELDCAT[]
          IT_SPECIAL_GROUPS       = GT_SP_GROUP[]
          IT_SORT                 = GT_SORT[]
          I_SAVE                  = GV_SAVE
          IS_VARIANT              = GT_VARIANT
          IT_EVENTS               = GT_EVENTS[]
        TABLES
          T_OUTTAB                = IT.                         "it_1.
      CLEAR:GT_FIELDCAT.
      REFRESH:GT_FIELDCAT.
    ENDFORM.                    " F40_DISPLAY_REPORT
    *&      Form  F30_SELECT_PRIMARY_DATA
          text
    FORM F30_SELECT_PRIMARY_DATA .
    subroutine to get the actual data
    to get the plants for the given company code
      data : temp_bukrs like BAPI0002_2-COMP_CODE,
             temp_date  like BAPI0002_4-POSTING_DATE.
      data : last_day(2) type n,
             from_date like sy-datum,
             temp_date1 like sy-datum,
             cal_month(2) type n,
             cal_year(4) type n.
      SELECT DISTINCT BWKEY FROM T001K INTO RANGE_WERK-LOW WHERE BUKRS = GS_BUKRS.
        RANGE_WERK-SIGN = 'I'.
        RANGE_WERK-OPTION = 'EQ'.
        APPEND RANGE_WERK.
      ENDSELECT.
    *selecting material that is relevant to the selection criteria
      SELECT MARAMATNR MARAMATKL MARAMEINS MAKTMAKTX
             FROM MARA JOIN MAKT
               ON MAKTMATNR = MARAMATNR
             INTO CORRESPONDING FIELDS OF TABLE I_MARA
             WHERE MARA~MATKL IN GS_MATKL
              AND  MARA~MATNR IN GS_MATNR
              AND MAKT~SPRAS = 'EN'.
      temp_bukrs = gs_bukrs.
      cal_month = gs_ped+4(2).
      cal_year  = gs_ped+0(4).
      concatenate cal_year cal_month '01' into temp_date.
    *temp_date = temp_date1.
      CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
        EXPORTING
          COMPANYCODEID = temp_bukrs
          POSTING_DATE  = temp_date
        IMPORTING
          FISCAL_YEAR   = fiscal_year
          FISCAL_PERIOD = period.
      select single * from marv into marv where bukrs = temp_bukrs.
    temp_date1 = temp_date.
      if sy-subrc = 0.
        if ( marv-lfmon ne period or marv-lfgja ne fiscal_year ).
          CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
            EXPORTING
              DAY_IN            = temp_date
            IMPORTING
              LAST_DAY_OF_MONTH = from_date
            EXCEPTIONS
              DAY_IN_NO_DATE    = 1
              OTHERS            = 2.
        else.
          from_date = sy-datum.
        endif.
      endif.
    to define the range for posting date
      RES_DATE = from_date - GS_DAYS.
      RANGE_DATE-LOW  = RES_DATE.
      RANGE_DATE-HIGH = from_date.
      RANGE_DATE-OPTION = 'BT'.
      RANGE_DATE-SIGN = 'I'.
      APPEND RANGE_DATE.
    to select documents and their quantities for the given range of posting dates
    with goods movement type 101 105 657 453 459 501 521 and their reversals
      if range_date-low ne range_date-high.
        SELECT MSEG~MATNR MSEG~MBLNR MSEG~ZEILE MSEG~MENGE MSEG~BWART mseg~ebeln mseg~ebelp
               MKPF~BUDAT MSEG~SHKZG
               FROM MKPF
               JOIN MSEG ON MSEG~MBLNR = MKPF~MBLNR
                        AND MSEG~MJAHR = MKPF~MJAHR
                          INTO CORRESPONDING FIELDS OF TABLE I_MKPF_MSEG
                              FOR ALL ENTRIES IN I_MARA
                            WHERE MSEG~MATNR = I_MARA-MATNR
                              AND MSEG~WERKS IN RANGE_WERK
                              AND MKPF~BUDAT IN RANGE_DATE
                              AND MSEG~BWART IN ('101','105','561','501','301','309','951','953','955','957','712','657','658',
                                                 '521','522','303','304','102','562','502','952','954','956','958','302').
    DELETE  I_MKPF_MSEG WHERE      ( BWART = '309' AND SHKZG = 'H' )
                                OR ( BWART = '303' AND SHKZG = 'H' )
                                OR ( BWART = '304' AND SHKZG = 'S' )
                                OR ( BWART = '657' AND SHKZG = 'H' )
                                OR ( BWART = '658' AND SHKZG = 'S' ).
      endif.
      SORT I_MKPF_MSEG BY MATNR MBLNR.
      LOOP AT I_MKPF_MSEG.
        if i_mkpf_mseg-bwart = '101' or i_mkpf_mseg-bwart = '102'.
          select single * from ekpo  where ebeln = i_mkpf_mseg-ebeln
                                       and ebelp = i_mkpf_mseg-ebelp.
          if ekpo-pstyp = 7.
            delete i_mkpf_mseg where ebeln = i_mkpf_mseg-ebeln
                                 and ebelp = i_mkpf_mseg-ebelp.
            CLEAR I_MKPF_MSEG-MENGE.
          endif.
        endif.
        IF ( I_MKPF_MSEG-BWART = '101' OR I_MKPF_MSEG-BWART = '105' OR I_MKPF_MSEG-BWART = '712' OR
             I_MKPF_MSEG-BWART = '657' OR I_MKPF_MSEG-BWART = '453' OR I_MKPF_MSEG-BWART = '459' OR
             I_MKPF_MSEG-BWART = '501' OR I_MKPF_MSEG-BWART = '701' OR
             I_MKPF_MSEG-BWART = '521' OR I_MKPF_MSEG-BWART = '561' ).
          NET_VAL = NET_VAL + I_MKPF_MSEG-MENGE.
        ENDIF.
        IF ( I_MKPF_MSEG-BWART = '102' OR I_MKPF_MSEG-BWART = '106' OR
             I_MKPF_MSEG-BWART = '658' OR I_MKPF_MSEG-BWART = '454' OR
             I_MKPF_MSEG-BWART = '460' OR I_MKPF_MSEG-BWART = '502' OR
             I_MKPF_MSEG-BWART = '522' OR I_MKPF_MSEG-BWART = '562').
          NET_VAL = NET_VAL - I_MKPF_MSEG-MENGE.
        ENDIF.
        WA_TEMP = I_MKPF_MSEG.
        AT END OF MATNR.
          I_TEMP-MATNR  = WA_TEMP-MATNR.
          I_TEMP-NET_VAL = NET_VAL.
          APPEND I_TEMP.
          CLEAR NET_VAL.
        ENDAT.
       ENDIF.
      ENDLOOP.
      SORT I_MARA BY MATNR.
      SORT I_TEMP BY MATNR.
      SELECT MATNR LBKUM SALK3 BWKEY
             FROM MBEWH
             INTO CORRESPONDING FIELDS OF TABLE I_MBEWH
             FOR ALL ENTRIES IN I_MARA
             WHERE MATNR = I_MARA-MATNR
               AND BWKEY IN RANGE_WERK
               AND BWTAR IN S_BWTAR
               AND LFGJA = FISCAL_YEAR
               AND LFMON = PERIOD.
      SELECT MATNR LBKUM SALK3 BWKEY
             FROM MBEW
             INTO CORRESPONDING FIELDS OF TABLE I_MBEWH1
             FOR ALL ENTRIES IN I_MARA
             WHERE MATNR = I_MARA-MATNR
               AND BWKEY IN RANGE_WERK.
                AND LFMON = PERIOD
                AND LFGJA = FISCAL_YEAR.
      SORT I_MBEWH BY MATNR BWKEY.
      SORT I_MBEWH1 BY MATNR BWKEY.
      LOOP AT I_MBEWH.
        LOOP AT I_MBEWH1 WHERE MATNR = I_MBEWH-MATNR
                           AND BWKEY = I_MBEWH-BWKEY.
          DELETE I_MBEWH1.
        ENDLOOP.
      ENDLOOP.
      APPEND LINES OF I_MBEWH1 TO I_MBEWH.
      CLEAR : I_MBEWH1.
      REFRESH I_MBEWH1.
      SORT I_MBEWH BY MATNR.
      LOOP AT I_MBEWH .
        I_MBEWH1 = I_MBEWH.
        AT END OF MATNR.
          SUM.
          I_MBEWH1-LBKUM = I_MBEWH-LBKUM.
          I_MBEWH1-SALK3 = I_MBEWH-SALK3.
          APPEND I_MBEWH1.
        ENDAT.
      ENDLOOP.
      DELETE I_MBEWH1 WHERE LBKUM <= 0.
      LOOP AT I_MARA.
        CLEAR : CUR_VAL,
                NUM,
                TOT_VAL,
                TOT_AMT1,
                I_MBEWH1.
        GT_FINAL-MATNR = I_MARA-MATNR.
        GT_FINAL-MATKL = I_MARA-MATKL.
        GT_FINAL-MAKTX = I_MARA-MAKTX.
        gt_final-meins = I_MARA-MEINS.
        READ TABLE I_MBEWH1 WITH KEY MATNR = I_MARA-MATNR.
        GT_FINAL-LBKUM = I_MBEWH1-LBKUM.
    to get the net inward movement vale that is to be subtracted from current value
        READ TABLE I_TEMP WITH KEY MATNR = I_MARA-MATNR.
        IF SY-SUBRC = 0 .
          IF GT_FINAL-LBKUM > 0.
            TOT_VAL = gt_final-lbkum - I_TEMP-NET_VAL.
            if tot_val gt 0.
              GT_FINAL-TOT_VAL = TOT_VAL.
              GT_FINAL-PRICE = I_MBEWH1-SALK3 / gt_final-lbkum."TOT_VAL.
              GT_FINAL-TOT_AMT = GT_FINAL-PRICE * GT_FINAL-TOT_VAL.
              APPEND GT_FINAL.
            endif.
          ENDIF.
        else.
          if gt_final-lbkum > 0.
            gt_final-tot_val = gt_final-lbkum.
            GT_FINAL-PRICE = I_MBEWH1-SALK3 / gt_final-lbkum.
            GT_FINAL-TOT_AMT = GT_FINAL-PRICE * GT_FINAL-TOT_VAL.
            APPEND GT_FINAL.
          endif.
        ENDIF.
      ENDLOOP.
      DELETE GT_FINAL WHERE LBKUM LE 0.
    ENDFORM.                    " F30_SELECT_PRIMARY_DATA
    *&      Form  f10_DATA_FORMAT
          text
    FORM F10_DATA_FORMAT_MAT .
    populating the field catalog table
    MATNR
      PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATNR' 'MATNR' '1'
                               TEXT-003 'GT_FINAL' '15'.
    MAKTX
      PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATKL' 'MATKL' '2'
                               TEXT-004 'GT_FINAL' '24'.
    DESC
      PERFORM F11_E01_FIELDCAT_INIT USING  'MAKT' 'MAKTX' 'MAKTX' '3'
                               TEXT-005 'GT_FINAL' '35'.
    qty
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_VAL' 'MENGE' '4'
                               TEXT-006 'GT_FINAL' '15'.
    MEINS
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'MEINS' 'MEINS' '4'
                               TEXT-008 'GT_FINAL' '15'.
    TOTAL COST
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_AMT' 'SALK3' '5'
                               TEXT-007 'GT_FINAL' '24'.
      PERFORM F12_E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
      GV_SAVE = 'A'.
      CLEAR GT_EVENTS.
      REFRESH GT_EVENTS.
      GT_EVENTS-NAME = 'TOP_OF_PAGE'.
      GT_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND GT_EVENTS.
    ENDFORM.                    " f10_DATA_FORMAT
    *&      Form  F11_E01_FIELDCAT_INIT
          text
    FORM F11_E01_FIELDCAT_INIT  USING T1 T2 T3 T4 T5 T6 T7.
      CLEAR GW_FIELDCAT.
      GW_FIELDCAT-REF_TABNAME    = T1.
      GW_FIELDCAT-FIELDNAME      = T2.
      GW_FIELDCAT-REF_FIELDNAME  = T3.
      GW_FIELDCAT-COL_POS        = T4.
      GW_FIELDCAT-SELTEXT_L      = T5.
      GW_FIELDCAT-TABNAME        = T6.
      GW_FIELDCAT-OUTPUTLEN      = T7.
      APPEND GW_FIELDCAT TO GT_FIELDCAT.
    ENDFORM.                    " F11_E01_FIELDCAT_INIT
    *&      Form  f40_material_group_data
          text
    -->  p1        text
    <--  p2        text
    FORM F50_MATERIAL_GROUP_DATA .
      SORT GT_FINAL BY MATKL.
      LOOP AT GT_FINAL.
        TOT_QTY = GT_FINAL-TOT_VAL + TOT_QTY.
        TOT_AMT1 = GT_FINAL-TOT_AMT + TOT_AMT1.
        UOM = GT_FINAL-MEINS.
        AT END OF MATKL.
          MAT_FINAL-MATKL = GT_FINAL-MATKL.
          MAT_FINAL-TOT_VAL = TOT_QTY.
          MAT_FINAL-TOT_AMT = TOT_AMT1.
          MAT_FINAL-MEINS   = UOM.
          APPEND MAT_FINAL.
          CLEAR : TOT_QTY,
                  TOT_AMT1.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " f40_material_group_data
    *&      Form  BUILD_DETAIL
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_DETAIL .
      DETAIL_FINAL[] = GT_FINAL[].
      DELETE DETAIL_FINAL WHERE MATKL NE MAT_FINAL-MATKL.
    ENDFORM.                    " BUILD_DETAIL
    *&      Form  f11_data_format_group
          text
    -->  p1        text
    <--  p2        text
    FORM F11_DATA_FORMAT_GROUP .
    MATNR
    PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATNR' 'MATNR' '1'
                              TEXT-003 'GT_FINAL' '15'.
      REFRESH GT_FIELDCAT[].
    MAKTX
      PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATKL' 'MATKL' '2'
                               TEXT-004 'MAT_FINAL' '24'.
    DESC
    PERFORM F11_E01_FIELDCAT_INIT USING  'MAKT' 'MAKTX' 'MAKTX' '3'
                              TEXT-005 'GT_FINAL' '35'.
    qty
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_VAL' 'MENGE' '4'
                               TEXT-006 'MAT_FINAL' '15'.
    qty
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'MEINS' 'MEINS' '5'
                               TEXT-008 'MAT_FINAL' '15'.
    TOTAL COST
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_AMT' 'SALK3' '6'
                               TEXT-007 'MAT_FINAL' '24'.
      PERFORM F12_E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
      GV_SAVE = 'A'.
      CLEAR GT_EVENTS.
      REFRESH GT_EVENTS.
      GT_EVENTS-NAME = 'TOP_OF_PAGE'.
      GT_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND GT_EVENTS.
    ENDFORM.                    " f11_data_format_group
    *&      Form  DETAIL_FORMAT_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM DETAIL_FORMAT_FIELDCAT .
      REFRESH GT_FIELDCAT[].
    MATNR
      PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATNR' 'MATNR' '1'
                               TEXT-003 'DETAIL_FINAL' '15'.
    MAKTL
      PERFORM F11_E01_FIELDCAT_INIT USING  'MARA' 'MATKL' 'MATKL' '2'
                               TEXT-004 'DETAIL_FINAL' '24'.
    MAKTX
      PERFORM F11_E01_FIELDCAT_INIT USING  'MAKT' 'MAKTX' 'MAKTX' '3'
                               TEXT-005 'DETAIL_FINAL' '35'.
    qty
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_VAL' 'MENGE' '4'
                               TEXT-006 'DETAIL_FINAL' '15'.
    UOM
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'MEINS' 'MEINS' '5'
                               TEXT-008 'DETAIL_FINAL' '15'.
    TOTAL COST
      PERFORM F11_E01_FIELDCAT_INIT USING  '' 'TOT_AMT' 'SALK3' '6'
                               TEXT-007 'DETAIL_FINAL' '24'.
    PERFORM F12_E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
      GV_SAVE = 'A'.
    CLEAR GT_EVENTS.
    REFRESH GT_EVENTS.
    GT_EVENTS-NAME = 'TOP_OF_PAGE'.
    GT_EVENTS-FORM = 'TOP_OF_PAGE'.
    APPEND GT_EVENTS.
    ENDFORM.                    " DETAIL_FORMAT_FIELDCAT
          FORM USER_COMMAND                                             *
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.                       "doubleclick
          IF RS_SELFIELD-TABNAME = 'MAT_FINAL'.
            READ TABLE MAT_FINAL INDEX  RS_SELFIELD-TABINDEX .
            PERFORM BUILD_DETAIL.
            PERFORM DETAIL_FORMAT_FIELDCAT.
            PERFORM F20_EVENTTAB_BUILD CHANGING GT_EVENTS[].
            PERFORM F40_DISPLAY_REPORT TABLES DETAIL_FINAL.
            CLEAR DETAIL_FINAL[].
          ENDIF.
          CLEAR R_UCOMM.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

    Hi,
    Any report code for Inventory ageing material group wise. kindly help me.
    regards,
    Ram

  • Urgent plz help me out about cartesian product

    plz...its urgent,can anyone help in the following query where iam getting cartesian product,so how to get result without cartesian product
    this is the query
    SELECT DISTINCT MIS.segment1 "ITEM CODE",
    MIS.DESCRIPTION "DESCRIP"
    ,MIS.Primary_uom_code "UOM",
    MTL.LOT_NUMBER "LOT NUMBER"
    ,A.PARTY_NUMBER "CUSTOMER NUMBER",
    A.PARTY_NAME "CUSTOMER NAME",
    (A.ADDRESS1||A.ADDRESS2||A.ADDRESS3||A.ADDRESS4) "SHIP TO",
    B.DELIVERY_DETAIL_ID "DO NO",B.SHIPPED_QUANTITY "SHIPPED QUANTITY"
    ,C.ULTIMATE_DROPOFF_DATE "ISSUED DATE"
    ,D.ORDER_NUMBER "SALES ORDER NUMBER"
    ,E.LINE_NUMBER "SALES ORDER LINE"
    FROM MTL_SYSTEM_ITEMS MIS
    ,MTL_TRANSACTION_LOT_NUMBERS MTL
    ,HZ_PARTIES A,
    WSH_DELIVERY_DETAILS B,
    WSH_NEW_DELIVERIES C,
    OE_ORDER_HEADERS_ALL D,
    OE_ORDER_LINES_ALL E
    WHERE MIS.INVENTORY_ITEM_ID=MTL.INVENTORY_ITEM_ID
    AND B.INVENTORY_ITEM_ID=MIS.INVENTORY_ITEM_ID
    AND A.PARTY_ID=B.CUSTOMER_ID
    AND B.DELIVERY_DETAIL_ID=C.DELIVERY_ID
    AND MIS.INVENTORY_ITEM_ID=E.INVENTORY_ITEM_ID
    AND D.HEADER_ID=E.HEADER_ID

    A lot of times when I get duplicate results, I'll do a select * and see why. Often one of those tables will have a sequenced value that could repeat several times for a combination of values.
    If thats the case, you may need to add something like:
    ...and a.id = (select min(id)
                     from b
                    where a.col = b.col)

  • Not able to change UOM in material master for a material

    Hi all ,
    I have a issue with changing of the UOM in the material master , IN MMO2  after changing the UOM , in Display error , its showing the error as : The base unit of
                                         The reasons for
                                         Manual  reservation
                                         Reserv.No   , Item - No data
                                         Purchase order  - 30017056  , Item 1 - 1
    There is no stock in the previous as well as current period , and deleted the PR , still i am not able to change
    Please help urgently
    Thanks in Advance
    Neha

    Hi Satyajit,
    Please look at OSS  Note 1069560 - Data inconsistencies: Activating integration. models in parallel, if this helps you.
    Since  Gross data of material is in the basic view, it is common across plants , whereas, IMs are normally designed to have material masters at plant level.
    We may have same material in different IMs with different  plants. Therefore changes of the basic view fields are then contained in multiple IMs.  SAP advises to have a larger IM or sequential activation of IMs.
    I hope this will  help you .
    Regards
    Datta

  • Regarding calculation of uom(unit of measurment)

    i want to display uom(unit of measure) field in dis format: -
    UOM IS KG -> SO QTY
    TO  -> (SALES ODER QTY * 1000)
    G -> (SALES ODR QTY / 1000)
    I making d report of sales order and i have to display it according to it...plzzz help me its urgent...

    can u provide d dummy code for it,i am using fields for it: -
    DATA : BEGIN OF ITSO OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           POSNR LIKE VBAP-POSNR,
           SPART LIKE VBAK-SPART,
           ERDAT LIKE VBAK-ERDAT,
           MATNR LIKE VBAP-MATNR,
           MAKTX LIKE MAKT-MAKTX,
           EDATU LIKE VBEP-EDATU,
           KWMENG LIKE VBAP-KWMENG,
           KBMENG LIKE VBAP-KBMENG,
           MEINS LIKE VBAP-MEINS,
           WERKS LIKE VBAP-WERKS,
           BRGEW LIKE MARA-BRGEW,
           NTGEW LIKE MARA-NTGEW,
           END OF ITSO.

  • ISO UoM vs USA UoM for SO and Transfer Order

    Hi to All,
    I've an issue  that I must resolve urgently!!!  So, I hope in your precious advices.
    Case: Customer Model: Holding with european company codes and americans ones.
    The corporate is an Italian Company. So, Materials Master Data are created centrally at Italian Company; consequently the Base Unit of Measure in which stocks of the material are managed (Master Data: view Basic data 1) is expressed in ISO UoMs( Kg, dm3....).
    I have the necessity to use also american UoMs so I've created in Additional Data -> Unit of Measure  alternative TU and CU using USA  UoMs for the dimensions (lb, "3....) in corrispondence to europeanTU and CU.
    I can use them on Sales Order, and Transfer Order with type ZT02 STO Cross Company but I can't use them for ZT01 STO from APS: Transfer order intra- company becouse as default the Base Unit of Measure is used.
    Does it exist a way to convert the Base Unit of Measure expressed in ISO UoMs to USA UoMs for dimensions without modyfing the Base Unit of Measure set in Master Data: view Basic data 1?
    Thanks in advance
    Roberta

    Hi,
    If you want to create any transaction with only alternative unit of measure  you don't active variable active unit of measure in purchasing view of material master. In this field take not active.
    Variable Active unit:
    When you required to create any transaction with both unit of measure  base unit and alternetive unit of measure you active it and if you want to create transaction with only alternative unit you don't active it.
    NOTE: - In case of Purchase order system take order unit of measure(In Purchasing view) and for stock transfer order take unit of issue(Plant Data1) - If variable active unit is off.
    Regards,
    Mahessh

  • No primary key attribute and does not support rowId -- URGENT : ADF Swing

    Hi , i have created a view and while create Entity Object through Business Components wizard for that view i am getting following error.
    ENTITY CREATION FAILED FOR THE FOLLOWING DATABASE OBJECT
    NO PRIMARY KEY ATTRIBUTES AND DOES NOT SUPPORT ROWID . USE ENTITY WIZARD TO CREATE THE ENTITY OBJECT.
    very urgent.
    Jdeveloper version :: 10.1.3.1.0
    oracle version :: 10g
    view script is :
    SELECT
    oh.order_number||'- ('||ol.line_number||'-'||ol.shipment_number||')' so_line,
    oh.cust_po_number customer_po,
    ol.flow_status_code status,
    ol.shipping_method_code carrier,
    ol.ordered_item item_no,
    nvl(xxapplication_express_pkg.getcustomerpart(ol.inventory_item_id, hca.cust_account_id), ' ') customer_item_number,
    nvl(mtl.description , 'na') description,
    nvl(org.organization_name , 'oak park') ship_from,
    hcsu.location||' ('||hl.city||' '||hl.state||' '||hl.postal_code||')' ship_to,
    nvl(ol.promise_date, sysdate) promised_date,
    nvl(ol.ordered_quantity, 0) order_quality ,
    xxapps.xx_eg_calculated_onhand(ol.line_id) available_qty,
    nvl(ol.shipped_quantity, 0) shipped_quality ,
    ol.order_quantity_uom uom,
    hp.party_name customer_name,
    jrs.name sales_person_name,
    0 refer
    FROM
    oe_order_headers_all oh,
    oe_order_lines_all ol,
    hz_cust_accounts hca,
    hz_parties hp ,
    hz_cust_site_uses_all hcsu,
    hz_cust_acct_sites_all hcas,
    hz_party_sites hps,
    hz_locations hl,
    org_organization_definitions org ,
    mtl_system_items_b mtl ,
    jtf_rs_salesreps jrs
    WHERE
    oh.header_id = ol.header_id and
    oh.org_id = ol.org_id and
    oh.sold_to_org_id = hca.cust_account_id and
    hca.party_id = hp.party_id and
    hcas.cust_account_id = hca.cust_account_id and
    hcsu.cust_acct_site_id = hcas.cust_acct_site_id and
    hcas.party_site_id = hps.party_site_id and
    hps.location_id = hl.location_id and
    hcsu.site_use_id = oh.ship_to_org_id and
    hcsu.site_use_code = 'SHIP_TO' and
    org.organization_id = ol.ship_from_org_id and
    org.organization_id = mtl.organization_id and
    ol.inventory_item_id = mtl.inventory_item_id and
    ol.ship_from_org_id = mtl.organization_id and
    ol.salesrep_id = jrs.salesrep_id and
    ol.org_id = jrs.org_id
    can i know will it check for any constraints while correlation multiple table or whether this type of exception can be sorted out .
    need help looking forward to reply...
    Regards
    bhanu prakash
    Message was edited by:
    user579125
    Message was edited by:
    user579125

    User,
    I assume that this is for read-only activity. If so, don't create an EO from the database view; create a read-only view object instead. The only reason you'd want to use an Entity Object is if you were going to insert/update through the EO; unless you have an instead-of trigger, this database view is non-insertable/non-updatable.
    Short answer: I think what you want to do is a read-only View Object (not EO) - put "select x, y, z (your columns) from view_name" as the SQL.
    John

  • Logical command in ABAP.....Urgent

    Hi,
      i am pretty new using ABAP program so i neeed help urgently. i am trying to move a file on the application server from one directory to the other and i was using the open dataset function to do that. but the file i am trying to move is pretty big and because i am using internal table to store, it is causing problems with the space.
      i have consulted the basis guys and they have managed to create a logical file for copying from one directory to the other on the application server. to help you furthter. i am enclosing the mail sent to me.
    I have created a logical command which should copy the file from one location to the other but you need to pass it the source dir and file name and the destination dir and file name.
    The logical command is ZCOPY and uses cmd /c copy
    Copies one or more files to another location.
    COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
         [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
      source       Specifies the file or files to be copied.
      /A           Indicates an ASCII text file.
      /B           Indicates a binary file.
      destination  Specifies the directory and/or filename for the new file(s).
      /V           Verifies that new files are written correctly.
      /N           Uses short filename, if available, when copying a file with a
                   non-8dot3 name.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless COPY command is being executed from
    within a batch script.
    the problem now is i have no idea about how to use the logical command. can any one help me.
    Thank you,
    Ravi.

    If memory is not an issue, then there should be no reason why this should not work.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: itab type table of string with header line.
    start-of-selection.
    * Read old file
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into itab.
          if sy-subrc <> 0.
            exit.
          endif.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Write to new file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete the old file
      delete dataset d1.
    Regards,
    Rich Heilman

  • Confirmation of balance - urgent

    Hi,
    We are using print program SAPF130K and SAPF130D for vendor and customer respectively.
    My query is can we bring even the cleared items alongwith the open items in the same print program???
    Now we have line items of open line items only?? As per our exploration into the program... we get only open items..
    Also we are using SAP10 and SAP11 as the correspondence type.Kindly advise as to correspondence type should be changed so that it can print both the open and cleared items?
    Please reply ASAP as it is very urgent.
    Thanks in advance.
    Regards
    Karpagam

    Hi,
    Use T.Code F.42 FOR Vendor Balances
    and F.23 For Customer Balances
    Hope this will help u
    Regards,
    Sarfaraz

Maybe you are looking for

  • Running iTunes7 on a 800Mhz iMac G4 (256mb Ram)

    Hi, i have an iMac G4 Flat panel (800Mhz-256mb Ram) and after hearing some people complaining on these boards of not being able to run iTunes7 properly on macs with a similar spec as mine i have decided for the time being not to upgrade from iTunes6.

  • Reports 9i - Printing Error on older version files

    I run a report made in Reports 3.0. When opened in 9i it runs on screen correctly but I can't print the results. Plus, when running the option for HTML the reults is a blank screen in the browser. Should I convert it first to 6i? Error message is nex

  • Aperture 3 library appears as a folder?

    I have several Aperture 3 libraries and they all appear as the standard triple pane icon (package I believe-just click it and the library opens in Aperture).  However, my main Aperture 3 library (some 25K pics) appears as a blank folder containing 11

  • How can i get to my files?

    i have a casio vado pocket cam that was given to me as a gift last year. i used it some and have presiose videos on it and hooked it up to me computer and it had asked me if i wanted to sync the files to my computer which i said yes without knowing w

  • .jar netbeans

    hello all, I created a jar file using netbeans put in a classpath for a database driver (derby.jar). There are also 8 classes in this jar file, i specified which main should start everything is working perfectly. But some of the classes access audio