Thursday, April 9, 2009

Default Output Type for Sales Order Header

I created 2 output types for hardcopy printout and for mail. 
I want both should be selected as default when a sales order is created. (using NACE)  
Output will be manually from VA02 -> issue output to. Here I must get 2 output types.

For this you need to maintain condition record for output type. for the sales order type, V V11.

Do the output determination in the same way as Pricing procedure determination.

OUTPUT DETERMINATION:

SPRO- IMG- Basic Functions- Output Control- Output Determination- Output Det using Cond Tech- Output Det for Sales Documents & output det for billing documents.

Create Condition Table: select the field Sales Doc Type from field catalog & Save

Maintain Access Sequence: 4-digits code & description. 

Assign condition table to access sequence. Select Accesses line item and Go To Fields. Fields will display the fields we have selected in the condition table i.e. sales doc type.

Maintain Output Types: 

AF00: Inquiry

AN00: Quotation

BA00: Order Confirmation

LD00: Delivery

Select BA00 & Copy & Rename. Give the same 4-digit code as given to acc seq.

You Can Maintain:

Languages of Output

Partners (to whom we want to send output)

Print Program- print specification

Sap Script- layout

Assign Output Types to Partner Functions: go to new entries & assign your output type to partner functions.

Maintain Output Determination Procedure: V10000 (Standard Procedure). Go to new entries & create your own 6-digit code with descp. Select the procedure & go to Control Data. Here mention the output type i.e. cond type & leave requirement and manual only columns as blank.

Determination Rule: link the 6-digit procedure code to doc types.

Create Condition Records: VV11. Select document type and click on Communication. Mention partner function, medium, time. Output device: LP01, Spool request Name: SD_003, Suffix 2: order_confir & flag on print immediately.

Once you press enter you will come across 2 key combinations:

Sales organisation/ Customer Number: fill SO, Customer No, Partner Function Abbreviation, Partner to whom the output should be sent, time, medium, language. {It contains: Sales Orgn, Customer, Partner Function 

(The abbreviated form of the name that identifies the Partner) (During output determination, the system determines the recipient of the output from the master record for the specified partner function. In this field, you can explicitly specify a recipient that will override the standard partner. There must also be a master record for the partner that is specified explicitly.), Medium, Time & Language.}

Order Type: Document Type, Partner Function (abbreviation), Partner, Medium, Time & Language.

Mass Print Sales Order


You can use program RSNAST00. Output aplication for sales orders is V1.

4.6x

Example of a Selection Parameters:-

Output application        V1 
Object key          0000012345 
Output Type          BA00 
Transmission medium    1 
Tick Send again 
Finally click Execute


How to maintain output types

When I am creating a bill and saving it and then giving issue output to and then header preview, the system does not respond.  Should I maintain condition records?  Where and how to maintain?

For getting any output either by print, Fax, or any media you have to do output determination. output determination is also carried by Condition techniques. The detail procedure for Output Determination is :

OutPut Determintaion :

Output is a form of media from your business to one of its business partners or it can be within the organization. The output can be sent to any of the partners defined in the document. Outputs are usually in the form of Order Confirmations, Freight List, Delivery Notes, Invoices & Shipping Notifications. Determining form of output is output determination.

Types of Output:

Print Output, Fax, Telex, E-Mail & EDI (Electronic Data Interchange)

--> PRINT OUTPUT:

Configuration path: ( following are the steps)

1) SPRO-> IMG-> Basic Functions-> Output Control-> Output Determination-> Output Determination using Condition Technique- >Output Determination for Sales Documents (or you can use output determination for billing documents depending on your requirement).

2) Create Condition Table: select the field Sales Doc Type from field catalog & Save

3) Maintain Access Sequence: 4-digits code & description.

4) Assign condition table to access sequence. Select Accesses line item and Go To Fields. Fields will display the fields we have selected in the condition table i.e. sales doc type.

Maintain Output Types:

AF00: Inquiry

AN00: Quotation

BA00: Order Confirmation

LD00: Delivery

RD00: Invoice

Select BA00 & Copy & Rename. Give the same 4-digit code as given to access sequence.

You Can Maintain:

Languages of Output

Partners (to whom you need to send output)

Print Program- print specification

Sap Script- layout

Assign Output Types to Partner Functions: go to new entries & assign your output type to partner functions.

Maintain Output Determination Procedure: V10000 (Standard Procedure). Go to new entries and create your own 6-digit code with description. Select the procedure, go to Control Data. Here mention the output type i.e. condition type and leave requirement and manual only columns as blank.

Determination Rule: link the 6-digit procedure code to doc types.

Create Condition Records: VV11. Select document type and click on Communication. Mention partner function, medium, time. Output device: LP01, Spool request Name: SD_003, Suffix 2: order_confir & flag on print immediately.

Once you press enter you will come across 2 key combinations:

Sales organisation/ Customer Number: fill SO, Customer No, Partner Function Abbreviation, Partner to whom the output should be sent, time, medium, language.

It contains: Sales Orgnisation, Customer, Partner Function (The abbreviated form of the name that identifies the Partner) (During output determination, the system determines the recipient of the output from the master record for the specified partner function. In this field, you can explicitly specify a recipient that will override the standard partner. There must also be a master record for the partner that is specified explicitly.), Medium, Time & Language.}

Order Type: Document Type, Partner Function (abbreviation), Partner, Medium, Time & Language.

Path For Output Determination For Sales Documents: Logistics -> Sales/distribution -> Master data -> Output -> Sales Document -> Create (t-code VV11)

Path for Output Determination for Delivery Documents : Logistics -> Sales/distribution -> Master data -> Output -> shipping -> Create ( t-ode VV21)

Path for Output Determination for Billing Documents : Logistics -> Sales/distribution -> Master data -> Output -> Billing Document -> Create ( t- code VV31) 

Program for Sales Order by Customer, Date, Sales


Sales Order by Organisation, Customer - To create the Sales Order by More no of Date's

User's can easily take the Report from this by selecting Different kinds like Customer Specific [And/Or] Sales Organisation Specific [And/Or] duration of date but Here Date is Mandatory Fields user must have to give date as a selection criteria

In Second level this report will interact with user where they can select date to see the full Details of Sales Order 
Selection 
- Sales Organisation 
- Date 
- Customer this will be usefull when Selecting the Checkbox 
Standard Variants 
- Output 
- Sales Order

Example 
Date              SalesOrderNo   Material   Amount  Currency 
10.01.2007   8530                  732         1000       INR

*&---------------------------------------------------------------------* *& Report  ZCHE_SALES_ORDER                                             *&--------Done by V.Chellavelu on 11.01.2007  --------------------------*  REPORT  zche_sales_order                        .  ****************************Declarations******************************** TABLES: vbkd,vepvg.",vbak,vbap,vbpa,vakpa, vapma.  DATA: BEGIN OF sal OCCURS 0,       ch TYPE checkbox,       vbeln LIKE vbak-vbeln, " sales document       netwr LIKE vbak-netwr, "Net Value of the SalesOrder       matnr LIKE vbap-matnr, "material no.       waerk LIKE vbak-waerk, "curr.       dat   LIKE vbak-erdat, "date.       END OF sal. DATA: newsal LIKE sal OCCURS 0 WITH HEADER LINE.  DATA: amount LIKE vbak-netwr, date2(15),date3(8),date4(1),       date5(2),date6(2).  DATA: lin LIKE sy-curow VALUE 1,"Screens, vertical cursor position at                                  "PAI available in SYST struc.       checkbox        TYPE c               ,       dat LIKE vbak-erdat.  *******************Selection**Screen**Design**************************** SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001. PARAMETERS: vkorg LIKE vepvg-vkorg,             vtweg LIKE vepvg-vtweg,             spart LIKE vepvg-spart. SELECT-OPTIONS date FOR vbkd-bstdk DEFAULT sy-datum TO sy-datum                                             OBLIGATORY. SELECTION-SCREEN END OF BLOCK blk1.  SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN POSITION 10. PARAMETERS: chk1 AS CHECKBOX. SELECTION-SCREEN POSITION 20. PARAMETERS: kunnr1 LIKE vbpa-kunnr. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN END OF BLOCK blk2.  ********************First**Level**Operation***************************** IF chk1 <> 'X'.   IF vkorg <> ''.     PERFORM organisation.   ELSE.     PERFORM organisation_else.   ENDIF.  ELSE.   IF vkorg <> ''.     PERFORM cus_orga.   ELSE.     PERFORM cus_orga_else.   ENDIF. ENDIF.   * Displaying the contents which is selected from table by *  -selection conditions SORT sal BY dat.  LOOP AT sal.   ON CHANGE OF sal-dat. *    FORMAT HOTSPOT ON.     IF sy-tabix = 1.       WRITE: sy-vline, sal-ch AS CHECKBOX,sal-dat .       CLEAR amount.     ELSE.       WRITE:sy-vline, amount,/ sy-vline, sal-ch AS CHECKBOX,sal-dat.       CLEAR amount.     ENDIF.   ENDON.   amount = amount + sal-netwr.   AT LAST.     WRITE:sy-vline, amount.     ULINE.     SUM. *    FORMAT HOTSPOT OFF.     FORMAT COLOR = 3.     WRITE:/ ' Total Amount:', sal-netwr UNDER amount.   ENDAT. ENDLOOP.  **********************Interaction with report**************************  SET PF-STATUS 'BANU'. " To create Application ToolBar for Display  Button *                          To verify Double click on BANU  AT USER-COMMAND. " This will execute after pressing Display Button   CASE sy-ucomm.     WHEN 'DISP'.     free newsal.       DO.         READ LINE lin FIELD VALUE sal-ch INTO checkbox.         IF sy-subrc NE 0. EXIT. ENDIF.         IF checkbox = 'X'.           PERFORM datecon.           PERFORM process.         ENDIF.         lin = lin + 1.       ENDDO.       PERFORM selection.   ENDCASE.  ************************ SUB ROUTINE Area  ****************************** *This Process SubRoutine will assign the values from current *   -InternalTable (sal) into other IT(newsal), by date which is *         - selected by CheckBox FORM process.   LOOP AT sal WHERE dat = dat.     newsal-ch    = 'X'.     newsal-vbeln = sal-vbeln.     newsal-netwr = sal-netwr.     newsal-matnr = sal-matnr.     newsal-waerk = sal-waerk.     newsal-dat   = sal-dat.     APPEND newsal.   ENDLOOP. ENDFORM.                    "process  *&---------This will display the values for selected dates from new --* *---------------------internal Table (newsal)-------------------------* *&      Form  SELECTION *&--------------------------------------------------------------------* *---------------------------------------------------------------------* FORM selection.   ULINE.   FORMAT COLOR = 1.   WRITE:sy-vline,'Date',AT 14 sy-vline, 'Order NO', AT 27 sy-vline, 'Order Material', AT 48 sy-vline,'Order Value(AMT) Currency  '.   FORMAT COLOR OFF.   ULINE.   LOOP AT newsal.     ON CHANGE OF newsal-dat.       IF sy-tabix <> 1.         WRITE:/ sy-vline, AT 14 sy-vline,AT 27 sy-vline,AT 48 sy-vline.     WRITE:/ sy-vline,newsal-dat,sy-vline,AT 27 sy-vline,AT 48 sy-vline.       ELSE.      WRITE: sy-vline,newsal-dat,sy-vline,AT 27 sy-vline,AT 48 sy-vline.       ENDIF.     ENDON.     WRITE:/ sy-vline, AT 14 sy-vline,newsal-vbeln,sy-vline,       newsal-matnr, sy-vline, newsal-netwr, newsal-waerk.      AT LAST.       SUM.       ULINE.  FORMAT COLOR = 3.       WRITE:/ sy-vline, AT 15 'Total Amount for selected month:',                     newsal-netwr UNDER newsal-netwr.       FORMAT COLOR OFF.       ULINE.     ENDAT.   ENDLOOP.   lin = 1.   FREE newsal. ENDFORM.                    "SELECTION  * This Date convertion is must for pick the particular Date from the *    -displayed line, and here we are reversing the Date like  YYYY/MM/DD *  -because to Check or assign the date we need to give in reverse  order  *&--------------------------------------------------------------------* *&      Form  DATECON *&--------------------------------------------------------------------* *       text *---------------------------------------------------------------------* FORM datecon.   date2 = sy-lisel(17).   SHIFT date2 LEFT BY 4 PLACES.   WHILE date2 <> ''.     SHIFT date2 RIGHT.     date4 = date2+11.     IF date4 <> '.'.       CONCATENATE date4 date3 INTO date3.     ENDIF.   ENDWHILE.   date5 = date3(2).   date6 = date3+2.   date3 = date3+4.   CONCATENATE date3 date6 date5 INTO date3.   dat = date3. *  SORT dat BY dat. *  DELETE ADJACENT DUPLICATES FROM dat COMPARING dat. ENDFORM.                    "DATECON   * Here we are doing different kinds of selections by the EndUser's  needs  *&---------When user selectiong an Sales Organisation-----------------* *&      Form  ORGANISATION *&--------------------------------------------------------------------* *       text *---------------------------------------------------------------------* FORM organisation.   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.     APPEND sal.   ENDSELECT. ENDFORM.                    "ORGANISATION   *&---------Without Sales Organisation i.e All Organisation------------* *&      Form  ORGANISATION_ELSE *&--------------------------------------------------------------------* *       text *---------------------------------------------------------------------* FORM organisation_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.      APPEND sal.   ENDSELECT. ENDFORM.                    "ORGANISATION_ELSE  *&------------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.

SAP Customizing Picking Output


From Release 4.5A, the system does no longer display the actions for SD picking in the implementation guide.

If you want to use the picking list according to the "old" procedure,  you can maintain the list as follows:

 o  Carry out Transaction V/38 to maintain the output types.

 o  Carry out Transaction OVLT to assign the picking list types to the 
     shipping points.

 o  Carry out Transaction V/53 to assign the picking lists to own 
     forms and programs. 
 

Sending a billing document by e-mail


First, your SAP system must be configure by the basis people in order for you to send an external mail. 

Whether it can send pdf or other file format will depends on the Mail Server you are using.

The basis people must also maintain the conversion parameters so that SAP knows how to convert the billing documents to be send as a pdf file or other desired format specified by your company.

Finally, you have define the IMG in Maintain Output Determination for Billing Documents (Output type MAIL)