Abap report - consignment stock

Hi Experts,
when i select special stock = 'w' at the selection screen ,
all stock with 'w' and with blank will appear.
when i select special stock = blank , all stock with blank appear.
but i dunwan it to be like this.
i want it to be,
when i select special stock = 'w'. only 'w' stock will appear.
when i select special stock = 'blank'
all 'w' stock and blank stock will appear.
Can anyone please advise on this ?
Thank you in advanced.
Selection screen for user to select the option/condition
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-S01.
  SELECT-OPTIONS:  p_plant FOR MARC-WERKS,   "Plant
                   p_mcode FOR MCHB-MATNR,   "New Material code
                   p_ocode FOR MARA-BISMT,   "Old Material Code
                   p_mtype FOR MARA-MTART,   "Material Type
                   p_mgroup FOR MARA-MATKL,  "Material Group
                   p_sloc   FOR MCHB-LGORT,    "Storage Location
                   p_spec   FOR MSKU-SOBKZ.   "Special Stock
  PARAMETER:  c_rzero AS CHECKBOX DEFAULT 'X', "Remove zero qty item
              c_old AS CHECKBOX DEFAULT '',
              c_new AS CHECKBOX DEFAULT ''.
SELECTION-SCREEN END OF BLOCK 1.
Retrieve Material details
select p~werks m~matnr m~bismt m~mtart
  into corresponding fields of table it_mat
  from  ( marc as p inner join mara as m
  on p~matnr = m~matnr )
  where m~matnr in p_mcode
  and m~bismt in p_ocode
  and m~mtart in p_mtype
  and p~werks in p_plant
  and m~matkl in p_mgroup
  and p~mmsta ne '01'
  order by m~matnr ASCENDING.
  DELETE ADJACENT DUPLICATES FROM it_mat.
if p_spec[] is not initial.
  lv_special = '1'.
  endif.
  IF it_mat[] is not initial and lv_special = '1'.
SELECT werks matnr kulab sobkz charg FROM MSKU
  INTO CORRESPONDING FIELDS OF TABLE it_msku
  for all entries in it_mat
    WHERE matnr = it_mat-matnr
    AND werks IN p_plant
  AND sobkz  = 'W'.
  CLEAR: it_resultt, wa_resultt.
  endif.
if it_msku[] is not initial.
  loop at it_msku.
     it_collmsku-werks = it_msku-werks.
     it_collmsku-matnr = it_msku-matnr.
     it_collmsku-kulab = it_msku-kulab.
     it_collmsku-sobkz = it_msku-sobkz.
    collect it_collmsku.
    endloop.
    clear it_msku.
  endif.
LOOP AT it_mat.
  CLEAR: it_resultt, wa_resultt.
Retrieve related details from MARD/MCHB based on conditinos
  IF it_mat-sobkz = space.
    Select werks matnr FROM MARC
      APPENDING CORRESPONDING FIELDS OF TABLE it_resultt
      where matnr = it_mat-matnr
      and werks in p_plant.
      wa_resultt-ltab = 'MARC'.
      MODIFY it_resultt FROM wa_resultt TRANSPORTING ltab
      where matnr = it_mat-matnr
      and werks in p_plant.
  ENDIF.
  IF it_mat-xchpf = SPACE.
    SELECT werks matnr labst lgort lgpbe FROM MARD
    APPENDING CORRESPONDING FIELDS OF TABLE it_resultt
    WHERE matnr = it_mat-matnr
    AND werks IN p_plant
    AND lgort IN p_sloc.
    wa_resultt-ltab = 'MARD'.
    MODIFY it_resultt FROM wa_resultt TRANSPORTING ltab
    WHERE matnr = it_mat-matnr
    AND werks IN p_plant
    AND lgort IN p_sloc.
  ELSE.
    SELECT werks matnr charg clabs lgort FROM MCHB
    APPENDING CORRESPONDING FIELDS OF TABLE it_resultt
    WHERE matnr = it_mat-matnr
    AND werks IN p_plant
    AND lgort IN p_sloc.
    wa_resultt-ltab = 'MCHB'.
    MODIFY it_resultt FROM wa_resultt TRANSPORTING ltab
    WHERE matnr = it_mat-matnr
    AND werks IN p_plant
    AND lgort IN p_sloc.
  ENDIF.
Combine all related data into a record and keep in it_results
  LOOP AT it_resultt INTO wa_resultt.
    IF ( c_rzero = 'X' AND
       ( wa_resultt-clabs <> 0 OR wa_resultt-labst <> 0 ) )
       OR ( c_rzero <> 'X' ).
    Preparing data needed.----------
      l_count = l_count + 1.
      SELECT SINGLE maktx FROM MAKT
      INTO (l_maktx)
      WHERE matnr = wa_resultt-matnr.
      SELECT SINGLE umren umrez meinh FROM MARM
      INTO (l_umren, l_umrez, l_meinh)
      WHERE matnr = wa_resultt-matnr
      AND MEINH <> it_mat-meins.
    Alternative Qty
      l_alqty = l_umren / l_umrez * wa_resultt-clabs.
    retrieve stroge bin if it is not found, especially for MCHB
      IF wa_resultt-lgpbe IS INITIAL OR wa_resultt-lgpbe = ''.
        SELECT SINGLE lgpbe FROM MARD
        INTO l_lgpbe
        WHERE MATNR = wa_resultt-matnr
        AND WERKS = wa_resultt-werks
        AND LGORT = wa_resultt-lgort.
      ENDIF.
    Retrieve all details from MBEW & decide the qty
      IF wa_resultt-ltab = 'MARD'.
        SELECT SINGLE vprsv verpr stprs peinh salk3 FROM MBEW
        INTO (l_vprsv, l_verpr, l_stprs, l_peinh, l_salk3)
        WHERE MATNR = wa_resultt-matnr
        AND BWKEY = wa_resultt-werks.
        l_clabs = wa_resultt-labst.
      ELSE.
        IF it_mat-mtart = 'ROH'.
          SELECT SINGLE vprsv verpr stprs peinh salk3 FROM MBEW
          INTO (l_vprsv, l_verpr, l_stprs, l_peinh, l_salk3)
          WHERE MATNR = wa_resultt-matnr
          AND BWTAR = wa_resultt-charg.
        ELSEIF it_mat-mtart = 'FERT'.
          SELECT SINGLE vprsv verpr stprs peinh salk3 FROM MBEW
          INTO (l_vprsv, l_verpr, l_stprs, l_peinh, l_salk3)
          WHERE MATNR = wa_resultt-matnr
          AND BWKEY = wa_resultt-werks.
        ENDIF.
        l_clabs = wa_resultt-clabs.
            ENDIF.
    Both l_vprsv and l_stprs are also price, based on price control
    to decide which one to use
      IF l_vprsv <> 'V'.
        l_verpr = l_stprs.
      ENDIF.
      l_untpr = l_verpr / l_peinh.
      wa_resultt-BISMT = IT_MAT-BISMT.
      wa_resultt-sobkz = it_msku-sobkz.
      wa_resultt-kulab = it_msku-kulab.
      wa_resultt-matnr = it_mat-matnr.
    Insert data into work area
      wa_results-lcnt = l_count.
      wa_results-werks = wa_resultt-werks.
      wa_results-matnr = wa_resultt-matnr.
      wa_results-BISMT = wa_resultt-BISMT.
      wa_results-maktx = l_maktx.
      wa_results-mtart = it_mat-mtart.
      wa_results-matkl = it_mat-matkl.
      wa_results-charg = wa_resultt-charg.
      wa_results-clabs = l_clabs.
      wa_results-meins = it_mat-meins.
      wa_results-alqty = l_alqty.
      wa_results-meinh = l_meinh.
      wa_results-lgort = wa_resultt-lgort.
      wa_results-lgpbe = l_lgpbe.
      wa_results-vprsv = l_vprsv.
      wa_results-curr = 'MYR'.
      wa_results-price = l_verpr.
      wa_results-peinh = l_peinh.
      wa_results-untpr = l_untpr.
      wa_results-salk3 = l_salk3.
      wa_results-sobkz = wa_resultt-sobkz.
      wa_results-kulab = wa_resultt-kulab.
    Append work area into it_results
      APPEND wa_results TO it_results.
    ENDIF.
    CLEAR wa_results.
  ENDLOOP.
   IF lv_special = '1'.
    loop at it_results into wa_results.
      loop at it_collmsku where matnr = wa_results-matnr and werks = wa_results-werks.
        wa_results-sobkz = it_collmsku-sobkz.
          wa_results-kulab = it_collmsku-kulab.
          modify it_results from wa_results.
          clear wa_results.
        endloop.
      endloop.
    endif.

Hello
Modify select :
SELECT werks matnr kulab sobkz charg FROM MSKU
INTO CORRESPONDING FIELDS OF TABLE it_msku
for all entries in it_mat
WHERE matnr = it_mat-matnr
AND werks IN p_plant
AND sobkz IN p_spec.
In this case if you select special stock = 'w' at the selection screen, only 'w' stock will be appear.
And if you select special stock blank (p_cpec is initial), all stock will be appear.

Similar Messages

  • Consignment stock in MC.9 report

    Hi All.
    In MC.9 report, consignment stock is consider under valuated stock or non valuated stock.
    I run MC.9 report in two different system. In one system consignment stock is under valuated stock while in other it is not considered as valuated stock. Which system is correct.
    If consignment stock is valuated stock then why it is not considered as valuated stock in other system.
    Please help.
    Thanks in advance
    Regards
    chetan

    Hello,
    The stock of MC.9 reflects the complete stock at plant level. It includes also the sock of material which one is send to vendor.(Subcontracting)  You can also cross check through MMBE in which stock prov. to vendor is different.
    While MB5B had three radio buttons for stock type.
    1 - Storage loc/Batch stock - which not include the materials provided to vendor.
    2 - Valuated stock    - - Total valuated stock as per your selection crieteria.
    3 - Special stock -- all the special stock such as subcontracting/pipeline/consignment.
    If you click on Valuated radio button and execute it, you will get same stock under head Closing stock and the value will same as the value in MC.9
    --Just click Valuated stock radio button.
    RGDS
    Rajan

  • Calculation of consignment stock for a material ( ABAP/MM)

    HI,
    I need information to find out consignment stock as per requirement. I doubt the requirement is not complete enough but they dont agree. I am using following logic.Please provide me your inputs.( i was asked to follow standard program logic of 'RM07MLBD')
    1.I am retrieving material document no.s from MSEG with the movement types 631,632,633,634,701,702 and SOBKZ = 'W' for a particular reporting period for a material.
    2. I filter them by checking date BUDAT in MKPF.
    3. then i aggregate them taking SHKZG = 'S' or 'H' accordingly '+ ' or '-'.
    And finally i Aggregate them for customers belonging to same state (REGIO)
    but i am getting some negative values and incorrect entries.
    what i am not able to understand is whether my selection criterion is wrong or aggregation of materials is wrong or if i am missing any other selection criterion? Your inputs are highly appreciated.
    Thanks in Advance.
    Shrini

    Hi ,
           Follow sample program RM07MKBS OR MB54 which display consignment stock for  am material.
    Please reward if useful.

  • Customer consignment stock- REPORTING stock level & goods depatched

    Hi all
    I'm looking for a report (or reports) which shows the following (bare in mind that this will all be customer consignment stock):
    - the delivery numbers
    - the previous month's stock level
    - the quantity of goods despatched the following month with a rolling calculation
    - monthly invoice values
    - remaining stock levels (after current months goods have been issued and invoiced)
    I'm aware that MMBE/ MB58 shows the current stock levels, however I'm hoping there is a report in SE16 which shows it as a report structure.
    I understand that this is a lot of info requested by myself however any information would be appreciated.
    Thanks
    / Vicky

    Dear tortyv,
    As per my understanding of the requirement,
    You please check the "VL06" report if it satisfies your requirement you enter the execution parameters and execute.
    System will give the list of out bound deliveries. Select one of those and click the details icon (ctrlshiftf3) according to the item view or headder view.
    If it does't suit you have to go for z report.
    I f you want that please provide the input fields in order to fetch the required data for the report.
    Thanks&Regards
    Raghu.k

  • Consignment Stock: Reporting in BW

    Hi,
    Has anybody developed a solution for the comprehensive reporting of the usage of consignment stocks in BW ?
    We currently use the purchasing cube in BW from Business Content (0PUR_C01) but this does not really give a good overview.
    Any pointers would be useful.
    Regards
    Dave

    Hi,
    I am sure we can get report on Consignment from 0IC_C03 Cube.
    http://help.sap.com/saphelp_nw04/helpdata/en/5b/8bf0997da5eb4197ce11ddda262e44/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/73/df78f07bb9b1498f02c4043920d5c7/frameset.htm
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • Safety Stock (ABAP Report)

    Hello to All,
    We have a problem regarding Safety Stock report (ABAP Report).  The program is designed to generate material's Plant/Sloc and Unrestricted Stock versus Safety Stock.  The report was working properly in DEV, QAS and PROD server.  Then another feature was requested to be added, the report should also eliminate or not display all materials that was marked as Flag for Deletion.  When the transport request for this enhancement was transported and tested in DEV and QAS server, the report is running properly.  But when transported in PROD server, the report only generates two material codes and doesn't list the other materials.
    Regards,
    Ann

    Hello,
    Thank you for the reply, I have checked the Safety Stock in the material and also the flag for deletion indicator... We have analyzed that the program needs to be reviewed on the part of "Flag for Deletion" indicator when eliminating records in the report list.
    Thank You again.
    Edited by: Meryll Penalosa on Dec 7, 2010 8:05 AM

  • Standard Report for stock Aging

    Hello all,
    can anyone plz let us know that is there any standard report in SAP for stock aging? actually i have to see the materials quantity whose 311 movement not done after 321 and also from how many days it is pending.
    Kindly help and tell how can i find those materials quantity, while user also do 311 for partial quantity?
    Regards.

    Hi  @ABAP@
    Check the followings...
    MB24 - Reservations for Material
    MB25 - Reservations for Account Assignment
    MB51 - Material Document List
    MB52 - List of Warehouse Stocks on Hand MB53 - Display Plant Stock Availability
    MB54 - Consignment Stocks
    MB56 - Analyze Batch Where-Used List
    MB57 - Build Up Batch Where-Used List
    MB58 - Consgmt and Ret. Packag. at Customer
    MB59 - Material Document List
    MB5B - Stocks for Posting Date
    MB5C - Pick-Up List
    MB5L - List of Stock Values: Balances
    MB5M - ShL.exp/prod.date
    MB5S - Display List of GR/IR Balances
    MB5W - List of Stock Values
    MB9A - Analyze Archived Material Documents
    MBAL - Material Documents: Read Archive
    MBGR - Display Material Documents by Movement Reason
    MBSI - Find Inventory Sampling
    MBSM - Display Cancelled Material Documents
    MMBE - Stock Overview
    MD07 - Current Material Overview
    MR51 - Material Line Items
    MRKO - Settle Consignment/Pipeline Liabilities
    MB5T - Stock in transit CC

  • Consignment stock is NOT getting displayed in the MC.9 trnasaction.

    Hi experts,
    We have some vendor consignement stock for some of our materials.
    In inventory trnasactions like MMBE, MB54 it is corrctly displayed.
    In the structure S032 also the consigment stock was updated. But we are not able to see this Consignement stock in the transaction MC.9
    Mc.9 is showing ZERO consignment stock.
    What is the reason for this?
    How to correct this?
    Please help us in solving this.
    Regards,
    Vijove

    Hi,
    Your question can be answered in this [forum Topic|ABAP Development; in a shor time..
    Regards
    Narin.

  • Consignment Stock movements in ORT_C37

    Hi Experts,
    I am working on BW IS-Retail  implementation. In my project for stock information, we are  using 0RT_C37 infocube.  But I am not getting the consignment stock material movements in my report.  Please let me know  how to get the  consignment material movements in 0rt_c37 infocube.
    Any enhancements required for 2lif_03_bf infosource. I saw the consignements stock movements in 0IC_C03 cube.  But I am using 0rt_c37 cube for retail values.
    Please help me out from this issue.
    Regards,
    Chandra

    Hi
    There are two option for u
    First option is...you can update the same cube with another infosource and updat rule to feed the data into the cube and get the consignment stock detail
    this should not affect the data consistency or granularity of the cube....
    Second option is..as already said create a multiprovider or infoset depending on the report...if u feel joins wil be useful go for infoset query or union condition is sufficing ur report requirement go for multiprovider....
    this should not affect the reporting performance as joins are done during runtime and may take some time to fetch
    Regards
    N Ganesh

  • Reg :  Z report for Stock on given date

    Dear ABAP Guru's,
                                   Iam in need of urgent report inorder to find Stock on given(particular) single date but not SAP standard report.That Stock Value should match the MC.9 value.Pls help me

    Hi,
    This code may help you.
    *& Report  ZDH_ITC_STOREP
    REPORT  ZDH_ITC_STOREP.
    TABLES: T001L.
    type-pools slis.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: GT_HEADER TYPE SLIS_T_LISTHEADER.
    DATA: GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: GT_EVENTS TYPE SLIS_T_EVENT.
    TYPES: BEGIN OF TY_FINAL,
           MATNR TYPE MCHB-MATNR,
           MATDES TYPE MAKT-MAKTX,
           BATNO TYPE MCHB-CHARG,
           UMIL TYPE MCHB-CLABS,
           UCFC TYPE MCHB-CLABS,
           BMIL TYPE MCHB-CSPEM,
           BCFC TYPE MCHB-CLABS,
           TMIL TYPE MCHB-CLABS,
           TCFC TYPE MCHB-CLABS,
           END OF TY_FINAL.
    TYPES: BEGIN OF TY_MCHB,
          MATNR TYPE MCHB-MATNR,      " Material Number
          CHARG TYPE MCHB-CHARG,      " Batch Number
          CLABS TYPE MCHB-CLABS,      " Valuated Unrestricted-Use Stock
          CSPEM TYPE MCHB-CSPEM,      " Blocked Stock
          UCFC TYPE MCHB-CLABS,
          bcfc TYPE MCHB-CLABS,
          END OF TY_MCHB.
    *TYPES: BEGIN OF TY_MARA,
    *     MATNR TYPE MARA-MATNR,
    *     END OF TY_MARA.
    TYPES: BEGIN OF TY_MAKT,
         MATNR TYPE MAKT-MATNR,       " Material Number
         MAKTX TYPE MAKT-MAKTX,       " MATERIAL DESCRIPTION
         END OF TY_MAKT.
    TYPES:BEGIN OF TY_MARM,
         MATNR TYPE MARM-MATNR,       "MATERIAL NUMBER
         UMREN TYPE MARM-UMREN,       "Denominator for conversion to base units of measure
         UMREZ TYPE MARM-UMREZ,       "Numerator for Conversion to Base Units of Measure
       END OF TY_MARM.
    DATA: IT_FINAL TYPE STANDARD TABLE OF TY_FINAL,
          WA_FINAL TYPE TY_FINAL.
    DATA: IT_MCHB TYPE STANDARD TABLE OF TY_MCHB,
          WA_MCHB TYPE TY_MCHB.
    *DATA: IT_MARA TYPE STANDARD TABLE OF TY_MARA,
    *      WA_MARA TYPE TY_MARA.
    DATA: IT_MAKT TYPE STANDARD TABLE OF TY_MAKT,
          WA_MAKT TYPE TY_MAKT.
    DATA: IT_MARM TYPE STANDARD TABLE OF TY_MARM,
          WA_MARM TYPE TY_MARM.
    data: atot, btot type MCHB-CLABS.
    PARAMETERS: PA_FACT TYPE T001W-WERKS OBLIGATORY,                  "FACTORY
                PA_DATE TYPE SY-DATUM OBLIGATORY.                     "DATE
    SELECT-OPTIONS: SO_STLO FOR T001L-LGORT OBLIGATORY.               " STORAGE LOCATION
    * GETTING THE MATERIALS
    SELECT MATNR CHARG CLABS CSPEM
      FROM MCHB
      INTO TABLE IT_MCHB
      WHERE WERKS = PA_FACT
      AND LGORT IN SO_STLO.
    * GETTING THE BRAND DESCRIPTION FROM THE ABOVE SELECTED MATERIAL
    SELECT MATNR MAKTX
      FROM MAKT
      INTO TABLE IT_MAKT
      FOR ALL ENTRIES IN IT_MCHB
      WHERE MATNR = IT_MCHB-MATNR
      AND SPRAS = 'EN'.
    * GETTING THE BATCH CODE FOR THE ABOVE MATERIAL AND BRAND
    SELECT MATNR UMREN UMREZ
      FROM MARM
      INTO TABLE IT_MARM
      FOR ALL ENTRIES IN IT_MCHB
      WHERE MATNR = IT_MCHB-MATNR.
    * CALCULATING THE TOTALS OF BLOCKED AND UNRESTRICTED QTY
    LOOP AT IT_MCHB INTO WA_MCHB.
      READ TABLE IT_MARM INTO WA_MARM WITH KEY MATNR = WA_MCHB-MATNR.
      WA_MCHB-ucfc  = ( ( WA_MARM-UMREN / WA_MARM-umrez ) * wa_mchb-clabs ).
        WA_MCHB-bcfc = ( ( wa_marm-umren / wa_marm-umrez ) * wa_mchb-cspem ).
    *  WA_MCHB-ucfc = atot.
    *  WA_MCHB-bcfc = btot.
      modify IT_MCHB from WA_MCHB TRANSPORTING ucfc bcfc WHERE MATNR = WA_MCHB-MATNR.
      READ TABLE it_makt into wa_makt with key MATNR = WA_MCHB-matnr.
      WA_FINAL-matnr = WA_MCHB-MATNR.
      WA_FINAL-MATDES = wa_makt-maktx.
      WA_FINAL-BATNO = wa_mchb-CHARG.
      WA_FINAL-UMIL = wa_MCHB-CLABS.
      wa_final-UCFC = WA_MCHB-ucfc.
      wa_final-bcfc = WA_MCHB-bcfc.
      wa_final-bmil = WA_MCHB-CSPEM.
      WA_FINAL-tmil = WA_MCHB-clabs + WA_MCHB-CSPEM.
      WA_FINAL-tcfc = WA_MCHB-ucfc + WA_MCHB-bcfc.
    append wa_final to IT_FINAL.
    ENDLOOP.
    perform buildheader USING GT_HEADER[].
    PERFORM FIELDCATINIT USING GT_FIELDCAT[].
    perform alvdisplay.
    PERFORM build_layout USING GS_LAYOUT.
    *&      Form  buildheader
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM buildheader USING RT_HEADER TYPE SLIS_T_LISTHEADER..
    DATA: TP TYPE SLIS_LISTHEADER.
      DATA: TEXT(20) TYPE C,
            DT TYPE SY-DATUM.
      TP-TYP = 'H'.
      TP-INFO = 'STOCK REPORT '.
      APPEND TP TO RT_HEADER.
      CLEAR TP.
      WRITE SY-DATUM TO DT DD/MM/YYYY.
      CONCATENATE 'DATE :' DT INTO TEXT.
      TP-TYP = 'S'.
      TP-INFO = TEXT.
      APPEND TP TO RT_HEADER.
      CLEAR TP.
    ENDFORM.                    " buildheader
    *&      Form  alvdisplay
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alvdisplay .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                 = 'ZDH_ITC_STOREP'
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                          = GS_LAYOUT
       IT_FIELDCAT                        = GT_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_FINAL
    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.                    " alvdisplay
    *&      Form  FIELDCATINIT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELDCATINIT USING FINIT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      LS_FIELDCAT-FIELDNAME       =  'MATNR'.
      LS_FIELDCAT-SELTEXT_L       =  'MATERIAL NO'.
      LS_FIELDCAT-KEY        =  'X'.
      LS_FIELDCAT-JUST = 'L'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'MATDES'.
      LS_FIELDCAT-SELTEXT_L       =  'BRAND'.
      LS_FIELDCAT-KEY        =  'X'.
      LS_FIELDCAT-JUST = 'L'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BATNO'.
      LS_FIELDCAT-SELTEXT_L       =  'BATCH NO'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'UMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'RESTRICTED'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'UCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'UCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'BLOCKED'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'BCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'BCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'TMIL'.
      LS_FIELDCAT-SELTEXT_L       =  'TOTAL MIL'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME       =  'TCFC'.
      LS_FIELDCAT-SELTEXT_L       =  'TCFC'.
      APPEND LS_FIELDCAT TO FINIT.
      CLEAR LS_FIELDCAT.
    ENDFORM.                    " FIELDCATINIT
    *&      Form  BUILDLAYOUT
    *       text
    *      -->P_GS_LAYOUT[]  text
    FORM BUILD_LAYOUT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      RS_LAYOUT-NO_INPUT = 'X'.
      RS_LAYOUT-ZEBRA = 'X'.
      RS_LAYOUT-COLWIDTH_OPTIMIZE = ' '.
      RS_LAYOUT-NO_COLHEAD = ' '.
      RS_LAYOUT-NO_VLINE = ' '.
      RS_LAYOUT-INFO_FIELDNAME = 'WS_COLOR'.
    ENDFORM.
                        " BUILDLAYOUT
    HTH
    Regards,
    Dhruv Shah

  • Vendor Consignment stock or vendor managed stock

    Dear All,
    My client wants to manage vendor consignment stock.
    Vendor will be given a area and vendor will keep the stock in his area. Based on the plan he will supply the stock.
    the GR for rawmaterials will be made on the consumption report given by the production person. This activity will happen next day only. i will do the GR only to the quantity consumed.
    for example if i consumed 100 qty, i will do GR only for 100 and vendor will issue invoice for 100. But when the vendor issue the stock, he will raise a excise invoice based on which i have to take excise credit. I want to know how to do the same.
    secondly, i take credit for 100 qty, but actual consumption is 95 only, how do i reverse the 5 only excise invoice.
    regards
    ranga

    No, it is possible to sell from vendor consignment stock directly and I have done it in ECC 6.0 (not IS-retail).
    - Pls refer the note 607604.
    - Establish the 'stock determination rule' in MM -> Inventory Management -> Stock Determination.
    - You need to assign it to the material (MRP3 view) or assign it to item-ategory.
    - DONOT mark the special stock indicator in item-category used in SD (e.g. TAN) with 'K'..I did this mistake and wasted some time. If you do, it will ask you to populate the Vendor field in the Delivery which is not available and you may get stuck up because of that.
    This should make it work.
    Pls award points if you find this information useful.
    Regards,
    Shripad

  • Request for help on Vendor Consignment stock and Customer Consignment Stock

    HI Experts,
    We have a requirement to segregate the Customer Consignment stock and Vendor consignment stock from the total Consignment stock available in the BW report.
    Currently in the report the calculation of total consignment stock is based up on Issued consignment stock and Received consignment stock .
    The calculations of the Issued and Received consignments stocks are specified below.
    Issued consignment Stock
    The below following parameters are checked when the quantity is considered as Issued consignment Stock 
    Transaction or Process keys :  100, 101, 104, 105, 106, 110
    Application    :   MM    
    Stock relevance : 1
    Adding to the above conditions,
    u2022     When the stock category is u2018Ku2019, the Quantity in Base Unit of Measure is assigned to Issued Consignment Stock.  or
    u2022     When the stock category is blank and the stock type is u2018Eu2019 or u2018Ku2019 or u2018Lu2019 then also the Quantity in Base Unit of Measure is assigned to Issued Consignment Stock.
    Received Consignment Stock :
    The below following parameters are checked when the quantity is considered as Issued consignment Stock 
    Transaction or Process keys :  000, 001, 004, 005, 006, 010
    Application    :   MM    
    Stock relevance : 1
    Adding to the above conditions,
    u2022     When the stock category is u2018Ku2019, the Quantity in Base Unit of Measure is assigned to Received Consignment Stock.  or
    u2022     When the stock category is blank and the stock type is u2018Eu2019 or u2018Ku2019 or u2018Lu2019 then also the Quantity in Base Unit of Measure is assigned to Received Consignment Stock
    Only stock category and stock type are available in the BW report for determining the type of consignment stock . So, with respect to stock category and stock type, could you please kindly advise if it is possible to determine the Customer consignment stock and Vendor consignment stock in the report
    Thanks a lot
    Warm Regards,
    Jeswanth
    Edited by: jeswanth kadali on Jun 23, 2009 4:10 PM

    Hi,
    We can settle consignment goods to vendor through MRKO transaction.Even user transafers consignment stock to own stock through MB1B transaction.We can use same document to settle vendor through MRKO transaction.
    What is implications of such Action (like Goods issue, 1 step transfer) on SAP.
    Nothing will happpen after after stock converted to own stock.
    Regards,
    JS

  • Standard report on Stock Status

    Hi,
    I need stock report in Inventory with the following output fields,
    1.Material
    2.Material Description
    3.Flagged Material For deletion (Yes/No)
    4.Plant
    5.Storage Location
    6.Division
    7.Valuated Stock (Qty & Value)
    8.Consignment Stock (Qty & Value)
    9.Total Stock (Qty & Value)
    Any standard reports available to generate this report cantaining all these fields.
    Regards,
    Baskar

    hi,...
    For any kind of damn report.:
    In SQVI...
    Enter some name..like zxxxxx. Create..
    Enter description.
    Data source: select table join
    Enter
    Click the insert table iconu2026enter the first table name
    Again Click the insert table iconu2026enter the second table name
    Then come back..
    You will see all the fields in both the tables with two boxes next to each field..
    The first box is the thing which you need to get in the output and the next box is for the inputting stuff..
    Put tick mark in the relevant boxes according to ur requirementsu2026and execute...
    Now save. Go to system...ststus....copy the program name..
    THen go to se93...give the transaction code of your choice. create...paste the program you copied.. then save it as a local object..save...
    Regards,
    AMit P hiran
    njoy SAP....
    njoy lyf....

  • ABAP Reports

    Hi All ,
                  I am new to ABAP ,can someone please tell me how to do the following.
    1-Created an interactive report for displaying vendor information based on the selection made by the client.The transactions made by the vendor with the client till date will be displayed in details.On selection, further details of the selected line is made available in
    the secondary list like credits availed by the client on purchase, delivery details of tyhe vendor, payment details by the clients etc.
    2-Created an interactive report to display details of vendor and all bank transactions done with the client.
    3-Created a report on material master.The report gives stock grouped by  material type and plant.The output also shows material no., storage location and unit of measure and description in addition to group totals.
    Thanks in Advance,
    Sujata

    Hi
       i want to know how to get the screen and solution in brief about the following:
    1-Created an interactive report for displaying vendor information based on the selection made by the client.The transactions made by the vendor with the client till date will be displayed in details.On selection, further details of the selected line is made available in
    the secondary list like credits availed by the client on purchase, delivery details of tyhe vendor, payment details by the clients etc.
    2-Created an interactive report to display details of vendor and all bank transactions done with the client.
    3-Created a report on material master.The report gives stock grouped by material type and plant.The output also shows material no., storage location and unit of measure and description in addition to group totals.
    Thanks in Advance,
    Sujata
    Bharat Kalagara  
    Posts: 156
    Questions: 6
    Registered: 2/27/07
    Forum points: 116 
    Solved problem (10)
    Very helpful answer (6)
    Helpful answer (2)
       Re: ABAP Reports  
    Posted: Mar 21, 2007 5:21 AM    in response to: jita dash       Reply      E-mail this post 
    HI,
    u just check this code.
    this is very simple toundersatnd interactive report concept.
    REPORT ZBHREP3 LINE-COUNT 15(1) LINE-SIZE 75.
    TABLES: SFLIGHT,ZEMP.
    DATA VAR LIKE SFLIGHT-CONNID.
    DATA ITAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.
    PARAMETERS NAME TYPE ZEMP-NAME DEFAULT 'BHARAT'.
    WRITE: 25 NAME COLOR 6.
    SELECT-OPTIONS CARRID1 FOR SFLIGHT-CARRID.
    SET PF-STATUS 'MENU'.
    SET TITLEBAR 'TIT'.
    FORMAT HOTSPOT ON.
    WRITE:/10 'AIRLINE CODE',25 'CONNECTION ID',40 'FLIGHT DATE'.
    SELECT * FROM SFLIGHT WHERE CARRID IN CARRID1.
    WRITE:/10 SFLIGHT-CARRID,25 SFLIGHT-CONNID,40 SFLIGHT-FLDATE.
    HIDE SFLIGHT-CONNID.
    ENDSELECT.
    *END-OF-PAGE.
    END-OF-PAGE.
    WRITE:/64 'P.NO:',SY-PAGNO.
    *TOP-OF-PAGE.
    TOP-OF-PAGE.
    WRITE:/ 'THIS IS MY FIRST REPORTS PROGRAM.'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    DO 5 TIMES.
    WRITE:/ SY-INDEX.
    ENDDO.
    *THESE 3 STATEMENTS ARE FOR THE END-OF-PAGE CONTENTS IN LAST PAGE.
    DATA M TYPE I.
    M = SY-LINCT - SY-LINNO - 1.
    SKIP M.
    *AT LINE-SELECTION.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN '1'.
    READ LINE SY-LILLI FIELD VALUE SFLIGHT-CONNID INTO VAR.
    SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF ITAB WHERE
    CONNID = VAR.
    WRITE:/ ITAB-CARRID,ITAB-PLANETYPE,ITAB-PAYMENTSUM.
    ENDSELECT.
    WRITE:/ VAR.
    SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF ITAB WHERE
    CONNID = SY-LISEL+24(4).
    WRITE:/ ITAB-CARRID,ITAB-PLANETYPE,ITAB-PAYMENTSUM.
    ENDSELECT.
    SKIP 1.
    WRITE:/ SY-LISEL+24(4).
    SELECT * FROM SFLIGHT INTO CORRESPONDING FIELDS OF ITAB WHERE
    CONNID = SFLIGHT-CONNID.
    WRITE:/ ITAB-CARRID,ITAB-PLANETYPE,ITAB-PAYMENTSUM.
    ENDSELECT.
    WRITE:/ SFLIGHT-CONNID.
    WHEN '2'.
    WRITE:/ SY-LILLI.
    WHEN '3'.
    WRITE :/ 'BHARAT'.
    ENDCASE.
    regards,
    bharat.
    keerthi kiran v...  
    Posts: 915
    Questions: 11
    Registered: 12/15/05
    Forum points: 1,078 
    Solved problem (10)
    Very helpful answer (6)
    Helpful answer (2)
       Re: ABAP Reports  
    Posted: Mar 21, 2007 5:29 AM    in response to: jita dash       Reply      E-mail this post 
    Hi ,
    chk this code for interactive report,this also covers totals concept
    *& Report ZTRAINING5_KEERTHI *
    REPORT ZTRAINING5_KEERTHI NO STANDARD PAGE HEADING
    LINE-SIZE 258
    LINE-COUNT 28(4).
    tables declaration *
    TABLES: VBAK,VBAP,VBUK,VBKD,TVKO,KNA1,MARA,KONV,T685T,TVKOV.
    data declaration *
    DATA: V_TAB LIKE SY-TABIX,
    V_KNUMV LIKE VBAK-KNUMV,
    L_TABIX LIKE SY-TABIX,
    DATE1 LIKE SY-DATUM.
    DATA: BEGIN OF IT_VBAK OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    VKORG LIKE VBAK-VKORG,
    VTWEG LIKE VBAK-VTWEG,
    SPART LIKE VBAK-SPART,
    AUART LIKE VBAK-AUART,
    AUDAT LIKE VBAK-AUDAT,
    KUNNR LIKE VBAK-KUNNR,
    NETWR LIKE VBAK-NETWR,
    END OF IT_VBAK.
    DATA: BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN,
    POSNR LIKE VBAP-POSNR,
    MATNR LIKE VBAP-MATNR,
    ARKTX LIKE VBAP-ARKTX,
    KWMENG LIKE VBAP-KWMENG,
    WERKS LIKE VBAP-WERKS,
    LGORT LIKE VBAP-LGORT,
    NETPR LIKE VBAP-NETPR,
    END OF IT_VBAP.
    DATA: BEGIN OF IT_VBPA OCCURS 0,
    KUNNR LIKE VBPA-KUNNR,
    PARVW LIKE VBPA-PARVW,
    VBELN LIKE VBPA-VBELN,
    END OF IT_VBPA.
    DATA: BEGIN OF IT_VBKD OCCURS 0,
    BSTKD LIKE VBKD-BSTKD,
    BSARK LIKE VBKD-BSARK,
    POSNR LIKE VBKD-POSNR,
    END OF IT_VBKD.
    DATA: BEGIN OF IT_FINAL OCCURS 0,
    KUNNR LIKE VBAK-KUNNR,
    VBELN LIKE VBAK-VBELN,
    VKORG LIKE VBAK-VKORG,
    VTWEG LIKE VBAK-VTWEG,
    SPART LIKE VBAK-SPART,
    AUART LIKE VBAK-AUART,
    AUDAT LIKE VBAK-AUDAT,
    NETWR LIKE VBAK-NETWR,
    POSNR LIKE VBAP-POSNR,
    MATNR LIKE VBAP-MATNR,
    ARKTX LIKE VBAP-ARKTX,
    KWMENG LIKE VBAP-KWMENG,
    WERKS LIKE VBAP-WERKS,
    LGORT LIKE VBAP-LGORT,
    NETPR LIKE VBAP-NETPR,
    KUNNR1 LIKE VBPA-KUNNR,
    BSTKD LIKE VBKD-BSTKD,
    BSARK LIKE VBKD-BSARK,
    END OF IT_FINAL.
    DATA: BEGIN OF IT_KONV OCCURS 0,
    KNUMV LIKE KONV-KNUMV,
    KPOSN LIKE KONV-KPOSN,
    KSCHL LIKE KONV-KSCHL,
    KBETR LIKE KONV-KBETR,
    KWERT LIKE KONV-KWERT,
    END OF IT_KONV.
    DATA: BEGIN OF IT_TEXT OCCURS 0,
    KSCHL LIKE T685T-KSCHL,
    VTEXT LIKE T685T-VTEXT,
    END OF IT_TEXT.
    selection screen *
    PARAMETERS:P_VKORG LIKE VBAK-VKORG OBLIGATORY,
    P_VTWEG LIKE VBAK-VTWEG OBLIGATORY,
    P_SPART LIKE VBAK-SPART OBLIGATORY.
    SELECT-OPTIONS: S_AUDAT FOR VBAK-AUDAT ,
    S_VBELN FOR VBAK-VBELN ,
    S_KUNNR FOR VBAK-KUNNR ,
    S_MATNR FOR VBAP-MATNR.
    PARAMETERS: OPENORD RADIOBUTTON GROUP RAD1 DEFAULT 'X',
    ALLORD RADIOBUTTON GROUP RAD1.
    initialization *
    INITIALIZATION.
    DATE1 = SY-DATUM - 30.
    S_AUDAT-LOW = DATE1.
    S_AUDAT-HIGH = SY-DATUM.
    APPEND S_AUDAT.
    validations *
    AT SELECTION-SCREEN.
    validating sales org
    SELECT SINGLE VKORG FROM TVKO
    INTO TVKO
    WHERE VKORG = P_VKORG.
    IF SY-SUBRC <> 0.
    WRITE:/ 'Invalid sales organisation'.
    ENDIF.
    validating distribution channel.
    SELECT SINGLE VTWEG
    FROM TVKOV
    INTO TVKOV
    WHERE VTWEG = P_VTWEG.
    IF SY-SUBRC NE 0.
    WRITE:/ 'Invalid distribution channel'.
    ENDIF.
    validating division.
    SELECT SINGLE SPART
    FROM TVTA
    INTO P_SPART
    WHERE SPART = P_SPART.
    IF SY-SUBRC NE 0.
    WRITE:/ 'Invalid division'.
    ENDIF.
    validating customer.
    SELECT SINGLE KUNNR FROM KNA1
    INTO KNA1
    WHERE KUNNR IN S_KUNNR.
    IF SY-SUBRC NE 0.
    WRITE:/ 'Invalid customer'.
    ENDIF.
    validating material.
    SELECT SINGLE MATNR FROM MARA
    INTO MARA
    WHERE MATNR IN S_MATNR.
    IF SY-SUBRC NE 0.
    WRITE:/ 'Invalid MATERIAL NUMBER'.
    ENDIF.
    start of selection *
    START-OF-SELECTION.
    SELECT VBELN
    VKORG
    VTWEG
    SPART
    AUART
    AUDAT
    KUNNR
    NETWR
    FROM VBAK
    INTO TABLE IT_VBAK
    WHERE VBELN IN S_VBELN AND
    VKORG = P_VKORG AND
    VTWEG = P_VTWEG AND
    SPART = P_SPART AND
    AUDAT IN S_AUDAT AND
    KUNNR IN S_KUNNR .
    IF OPENORD = 'X'.
    LOOP AT IT_VBAK.
    READ TABLE IT_VBAK INDEX SY-TABIX.
    SELECT SINGLE VBELN FROM VBUK
    INTO VBUK
    WHERE VBELN = IT_VBAK-VBELN AND
    GBSTK <> 'C'.
    IF SY-SUBRC <> 0.
    DELETE IT_VBAK INDEX SY-TABIX.
    ENDIF.
    ENDLOOP.
    ENDIF.
    SELECT VBELN
    POSNR
    MATNR
    ARKTX
    KWMENG
    WERKS
    LGORT
    NETPR
    FROM VBAP
    INTO TABLE IT_VBAP
    FOR ALL ENTRIES IN IT_VBAK
    WHERE VBELN = IT_VBAK-VBELN AND
    MATNR IN S_MATNR.
    SELECT KUNNR
    PARVW
    VBELN
    FROM VBPA
    INTO TABLE IT_VBPA
    FOR ALL ENTRIES IN IT_VBAP
    WHERE VBELN = IT_VBAP-VBELN AND
    POSNR = IT_VBAP-POSNR AND
    PARVW = 'WE'.
    IF SY-SUBRC <> 0.
    SELECT KUNNR
    PARVW
    VBELN
    FROM VBPA
    INTO TABLE IT_VBPA
    FOR ALL ENTRIES IN IT_VBAP
    WHERE VBELN = IT_VBAP-VBELN AND
    POSNR = '000000' AND
    PARVW = 'we'.
    ENDIF.
    SELECT BSTKD
    BSARK
    POSNR
    FROM VBKD
    INTO TABLE IT_VBKD
    FOR ALL ENTRIES IN IT_VBAP
    WHERE VBELN = IT_VBAP-VBELN AND
    POSNR = IT_VBAP-POSNR .
    IF SY-SUBRC <> 0.
    SELECT BSTKD
    BSARK
    POSNR
    FROM VBKD
    INTO TABLE IT_VBKD
    FOR ALL ENTRIES IN IT_VBAP
    WHERE VBELN = IT_VBAP-VBELN AND
    POSNR = '000000' .
    ENDIF.
    LOOP AT IT_VBAK.
    L_TABIX = SY-TABIX.
    MOVE: IT_VBAK-KUNNR TO IT_FINAL-KUNNR,
    IT_VBAK-VBELN TO IT_FINAL-VBELN,
    IT_VBAK-VKORG TO IT_FINAL-VKORG,
    IT_VBAK-VTWEG TO IT_FINAL-VTWEG,
    IT_VBAK-SPART TO IT_FINAL-SPART,
    IT_VBAK-AUART TO IT_FINAL-AUART,
    IT_VBAK-AUDAT TO IT_FINAL-AUDAT,
    IT_VBAK-NETWR TO IT_FINAL-NETWR.
    READ TABLE IT_VBAP WITH KEY VBELN = IT_VBAK-VBELN.
    READ TABLE IT_VBAK INDEX L_TABIX.
    MOVE: IT_VBAP-POSNR TO IT_FINAL-POSNR,
    IT_VBAP-MATNR TO IT_FINAL-MATNR ,
    IT_VBAP-ARKTX TO IT_FINAL-ARKTX,
    IT_VBAP-KWMENG TO IT_FINAL-KWMENG,
    IT_VBAP-WERKS TO IT_FINAL-WERKS,
    IT_VBAP-LGORT TO IT_FINAL-LGORT,
    IT_VBAP-NETPR TO IT_VBAP-NETPR.
    READ TABLE IT_VBPA WITH KEY VBELN = IT_VBAK-VBELN.
    MOVE IT_VBPA-KUNNR TO IT_FINAL-KUNNR1.
    READ TABLE IT_VBKD WITH KEY POSNR = IT_VBAP-POSNR.
    MOVE: IT_VBKD-BSTKD TO IT_FINAL-BSTKD,
    IT_VBKD-BSARK TO IT_FINAL-BSARK.
    APPEND IT_FINAL.
    ENDLOOP.
    end of selection *
    END-OF-SELECTION.
    SORT IT_FINAL BY KUNNR VBELN.
    LOOP AT IT_FINAL.
    AT NEW KUNNR.
    NEW-PAGE.
    WRITE:/ SY-ULINE(255),/ SY-VLINE.
    FORMAT COLOR COL_POSITIVE.
    WRITE: 2 'customer no.',10 SY-VLINE,'sales doc.',25 SY-VLINE,'dis.ch.',
    30 SY-VLINE,'division',35 SY-VLINE,'salesordtype',50 SY-VLINE,'doc.date'
    ,62 SY-VLINE,'netvalue',85 SY-VLINE,'item no.',92 SY-VLINE,'materialno.'
    ,105 SY-VLINE,'item text',150 SY-VLINE,'ord.qty.',170 SY-VLINE,'plant',
    175 SY-VLINE,'sto.loc.',180 SY-VLINE,'net price',196 SY-VLINE,
    'ship2party',206 SY-VLINE,'pur.ord.',245 SY-VLINE,'purordtype' ,255
    SY-VLINE.
    WRITE:/ SY-ULINE(255).
    ENDAT.
    V_TAB = SY-TABIX MOD 2.
    IF V_TAB <> 0.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    ELSE.
    FORMAT COLOR COL_HEADING INTENSIFIED OFF.
    ENDIF.
    WRITE:/ SY-VLINE,2 IT_FINAL-KUNNR,10 SY-VLINE, IT_FINAL-VBELN,25
    SY-VLINE,
    IT_FINAL-VTWEG,30 SY-VLINE,IT_FINAL-SPART,35 SY-VLINE,
    IT_FINAL-AUART,50 SY-VLINE,IT_FINAL-AUDAT,62 SY-VLINE,IT_FINAL-NETWR,85
    SY-VLINE,IT_FINAL-POSNR,92 SY-VLINE,
    IT_FINAL-MATNR,105 SY-VLINE,IT_FINAL-ARKTX,150 SY-VLINE
    ,IT_FINAL-KWMENG,170 SY-VLINE,IT_FINAL-WERKS,175 SY-VLINE,
    IT_FINAL-LGORT,180 SY-VLINE,IT_FINAL-NETPR,196 SY-VLINE
    ,IT_FINAL-KUNNR1,206 SY-VLINE,IT_FINAL-BSTKD,245 SY-VLINE,
    IT_FINAL-BSARK,255 SY-VLINE.
    HIDE IT_FINAL-VBELN.
    WRITE:/ SY-ULINE(255).
    AT END OF KUNNR.
    SUM.
    WRITE:/ SY-VLINE,'TOTAL',63 IT_FINAL-NETWR,181 IT_FINAL-NETPR,255
    SY-VLINE.
    WRITE:/ SY-ULINE.
    ENDAT.
    ENDLOOP.
    AT LINE-SELECTION.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN '1'.
    TO GET SECONDARY LIST
    PERFORM INTERACT.
    ENDCASE.
    *& Form interact
    text
    --> p1 text
    <-- p2 text
    FORM INTERACT .
    SELECT SINGLE KNUMV FROM VBAK
    INTO V_KNUMV
    WHERE VBELN = IT_FINAL-VBELN.
    SELECT KNUMV
    KPOSN
    KSCHL
    KBETR
    KWERT
    FROM KONV
    INTO TABLE IT_KONV
    WHERE KNUMV = V_KNUMV.
    SELECT KSCHL
    VTEXT FROM T685T
    INTO TABLE IT_TEXT
    FOR ALL ENTRIES IN IT_KONV
    WHERE KSCHL = IT_KONV-KSCHL AND
    SPRAS = SY-LANGU AND
    KVEWE = 'A' AND
    KAPPL = 'V'.
    CLEAR IT_KONV.
    CLEAR IT_TEXT.
    WRITE:/ SY-ULINE(72).
    FORMAT COLOR COL_NEGATIVE.
    WRITE:/ SY-VLINE,'COITEM',10 SY-VLINE,'RATE',28 SY-VLINE,
    'COND.VALUE',48 SY-VLINE,'NAME',72 SY-VLINE.
    WRITE:/ SY-ULINE(72).
    LOOP AT IT_KONV.
    L_TABIX = SY-TABIX.
    READ TABLE IT_KONV INDEX L_TABIX.
    READ TABLE IT_TEXT WITH KEY KSCHL = IT_KONV-KSCHL.
    L_TABIX = SY-TABIX MOD 2.
    IF L_TABIX <> 0.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    ELSE.
    FORMAT COLOR COL_HEADING INTENSIFIED OFF.
    ENDIF.
    WRITE:/ SY-VLINE,IT_KONV-KPOSN,10 SY-VLINE, IT_KONV-KBETR,28
    SY-VLINE,IT_KONV-KWERT,48 SY-VLINE,IT_TEXT-VTEXT,72 SY-VLINE.
    ENDLOOP.
    WRITE:/ SY-ULINE(72).
    ENDFORM. " interact
    regards,
    keerthi
    Sankar M  
    Posts: 543
    Questions: 18
    Registered: 11/20/06
    Forum points: 622 
    Solved problem (10)
    Very helpful answer (6)
    Helpful answer (2)
       Re: ABAP Reports  
    Posted: Mar 21, 2007 5:39 AM    in response to: jita dash       Reply      E-mail this post 
    Hi,
    This is the very simple INTERACTIVE REPORT. It will help really helps to u to understand the concept.
    REPORT YMS_INTERACTIVETEST LINE-SIZE 50 NO STANDARD PAGE HEADING.
    TABLES: VBAP,KNA1,VBAK.
    SELECT-OPTIONS: CUST FOR KNA1-KUNNR.
    DATA: BEGIN OF ITAB OCCURS 0,
    KUNNR LIKE KNA1-KUNNR,
    NAME1 LIKE KNA1-NAME1,
    VBELN LIKE VBAK-VBELN,
    AUDAT LIKE VBAK-AUDAT,
    AUART LIKE VBAK-AUART,
    POSNR LIKE VBAP-POSNR,
    POSAR LIKE VBAP-POSAR,
    END OF ITAB.
    DATA: ITAB1 LIKE ITAB OCCURS 0 WITH HEADER LINE.
    INITIALIZATION.
    START-OF-SELECTION.
    SELECT KNA1KUNNR KNA1NAME1 INTO CORRESPONDING FIELDS OF TABLE ITAB1
    FROM KNA1 WHERE KNA1~KUNNR IN CUST.
    LOOP AT ITAB1.
    WRITE:/10 ITAB1-KUNNR HOTSPOT, 30 ITAB1-NAME1.
    HIDE: ITAB1-KUNNR.
    ENDLOOP.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN '1'.
    SELECT KNA1KUNNR VBAKVBELN VBAKAUDAT VBAKERDAT INTO CORRESPONDING FIELDS OF TABLE ITAB1
    FROM KNA1 INNER JOIN VBAK ON KNA1KUNNR = VBAKKUNNR.
    LOOP AT ITAB1.
    WRITE:/ ITAB1-VBELN HOTSPOT, ITAB1-AUDAT, ITAB1-AUART.
    HIDE: ITAB1-VBELN, ITAB1-AUDAT, ITAB1-AUART.
    ENDLOOP.
    WHEN '2'.
    SELECT VBAKVBELN VBAPPOSNR VBAP~POSAR
    INTO CORRESPONDING FIELDS OF TABLE ITAB1 FROM VBAK INNER JOIN VBAP ON VBAKVBELN = VBAPVBELN.
    LOOP AT ITAB1.
    WRITE:/ ITAB1-POSNR, ITAB1-POSAR.
    ENDLOOP.
    ENDCASE.
    TOP-OF-PAGE.
    WRITE:/ SY-VLINE,TEXT-001 COLOR COL_NEGATIVE.
    ULINE.
    Thanks,
    Shankar
    jita dash  
    Posts: 8
    Questions: 3
    Registered: 3/20/07
    Forum points: 0 
       Re: ABAP Reports  
    Posted: Mar 21, 2007 1:05 PM    in response to: jita dash         Reply      E-mail this post 
    2-Created an interactive report to display details of vendor and all bank transactions done with the client.
    jita dash  
    Posts: 8
    Questions: 3
    Registered: 3/20/07
    Hi
    i want to know how to get the screen and solution in brief about the following:
    Message was edited by:
            jita dash

  • Consignment Stock for Inventory Management

    Posting as a new thread...
    I have installed and loaded the Inventory Management Cube 0IC_03 in our development and quality systems.  During testing we have found just one problem with Consignment Stock.  The Stock Initialization (2LIS_03_BX) does not bring in an initial quantity (BWMNG) for any material flagged as a Consignment Stock (Stock Category = K, field BSTTYP). 
    My question - is there a good reason for this or is this a problem?  It causes a problem with reporting, because balances are now off.  Do I need to change how reporting is done for Consignment?
    It seems to me that the BX extractor should be picking up the initial balance.  I am trying to debug the code, but am getting a headache!
    Any help would be appreciated!
    Yes, I have reviewed the "How To..." documentation, but don't see anything regarding consignment stock.
    We are at BW 3.0b Support Pack 25.
    Lisa.

    Thanks, Ken.   I don't know that this note actually helped me, but I did another review of OSS notes.  We have applied 3 of them (726485, 756151, 762219) and our consignment issue has been resolved.
    Thanks for pointing me back in the right direction!
    Lisa.

Maybe you are looking for

  • Everytime i go to update my ipod it comes up with this error message

    The ipod "amarocchi ipod" cannot be updated. The required folder cannot be found! Please help what can i do! ive tried everything!

  • Address and Number not matching?

    I moved in to a brand new house on 25/05 and was given an install date for my phone line of 07/06 by BT. I had originally signed up to Sky but they had all sorts of issues with our address and eventually admitted with days to go that they had no plan

  • My dream container

    Hi all. In Flex so far i know containers that allow you to specify x and y of the children, containers that list them all vertically (VBox) and horizontally (HBox) - I need a container like in HTML that list all objects horizontally until they hit th

  • BPS: How to filter Lead Columns at run time

    I need to know if there is a way to filter values for lead columns, after planning level and planning package where defined Example: Family | Material | Brand | Format | sales | cost | Margin F1      M1         B1      F1       100     80     20 F1  

  • Autoplay error. Please help- my(Zen Micro) software won't lo

    I have a 5GB Zen Micro and when I try to install my software I get the "Utility for Windows AutoPlay screen has encountered a problem and needs to close. We are sorry for the inconvenience." message. I'm running XP and have updated Quicktime (that di