<?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: HELP WITH SELECTION SCREENS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804368#M345281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select vbeln from vbak where vbeln = p_vbeln&lt;/P&gt;&lt;P&gt;                                          auart = p_auart&lt;/P&gt;&lt;P&gt;                                          erdat = p_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbap&lt;SUB&gt;vbeln vbap&lt;/SUB&gt;posex vbap&lt;SUB&gt;netpr vbap&lt;/SUB&gt;netwr vbak~auart into i_output&lt;/P&gt;&lt;P&gt;                          from vbap inner join vbak&lt;/P&gt;&lt;P&gt;                          on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put atll the five fields that you have to display as output in the output internal table i_output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2007 07:21:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-04T07:21:19Z</dc:date>
    <item>
      <title>HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804365#M345278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;    I am new to SAP(ABAP) have been given this assignment sort of ....plz help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Write a program to fetch all the sales orders and line items with in a data range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Selection screen fields: Sales Order Number&lt;/P&gt;&lt;P&gt;                                       Document type&lt;/P&gt;&lt;P&gt;                                       Sales order date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  To display in the output report should contain following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Sales Order number&lt;/P&gt;&lt;P&gt;2.	item number&lt;/P&gt;&lt;P&gt;3.	net price&lt;/P&gt;&lt;P&gt;4.	net value&lt;/P&gt;&lt;P&gt;5.	document type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Tables :vbak and vbap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 07:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804365#M345278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T07:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804366#M345279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for the selection screen, you can define the sales order number as parameter (single value) or select-option (range) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_vbeln type vbak-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_vbak type vbak.&lt;/P&gt;&lt;P&gt;select-options: s_vbeln for wa_vbak-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get data:&lt;/P&gt;&lt;P&gt;select * from vbak where vbeln eq p_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbak where vbeln in s_vbeln.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 07:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804366#M345279</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-01-04T07:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804367#M345280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;  u can use select-options for sales order number and date&lt;/P&gt;&lt;P&gt;and parameters for document type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbak is for header data...&lt;/P&gt;&lt;P&gt;and vbap is for item data.&lt;/P&gt;&lt;P&gt;based on the key field in both tables ie sales order number v can retrieve the details&lt;/P&gt;&lt;P&gt;store it in an internal table&lt;/P&gt;&lt;P&gt;and display them by looping at that internal table...&lt;/P&gt;&lt;P&gt;hope this helps....&lt;/P&gt;&lt;P&gt;else if u want code...let meknow&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 07:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804367#M345280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T07:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804368#M345281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select vbeln from vbak where vbeln = p_vbeln&lt;/P&gt;&lt;P&gt;                                          auart = p_auart&lt;/P&gt;&lt;P&gt;                                          erdat = p_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbap&lt;SUB&gt;vbeln vbap&lt;/SUB&gt;posex vbap&lt;SUB&gt;netpr vbap&lt;/SUB&gt;netwr vbak~auart into i_output&lt;/P&gt;&lt;P&gt;                          from vbap inner join vbak&lt;/P&gt;&lt;P&gt;                          on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put atll the five fields that you have to display as output in the output internal table i_output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 07:21:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804368#M345281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T07:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804369#M345282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbap,vbak.
select-options: s_VBELN for vbap-vbeln,
                s_AUART for vbak-auart,
                s_AUDAT for vbak-audat.
                
  data:begin of itab occurs 0,
    vbeln like vbap-vbeln,
    posnr like vbap-posnr,
    netwr like vbap-netwr,
    netpr like vbap-netpr,
    auart like vbak-auart,
   end of itab.
select vbap~vbeln vbap~posnr vbap~netwr vbap~netpr vbak~auart
           into table itab from vbap inner join vbak
           on vbap~vbeln = vbak~vbeln
           where vbap~vbeln in s_vbeln
            and vbak~auart in s_auart
            and vbak~audat in s_audat.

loop at itab.
write:itab-vbeln,itab-posnr, itab-netwr,itab-netpr,itab-auart.
endloop.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 07:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804369#M345282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T07:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804370#M345283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT yjjtest MESSAGE-ID zm.

TABLES: vbap, vbak.
DATA: BEGIN OF i_output OCCURS 0,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             netwr LIKE vbap-netwr,
             netpr LIKE vbap-netpr,
             auart LIKE vbak-auart,
           END OF i_output.

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
" text-001 as Selection
SELECT-OPTIONS: s_vbeln  FOR vbap-vbeln,
                s_auart  FOR vbak-auart ,
                s_audat  FOR vbak-audat.
SELECTION-SCREEN END OF BLOCK blk1.

START-OF-SELECTION.

  SELECT a~vbeln
                a~posnr
                a~netwr
                a~netpr
                b~auart
                INTO TABLE i_output
                FROM vbap AS a
                INNER JOIN vbak AS b
                ON a~vbeln = b~vbeln
                WHERE    a~vbeln IN s_vbeln
                AND      b~auart IN s_auart
                AND      b~audat IN s_audat.
  IF sy-subrc NE 0.
  MESSAGE e000 WITH text-002. " No data found for the selection criteria
  ENDIF.

  WRITE:/  'Program to fetch all the sales orders and line items'.
  ULINE.
  WRITE:/001 'Sales Order number',
         012 'Item Number',
         025 'Net Price',
         050 'Net Value',
         070 'Document Type'.
  ULINE.

  LOOP AT i_output.
    WRITE:/001 i_output-vbeln,
           012 i_output-posnr,
           025 i_output-netwr,
           050 i_output-netpr,
           070 i_output-auart.
    CLEAR i_output.
  ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hope this solves ur query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample output&lt;/P&gt;&lt;P&gt;TEST Program                                                                                &lt;/P&gt;&lt;P&gt;Program to fetch all the sales orders and line items                                                                                &lt;/P&gt;&lt;P&gt;Sales OrderItem Number  Net Price                Net Value           Document Type                                                                                &lt;/P&gt;&lt;P&gt;10000000   000010                       0.00                0.00     ZNOR                   &lt;/P&gt;&lt;P&gt;10000000   000020                       0.00                0.00     ZNOR                   &lt;/P&gt;&lt;P&gt;10000006   000010                       0.00                0.00     ZNOR                   &lt;/P&gt;&lt;P&gt;10000007   000060                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000007   000020                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000007   000050                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000007   000040                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000007   000030                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000007   000010                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000008   000010                  13,825.35            3,675.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000009   000010                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000010   000010                  47,002.06            2,637.60     ZERO                   &lt;/P&gt;&lt;P&gt;10000011   000010                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000012   000010                  36,193.40            1,522.01     ZERO                   &lt;/P&gt;&lt;P&gt;10000014   000010                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000015   000050                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000015   000010                       0.00                0.00     ZERO                   &lt;/P&gt;&lt;P&gt;10000015   000020                       0.00                0.00     ZERO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points and clos ethe thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 08:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804370#M345283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T08:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: HELP WITH SELECTION SCREENS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804371#M345284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please reward poinst and mark the thread closed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2007 13:12:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-selection-screens/m-p/1804371#M345284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-05T13:12:26Z</dc:date>
    </item>
  </channel>
</rss>

