<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: delivery returns in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delivery-returns/m-p/1137813#M113695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raju!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use internal table gt_return - but you never fill this table, this makes no sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to show only one type of delivery, why don't you select them via s_shkzg (only S or only H, just have a look). Also movement type should be different, e.g. LIPS-BWART = 161 (and not 101).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jan 2006 15:06:05 GMT</pubDate>
    <dc:creator>christian_wohlfahrt</dc:creator>
    <dc:date>2006-01-19T15:06:05Z</dc:date>
    <item>
      <title>delivery returns</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delivery-returns/m-p/1137812#M113694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with Delivery Returns...&lt;/P&gt;&lt;P&gt;Actually Delivery Returns are marked with "X".. and it is not marked it is not delivered...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i need to sperate the "X" marked ones and also the non marked..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the main objective of the report is to get the NON RETURNED MATERIAL....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but problem is after returned the material it is showing me as a RETURN and also the NON RETURN....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for that i need to delete the NON RETURNED material IF IT IS RETURNED...in the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please go thorough the following coding and correct me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:   mara, lips, likp ,sscrfields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.                                 "ALV Declarations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fieldcat type slis_t_fieldcat_alv .&lt;/P&gt;&lt;P&gt;data: sort     type slis_t_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of GT_ALTTEILE occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       matnr type mara-matnr,   "Material Number&lt;/P&gt;&lt;P&gt;       matkl type mara-matkl,   "Material Group&lt;/P&gt;&lt;P&gt;       vbeln type likp-vbeln,   "Delivery Document Number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       netpr type lips-netpr,   "Net price&lt;/P&gt;&lt;P&gt;       posnr type lips-posnr,   "Delivery item&lt;/P&gt;&lt;P&gt;       shkzg type lips-shkzg,   "Returns item&lt;/P&gt;&lt;P&gt;       extwg type mara-extwg,   "&lt;/P&gt;&lt;P&gt;       mstae type mara-mstae,   "Cross-Plant Material Status&lt;/P&gt;&lt;P&gt;       mstav type mara-mstav,   "Cross-distri-chain material status&lt;/P&gt;&lt;P&gt;       lfdat type likp-lfdat,   "Delivery Date&lt;/P&gt;&lt;P&gt;       lfart type likp-lfart,   "Delivery Type&lt;/P&gt;&lt;P&gt;       kunnr type likp-kunnr,   "Ship-To Party&lt;/P&gt;&lt;P&gt;       wadat_ist type likp-wadat_ist,   "Actual goods movement date&lt;/P&gt;&lt;P&gt;       arktx type lips-arktx,   "Short Text for Sales Order Item&lt;/P&gt;&lt;P&gt;       bismt type mara-bismt.   "Old material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : end of GT_ALTTEILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of GT_RETURN occurs 0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      matnr type mara-matnr,   "Material Number&lt;/P&gt;&lt;P&gt;      vbeln type likp-vbeln,   "Delivery Document Number&lt;/P&gt;&lt;P&gt;      shkzg type lips-shkzg,   "Returns item&lt;/P&gt;&lt;P&gt;      posnr type lips-posnr.   "Delivery Item&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       matkl type mara-matkl,   "Material Group&lt;/P&gt;&lt;P&gt;       netpr type lips-netpr,   "Net price&lt;/P&gt;&lt;P&gt;       extwg type mara-extwg,   "&lt;/P&gt;&lt;P&gt;       mstae type mara-mstae,   "Cross-Plant Material Status&lt;/P&gt;&lt;P&gt;       mstav type mara-mstav,   "Cross-distri-chain material status&lt;/P&gt;&lt;P&gt;       lfdat type likp-lfdat,   "Delivery Date&lt;/P&gt;&lt;P&gt;       lfart type likp-lfart,   "Delivery Type&lt;/P&gt;&lt;P&gt;       kunnr type likp-kunnr,   "Ship-To Party&lt;/P&gt;&lt;P&gt;       wadat_ist type likp-wadat_ist,   "Actual goods movement date&lt;/P&gt;&lt;P&gt;       arktx type lips-arktx,   "Short Text for Sales Order Item&lt;/P&gt;&lt;P&gt;       bismt type mara-bismt.   "Old material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : end of GT_RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab like table of GT_ALTTEILE with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_tabix like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gd_tab_group  type slis_t_sp_group_alv with header line,&lt;/P&gt;&lt;P&gt;      gd_layout     type slis_layout_alv,&lt;/P&gt;&lt;P&gt;      gd_repid      like sy-repid,&lt;/P&gt;&lt;P&gt;      gt_events     type slis_t_event,&lt;/P&gt;&lt;P&gt;      gd_prntparams type slis_print_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options :  s_kunnr for GT_ALTTEILE-kunnr,&lt;/P&gt;&lt;P&gt;                  s_matnr for GT_ALTTEILE-matnr,&lt;/P&gt;&lt;P&gt;                  s_lfdat for GT_ALTTEILE-lfdat,&lt;/P&gt;&lt;P&gt;                  s_extwg for GT_ALTTEILE-extwg,&lt;/P&gt;&lt;P&gt;                  s_shkzg for GT_ALTTEILE-shkzg,&lt;/P&gt;&lt;P&gt;                  s_lfart for GT_ALTTEILE-lfart,&lt;/P&gt;&lt;P&gt;                  s_matkl for GT_ALTTEILE-matkl,&lt;/P&gt;&lt;P&gt;                  s_mstae for GT_ALTTEILE-mstae,&lt;/P&gt;&lt;P&gt;                  s_mstav for GT_ALTTEILE-mstav.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform data_retrieval.&lt;/P&gt;&lt;P&gt;perform build_fieldcatalog.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;perform build_events.&lt;/P&gt;&lt;P&gt;perform build_print_params.&lt;/P&gt;&lt;P&gt;perform display_alv_report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*BUILD_FIELD_CATALOG&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;form build_fieldcatalog.&lt;/P&gt;&lt;P&gt;  data: fc_tmp type slis_t_fieldcat_alv with header line.&lt;/P&gt;&lt;P&gt;  clear: fieldcat.&lt;/P&gt;&lt;P&gt;  refresh: fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Liefer.No'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname       = 'VBELN'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname         = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-key             = 'X'.&lt;/P&gt;&lt;P&gt;  fc_tmp-outputlen       = '18'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos         = 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-do_sum         = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-emphasize      = 'C500'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-hotspot         = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic  = 'Materialnummer'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname     = 'MATNR'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname       = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen    = '8'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos       = 2.&lt;/P&gt;&lt;P&gt;  fc_tmp-key           = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-emphasize    = 'C501'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-hotspot       = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-do_sum           = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Warengruppe'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'MATKL'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-key       = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-outputlen  = '5'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 3.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-do_sum           = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Bezeichnung'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'ARKTX'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-outputlen  = '10'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 4.&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Lief posi'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'POSNR'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-outputlen  = '2'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Kunde'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'KUNNR'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; clear: fc_tmp.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-reptext_ddic    = 'Name des Kunden'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-fieldname  = 'NAME1'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-col_pos    = 7.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; append fc_tmp to fieldcat.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Warenbewegsdatum'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'WADAT_IST'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Liefertermin'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'LFDAT'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '18'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Lieferart'.&lt;/P&gt;&lt;P&gt; fc_tmp-fieldname  = 'LFART'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '6'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Externe Warengruppe'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'EXTWG'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '6'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Retourenposition'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'SHKZG'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-col_pos    = 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Alte Materialnummer'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'BISMT'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '6'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Materialstatus'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'MSTAE'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fc_tmp-outputlen  = '8'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Vertriebs-status'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'MSTAV'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '8'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 15.&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: fc_tmp.&lt;/P&gt;&lt;P&gt;  fc_tmp-reptext_ddic    = 'Nettoprice'.&lt;/P&gt;&lt;P&gt;  fc_tmp-fieldname  = 'NETPR'.&lt;/P&gt;&lt;P&gt;  fc_tmp-tabname   = 'wa'.&lt;/P&gt;&lt;P&gt;  fc_tmp-no_zero     = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fc_tmp-outputlen  = '8'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  fc_tmp-col_pos    = 16  .&lt;/P&gt;&lt;P&gt;  fc_tmp-do_sum           = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append fc_tmp to fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Build layout for ALV grid report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form build_layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gd_layout-no_input          = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-totals_text       = 'Totals'(201).&lt;/P&gt;&lt;P&gt;  gd_layout-totals_only       = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; gd_layout-f2code           = 'DISP'.  "Sets fcode for when double&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                        "click(press f2)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_layout-info_fieldname    = 'LINE_COLOR'.&lt;/P&gt;&lt;P&gt;  gd_layout-info_fieldname    = 'WS_COLOR'.&lt;/P&gt;&lt;P&gt;  gd_layout-zebra             = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-group_change_edit = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-header_text       = 'HELLO'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " BUILD_LAYOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Display report using ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form display_alv_report.&lt;/P&gt;&lt;P&gt;  gd_repid = sy-repid.&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            i_callback_program      = gd_repid&lt;/P&gt;&lt;P&gt;            i_callback_top_of_page  = 'TOP-OF-PAGE'  "see FORM&lt;/P&gt;&lt;P&gt;            i_callback_user_command = 'USER_COMMAND'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_grid_title           = outtext&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            is_layout               = gd_layout&lt;/P&gt;&lt;P&gt;            it_fieldcat = fieldcat&lt;/P&gt;&lt;P&gt;            it_sort     = sort&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           it_special_groups      = gd_tabgroup&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            it_events               = gt_events&lt;/P&gt;&lt;P&gt;            is_print                = gd_prntparams&lt;/P&gt;&lt;P&gt;            i_save                  = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           is_variant             = z_template&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            t_outtab                = itab&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            program_error           = 1&lt;/P&gt;&lt;P&gt;            others                  = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " DISPLAY_ALV_REPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Retrieve data form VBAK table and populate itab it_VBAK&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form data_retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ld_color(1) type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     select                mara~matnr&lt;/P&gt;&lt;P&gt;                           mara~matkl&lt;/P&gt;&lt;P&gt;                           likp~vbeln&lt;/P&gt;&lt;P&gt;                           lips~netpr&lt;/P&gt;&lt;P&gt;                           lips~posnr&lt;/P&gt;&lt;P&gt;                           lips~shkzg&lt;/P&gt;&lt;P&gt;                           mara~extwg&lt;/P&gt;&lt;P&gt;                           mara~mstae&lt;/P&gt;&lt;P&gt;                           mara~mstav&lt;/P&gt;&lt;P&gt;                           likp~lfdat&lt;/P&gt;&lt;P&gt;                           likp~lfart&lt;/P&gt;&lt;P&gt;                           likp~kunnr&lt;/P&gt;&lt;P&gt;                           likp~wadat_ist&lt;/P&gt;&lt;P&gt;                           lips~arktx&lt;/P&gt;&lt;P&gt;                           mara~bismt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              into corresponding fields of table itab from lips&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                        inner join likp&lt;/P&gt;&lt;P&gt;                             on lips&lt;SUB&gt;vbeln = likp&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;                        inner join mara&lt;/P&gt;&lt;P&gt;                             on lips&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          where        likp~kunnr in s_kunnr&lt;/P&gt;&lt;P&gt;                                   and mara~matnr in s_matnr&lt;/P&gt;&lt;P&gt;                                   and lips~shkzg in s_shkzg&lt;/P&gt;&lt;P&gt;                                   and likp~lfart in s_lfart&lt;/P&gt;&lt;P&gt;                                   and lips~matkl in s_matkl&lt;/P&gt;&lt;P&gt;                                   and likp~lfdat in s_lfdat&lt;/P&gt;&lt;P&gt;                                   and mara~extwg in s_extwg&lt;/P&gt;&lt;P&gt;                                   and mara~mstav in s_mstav&lt;/P&gt;&lt;P&gt;                                   and mara~mstae in s_mstae.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_TABIX = SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE GT_RETURN WITH KEY VBELN = GT_ALTTEILE-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ITAB INDEX LV_TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2006 13:06:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delivery-returns/m-p/1137812#M113694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-19T13:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: delivery returns</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delivery-returns/m-p/1137813#M113695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raju!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use internal table gt_return - but you never fill this table, this makes no sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to show only one type of delivery, why don't you select them via s_shkzg (only S or only H, just have a look). Also movement type should be different, e.g. LIPS-BWART = 161 (and not 101).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2006 15:06:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delivery-returns/m-p/1137813#M113695</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-01-19T15:06:05Z</dc:date>
    </item>
  </channel>
</rss>

