Skip to Content
author's profile photo
Former Member


1How to test Script?

2.How debug the Userexir?

3.Can u explain SD&MM flow

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 11:43 AM


    <b>SD FLOW</b>

    SD Flow Cycle and T Codes:

    INQUIRY ( VA11)










    PACKING LIST - (VL02, VL01)


    SHIPPING – (VT01)


    INVOICE – (VF21, VF01)



    Explantion with relavent tables:

    Enquiry - Customer enquires about the Products services that were sold by a company - VA11

    Quotation - Company Gives a Quotation for the products and Services to a Customer

    Sales Order - Customer gives a Purchase order to the company agaionst which a Sales order will be raised to Customer in SAP.

    VBAK: Sales Document(Header Data) (VBELN)

    VBAP: Sales Document(Item Data) (VBELN,POSNR,MATNR,ARKTX,CHARG)

    Enquiry, Quotation, Sales Order are differentiated based on Doc.

    Type(VBTYP field) in VBAK,VBAP Tables( for Enquiry VBTYP = A,

    for Quotation 'B' & for Order it is 'C'.)

    Delivery(Picking, Packing, Post Goods Issue and Shipment)->

    Company sends the material after picking it from Godown and Packing it in a Handling Unit(box) and Issues the goods

    LIKP: Delivery Table (Header Data)(VBELN,LFART,KUNNR,WADAT,INCO1)



    Billing - Also company bills to the customer for those deliveries

    And in FI against this billing Accounting doc is created.

    VBRK: Billing Table(Header Data)(VBELN,FKART,BELNR)



    Apart from these tables there are lot of other tables which starts with

    ‘V’, but we use the following tables frequently.

    Links for sd:

    Please check this SD online documents.

    Also please check this SD links as well.,290042,sid21_gci961718,00.html

    All help ebooks are in PDF format here

    see this link

    <b>1. MM Flow.</b>

    > goto T.C MM01.

    > give material Number - some no.

    give MAterial sector - Mechanical

    give Material Type - Raw Material.

    then goto ORg Levels on top.

    then goto plant - 1000 n storage location - 0001

    then select views.

    in that select basic data 1, basic data 2, purchasing, general plant data storage / main..., Accounting 1 n then enter.

    > Then give the materiual descripition

    basic unit of measure KG

    Mat group - 001.

    click on purchasing n give mat no u have created n plant - 1000 n basic unit of measure KG n enter enter n enter.

    then goto valuation class - 3000, P.C - S n moving price -100.

    save then the mat no gets created.

    > now go to TC XK01 ie, vendor master

    give vendor - 126

    comp code - 1000.

    pur org - 1000.

    Acc grp - 0001


    give title name - company.

    search itenm 1/2 - M

    then Rec ACc - 31000.

    Cash Mang Grp - A1.

    enter n enter.

    order currency - INR

    in control data click on GR- based info verf n click on ACK Req.

    save n enter.

    > goto TC ME 11 ie, purchasing info record.

    Vendor - 126.

    Mat no - the one u have created.

    Pur org - 1000

    plant - 1000

    info rec-

    select standard enter n enter.

    in Period delay time give -10 n In conditions Net price - 100.enter In control Pur grp - 100.

    enter n enter n enter for three times.

    > goto ME01 source list.

    Mat no - mat no u have created.

    Plant - 1000.

    enter fix the line.

    give vlaid from , vend to , vendor as 126 p org as 1000, enter n save.

    > TC code RFQ for request for quotation.

    TC ME41.

    RFQ type - AN

    Lang Key -EN

    RFQ date - any date.

    QUAT Deadline - any date RFQ-

    give purc org grp - 000

    presss enter

    coll no - RFQ1.

    enter then give MAt no RFQ qnt as 100 ,O as KG del dat n netr.

    goto header click on Vendor Add

    vendor - 567

    Title - company


    the goto tc ME47


    give net price 100 enter.

    then goto ME49.

    give quotation no tht u have created coll rfq as RFQ1 vendor as 567 mat no u have created. n execute, back n back.

    > goto tC ME51N for purc requisition.

    click on header n give text as.

    item as 10,SR as sur3, quant 100, del date, mat grp, plant n pur as 000

    enter n save.

    we will get purch req no...

    now go to ME21N pur order.

    click on Purchase/req no. click on value ur purh req no will be displayed there select it...

    then goto Org data tab strip.

    pur org - 1000.

    Pur grp - 000

    com code - 1000


    vendor - the one u have given...

    enter n enter check n save.

    then tc MIGO for goods receipt.

    give pur order no u have created...

    gotot quantity tabstrip n press enter give qty in unit of enrty as 80

    goto pur org tabstrip n give del comp as set automatic.

    click on item ok.

    then continue n then post n continue.

    then two documents will get created mat doc n acc doc.

    then > MIRO invoice.

    give vendor no - comp code invo date pur ord no.then select it n copy.


    then we will get acc no n write it in the acc block.

    the >MB1A ie goods issues.

    mov type - 201

    plant - 1000

    stor loc - 0001


    cost cent - 1000

    vendor - u have created

    then give sc qty enter.

    mat n acc doc r generated.

    >MMBE stock overview.

    give mat no - u have created.

    plant - 1000

    sto loc - 0001 n enter...

    the MM get created...



    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 11:47 AM


    When we want to debug the SAPSCRIPT, we need to first activate the debugger, we have 2 ways to activate the Debugger.

    1) Execute the program RSTXDBUG

    2) Go to SE71, from the initial screen enter the form name and press Utilities --> Activate Debugger

    When we are in the Debug screen,

    3.1) F5 will be debug filed by field, that means if a single line is having 5 fields, if we press the F5 this will do field by field,

    3.2) F6 will be line by line, that means when we press the F6, it will debug the line and it will go to the next line. F7 also do the same way

    3.3) F8 will be very useful when we have any include statement in the SCRIPT, if any include is there and we press the F5 or F6 then this will go that Include (normally SO10 or any transaction text), then if we want line by line debugging then we can press the F5 or F6, or if you want to execute that in a single shot then press the F8, then the debugger will be executed that include and come back to the Script debugging.

    Some times in the script, we may right lengthy lines, if we want to debug that whole line, we have an option called Left/Right, this we will find the Debug screen of the script, there is a Push button, we can make use this button to debug.

    We can put the breakpoints in the SCRIPT DEBUGGER also, just press the BREAKPOINT Pushbutton from the debugging screen or press EDIT --> Breakpoint

    If we want to debug the print program from the SCRIPT DEBUGGER, just press SHIFT+F7 or EDIT --> ABAP Debugging

    If we want to see the Windows which are defined in the forms, just press the Go to --> Form --> Windows .if we want to see the pages go to --> Form --> pages. Here we have an option to see the page wise window also go to --> Form --> page Windows

    If we want to see the paragraphs which are defined in that script, press go to --> Styles --> paragraphs.

    If we want to see the Character formats which are defined in that script, press go to --> Styles --> Character Strings.

    If we want to see the Page formats which are defined in that script, press go to --> OTF --> Page.

    If we want to see the Elements which are used in the Script, then press go to --> Text Elements --> Form Elements.

    If we want to see the commands which are used in the script, press go to --> Commands --> List

    Finally, if we want to exit from the SCRIPT DEBUGING, simply press Debugger --> Exit

    <b>SD & MM Flow</b>


    PR >Release the PR>RFQ>Quotation>Quotation Comparison>PO>Release the PO>GR>Invoice Verification

    MM Process flow:

    Process Flow

    The typical procurement cycle for a service or material consists of the following phases:

    1. Determination of Requirements

    Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.

    2. Source Determination

    The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.

    3. Vendor Selection and Comparison of Quotations

    The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.

    4. Purchase Order Processing

    The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.

    5. Purchase Order Follow-Up

    The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.

    6. Goods Receiving and Inventory Management

    Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and under deliveries of ordered goods.

    7. Invoice Verification

    The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.



















    Sales Documents

    You create a sales document to enter information about different sales transactions. R/3 provides a number

    of predefined sales document types. However , these can be customized to suit your company's needs when

    R/3 is installed.

    Some examples of sales documents include:

    • sales queries

    • sales orders

    • outline agreements

    • complaints

    You use sales queries to enter information about potential sales into R/3.Types of sales query documents


    • inquiries

    • quotations

    • free-of-charge deliveries

    An inquiry is used to record any general queries a customer may have about goods or services they

    are thinking of buying from your company. An inquiry is one of the first possible documents you can

    create in the customer order management cycle. An example of the type of information contained in an

    inquiry is whether your company stocks a certain product line. Along with entering general customer

    queries, you can use inquiries to record the goods or services that a customer is interested in. And you

    can enter descriptions of goods or services that your company should research in order to answer customer

    queries. You can carry out automatic pricing for any goods or services you enter in an inquiry. This will

    enter the price of goods or services into the inquiry for you. You can also check whether any goods you

    entered in the inquiry are available in your company's warehouse. The order probability function enables

    you to determine the likelihood that a customer will buy from you. To increase the probability of a sale,

    you can offer the customer alternative goods and services.

    Quotations are sales query documents that you create when a customer requests specific information

    about a product. For example, you can use a quotation if a customer makes a query regarding how much

    goods or services cost or you can use a query if a customer asks when goods will be available for shipping.

    You can create quotations from scratch or you can create them by copying inquiries. If a customer is

    interested in the products or services after they have made an inquiry, you can provide a quotation based

    on the original inquiry. R/3 allows you to copy the information directly from an inquiry to a quotation.

    Let's say an inquiry was created when a customer inquired whether your company, could manufacture

    twenty motorcycles. Assume a quotation was created by copying this inquiry when the customer called

    back to inquire how much twenty motorcycles would cost. You can use quotations to enter information and

    descriptions for goods and services that are to be researched. You can also use them to carry out automatic

    pricing and to check goods availability. You can use quotations to calculate the probability that a customer

    will buy the goods or services entered on a quotation. This function is called order probability.You can

    also use quotations to enter details about alternative goods or services. These are goods or services that a

    customer did not inquire about but that you think they will consider purchasing. Once you have created a

    quotation for a query in R/3, you send the quotation to the customer who made the query. The quotation

    represents a binding offer made to the customer that includes quantity and cost details.

    You create a free of charge delivery when you send free samples of any goods that your company

    produces to customers. These contain information about the goods that are delivered but they don't

    include the corresponding pricing information for them.

    Let's look at the sales orders that exist in R/3.You create a sales order when a customer has ordered

    goods or services from your company. They are a part of the customer order management cycle.

    You can carry out automatic pricing in sales orders to enter the price of goods or services.

    R/3 will also run a credit check on the customer to see if they will be exceeding their credit limit.

    You can also check whether ordered goods will be available in your company's warehouse for delivery.

    Examples of types of sales order include

    • standard orders

    • consignment orders

    • cash orders

    • rush orders

    You create standard orders for goods and services that will be delivered or rendered according to

    the standard R/3 sales cycle. This means that goods are ordered, picked from the warehouse, and

    then shipped before customers are billed for them. Likewise, services are rendered before customers

    are billed for them.

    Your company may store its goods in its customers' warehouses. You create a

    consignment order when a customer is ready to retrieve stock from the warehouse.

    SAP can propose the most suitable stock to retrieve, including third-party stock.

    A consigment order is like a standard sales order for goods but it doesn't have any delivery


    You create cash orders and rush orders for the sale of goods only.

    You create a cash order when a customer picks up and pays for a delivery as soon

    as it is ordered. And you create a rush order when the customer picks up the goods on the

    same day as the order is placed. In this case, the invoice is created later.

    You can arrange to deliver goods or render services in installments. To do this, you create an

    outline agreement. Examples of some types of outline agreement include :

    • quantity and value contracts

    • master contracts

    • scheduling agreements

    • service contracts

    You create a quantity contract if a customer has agreed to order a certain quantity

    of goods from your company during a specified period.

    And you create a value contract if a customer has agreed to order goods of a certain

    cumulative value from your company during a specified period.

    Quantity and value contracts do not include delivery dates, so releases are made

    using a sales order.

    You can unite multiple contracts in a single master contract.

    Let's say you create a quantity contract because a customer has agreed to order

    500 engines in the first six months of the current year. If the customer orders 100 of these

    engines in January, you create a sales order called a release order.You refer to a quantity

    contract in a release order. So you refer to the quantity contract created for the 500 engines in

    each release order created for these engines. R/3 will then update the quantity contract

    automatically so it contains the correct number of remaining engines to be ordered.

    Scheduling agreements specify the installments in which goods will be delivered

    to a customer. They include the quantity of a product that will be delivered in each

    installment. And they include the delivery date of each installment. You process a delivery

    for each installment contained in the scheduling agreement in the same way that you process

    a delivery for a regular sales order.No sales documents, such as release orders, are created before

    the products included on a scheduling agreement are processed for delivery.

    You create a service contract if a customer requests a service over a particular

    period of time.For example, you could create a service contract if a customer ordered five

    one-hour maintenance checks from your company's motorcycle repair department.

    You create complaint sales documents if there has been a fault with any goods that

    have been delivered, or with any services rendered, by your company.

    For example, you create complaint sales documents if customers have been billed

    incorrectly for an item or service, or if goods are faulty.

    Different types of complaint sales document include

    • returns

    • credit memo requests

    • debit memo requests

    You create a returns document if a customer returns goods they have purchased from

    you because they are not satisfied with them. You can create returns from scratch or you can

    create them by copying the sales order that was originally created for the returned delivery.

    A returns document records that you expect stock to be returned to your warehouse.

    You can create one or more credit memo requests if a customer has been overcharged

    for a quantity of goods or services. You can also create a credit memo request if goods were

    damaged during transit and you want to credit the customer for the goods damaged.

    When you create a credit memo request, your Accounting department reviews it to

    confirm that it can be justified. If the credit memo request is approved, the Accounting department

    creates a credit memo based on the request. You can create credit memo requests by copying other

    sales documents such as the sales order where the overcharge occurred.

    You create debit memo requests when customers have been undercharged for products

    or services.Your company’s Accounting department can then create an invoice to bill the

    undercharged customer.

    <b>Debugging User Exits</b>

    1) Identify the main program you want to locate a user exit/debug.

    2) For example, go to SE80 and do a search by program or dev class (SAPMV45A sales order or Dev Class VMOD, most SD user exits are in this dev class). In SE80 if you go by program, most user exit programs end in a 'Z' on a rare occasion 'X' or 'Y'.

    3) If you are looking at including MV45AFZZ, you can see where there are different forms. These forms will get called at times within the program. If you are looking to fill the storage location on the sales order, you will probably want to take a look at the perform that fills in a field in vbap.

    4) If this is what you are trying to accomplish, you will need to do the select against the config Table TVKOL based on the shipping point/plant and possibly storage condition based on your picking strategies.

    5) For the debug part, you can do the same as in the enhancements/modifications but you will not need to activate any projects.



    <b>*reward for useful answers*</b>

    Add comment
    10|10000 characters needed characters exceeded