Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > SAP Forum > SAP SD Forum


Program for Sales Order by Customer, Date, Sales


Reply
Views: 1748  
Thread Tools Rate Thread
  #1  
Old 05-15-2009, 02:15 PM
bholus7
Guest
 
Posts: n/a
Default Program for Sales Order by Customer, Date, Sales

*&------------When Selecting Customer by choosing CheckBox------------*
*& Form CUS_ORGA
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM cus_orga.
SELECT f~vbeln p~matnr c~netwr c~waerk p~audat INTO (sal-vbeln,
sal-matnr, sal-netwr,sal-waerk, sal-dat) FROM ( vakpa AS f INNER JOIN
vbak AS c ON f~vbeln = c~vbeln ) INNER JOIN vapma AS p ON
f~vbeln = p~vbeln WHERE p~audat IN date AND p~vkorg = vkorg AND
p~kunnr = kunnr1.

APPEND sal.
ENDSELECT.
ENDFORM. "CUS_ORGA

*&------------Without Customer by without choosing CheckBox-----------*
*& Form CUS_ORGA_ELSE
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM cus_orga_else.
SELECT f~vbeln p~matnr c~netwr c~waerk p~audat INTO (sal-vbeln,
sal-matnr, sal-netwr,sal-waerk, sal-dat) FROM ( vakpa AS f INNER JOIN
vbak AS c ON f~vbeln = c~vbeln ) INNER JOIN vapma AS p ON
f~vbeln = p~vbeln WHERE p~audat IN date AND p~kunnr = kunnr1.

APPEND sal.
ENDSELECT.

Reply With Quote
Reply

New topics in SAP SD Forum


Thread Tools
Rate This Thread
Rate This Thread:



Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
WikiNewForum)