Wednesday, March 12, 2014

SAP SD CREDIT/DEBIT MEMO

distribution channnel:way thru which a company sells its products
like Online,retail,wholesale etc

division:Grouping of Products

plant: Location where materials are stored/Produced(can be multiple)
1 company code can have multiple plant.

location from where products or services are delivered.
=========================================================================================


Credit Notes/Debit Notes:
whenever we have overbilled a customer, we can create a credit memos in order to adjust invoice/amount.
option available to create credit are :
- With reference
-without reference

again with reference we have 2 option
-rerraise full invoice
-partial invoice.

debit note are used as an option for complaint processing .like reducing the amount payabale to vendor .
when for ex: you return a damaged goods and ask for reimbursement .
or when customers are billed low than they should have been actually billed.

============================================================================================================


SAP SD- CREATING MASTER

master data
customer master data
material Master data
Customer Material- mapping data
Pricing

Customer Master
-General(Name, address, contact)
-Sales Area(sales org+division+dist Channel) like US , jAPAn
    ->orders:currency,dales district, price group
    ->shipping :shipping condition,delivering plant
    ->billing doc: o/p tax classification, terms of payment
    ->partner functions:ship to party bill to party

-company code

Goto Logistics->sales and distribution->Master Data->Business Partner->Customer->Create

Account related data: reconciliation account
Payment transactions:payment menthods, dunning(reminders for payment)
Insurance : amount insured

to create : tcode ->spro





SAP SD BASIC PROCESS

sales order
purchase order
billing
credit memo
=================================================================
a)Sales process(order to cash)
-sales order processing
how to create a sales order
how to create out bond delivery
pick and post goods issue
Invoice a customer for delivery
=================================================================
Sales Dept
we recieve a sales order
we deliver
finally we bill the customer(Invoicing)

Material Management Dept(purchasing dept)

Production planning dept

Finance and Accounting(FICO)
=============================================================================================

sales order.: wipro recieves a sales order of laptops for ex:
we need to check whether sufficient stock is there in the Warehouse.(check in  SAP)
if yes then we can deliver it
if no, then we will have to check which vendor to contact for raw materials to manufacture it
System will send a purchase order to vendor . and vendor will deliver us the products.
and then Production planning dept will plan for manufacturing .
then company will deliver the material
then invoicing happens.
system will create a financial document.
=================================================================================================

before creating sales order customer might ask for a quotation.

2)delivery
-creating transfer order
-post goods issue.

3)Invoice (Billing document)

Presales activity.
-Inquiries.
-Quoatations

Sales order processing
-creating SO with some data
(item, quantity, Rate, date of Delivery)
Quantity*rate=Revenue(amount)
Shipping
Billing

========================================================================================================
Procurement(Material mgmt)
Check the availibility
check when we can buy from other vendors and sell it to customers
======================================================================
Shipping Process
-Picking
-Packing
======================
creating Quotations
tcode- va21

happy with the quotation? then place a sales order.
TCODE-va01
header,item details to be provided
schedule lines
-data related to delivery. when we can deliver this item

document flow
-gives details from where the sales order was created
for ex: it shows the corresponding quotation.

===========================================================
Delivery
-do delivery
-transport/trasfer order(picking)
-post good issue

picking means giving the details to wipro stores about the sales order to be shipped on the specific dates
and stores will keep it ready to deliver.

PGI-> ensuring that goods has left the company for delivery.

1)Shipping
-picking
-packing

Picking. find the sales order first.

create transfer order.

Create PGI.
========================================================================================================================
Billing
-to do the billing we must have done the delivery else you cannot create a billing doc in SAP.(logically true becasue
without delivering the products why will the customer pay haha)

Point to Remember: SAP will not create billing document against sales order no.
it will always create doc with delivery no.


we can use same quaotation no . for different sales order also.
for ex: we have created a quoatation for 10 items and created sales order for only 5.
so remianing 5 can be used to create another  S.O
===========================================================================================================================

can we convert two sales quoatation to 1 sales order?? if yes, then how??

Monday, December 9, 2013

copy data from 1 datatable to another

There are multiple ways to copy data from 1 datatable to another.
a)dtnew=dtold.copy();
copies both structure and data
b)dtnew=dtold,clone()
copies only structure.
(we can use it instead of adding columns)

c)
to copies data of specific columns

    DataTable dtnew=new DataTable();
            dtnew.Columns.Add("sl_no");
            dtnew.Columns.Add("Tenant");

            foreach(DataRow dr in dt.Rows)
            {
                DataRow drNew = dtnew.NewRow();
                drNew["sl_no"]=dr["slno"];
                drNew["Tenant"] = dr["tenant_name"];
                dtnew.Rows.Add(drNew);


            }

Saturday, September 14, 2013

Adding/using accordian in VS2010

Creating according requires following steps to be followed
a) downlaod ajax control kit dll .
b)add ajax control kit in toolbox

now add script manager
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>



 add accordian control
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    </asp:UpdatePanel>
<asp:Accordion ID="Accordion1" runat="server" RequireOpenedPane="false" HeaderSelectedCssClass="accordionHeaderSelected" SelectedIndex="0" AutoSize="None" FadeTransitions="true" TransitionDuration="300" FramesPerSecond="25" Height="500px">
<Panes>
<asp:AccordionPane ID="Pane1" runat ="server" HeaderCssClass="accordionHeader" >

<Header >
<b>This is a header</b>


</Header>
<Content>

This is content1. just  created for ajax testing
</Content>

</asp:AccordionPane>

<asp:AccordionPane ID="pane2" runat="server" HeaderCssClass="accordionHeader" >
<Header>
<b>This is a header2</b>
</Header>
<Content>
This is Content2.
</Content>
</asp:AccordionPane>
</Panes>
</asp:Accordion>

run the solution

screenshot shown below

Thursday, September 12, 2013

Capturing Template field values of editable Gridview

I was capturing the values from the grid view . i could do it oretty easily but what struck me was how do i capture values of a template field in editable grid view. it was returning null.
so here is what I did

a)Use find control method with rowdatabound() event.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label lbl= e.Row.FindControl("Tenant_Name") as Label;
               
            }

}

b)in the Rowcommand()event i looped through each row . and at specified row index i captured the desired value a below:

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
               string str= GridView1.Rows[i].Cells[1].Text;
            }
        }

here is the screenshot


Wednesday, September 11, 2013

Sorting a Grid column on header click

i had a small requirement to sort a grid column when column header is clicked .
Here is what i did

a) Enable allowsorting Property in grid-view

<asp:GridView ID="GridView1" runat="server" CellPadding="3" GridLines="Horizontal"
   Font-Names="Verdana" Font-Size="10" DataKeyNames="Tenant_Name"
   AutoGenerateColumns="false" AllowSorting="true"
        onselectedindexchanged="GridView1_SelectedIndexChanged"
        onrowcancelingedit="GridView1_RowCancelingEdit"
        onrowcreated="GridView1_RowCreated" onrowediting="GridView1_RowEditing"
        onrowupdated="GridView1_RowUpdated" onrowupdating="GridView1_RowUpdating"
        onrowdeleted="GridView1_RowDeleted" onrowdeleting="GridView1_RowDeleting"
        onrowdatabound="GridView1_RowDataBound" onsorting="GridView1_Sorting" 

   >

add Property SortExpression

      <asp:BoundField DataField="Tenant_Name" HeaderText="Tenant Name" ReadOnly="true" SortExpression="Tenant_Name" />



b) Create a Property  for sort direction and store in a view state

  public SortDirection dir

    {
        get

        {

            if (ViewState["dirState"] == null)

            {

                ViewState["dirState"] = SortDirection.Ascending;

            }

            return (SortDirection)ViewState["dirState"];

        }
        set


        {

            ViewState["dirState"] = value;

        }

    }


c) if data is stored in dataset copy dataset to datatable

 dt = dsshowTen.Tables[0];

d) add event  GridView1_Sorting(object sender, GridViewSortEventArgs e) event 

   
            string sortingDirection = string.Empty;

        if (dir == SortDirection.Ascending)

        {

            dir = SortDirection.Descending;

            sortingDirection = "Desc";

        }

        else

        {

            dir = SortDirection.Ascending;

            sortingDirection = "Asc";

        }

       


        DataView sortedView = new DataView(dt);

        sortedView.Sort = e.SortExpression + " " + sortingDirection;

        GridView1.DataSource = sortedView;

        GridView1.DataBind();





the above 2 screenshot shows sorted records of Tenant_Name column