Wednesday, 27 September 2017

Configure Quota Arrangement in SAP MM

Quota Arrangement:


As we know about source list, as well as source list, we can use quota arrangement.

We know source list is used for a source for a material. In purchase requisition there is a tab Assign Source of Supply.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

We can assign a number of vendors in source list so that when we press Assign Source of Supply, system will automatic pick the vendor for the material.

We can assign many vendors to source list, at that time system will propose all vendor in source of supply field and we have to choose one from the list.

But via quota arrangement, we can give the quantity and percentage for a vendor, so if we maintain many vendors in source list, system will take the correct vendor with comparison of quantity of document and quota arrangement.

That is the main facility of quota arrangement..

To use quota arrangement, we have to do some configuration, we have to maintain the quota arrangement, then we can see the result.


Configuration


In this part, we will configure all things which is required for quota arrangement.


Define Number Ranges


Go to OMEP or path SPRO-IMG-Materials Management-Purchasing-Quota Arrangement-Define Number Ranges

The initial screen will appear.

Click on the Intervals

Enter your number range.. You can set the number range as external or internal (Its depend on your business process).

Then Save you data.


Define Quota Arrangement Usage


In this part, we will configure the quota arrangement uses.

Go to SPRO-IMG-Materials Management-Purchasing-Quota Arrangement-Define Quota Arrangement Usage

The initial screen will be appear.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

You can see in My system 1,2,3,4 is already created. Now I am going to create Quota arr. Usage 5.

Click on New Entries

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

As you can see I have selected only Purchase Requisition but you can select these option as per your business requirement.

Then save your data.

Now we have to give assign quota arrangement uses to material master.

Go to MM02, enter your material, select plant and in purchasing tab give the newly created Quota arrangement uses number.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Save your data.

Create Info record


Now suppose we have 3 vendors KKNN001, KKNN002, KKNN003, they will supply the material. and we have to use in quota arrangement as per quantity basis for these vendors.

So we have created Info record for each vendor with regards to material.

Create 3 valid info records for Each vendor.


Create Quota Arrangement


Go to MEQ1

The initial screen will be appear.

Give the Material and Plant and then press enter.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

You can see the above screen. Enter the valid to date, (Valid from date will be automatically set as current date of quota arrangement create date)

In the option Minimum qty split, Its specify for the splitting quota (for more help, you can press F1 on this option). You can choose as per your business process…

Now press enter.

After pressing enter, You can see the date from is appeared as current date.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Then you can choose Item or you can double click on the line item.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

You can see the initial screen will be appeared for quota arrangement creation.

Here we can found many options for quota uses. We have to choose as per our business process.

To know about every field, you can select the field and press F1 for a help topic for the field.

I have used Maximum Quantity for quota arrangement selection.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

I have set the quota arrangement like this

If I use below 20 quantity in PR, then the source of supply will be the vendor KKNN003.

From 21-50 quantity in PR, it will pick the source of supply KKNN002.

From 51-100 quantity in PR, it will pick the source of supply KKNN001.

You can see I have given quota = 3 for vendor KKNN003 and quantity 20 and its percentage shows 50.0, it means When I use below or equal 20, then system will propose the vendor KKNN003.

Now we will check the uses for quota in Purchase Requisition.

I have created a PR with quantity 15..

When I have pressed the Assign Source of Supply, system has proposed me the vendor KKN003.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

You can see my default vendor is came into source of supply field.

Now I have changed the quantity 25..

System will shows me a warning message

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

That means system wants to propose me that as per quota arrangement entry, your prior vendor will be KKNN002.

Now when I press Assign Source of Supply, System will change the source of supply to KKNN002.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Now I have changed the quantity to 90..

System will propose me the vendor KKNN001.

And when I press the Assign Source of Supply, system will change the vendor to KKNN01 in field source of supply.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Now I have changed the quantity 110, as we can see in that position our quantity is exceed against quota arrangement setup.

Now we can see system will propose the all vendors which is can be used as source of supply not only the quota arrangement setup.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Here we can see, system is not proposing me only the vendor which is under quota arrangement, system will propose me all vendor which can a source for this material, and also system will gives us a warning message “Choose a source of supply”

Now we can choose a source as per our requirement.

Just click on the blank option which is left on the vendor number.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

After pressing this, you can see a green indicator on the vendor.

Now press Assigned Source..

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

You can see the source of supply is raised as per our selection…..


How to Remove a vendor from QA List


Now suppose you have ordered some quantity to the 3 vendors.

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

As you can see I have placed order for all vendor..

Now Vendor KKNN002 inform us that he can’t deliver the material any more. So source of supply should not be vendor KKNN002.

But if we order the material for qty 5 to 10, then it will shows the vendor KKNN002 as source of supply.

In that position, we can;t delete the vendor from quota arrangement, because we have already placed some order.

We have to just remove the quota from vendor KKNN002, so that it will not display on source of supply..

And suppose vendor KKNN003 will delivered the rest of quantity of vendor KKNN002.

Then we can increase the maximum quantity to 30. So that when we placed order for quantity 1 to 15, it will always take the vendor KKNN003 as source of supply.

It will be looks like that

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Or if you don’t want to change the quota sequence, then you can also change the maximum quantity.

Then it will be like this

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Just change the maximum quantity as same as allocated quantity, then the vendor will not able to use in source of supply..

If you want that the vendor KKNN001 will supply the rest of quantity of vendor KKNN002, in that case, you can increase the maximum quantity of KKNN001 as 110.

How to Add a Vendor in QA List


Now suppose vendor KKNN004 wants to deliver the material, and you have to add the vendor KKNN004 in quota arrangement list, so that the vendor will com automatically in source of supply.

Suppose vendor KKNN004 inform you that he can borrow the order of maximum quantity 7.

But the vendor has already supplied the material with quantity of 5. In that situation, you have to entered the quantity 5 in Quota Base Qty, so in quota calculation, then vendor will prior for just quantity 2.

Then you can add the vendor in existing QA list.

It will be looks like

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

In this situation, Vendor KKNN004 will be sourced for only quantity (7-5)= 2 quantity.

If you have placed order below than 2 quantity, then the source will be vendor KKNN004 and over 2 it will goes to vendor KKNN003.


Vendor Selection With Same Quota


If you vendor content the same quota in QA, then the source list will picked as per maximum quantity..

But in that scenario, you have to maintain the sequence for maximum quantity…

SAP Guides, SAP Module, SAP MM Module, SAP Tutorial, Material and Certification, SAP Learning, SAP Live Access

Here you can see my maximum quantity is 50 for vendor KKNN001 and 500 for vendor KKNN002. Both vendor has same quota.

When I order below 50 quantity, system will propose the vendor KKNN001 and when I order more than 50, then system will propose the vendor KKNN002 as source of supply.

In that way, we can configure quota arrangement in our system…

Sunday, 24 September 2017

ABAP Group Operations in Internal Tables

SAP ABAP Tutorials and Materials, SAP ABAP Live, SAP Learning, SAP ABAP Certifications

First, let’s get familiar with our context. We will read the table T001K, where BWKEY (valuation area) is the table key, but BUKRS (company code) is repeated multiple times in various lines. Let’s start off by reading this table.

SELECT * INTO TABLE @DATA(gt_t001k) FROM t001k ORDER BY bukrs.

So far so good. Now, our goal is to build a list of unique BUKRS values. Using classical ABAP, this is possible via the COLLECT command.

TYPES:
  BEGIN OF t_bukrs,
    bukrs TYPE bukrs,
  END OF t_bukrs,

  tt_bukrs TYPE STANDARD TABLE OF t_bukrs WITH DEFAULT KEY.

DATA:
  gs_bukrs TYPE t_bukrs,
  gt_bukrs TYPE tt_bukrs.

LOOP AT gt_t001k ASSIGNING FIELD-SYMBOL(<gs_t001k>).
  gs_bukrs-bukrs = <gs_t001k>-bukrs.
  COLLECT gs_bukrs INTO gt_bukrs.
ENDLOOP.

If we move forward to ABAP 7.40, we can achieve the same result with a better approach:

DATA(gt_bukrs) = CORRESPONDING tt_bukrs( gt_t001k ).
SORT gt_bukrs BY bukrs.
DELETE ADJACENT DUPLICATES FROM gt_bukrs COMPARING bukrs.

However, we can reduce the code even more by using the group command.

DATA(gt_bukrs) = VALUE tt_bukrs(
  FOR GROUPS gr1 OF gs_t001k
  IN gt_t001k
  GROUP BY gs_t001k-bukrs (
    bukrs = gr1
) ).

Cool eh? Just one line of code, and you are there!

Things get cooler when you want to do operations by grouping the data in an internal table. For example; you want to write the BWKEY’s corresponding to each BUKRS. Without grouping, you would first build GT_BUKRS, and then write two nested LOOPs to achieve that.

LOOP AT gt_bukrs ASSIGNING FIELD-SYMBOL(<gs_bukrs>).

  NEW-LINE.
  WRITE AT 1(5) 'Group'.
  WRITE AT 7(20) <gs_bukrs>-bukrs.

  LOOP AT gt_t001k
    ASSIGNING FIELD-SYMBOL(<gs_t001k>)
    WHERE bukrs EQ <gs_bukrs>-bukrs.

    NEW-LINE.
    WRITE <gs_t001k>-bwkey.

  ENDLOOP.

ENDLOOP.

However; using the grouping option, you don’t even need to build GT_BUKRS. You can achieve the same goal by using GT_T001K alone.

LOOP AT gt_t001k
  INTO DATA(gs_line)
  GROUP BY ( gr_bukrs = gs_line-bukrs )
  ASCENDING
  ASSIGNING FIELD-SYMBOL(<gs_bukrs>).

  NEW-LINE.
  WRITE AT 1(5) 'Group'.
  WRITE AT 7(20) <gs_bukrs>-gr_bukrs.

  LOOP AT GROUP <gs_bukrs> ASSIGNING FIELD-SYMBOL(<gs_sub>).
    NEW-LINE.
    WRITE: <gs_sub>-bwkey.
  ENDLOOP.

ENDLOOP.

And voila! This technique can be used for multi level grouping as well. Check the following code sample:

SELECT
    ekko~ebeln,
    ekpo~ebelp, ekpo~matnr,
    eket~etenr, eket~eindt, eket~menge
  INTO TABLE @DATA(gt_all)
  FROM
    ekko
    INNER JOIN ekpo ON ekpo~ebeln EQ ekko~ebeln
    INNER JOIN eket ON
      eket~ebeln EQ ekko~ebeln AND
      eket~ebelp EQ ekpo~ebelp
  WHERE
    ekko~ebeln EQ '5500000026' OR
    ekko~ebeln EQ '5500000027'.

LOOP AT gt_all
  INTO DATA(gs_1)
  GROUP BY ( ebeln = gs_1-ebeln
             ebelp = gs_1-ebelp
           )
  ASCENDING
  ASSIGNING FIELD-SYMBOL(<gs_all>).

  NEW-LINE.
  WRITE:
    'Outer loop for ',
    <gs_all>-ebeln,
    <gs_all>-ebelp.

  LOOP AT GROUP <gs_all>
    INTO DATA(gs_2)
    GROUP BY ( ebeln = <gs_all>-ebeln )
    ASCENDING
    ASSIGNING FIELD-SYMBOL(<gs_sub>).

    NEW-LINE.
    WRITE:
      'Inner loop for ',
      <gs_sub>-ebeln.

  ENDLOOP.
ENDLOOP.

GROUP command has many further applications in internal table operations, which I might write in more detail someday. You can check Google or ABAP help for further use.

Friday, 22 September 2017

Wonders in ABAP Editor SE38

I was wondering in ABAP editor se38.

See the below screen shots..

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

From the above screen shots the  program name’s are different while checking it is not throwing any syntax error.

As well As i didn’t pass any report name like below screen shots, but it did not throw any syntax error.

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

I gave the following report name which i already created ZRTEST_REP_KEY1 then i want find the program using the where used list it throws the below error screen shot.

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

Using SUBMIT key i submitted that report into my report. Then i clicked the where used list it does display like the below screen shot.

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

And also i created one subroutine which met all the above first three screen shots behavior.

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

As well as i created  one more include program it is also met the same.

SAP ABAP Tutorial and Material, SAP Certifications, SAP Guides, SAP Learning, SAP SE38, SAP Module, SAP All Modules

What ever it may be the ABAP editor will not consider any thing on report first it will search the program has the key word report or program if not it will leave the syntax error otherwise it will read the program from the repository through the program attributes.

Thursday, 21 September 2017

How to attach a Document in SE38

Downhere is the step by step info on how to attach a Technical Specification or User Training Document or any other Information Document in SE38.

Launch the  T Code SE61.

Create a Word Document using the Create Button.

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

We can copy paste the Technical Specification or User Training Document or any Technical Info Document

(Or)

We can start maintaining this Document with all the necessary Technical Info right from the day one  and keep updating it as and when required

(Or)

We can even attach for ex Technical Specification  here using INSERT OBJECT.

I prefer this way as it is much easier way to attach the latest document whenever required, replacing the older one and getting it transported to Q and P

For our ex, I had attached the updated Technical Document as shown below :-

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

Save these changes to a Transport Request.

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

After saving it to a TR,you can go back to SE61 and click on DISPLAY to view the attachment Document.

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

Now,let’s see how to attach this ZTECHNICAL SPEC into the Documentation of SE38.

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

Click on Change

Click on Goto >> Change Editor

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

<DS:WORD.ZTECHNICALSPEC>Click here to view the Technical Spec</>

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

Now,click on DISPLAY to view the Documentation attached in the Text Editor.

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

SAP ABAP Tutorials and Materials, SAP ABAP Certification, SAP Guides, SAP Learning, SAP SE38, SAP Live Access

Now we can view the attached Tech Spec by clicking on it.

Wednesday, 20 September 2017

Interoperability between SAP Lumira 2.0 Discovery and SAP Lumira 2.0 Designer

With SAP Lumira 2.0, comes the convergence of SAP Lumira and SAP Design Studio. Hence forward, we call SAP Lumira as SAP Lumira Discovery and SAP Design Studio as SAP Lumira Designer.

How the fusion of both the tool works? Here comes the concept of Interoperability. Interoperability between Discovery and Designer. You build storyboards with SAP Lumira Discovery and to make them more professionalized we consume the same storyboards in SAP Lumira Designer.

So let’s get started.


Create Storyboards in Lumira 2.0 Discovery


We can create stories in Lumira Discovery using data from different sources:

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

You can connect to SAP BW and HANA Live connections or import data from them and use that to create your story.

Also, you can use SAP Universes, Microsoft Excel and Query with SQL as your data source.

In the home page of SAP Lumira, there are some sample documents to start with.

Let’s use one of them to create our story.

1. In the Lumira Discovery home page, under Samples Document select a tile:

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

2. Navigate to Page-04 and click on the Tag cloud chart for Team Review. Select Ranking from the list of options on the right.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

3. Select Top 10 and click on OK.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

Chart data now shows top 10 team member’s name:

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

4. Once we are done with the modification, we will click on Save icon at the top and do Save As.

5. Let’s save the document locally. Enter some name and description and click on Save.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

Now we are done with creating story in Lumira Discovery. Next we will see how we can consume the same story in Lumira Designer.

Consume the story board of Lumira Discovery in Lumira Designer


1. Launch Lumira Deisgner in SAP BusinessObjects Lumira Documents mode. You can change the mode of startup by navigating to Tools a Preferences and select the option from Preferred Startup Mode:

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

2. You can either work in online mode by entering Web Service URL and BIP credentials or work in offline mode by clicking the button “Work Offline”

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

3. Close the Welcome screen. In the Documents pane, you can see the list of both local and BIP .lumx documents.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

4. Since we have saved the Lumira Discovery story board locally, we can see it under the list of Local Documents. In case you have saved your story in BIP, you can invoke context menu on the BI Platform Documents node and select Download Documents… Browse for the created document.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

5. Let’s open the saved story. In case you are unable to view the locally saved document under the list of Local Documents, invoke context menu on Local Documents node and select Refresh.

Expand the node for the document and you can see a Story inside it. Double click on it to open.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

6. Now you can start modifying your story in Lumira Designer and make it more interactive using the available script APIs.

Observe the below points:

Stories from Lumira discovery are considered as Composites in Lumira Designer.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

Select Story-01 in the outline pane and observe its properties. It shows that it was last edited with Lumira Discovery.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

You cannot execute a story. Story should be added to an application to execute them.

7. In the Designer, navigate to Page-03 and select the geomap to display its additional properties. For LAYER_1, change the layer type to Bubble charts.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

8. Save the story. A warning message displays as below: You will not be able to edit the story in Lumira Discovery anymore.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

Click on Save button.

Now we are done with the necessary modifications in Lumira Designer and want to add some more pages to the story in Lumira Discovery.

Open the modified story in Lumira Discovery


1. Launch Lumira Discovery and in the home page, under local documents, the recently modified story should be listed. Click on it to open

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

2. Warning message appears. Few stories in the document are read only.

SAP Lumira, SAP Certification, SAP Guides, SAP Module, SAP Learning, SAP Lumira 2.0, SAP Tutorial and Material

3. Observe the below points:
  • We cannot change the chart types anymore in Discovery.
  • Few options like applying filter, creating conditional fomatting, rankings, formula, etc. are still possible.
  • No new component addition to the original story.
  • Cannot delete any component of the original story.
  • We can create another story and add new data set.